From 7b20f17d1687b5d335bf2a1bccdcda096b08873e Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sat, 12 Aug 2023 10:15:04 +0200 Subject: [PATCH 01/12] Check compressed size (#698) * Check compressed size * Test update of jquery * Check lib files * Revert "Test update of jquery" This reverts commit 8e2d55614fee87419a8876b040946d6d4afcbc23. * Add size workflow * Change 'on' attribute --- .github/workflows/size.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/size.yml diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml new file mode 100644 index 00000000..fd627574 --- /dev/null +++ b/.github/workflows/size.yml @@ -0,0 +1,23 @@ +name: Compressed Size +on: [pull_request] + +jobs: + runner-job: + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install pnpm + run: npm install -g pnpm + - name: Install packages + run: pnpm install + - name: Check compressed size + uses: preactjs/compressed-size-action@v2 + with: + build-script: "production" + pattern: "./lib/**/*.js" From 6c36c96d0502e1e8e0d59a539c0f5af0584298e7 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sat, 12 Aug 2023 10:16:46 +0200 Subject: [PATCH 02/12] Remove ie11 from docs (#728) --- README.md | 2 +- docs/_entries/03_features.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 458de35c..31a27809 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ JqTree is a tree widget. Read more in the [documentation](https://mbraak.github. - Create a tree from JSON data - Drag and drop -- Works on ie11+, firefox, chrome and safari +- Works on all modern browsers - Written in Typescript The project is hosted on [github](https://github.com/mbraak/jqTree), has a [test suite](http://mbraak.github.io/jqTree/test/test.html). diff --git a/docs/_entries/03_features.md b/docs/_entries/03_features.md index 398c1589..f5e04963 100644 --- a/docs/_entries/03_features.md +++ b/docs/_entries/03_features.md @@ -9,7 +9,7 @@ name: features - Saves the state - Keyboard support - Lazy loading -- Works on ie11+, firefox, chrome and safari +- Works on all modern browsers - Written in Typescript The project is [hosted on github](https://github.com/mbraak/jqTree). From b4ff4a249b3cbd64758c86e00b85a83c7cb44f74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Aug 2023 10:22:32 +0200 Subject: [PATCH 03/12] Bump commonmarker from 0.23.9 to 0.23.10 in /docs (#730) Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10. - [Release notes](https://github.com/gjtorikian/commonmarker/releases) - [Changelog](https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md) - [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10) --- updated-dependencies: - dependency-name: commonmarker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 61746f60..75dee868 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -13,7 +13,7 @@ GEM execjs coffee-script-source (1.11.1) colorator (1.1.0) - commonmarker (0.23.9) + commonmarker (0.23.10) concurrent-ruby (1.2.2) dnsruby (1.61.9) simpleidn (~> 0.1) From b23bdf874ca020f1188c2147e6885a5db2950368 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sat, 12 Aug 2023 13:49:08 +0200 Subject: [PATCH 04/12] Ruby 1.7 (#731) --- docs/Gemfile.lock | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 75dee868..2978d7b0 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,12 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.0.4.3) + activesupport (6.1.7.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.1) + zeitwerk (~> 2.3) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) coffee-script (2.4.1) coffee-script-source @@ -15,8 +16,8 @@ GEM colorator (1.1.0) commonmarker (0.23.10) concurrent-ruby (1.2.2) - dnsruby (1.61.9) - simpleidn (~> 0.1) + dnsruby (1.70.0) + simpleidn (~> 0.2.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -24,7 +25,7 @@ GEM ffi (>= 1.15.0) eventmachine (1.2.7) execjs (2.8.1) - faraday (2.7.4) + faraday (2.7.10) faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) @@ -86,7 +87,7 @@ GEM activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.8.0) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) jekyll (3.9.3) addressable (~> 2.4) @@ -205,13 +206,13 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.8.1) + mini_portile2 (2.8.4) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.18.0) - nokogiri (1.14.3) + minitest (5.19.0) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) octokit (4.25.1) @@ -220,11 +221,11 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.7) - racc (1.6.2) + racc (1.7.1) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.5) + rexml (3.2.6) rouge (3.26.0) ruby2_keywords (0.0.5) rubyzip (2.3.2) @@ -249,6 +250,7 @@ GEM unf_ext unf_ext (0.0.8.2) unicode-display_width (1.8.0) + zeitwerk (2.6.11) PLATFORMS ruby @@ -257,4 +259,4 @@ DEPENDENCIES github-pages BUNDLED WITH - 2.1.4 + 1.17.2 From e66e7935d0e1788268d54330af3755258305f62f Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sat, 12 Aug 2023 13:59:39 +0200 Subject: [PATCH 05/12] Document icon button options (#732) * Improve types for button options * Add test * Add test * Update docs * Changelog * Add issue number to changelog * Styling --- docs/_entries/10_changelog.md | 4 ++ docs/_entries/16_closedicon.md | 20 ++++++++-- docs/_entries/31_openedicon.md | 20 ++++++++-- src/elementsRenderer.ts | 34 ++++++++-------- src/jqtreeOptions.ts | 4 +- src/test/jqTree/options.test.ts | 69 +++++++++++++++++++++++++++++---- src/tree.jquery.d.ts | 20 +++++----- 7 files changed, 128 insertions(+), 43 deletions(-) diff --git a/docs/_entries/10_changelog.md b/docs/_entries/10_changelog.md index a872975e..1fd792d2 100644 --- a/docs/_entries/10_changelog.md +++ b/docs/_entries/10_changelog.md @@ -3,6 +3,10 @@ title: Changelog name: changelog --- +#### Development + +- Issue #732: improve types of closedIcon and openedIcon + #### 1.7.1 (august 6 2023) - Issue #724: improve accessibility diff --git a/docs/_entries/16_closedicon.md b/docs/_entries/16_closedicon.md index 668abbdb..e419262b 100644 --- a/docs/_entries/16_closedicon.md +++ b/docs/_entries/16_closedicon.md @@ -5,8 +5,22 @@ name: options-closedicon A character or symbol to display on closed nodes. The default is '&#x25ba;' (►) +The value can be a: + +- **string**. E.g. a unicode character or a text. + - The text is escaped. +- **html element**. E.g. for an icon +- **JQuery element**. Also for an icon + {% highlight js %} -$('#tree1').tree({ - closedIcon: '+' -}); +// String +$('#tree1').tree({ closedIcon: '+' }); + +// Html element +const icon = document.createElement("span"); +icon.className = "icon test"; +$('#tree1').tree({ closedIcon: icon }); + +// JQuery element +$('#tree1').tree({ closedIcon: $('') }); {% endhighlight %} diff --git a/docs/_entries/31_openedicon.md b/docs/_entries/31_openedicon.md index f3e8c7a9..73b76479 100644 --- a/docs/_entries/31_openedicon.md +++ b/docs/_entries/31_openedicon.md @@ -5,8 +5,22 @@ name: options-openedicon A character or symbol to display on opened nodes. The default is '&#x25bc;' (▼) +The value can be a: + +- **string**. E.g. a unicode character or a text. + - The text is escaped. +- **html element**. E.g. for an icon +- **JQuery element**. Also for an icon + {% highlight js %} -$('#tree1').tree({ - openedIcon: '-' -}); +// String +$('#tree1').tree({ openedIcon: '-' }); + +// Html element +const icon = document.createElement("span"); +icon.className = "icon test"; +$('#tree1').tree({ openedIcon: icon }); + +// JQuery element +$('#tree1').tree({ openedIcon: $('') }); {% endhighlight %} diff --git a/src/elementsRenderer.ts b/src/elementsRenderer.ts index aaef91b3..cf390843 100644 --- a/src/elementsRenderer.ts +++ b/src/elementsRenderer.ts @@ -2,21 +2,21 @@ import { getBoolString } from "./util"; import { Node } from "./node"; import { JqTreeWidget } from "./tree.jquery"; -type IconElement = Text | Element; +type IconElement = string | HTMLElement | JQuery; export default class ElementsRenderer { - public openedIconElement?: IconElement; - public closedIconElement?: IconElement; + public openedIconElement?: HTMLElement | Text; + public closedIconElement?: HTMLElement | Text; private treeWidget: JqTreeWidget; constructor(treeWidget: JqTreeWidget) { this.treeWidget = treeWidget; this.openedIconElement = this.createButtonElement( - treeWidget.options.openedIcon || "+" + treeWidget.options.openedIcon || "+", ); this.closedIconElement = this.createButtonElement( - treeWidget.options.closedIcon || "-" + treeWidget.options.closedIcon || "-", ); } @@ -37,7 +37,7 @@ export default class ElementsRenderer { $element[0], this.treeWidget.tree.children, true, - 1 + 1, ); } } @@ -62,7 +62,7 @@ export default class ElementsRenderer { li, node.children, false, - node.getLevel() + 1 + node.getLevel() + 1, ); } } @@ -71,7 +71,7 @@ export default class ElementsRenderer { element: Element, children: Node[], isRootNode: boolean, - level: number + level: number, ): void { const ul = this.createUl(isRootNode); element.appendChild(ul); @@ -123,7 +123,7 @@ export default class ElementsRenderer { private createLi(node: Node, level: number): HTMLLIElement { const isSelected = Boolean( - this.treeWidget.selectNodeHandler.isNodeSelected(node) + this.treeWidget.selectNodeHandler.isNodeSelected(node), ); const mustShowFolder = @@ -145,7 +145,7 @@ export default class ElementsRenderer { element: HTMLElement, name: string, level: number, - isSelected: boolean + isSelected: boolean, ) { element.setAttribute("aria-label", name); element.setAttribute("aria-level", `${level}`); @@ -156,7 +156,7 @@ export default class ElementsRenderer { private createFolderLi( node: Node, level: number, - isSelected: boolean + isSelected: boolean, ): HTMLLIElement { const buttonClasses = this.getButtonClasses(node); const folderClasses = this.getFolderClasses(node, isSelected); @@ -194,7 +194,7 @@ export default class ElementsRenderer { node.name, isSelected, true, - level + level, ); titleSpan.setAttribute("aria-expanded", getBoolString(node.is_open)); div.appendChild(titleSpan); @@ -209,7 +209,7 @@ export default class ElementsRenderer { private createNodeLi( node: Node, level: number, - isSelected: boolean + isSelected: boolean, ): HTMLLIElement { const liClasses = ["jqtree_common"]; @@ -236,7 +236,7 @@ export default class ElementsRenderer { node.name, isSelected, false, - level + level, ); div.appendChild(titleSpan); @@ -247,7 +247,7 @@ export default class ElementsRenderer { nodeName: string, isSelected: boolean, isFolder: boolean, - level: number + level: number, ): HTMLSpanElement { const titleSpan = document.createElement("span"); @@ -317,8 +317,8 @@ export default class ElementsRenderer { } private createButtonElement( - value: string | Element - ): IconElement | undefined { + value: IconElement, + ): HTMLElement | Text | undefined { if (typeof value === "string") { // convert value to html const div = document.createElement("div"); diff --git a/src/jqtreeOptions.ts b/src/jqtreeOptions.ts index dd8f7f5f..78456e8e 100644 --- a/src/jqtreeOptions.ts +++ b/src/jqtreeOptions.ts @@ -21,7 +21,7 @@ export interface JQTreeOptions { autoEscape: boolean; autoOpen: boolean | number; buttonLeft: boolean; - closedIcon: string | Element | undefined; + closedIcon?: string | HTMLElement | JQuery; data: NodeData[] | undefined; dataFilter: DataFilter | undefined; dataUrl: DataUrl | undefined; @@ -39,7 +39,7 @@ export interface JQTreeOptions { onLoadFailed: ((response: JQuery.jqXHR) => void) | undefined; onLoading: HandleLoadingMethod | undefined; onSetStateFromStorage: ((data: string) => void) | undefined; - openedIcon: string | Element; + openedIcon?: string | HTMLElement | JQuery; openFolderDelay: number | false; rtl: boolean | undefined; selectable: boolean; diff --git a/src/test/jqTree/options.test.ts b/src/test/jqTree/options.test.ts index c06f1c98..55d67bc4 100644 --- a/src/test/jqTree/options.test.ts +++ b/src/test/jqTree/options.test.ts @@ -164,6 +164,56 @@ describe("autoOpen", () => { }); }); +describe("closedIcon", () => { + it("renders a string", () => { + const $tree = $("#tree1"); + $tree.tree({ + closedIcon: "closed", + data: exampleData, + }); + + const $button = $tree.find("a.jqtree-toggler:first"); + expect($button.text()).toBe("closed"); + }); + + it("escapes html", () => { + const $tree = $("#tree1"); + $tree.tree({ + closedIcon: "test", + data: exampleData, + }); + + const $button = $tree.find("a.jqtree-toggler:first"); + expect($button.text()).toBe("test"); + }); + + it("renders a jquery element", () => { + const $tree = $("#tree1"); + $tree.tree({ + closedIcon: $("test"), + data: exampleData, + }); + + const $span = $tree.find("a.jqtree-toggler:first span.abc"); + expect($span.text()).toBe("test"); + }); + + it("renders a html element", () => { + const closedIcon = document.createElement("span"); + closedIcon.className = "abc"; + closedIcon.textContent = "test"; + + const $tree = $("#tree1"); + $tree.tree({ + closedIcon, + data: exampleData, + }); + + const $span = $tree.find("a.jqtree-toggler:first span.abc"); + expect($span.text()).toBe("test"); + }); +}); + describe("dataUrl", () => { const exampleStructure = [ expect.objectContaining({ name: "node1" }), @@ -201,7 +251,7 @@ describe("dataUrl", () => { const data = nodeName ? [nodeName] : exampleData; return response(ctx.status(200), ctx.json(data)); - }) + }), ); }); @@ -323,7 +373,7 @@ describe("onGetStateFromStorage and onSetStateFromStorage", () => { JSON.stringify({ open_nodes: [123], selected_node: [123], - }) + }), ); it("restores the state", () => { @@ -351,8 +401,11 @@ describe("onLoadFailed", () => { beforeEach(() => { server.use( rest.get("/tree/", (_request, response, ctx) => - response(ctx.status(500), ctx.body("Internal server error")) - ) + response( + ctx.status(500), + ctx.body("Internal server error"), + ), + ), ); }); @@ -366,7 +419,7 @@ describe("onLoadFailed", () => { await waitFor(() => { expect(onLoadFailed).toHaveBeenCalledWith( - expect.objectContaining({ status: 500 }) + expect.objectContaining({ status: 500 }), ); }); }); @@ -432,7 +485,7 @@ describe("saveState", () => { it("saves the state to local storage", () => { expect(localStorage.getItem("tree")).toBe( - '{"open_nodes":[123],"selected_node":[123]}' + '{"open_nodes":[123],"selected_node":[123]}', ); }); }); @@ -442,7 +495,7 @@ describe("saveState", () => { it("uses the string as a key", () => { expect(localStorage.getItem("my-state")).toBe( - '{"open_nodes":[123],"selected_node":[123]}' + '{"open_nodes":[123],"selected_node":[123]}', ); }); }); @@ -462,7 +515,7 @@ describe("saveState", () => { beforeEach(() => { localStorage.setItem( "tree", - '{"open_nodes":[123],"selected_node":[123]}' + '{"open_nodes":[123],"selected_node":[123]}', ); given.$tree.tree({ diff --git a/src/tree.jquery.d.ts b/src/tree.jquery.d.ts index 3035e05e..19c70333 100644 --- a/src/tree.jquery.d.ts +++ b/src/tree.jquery.d.ts @@ -44,7 +44,7 @@ interface IJQTreeOptions { autoEscape?: boolean; autoOpen?: boolean | number | string; buttonLeft?: boolean; - closedIcon?: string | Element; + closedIcon?: string | HTMLElement | JQuery; data?: NodeData[]; dataFilter?: (data: NodeData[]) => NodeData[]; dataUrl?: DataUrl; @@ -61,7 +61,7 @@ interface IJQTreeOptions { onLoading?: (isLoading: boolean, node: INode, $el: JQuery) => void; onGetStateFromStorage?: () => string; onSetStateFromStorage?: (data: string) => void; - openedIcon?: string | Element; + openedIcon?: string | HTMLElement | JQuery; openFolderDelay?: number | false; rtl?: boolean; selectable?: boolean; @@ -79,17 +79,17 @@ interface IJQTreePlugin { ( behavior: "addNodeAfter", newNodeInfo: NodeData, - existingNode: INode + existingNode: INode, ): INode | null; ( behavior: "addNodeBefore", newNodeInfo: NodeData, - existingNode: INode + existingNode: INode, ): INode | null; ( behavior: "addParentNode", newNodeInfo: NodeData, - existingNode: INode + existingNode: INode, ): INode | null; (behavior: "addToSelection", node: INode, mustSetFocus?: boolean): JQuery; (behavior: "appendNode", newNodeInfo: NodeData, parentNode?: INode): INode; @@ -97,7 +97,7 @@ interface IJQTreePlugin { (behavior: "destroy"): void; ( behavior: "getNodeByCallback", - callback: (node: INode) => boolean + callback: (node: INode) => boolean, ): INode | null; (behavior: "getNodeByHtmlElement", element: Element | JQuery): INode | null; (behavior: "getNodeById", id: NodeId): INode | null; @@ -116,14 +116,14 @@ interface IJQTreePlugin { behavior: "loadDataFromUrl", param1?: string | null | INode, param2?: INode | null | (() => void), - param3?: () => void + param3?: () => void, ): JQuery; (behavior: "moveDown"): JQuery; ( behavior: "moveNode", node: INode, targetNode: INode, - position: string + position: string, ): JQuery; (behavior: "moveUp"): JQuery; (behavior: "openNode", node: INode): JQuery; @@ -131,13 +131,13 @@ interface IJQTreePlugin { ( behavior: "openNode", node: INode, - onFinished: (node: INode) => void + onFinished: (node: INode) => void, ): JQuery; ( behavior: "openNode", node: INode, slide: boolean, - onFinished?: (node: INode) => void + onFinished?: (node: INode) => void, ): JQuery; (behavior: "prependNode", newNodeInfo: NodeData, parentNode?: INode): INode; (behavior: "refresh"): JQuery; From c0b897bfee17577b011e87c3bce1ab49a69bade5 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sat, 12 Aug 2023 16:07:28 +0200 Subject: [PATCH 06/12] compressed-size-action: exclude tests (#733) * compressed-size-action: exclude tests * Use curley braces for exclude option --- .github/workflows/size.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index fd627574..bc060cbc 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -21,3 +21,4 @@ jobs: with: build-script: "production" pattern: "./lib/**/*.js" + exclude: "{./lib/**/*.d.js,./lib/playwright/**,./lib/test/**}" From daa50e24d1ce0576fea2836fc916da5b94c914df Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Wed, 6 Sep 2023 09:15:13 +0200 Subject: [PATCH 07/12] Remove coverage artifact (#741) --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee00e304..e8560937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,11 +61,6 @@ jobs: path: src/playwright/playwright.test.ts-snapshots/ - name: Merge coverage run: cp jest-coverage/coverage-final.json .nyc_output/coverage_jsdom.json - - name: Coverage artifact - uses: actions/upload-artifact@v3 - with: - name: coverage - path: .nyc_output - name: Codecov uses: codecov/codecov-action@v3 with: From 800a4c6fbeef2585415cb1f681f144e7086c7d7b Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Wed, 6 Sep 2023 14:12:11 +0200 Subject: [PATCH 08/12] Change bundle in package (#739) * Change bundle in package.json * Build * Set browser entry * Changelog --- docs/_entries/10_changelog.md | 1 + lib/test/jqTree/options.test.js | 41 +++++++++++++++++++++++++++++++++ package.json | 2 +- tree.jquery.debug.js.map | 2 +- tree.jquery.js.map | 2 +- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/docs/_entries/10_changelog.md b/docs/_entries/10_changelog.md index 1fd792d2..559e64c6 100644 --- a/docs/_entries/10_changelog.md +++ b/docs/_entries/10_changelog.md @@ -6,6 +6,7 @@ name: changelog #### Development - Issue #732: improve types of closedIcon and openedIcon +- Issue #736: use the bundle in the package.json #### 1.7.1 (august 6 2023) diff --git a/lib/test/jqTree/options.test.js b/lib/test/jqTree/options.test.js index 5cc86949..6975fdb6 100644 --- a/lib/test/jqTree/options.test.js +++ b/lib/test/jqTree/options.test.js @@ -160,6 +160,47 @@ describe("autoOpen", function () { }); }); }); +describe("closedIcon", function () { + it("renders a string", function () { + var $tree = $("#tree1"); + $tree.tree({ + closedIcon: "closed", + data: _exampleData["default"] + }); + var $button = $tree.find("a.jqtree-toggler:first"); + expect($button.text()).toBe("closed"); + }); + it("escapes html", function () { + var $tree = $("#tree1"); + $tree.tree({ + closedIcon: "test", + data: _exampleData["default"] + }); + var $button = $tree.find("a.jqtree-toggler:first"); + expect($button.text()).toBe("test"); + }); + it("renders a jquery element", function () { + var $tree = $("#tree1"); + $tree.tree({ + closedIcon: $("test"), + data: _exampleData["default"] + }); + var $span = $tree.find("a.jqtree-toggler:first span.abc"); + expect($span.text()).toBe("test"); + }); + it("renders a html element", function () { + var closedIcon = document.createElement("span"); + closedIcon.className = "abc"; + closedIcon.textContent = "test"; + var $tree = $("#tree1"); + $tree.tree({ + closedIcon: closedIcon, + data: _exampleData["default"] + }); + var $span = $tree.find("a.jqtree-toggler:first span.abc"); + expect($span.text()).toBe("test"); + }); +}); describe("dataUrl", function () { var exampleStructure = [expect.objectContaining({ name: "node1" diff --git a/package.json b/package.json index 282dc89e..6de2e2c3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "tree" ], "license": "Apache-2.0", - "main": "./lib/tree.jquery.js", + "browser": "./tree.jquery.js", "types": "./src/tree.jquery.d.ts", "repository": { "type": "git", diff --git a/tree.jquery.debug.js.map b/tree.jquery.debug.js.map index 7e059228..52546eb0 100644 --- a/tree.jquery.debug.js.map +++ b/tree.jquery.debug.js.map @@ -1 +1 @@ -{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = Text | Element;\n\nexport default class ElementsRenderer {\n public openedIconElement?: IconElement;\n public closedIconElement?: IconElement;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\"\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\"\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node)\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: string | Element\n ): IconElement | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,OAAO,GAAG,OAAO;;ECIXC,IAAAA,QAAQ,0BAARA,QAAQ,EAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QA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AK;EAAE;EAClB+P,EAAAA,UAAU,EAAE,IAAI;EAChBjZ,EAAAA,eAAe,EAAE,KAAK;EACtBvG,EAAAA,KAAK,EAAE,IAAI;EAAE;EACb2d,EAAAA,aAAa,EAAE,GAAG;EAAE;EACpBjW,EAAAA,QAAQ,EAAE,CAAC;EACX8V,EAAAA,cAAc,EAAE,IAAA;EACpB,CAAC,CAAA,CAAA;EAwlCLnR,YAAY,CAACP,QAAQ,CAACiN,YAAY,EAAE,MAAM,CAAC;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,OAAO,GAAG,OAAO;;ECIXC,IAAAA,QAAQ,0BAARA,QAAQ,EAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA,CAAA;EAAA,EAAA,OAARA,QAAQ,CAAA;EAAA,CAAA,CAAA,EAAA,CAAA,CAAA;EAOpB,IAAMC,aAAuC,GAAG;IAC5CC,MAAM,EAAEF,QAAQ,CAACG,MAAM;IACvBC,KAAK,EAAEJ,QAAQ,CAACK,KAAK;IACrBC,MAAM,EAAEN,QAAQ,CAACO,MAAM;IACvBC,IAAI,EAAER,QAAQ,CAACS,IAAAA;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a/tree.jquery.js.map +++ b/tree.jquery.js.map @@ -1 +1 @@ -{"version":3,"file":"tree.jquery.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = Text | Element;\n\nexport default class ElementsRenderer {\n public openedIconElement?: IconElement;\n public closedIconElement?: IconElement;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\"\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\"\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node)\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: string | Element\n ): IconElement | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","this","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","removeChildren","_step","_iterator","_createForOfIteratorHelper","s","n","done","node","createNode","addChild","loadFromData","err","e","f","push","setParent","index","splice","doRemoveChild","indexOf","hasChildren","callback","_iterate","level","_step2","_iterator2","child","movedNode","targetNode","isParentOf","addChildAtPosition","getChildIndex","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByCallback","concat","result","iterate","nodeInfo","childIndex","newParent","_step3","originalParent","_iterator3","removeChild","nodeId","get","id","set","_this","_this$tree","removeNodeFromIndex","previousIndex","nextIndex","filter","nextSibling","getNextSibling","getNextNode","is_open","previousSibling","getPreviousSibling","getLastChild","getParent","lastChild","nodeData","_this2","addChildren","childrenData","_step4","_iterator4","initFromData","_this$tree2","addNodeToIndex","_this$tree3","_this$tree4","getNodeClass","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","move","area","findHoveredArea","canMoveToArea","isFolder","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","remove","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolderDelay","openFolderTimer","window","setTimeout","_openNode","slide","clearTimeout","previousParent","doMove","moveNode","empty","_refreshElements","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","nextNode","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","i","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","mustIterateInside","handleFirstNode","handleOpenFolder","handleClosedFolder","handleNode","childrenLength","forEach","_","nextChild","handleAfterOpenFolder","nodeName","offsetX","offsetY","$tree","text","html","css","append","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","getLevel","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","setTreeItemAriaAttributes","textContent","innerHTML","is_loading","createTextNode","DataLoader","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","submitRequest","loadData","parseData","jqXHR","onLoadFailed","isLoading","onLoading","urlInfoInput","handleSuccess","handleError","_ajaxSettings$method","ajaxSettings","_objectSpread","method","cache","dataType","success","error","url","toUpperCase","ajax","dataFilter","parsedData","JSON","parse","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","off","selectNode","getNextVisibleNode","getPreviousVisibleNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","init","fn","argument1","functionName","destroy","removeData","destroyWidget","_len","args","_key","widgetFunction","apply","callFunction","defaults","constructor","deinit","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","mouseCapture","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","mouseDrag","mouseStart","mouseStop","SaveStateHandler","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","jsonData","loadFromStorage","parseState","selectedNodeIds","openNodes","open_nodes","selected_node","getSelectedNodes","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","cbFinished","doSetInitialStateOnDemand","getStateFromStorage","onGetStateFromStorage","getItem","nodeIds","getNodeById","selectCount","addToSelection","removeFromSelection","nodeIdsParam","selectedNodes","loadingCount","newNodesIds","loadAndOpenNode","saveState","_supportsLocalStorage","sessionStorage","removeItem","testSupport","ScrollHandler","isInitialized","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","scrollParentTop","scrollLeft","_$scrollParent$","setDocumentAsScrollParent","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","getParentWithOverflow","tagName","initScrollParent","scrollParent","offsetHeight","refreshHitAreas","dndHandler","handleVerticalScrollingWithScrollParent","handleVerticalScrollingWithDocument","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","has","includeChildren","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","mustSetFocus","getLi","$span","getSpan","trigger","removeAttr","FolderElement","_NodeElement","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","getUl","slideDown","show","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","optionsParam","getData","doLoadData","param1","param2","param3","doLoadDataFromUrl","getNodeByName","getNodeByNameMustExist","getNodesByProperty","_parseParams","_this2$options$slide","parseParams","_parseParams2","_slicedToArray","close","newNodeInfo","existingNode","newNode","addAfter","addBefore","addParent","parentNodeParam","prepend","idIsChanged","subtree","positionIndex","saveStateHandler","select","deselect","nodeOffset","nodeTop","treeOffset","scrollToY","setInitialState","option","keyHandler","eventName","values","event","Event","doOpenNode","_node","_slide","_onFinished","open","loadFolderOnDemand","mustSelect","isSelectedNodeInSubtree","render","selectCurrentNode","getScrollLeft","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","checkScrolling","_this$options$startDn","startDndDelay","getDataUrlInfo","dataUrl","setUrlInfoData","selectedNodeId","getNodeIdToBeSelected","_this5","doInit","setInitialStateOnDemand","_this6","_restoreState2","restoreState","isRestored","autoOpen","maxLevel","getAutoOpenMaxLevel","autoOpenNodes","_this7","parseInt","$target","$li","dataRtl","_this8","deselectCurrentNode","selectOptions","mustToggle","onCanSelectNode","selectable","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","initTree","tree_data","parent_node","getSelectedNodesUnder","urlInfoParam","loadFromUrl","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;q1JAAA,ICIYA,WAAAA,GAAQ,OAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,MAAA,GAAA,QAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,KAAA,GAAA,OAARA,CAAQ,EAAA,CAAA,GAOdC,EAA0C,CAC5CC,OAAQF,EAASG,OACjBC,MAAOJ,EAASK,MAChBC,OAAQN,EAASO,OACjBC,KAAMR,EAASS,MAKNC,EAAkB,SAACC,GAC5B,IAAK,IAAMC,KAAQX,EACf,GAAIY,OAAOC,UAAUC,eAAeC,KAAKf,EAAeW,IAChDX,EAAcW,KAAUD,EACxB,OAAOC,EAKnB,MAAO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uBha,EACvB8O,WAAY,WACZ1E,gBAAiB,IAGjB4F,SAAKhQ,EACLgc,WAAW,EACX0M,YAAY,EACZhY,iBAAiB,EACjBjG,OAAO,EACPsc,cAAe,IACfnV,SAAU,EACV+U,gBAAgB,IAylCxBpQ,EAAaP,SAASkM,EAAc"} \ No newline at end of file +{"version":3,"file":"tree.jquery.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","this","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","removeChildren","_step","_iterator","_createForOfIteratorHelper","s","n","done","node","createNode","addChild","loadFromData","err","e","f","push","setParent","index","splice","doRemoveChild","indexOf","hasChildren","callback","_iterate","level","_step2","_iterator2","child","movedNode","targetNode","isParentOf","addChildAtPosition","getChildIndex","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByCallback","concat","result","iterate","nodeInfo","childIndex","newParent","_step3","originalParent","_iterator3","removeChild","nodeId","get","id","set","_this","_this$tree","removeNodeFromIndex","previousIndex","nextIndex","filter","nextSibling","getNextSibling","getNextNode","is_open","previousSibling","getPreviousSibling","getLastChild","getParent","lastChild","nodeData","_this2","addChildren","childrenData","_step4","_iterator4","initFromData","_this$tree2","addNodeToIndex","_this$tree3","_this$tree4","getNodeClass","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","move","area","findHoveredArea","canMoveToArea","isFolder","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","remove","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolderDelay","openFolderTimer","window","setTimeout","_openNode","slide","clearTimeout","previousParent","doMove","moveNode","empty","_refreshElements","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","nextNode","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","i","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","mustIterateInside","handleFirstNode","handleOpenFolder","handleClosedFolder","handleNode","childrenLength","forEach","_","nextChild","handleAfterOpenFolder","nodeName","offsetX","offsetY","$tree","text","html","css","append","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","getLevel","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","setTreeItemAriaAttributes","textContent","innerHTML","is_loading","createTextNode","DataLoader","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","submitRequest","loadData","parseData","jqXHR","onLoadFailed","isLoading","onLoading","urlInfoInput","handleSuccess","handleError","_ajaxSettings$method","ajaxSettings","_objectSpread","method","cache","dataType","success","error","url","toUpperCase","ajax","dataFilter","parsedData","JSON","parse","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","off","selectNode","getNextVisibleNode","getPreviousVisibleNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","init","fn","argument1","functionName","destroy","removeData","destroyWidget","_len","args","_key","widgetFunction","apply","callFunction","defaults","constructor","deinit","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","mouseCapture","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","mouseDrag","mouseStart","mouseStop","SaveStateHandler","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","jsonData","loadFromStorage","parseState","selectedNodeIds","openNodes","open_nodes","selected_node","getSelectedNodes","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","cbFinished","doSetInitialStateOnDemand","getStateFromStorage","onGetStateFromStorage","getItem","nodeIds","getNodeById","selectCount","addToSelection","removeFromSelection","nodeIdsParam","selectedNodes","loadingCount","newNodesIds","loadAndOpenNode","saveState","_supportsLocalStorage","sessionStorage","removeItem","testSupport","ScrollHandler","isInitialized","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","scrollParentTop","scrollLeft","_$scrollParent$","setDocumentAsScrollParent","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","getParentWithOverflow","tagName","initScrollParent","scrollParent","offsetHeight","refreshHitAreas","dndHandler","handleVerticalScrollingWithScrollParent","handleVerticalScrollingWithDocument","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","has","includeChildren","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","mustSetFocus","getLi","$span","getSpan","trigger","removeAttr","FolderElement","_NodeElement","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","getUl","slideDown","show","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","optionsParam","getData","doLoadData","param1","param2","param3","doLoadDataFromUrl","getNodeByName","getNodeByNameMustExist","getNodesByProperty","_parseParams","_this2$options$slide","parseParams","_parseParams2","_slicedToArray","close","newNodeInfo","existingNode","newNode","addAfter","addBefore","addParent","parentNodeParam","prepend","idIsChanged","subtree","positionIndex","saveStateHandler","select","deselect","nodeOffset","nodeTop","treeOffset","scrollToY","setInitialState","option","keyHandler","eventName","values","event","Event","doOpenNode","_node","_slide","_onFinished","open","loadFolderOnDemand","mustSelect","isSelectedNodeInSubtree","render","selectCurrentNode","getScrollLeft","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","checkScrolling","_this$options$startDn","startDndDelay","getDataUrlInfo","dataUrl","setUrlInfoData","selectedNodeId","getNodeIdToBeSelected","_this5","doInit","setInitialStateOnDemand","_this6","_restoreState2","restoreState","isRestored","autoOpen","maxLevel","getAutoOpenMaxLevel","autoOpenNodes","_this7","parseInt","$target","$li","dataRtl","_this8","deselectCurrentNode","selectOptions","mustToggle","onCanSelectNode","selectable","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","initTree","tree_data","parent_node","getSelectedNodesUnder","urlInfoParam","loadFromUrl","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;q1JAAA,ICIYA,WAAAA,GAAQ,OAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,MAAA,GAAA,QAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,KAAA,GAAA,OAARA,CAAQ,EAAA,CAAA,GAOdC,EAA0C,CAC5CC,OAAQF,EAASG,OACjBC,MAAOJ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N,EACXoH,eAAWhH,EACXuJ,iBAAavJ,EACbyoB,qBAAiBzoB,EACjB6Q,gBAAY7Q,EACZuI,gBAAYvI,EACZ8I,gBAAY9I,EACZob,2BAAuBpb,EACvB6G,oBAAgB7G,EAChBgT,kBAAchT,EACdkT,eAAWlT,EACXga,2BAAuBha,EACvB8O,WAAY,WACZ1E,gBAAiB,IAGjB4F,SAAKhQ,EACLgc,WAAW,EACX0M,YAAY,EACZhY,iBAAiB,EACjBjG,OAAO,EACPsc,cAAe,IACfnV,SAAU,EACV+U,gBAAgB,IAylCxBpQ,EAAaP,SAASkM,EAAc"} \ No newline at end of file From f5f4ddcdd0eba6e26cde03e10938b04570753e92 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sun, 10 Sep 2023 16:09:25 +0200 Subject: [PATCH 09/12] Remove init from examples (#742) --- docs/static/examples/autoescape.js | 32 ++++++------- docs/static/examples/autoscroll.js | 12 ++--- docs/static/examples/button-on-right.js | 10 ++-- docs/static/examples/custom_html.js | 46 +++++++++--------- docs/static/examples/drag-outside.js | 48 +++++++++---------- docs/static/examples/drag_and_drop.js | 10 ++-- docs/static/examples/icon_buttons.js | 8 ++-- docs/static/examples/load_json_data.js | 30 ++++++------ .../examples/load_json_data_from_server.js | 4 +- docs/static/examples/load_on_demand.js | 8 ++-- docs/static/examples/multiple_select.js | 40 ++++++++-------- docs/static/examples/right-to-left.js | 6 +-- docs/static/examples/save_state.js | 6 +-- 13 files changed, 117 insertions(+), 143 deletions(-) diff --git a/docs/static/examples/autoescape.js b/docs/static/examples/autoescape.js index fc6c937b..0d21c488 100644 --- a/docs/static/examples/autoescape.js +++ b/docs/static/examples/autoescape.js @@ -1,19 +1,17 @@ -$(function() { - var data = [ - { - name: "examples", - children: [ - { name: 'Example 1' }, - { name: 'Example 2' }, - 'Example 3' - ] - } - ]; +var data = [ + { + name: "examples", + children: [ + { name: 'Example 1' }, + { name: 'Example 2' }, + 'Example 3' + ] + } +]; - // set autoEscape to false - $("#tree1").tree({ - data: data, - autoEscape: false, - autoOpen: true - }); +// set autoEscape to false +$("#tree1").tree({ + data: data, + autoEscape: false, + autoOpen: true }); diff --git a/docs/static/examples/autoscroll.js b/docs/static/examples/autoscroll.js index 58c8770a..816a3c4b 100644 --- a/docs/static/examples/autoscroll.js +++ b/docs/static/examples/autoscroll.js @@ -1,8 +1,6 @@ -$(function() { - var $tree = $("#tree1"); - $tree.tree({ - data: ExampleData.exampleData, - dragAndDrop: true, - autoOpen: true - }); +var $tree = $("#tree1"); +$tree.tree({ + data: ExampleData.exampleData, + dragAndDrop: true, + autoOpen: true }); diff --git a/docs/static/examples/button-on-right.js b/docs/static/examples/button-on-right.js index 531b8dfc..498a6b6a 100644 --- a/docs/static/examples/button-on-right.js +++ b/docs/static/examples/button-on-right.js @@ -6,10 +6,8 @@ $.mockjax({ responseTime: 0 }); -$(function() { - $("#tree1").tree({ - buttonLeft: false, - autoOpen: 0, - slide: true - }); +$("#tree1").tree({ + buttonLeft: false, + autoOpen: 0, + slide: true }); diff --git a/docs/static/examples/custom_html.js b/docs/static/examples/custom_html.js index e8618b0c..6e8553a3 100644 --- a/docs/static/examples/custom_html.js +++ b/docs/static/examples/custom_html.js @@ -1,29 +1,27 @@ -$(function () { - var $tree = $("#tree1"); +var $tree = $("#tree1"); - $tree.tree({ - data: ExampleData.exampleData, - autoOpen: 1, - onCreateLi: function (node, $li) { - // Append a link to the jqtree-element div. - // The link has an url '#node-[id]' and a data property 'node-id'. - $li.find(".jqtree-element").append( - `edit` - ); - }, - }); +$tree.tree({ + data: ExampleData.exampleData, + autoOpen: 1, + onCreateLi: function (node, $li) { + // Append a link to the jqtree-element div. + // The link has an url '#node-[id]' and a data property 'node-id'. + $li.find(".jqtree-element").append( + `edit` + ); + }, +}); - // Handle a click on the edit link - $tree.on("click", ".edit", function (e) { - // Get the id from the 'node-id' data property - var node_id = $(e.target).data("node-id"); +// Handle a click on the edit link +$tree.on("click", ".edit", function (e) { + // Get the id from the 'node-id' data property + var node_id = $(e.target).data("node-id"); - // Get the node from the tree - var node = $tree.tree("getNodeById", node_id); + // Get the node from the tree + var node = $tree.tree("getNodeById", node_id); - if (node) { - // Display the node name - alert(node.name); - } - }); + if (node) { + // Display the node name + alert(node.name); + } }); diff --git a/docs/static/examples/drag-outside.js b/docs/static/examples/drag-outside.js index afab9b18..e90a8671 100644 --- a/docs/static/examples/drag-outside.js +++ b/docs/static/examples/drag-outside.js @@ -6,34 +6,32 @@ $.mockjax({ responseTime: 0 }); -$(function() { - var targetCollisionDiv = $("#targetDiv"); +var targetCollisionDiv = $("#targetDiv"); - function isOverTarget(e) { - return ( - e.clientX > targetCollisionDiv.position().left && - e.clientX < - targetCollisionDiv.position().left + - targetCollisionDiv.width() && - e.clientY > targetCollisionDiv.position().top && - e.clientY < - targetCollisionDiv.position().top + targetCollisionDiv.height() - ); - } +function isOverTarget(e) { + return ( + e.clientX > targetCollisionDiv.position().left && + e.clientX < + targetCollisionDiv.position().left + + targetCollisionDiv.width() && + e.clientY > targetCollisionDiv.position().top && + e.clientY < + targetCollisionDiv.position().top + targetCollisionDiv.height() + ); +} - function handleMove(node, e) { - if (isOverTarget(e)) { - console.log("the node is over the target div"); - } +function handleMove(node, e) { + if (isOverTarget(e)) { + console.log("the node is over the target div"); } +} - function handleStop(node, e) { - console.log("stopped over target: ", isOverTarget(e)); - } +function handleStop(node, e) { + console.log("stopped over target: ", isOverTarget(e)); +} - $("#tree1").tree({ - dragAndDrop: true, - onDragMove: handleMove, - onDragStop: handleStop - }); +$("#tree1").tree({ + dragAndDrop: true, + onDragMove: handleMove, + onDragStop: handleStop }); diff --git a/docs/static/examples/drag_and_drop.js b/docs/static/examples/drag_and_drop.js index 2ff33da3..a78ee85b 100644 --- a/docs/static/examples/drag_and_drop.js +++ b/docs/static/examples/drag_and_drop.js @@ -6,10 +6,8 @@ $.mockjax({ responseTime: 0 }); -$(function() { - var $tree = $("#tree1"); - $tree.tree({ - dragAndDrop: true, - autoOpen: 0 - }); +var $tree = $("#tree1"); +$tree.tree({ + dragAndDrop: true, + autoOpen: 0 }); diff --git a/docs/static/examples/icon_buttons.js b/docs/static/examples/icon_buttons.js index 37a9261f..039131db 100644 --- a/docs/static/examples/icon_buttons.js +++ b/docs/static/examples/icon_buttons.js @@ -6,9 +6,7 @@ $.mockjax({ responseTime: 0 }); -$(function() { - $("#tree1").tree({ - closedIcon: $(''), - openedIcon: $('') - }); +$("#tree1").tree({ + closedIcon: $(''), + openedIcon: $('') }); diff --git a/docs/static/examples/load_json_data.js b/docs/static/examples/load_json_data.js index f5cab07c..4e72e810 100644 --- a/docs/static/examples/load_json_data.js +++ b/docs/static/examples/load_json_data.js @@ -1,18 +1,16 @@ -$(function() { - var data = [ - { - name: "node1", - id: 1, - children: [{ name: "child1", id: 2 }, { name: "child2", id: 3 }] - }, - { - name: "node2", - id: 4, - children: [{ name: "child3", id: 5 }] - } - ]; +var data = [ + { + name: "node1", + id: 1, + children: [{ name: "child1", id: 2 }, { name: "child2", id: 3 }] + }, + { + name: "node2", + id: 4, + children: [{ name: "child3", id: 5 }] + } +]; - $("#tree1").tree({ - data: data - }); +$("#tree1").tree({ + data: data }); diff --git a/docs/static/examples/load_json_data_from_server.js b/docs/static/examples/load_json_data_from_server.js index 08f85895..5d9cef21 100644 --- a/docs/static/examples/load_json_data_from_server.js +++ b/docs/static/examples/load_json_data_from_server.js @@ -6,6 +6,4 @@ $.mockjax({ responseTime: 0 }); -$(function() { - $("#tree1").tree(); -}); +$("#tree1").tree(); diff --git a/docs/static/examples/load_on_demand.js b/docs/static/examples/load_on_demand.js index 35e0e38a..8fdc03e8 100644 --- a/docs/static/examples/load_on_demand.js +++ b/docs/static/examples/load_on_demand.js @@ -12,10 +12,8 @@ $.mockjax({ } }); -$(function() { - var $tree = $("#tree1"); +var $tree = $("#tree1"); - $tree.tree({ - saveState: true - }); +$tree.tree({ + saveState: true }); diff --git a/docs/static/examples/multiple_select.js b/docs/static/examples/multiple_select.js index a9606762..2b477b9a 100644 --- a/docs/static/examples/multiple_select.js +++ b/docs/static/examples/multiple_select.js @@ -1,25 +1,23 @@ -$(function() { - var $tree = $("#tree1"); - $tree.tree({ - data: ExampleData.exampleData, - autoOpen: true - }); - $tree.on("tree.click", function(e) { - // Disable single selection - e.preventDefault(); +var $tree = $("#tree1"); +$tree.tree({ + data: ExampleData.exampleData, + autoOpen: true +}); +$tree.on("tree.click", function(e) { + // Disable single selection + e.preventDefault(); - var selected_node = e.node; + var selected_node = e.node; - if (selected_node.id == undefined) { - console.log( - "The multiple selection functions require that nodes have an id" - ); - } + if (selected_node.id == undefined) { + console.log( + "The multiple selection functions require that nodes have an id" + ); + } - if ($tree.tree("isNodeSelected", selected_node)) { - $tree.tree("removeFromSelection", selected_node); - } else { - $tree.tree("addToSelection", selected_node); - } - }); + if ($tree.tree("isNodeSelected", selected_node)) { + $tree.tree("removeFromSelection", selected_node); + } else { + $tree.tree("addToSelection", selected_node); + } }); diff --git a/docs/static/examples/right-to-left.js b/docs/static/examples/right-to-left.js index 2aaf57ed..c775f490 100644 --- a/docs/static/examples/right-to-left.js +++ b/docs/static/examples/right-to-left.js @@ -6,8 +6,6 @@ $.mockjax({ responseTime: 0 }); -$(function() { - $("#tree1").tree({ - rtl: true - }); +$("#tree1").tree({ + rtl: true }); diff --git a/docs/static/examples/save_state.js b/docs/static/examples/save_state.js index 3dcf6e0c..a93e9895 100644 --- a/docs/static/examples/save_state.js +++ b/docs/static/examples/save_state.js @@ -6,8 +6,6 @@ $.mockjax({ responseTime: 0 }); -$(function() { - $("#tree1").tree({ - saveState: true - }); +$("#tree1").tree({ + saveState: true }); From d2b860c0593fe96e9f940803e0d7d9de92a87f25 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Sun, 10 Sep 2023 16:53:45 +0200 Subject: [PATCH 10/12] Update github pages bundle (#743) --- docs/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 2978d7b0..4d08d2a4 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.1.7.4) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -211,7 +211,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.19.0) + minitest (5.20.0) nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) From cbb8ac0423208bac7829a32b50c2ed100c4fa236 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Thu, 14 Sep 2023 14:53:39 +0200 Subject: [PATCH 11/12] Update javascript packages (#727) * Update * Update * Update * Build * Update * Update * Update * Build * Update * Docs packages * Update * Update * Update * Update * Build --- docs/package.json | 4 +- docs/pnpm-lock.yaml | 236 +- lib/dataLoader.js | 6 +- lib/dragAndDropHandler.js | 2 +- lib/elementsRenderer.js | 2 +- lib/keyHandler.js | 2 +- lib/mouse.widget.js | 2 +- lib/node.js | 8 +- lib/nodeElement.js | 2 +- lib/playwright/coverage.js | 27 +- lib/playwright/playwright.test.js | 95 +- lib/playwright/testUtils.js | 71 +- lib/saveStateHandler.js | 2 +- lib/scrollHandler.js | 2 +- lib/selectNodeHandler.js | 2 +- lib/simple.widget.js | 6 +- lib/test/jqTree/accessibility.test.js | 4 +- lib/test/jqTree/events.test.js | 4 +- lib/test/jqTree/loadOnDemand.test.js | 9 +- lib/test/jqTree/methods.test.js | 4 +- lib/test/jqTree/options.test.js | 4 +- lib/test/node.test.js | 4 +- lib/tree.jquery.js | 10 +- package.json | 54 +- pnpm-lock.yaml | 3087 ++++++++++++------------- src/test/.eslintrc | 3 +- src/test/jqTree/loadOnDemand.test.ts | 11 +- src/test/jqTree/methods.test.ts | 52 +- src/tree.jquery.d.ts | 11 +- tree.jquery.debug.js | 86 +- tree.jquery.debug.js.map | 2 +- 31 files changed, 1768 insertions(+), 2046 deletions(-) diff --git a/docs/package.json b/docs/package.json index fa147142..311bcd3b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,8 +11,8 @@ }, "devDependencies": { "@tailwindcss/typography": "^0.5.9", - "autoprefixer": "^10.4.14", - "postcss": "^8.4.27", + "autoprefixer": "^10.4.15", + "postcss": "^8.4.28", "postcss-cli": "^10.1.0", "postcss-import": "^15.1.0", "postcss-load-config": "^4.0.1", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 8477b636..ac1dcdb3 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -9,23 +9,23 @@ devDependencies: specifier: ^0.5.9 version: 0.5.9(tailwindcss@3.3.3) autoprefixer: - specifier: ^10.4.14 - version: 10.4.14(postcss@8.4.27) + specifier: ^10.4.15 + version: 10.4.15(postcss@8.4.28) postcss: - specifier: ^8.4.27 - version: 8.4.27 + specifier: ^8.4.28 + version: 8.4.28 postcss-cli: specifier: ^10.1.0 - version: 10.1.0(postcss@8.4.27) + version: 10.1.0(postcss@8.4.28) postcss-import: specifier: ^15.1.0 - version: 15.1.0(postcss@8.4.27) + version: 15.1.0(postcss@8.4.28) postcss-load-config: specifier: ^4.0.1 - version: 4.0.1(postcss@8.4.27) + version: 4.0.1(postcss@8.4.28) postcss-nested: specifier: ^6.0.1 - version: 6.0.1(postcss@8.4.27) + version: 6.0.1(postcss@8.4.28) tailwindcss: specifier: ^3.3.3 version: 3.3.3 @@ -43,11 +43,11 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true @@ -56,19 +56,15 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: true - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@nodelib/fs.scandir@2.1.5: @@ -132,19 +128,19 @@ packages: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: true - /autoprefixer@10.4.14(postcss@8.4.27): - resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==} + /autoprefixer@10.4.15(postcss@8.4.28): + resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.5 - caniuse-lite: 1.0.30001478 - fraction.js: 4.2.0 + browserslist: 4.21.10 + caniuse-lite: 1.0.30001524 + fraction.js: 4.2.1 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.27 + postcss: 8.4.28 postcss-value-parser: 4.2.0 dev: true @@ -171,15 +167,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.21.5: - resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001478 - electron-to-chromium: 1.4.310 - node-releases: 2.0.10 - update-browserslist-db: 1.0.10(browserslist@4.21.5) + caniuse-lite: 1.0.30001524 + electron-to-chromium: 1.4.504 + node-releases: 2.0.13 + update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true /camelcase-css@2.0.1: @@ -187,8 +183,8 @@ packages: engines: {node: '>= 6'} dev: true - /caniuse-lite@1.0.30001478: - resolution: {integrity: sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==} + /caniuse-lite@1.0.30001524: + resolution: {integrity: sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==} dev: true /chokidar@3.5.3: @@ -203,7 +199,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /cliui@8.0.1: @@ -261,8 +257,8 @@ packages: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} dev: true - /electron-to-chromium@1.4.310: - resolution: {integrity: sha512-/xlATgfwkm5uDDwLw5nt/MNEf7c1oazLURMZLy39vOioGYyYzLWIDT8fZMJak6qTiAJ7udFTy7JG7ziyjNutiA==} + /electron-to-chromium@1.4.504: + resolution: {integrity: sha512-cSMwIAd8yUh54VwitVRVvHK66QqHWE39C3DRj8SWiXitEpVSY3wNPD9y1pxQtLIi4w3UdzF9klLsmuPshz09DQ==} dev: true /emoji-regex@8.0.0: @@ -274,8 +270,8 @@ packages: engines: {node: '>=6'} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -298,15 +294,15 @@ packages: to-regex-range: 5.0.1 dev: true - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} + /fraction.js@4.2.1: + resolution: {integrity: sha512-/KxoyCnPM0GwYI4NN0Iag38Tqt+od3/mLuguepLgCAKPn0ZhC544nssAW0tG2/00zXEYl9W+7hwAIpLHo6Oc7Q==} dev: true - /fs-extra@11.1.0: - resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} + /fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.0 dev: true @@ -315,8 +311,8 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -362,19 +358,19 @@ packages: path-is-absolute: 1.0.1 dev: true - /globby@13.1.3: - resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 dev: true - /graceful-fs@4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true /has@1.0.3: @@ -407,14 +403,8 @@ packages: binary-extensions: 2.2.0 dev: true - /is-core-module@2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} - dependencies: - has: 1.0.3 - dev: true - - /is-core-module@2.12.0: - resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 dev: true @@ -441,8 +431,8 @@ packages: engines: {node: '>=0.12.0'} dev: true - /jiti@1.18.2: - resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} + /jiti@1.19.3: + resolution: {integrity: sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==} hasBin: true dev: true @@ -451,12 +441,7 @@ packages: dependencies: universalify: 2.0.0 optionalDependencies: - graceful-fs: 4.2.10 - dev: true - - /lilconfig@2.0.6: - resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} - engines: {node: '>=10'} + graceful-fs: 4.2.11 dev: true /lilconfig@2.1.0: @@ -513,8 +498,8 @@ packages: hasBin: true dev: true - /node-releases@2.0.10: - resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true /normalize-path@3.0.0: @@ -571,12 +556,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /pirates@4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} dev: true - /postcss-cli@10.1.0(postcss@8.4.27): + /postcss-cli@10.1.0(postcss@8.4.28): resolution: {integrity: sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA==} engines: {node: '>=14'} hasBin: true @@ -585,44 +570,44 @@ packages: dependencies: chokidar: 3.5.3 dependency-graph: 0.11.0 - fs-extra: 11.1.0 + fs-extra: 11.1.1 get-stdin: 9.0.0 - globby: 13.1.3 + globby: 13.2.2 picocolors: 1.0.0 - postcss: 8.4.27 - postcss-load-config: 4.0.1(postcss@8.4.27) - postcss-reporter: 7.0.5(postcss@8.4.27) + postcss: 8.4.28 + postcss-load-config: 4.0.1(postcss@8.4.28) + postcss-reporter: 7.0.5(postcss@8.4.28) pretty-hrtime: 1.0.3 read-cache: 1.0.0 - slash: 5.0.0 - yargs: 17.7.1 + slash: 5.1.0 + yargs: 17.7.2 transitivePeerDependencies: - ts-node dev: true - /postcss-import@15.1.0(postcss@8.4.27): + /postcss-import@15.1.0(postcss@8.4.28): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.27 + postcss: 8.4.28 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.1 + resolve: 1.22.4 dev: true - /postcss-js@4.0.1(postcss@8.4.27): + /postcss-js@4.0.1(postcss@8.4.28): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.27 + postcss: 8.4.28 dev: true - /postcss-load-config@4.0.1(postcss@8.4.27): + /postcss-load-config@4.0.1(postcss@8.4.28): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -634,29 +619,29 @@ packages: ts-node: optional: true dependencies: - lilconfig: 2.0.6 - postcss: 8.4.27 - yaml: 2.2.1 + lilconfig: 2.1.0 + postcss: 8.4.28 + yaml: 2.3.2 dev: true - /postcss-nested@6.0.1(postcss@8.4.27): + /postcss-nested@6.0.1(postcss@8.4.28): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.27 - postcss-selector-parser: 6.0.11 + postcss: 8.4.28 + postcss-selector-parser: 6.0.13 dev: true - /postcss-reporter@7.0.5(postcss@8.4.27): + /postcss-reporter@7.0.5(postcss@8.4.28): resolution: {integrity: sha512-glWg7VZBilooZGOFPhN9msJ3FQs19Hie7l5a/eE6WglzYqVeH3ong3ShFcp9kDWJT1g2Y/wd59cocf9XxBtkWA==} engines: {node: '>=10'} peerDependencies: postcss: ^8.1.0 dependencies: picocolors: 1.0.0 - postcss: 8.4.27 + postcss: 8.4.28 thenby: 1.3.4 dev: true @@ -668,8 +653,8 @@ packages: util-deprecate: 1.0.2 dev: true - /postcss-selector-parser@6.0.11: - resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} + /postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} engines: {node: '>=4'} dependencies: cssesc: 3.0.0 @@ -680,8 +665,8 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + /postcss@8.4.28: + resolution: {integrity: sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -716,20 +701,11 @@ packages: engines: {node: '>=0.10.0'} dev: true - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true dependencies: - is-core-module: 2.12.0 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -750,8 +726,8 @@ packages: engines: {node: '>=12'} dev: true - /slash@5.0.0: - resolution: {integrity: sha512-n6KkmvKS0623igEVj3FF0OZs1gYYJ0o0Hj939yc1fyxl2xt+xYpLnzJB6xBSqOfV9ZFLEWodBBN/heZJahuIJQ==} + /slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} dev: true @@ -776,8 +752,8 @@ packages: ansi-regex: 5.0.1 dev: true - /sucrase@3.32.0: - resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} + /sucrase@3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} engines: {node: '>=8'} hasBin: true dependencies: @@ -786,7 +762,7 @@ packages: glob: 7.1.6 lines-and-columns: 1.2.4 mz: 2.7.0 - pirates: 4.0.5 + pirates: 4.0.6 ts-interface-checker: 0.1.13 dev: true @@ -805,23 +781,23 @@ packages: chokidar: 3.5.3 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.12 + fast-glob: 3.3.1 glob-parent: 6.0.2 is-glob: 4.0.3 - jiti: 1.18.2 + jiti: 1.19.3 lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.27 - postcss-import: 15.1.0(postcss@8.4.27) - postcss-js: 4.0.1(postcss@8.4.27) - postcss-load-config: 4.0.1(postcss@8.4.27) - postcss-nested: 6.0.1(postcss@8.4.27) - postcss-selector-parser: 6.0.11 - resolve: 1.22.2 - sucrase: 3.32.0 + postcss: 8.4.28 + postcss-import: 15.1.0(postcss@8.4.28) + postcss-js: 4.0.1(postcss@8.4.28) + postcss-load-config: 4.0.1(postcss@8.4.28) + postcss-nested: 6.0.1(postcss@8.4.28) + postcss-selector-parser: 6.0.13 + resolve: 1.22.4 + sucrase: 3.34.0 transitivePeerDependencies: - ts-node dev: true @@ -859,13 +835,13 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /update-browserslist-db@1.0.10(browserslist@4.21.5): - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + /update-browserslist-db@1.0.11(browserslist@4.21.10): + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.5 + browserslist: 4.21.10 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -892,8 +868,8 @@ packages: engines: {node: '>=10'} dev: true - /yaml@2.2.1: - resolution: {integrity: sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==} + /yaml@2.3.2: + resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} engines: {node: '>= 14'} dev: true @@ -902,8 +878,8 @@ packages: engines: {node: '>=12'} dev: true - /yargs@17.7.1: - resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} dependencies: cliui: 8.0.1 diff --git a/lib/dataLoader.js b/lib/dataLoader.js index cb7ae76d..9e2eceff 100644 --- a/lib/dataLoader.js +++ b/lib/dataLoader.js @@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } diff --git a/lib/dragAndDropHandler.js b/lib/dragAndDropHandler.js index e581d3ba..82dc856a 100644 --- a/lib/dragAndDropHandler.js +++ b/lib/dragAndDropHandler.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.HitAreasGenerator = exports.DragAndDropHandler = void 0; var _node = require("./node"); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } diff --git a/lib/elementsRenderer.js b/lib/elementsRenderer.js index fb9f02cd..2db78739 100644 --- a/lib/elementsRenderer.js +++ b/lib/elementsRenderer.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports["default"] = void 0; var _util = require("./util"); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } diff --git a/lib/keyHandler.js b/lib/keyHandler.js index 64767b86..0564dc74 100644 --- a/lib/keyHandler.js +++ b/lib/keyHandler.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } diff --git a/lib/mouse.widget.js b/lib/mouse.widget.js index 98ef968b..ad39aa1b 100644 --- a/lib/mouse.widget.js +++ b/lib/mouse.widget.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports["default"] = void 0; var _simple = _interopRequireDefault(require("./simple.widget")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } diff --git a/lib/node.js b/lib/node.js index 8e969bdc..05ea4173 100644 --- a/lib/node.js +++ b/lib/node.js @@ -13,7 +13,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var Position = /*#__PURE__*/function (Position) { Position[Position["Before"] = 1] = "Before"; Position[Position["After"] = 2] = "After"; @@ -500,7 +500,7 @@ var Node = /*#__PURE__*/function () { var _this = this; this.iterate(function (child) { var _this$tree; - (_this$tree = _this.tree) === null || _this$tree === void 0 ? void 0 : _this$tree.removeNodeFromIndex(child); + (_this$tree = _this.tree) === null || _this$tree === void 0 || _this$tree.removeNodeFromIndex(child); return true; }); this.children = []; @@ -690,14 +690,14 @@ var Node = /*#__PURE__*/function () { var _this$tree2; this.parent = parent; this.tree = parent.tree; - (_this$tree2 = this.tree) === null || _this$tree2 === void 0 ? void 0 : _this$tree2.addNodeToIndex(this); + (_this$tree2 = this.tree) === null || _this$tree2 === void 0 || _this$tree2.addNodeToIndex(this); } }, { key: "doRemoveChild", value: function doRemoveChild(node) { var _this$tree3; this.children.splice(this.getChildIndex(node), 1); - (_this$tree3 = this.tree) === null || _this$tree3 === void 0 ? void 0 : _this$tree3.removeNodeFromIndex(node); + (_this$tree3 = this.tree) === null || _this$tree3 === void 0 || _this$tree3.removeNodeFromIndex(node); } }, { key: "getNodeClass", diff --git a/lib/nodeElement.js b/lib/nodeElement.js index 461e66ce..4cc16b0a 100644 --- a/lib/nodeElement.js +++ b/lib/nodeElement.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.NodeElement = exports.FolderElement = exports.BorderDropHint = void 0; var _node = require("./node"); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } diff --git a/lib/playwright/coverage.js b/lib/playwright/coverage.js index 2f559b94..3ed16259 100644 --- a/lib/playwright/coverage.js +++ b/lib/playwright/coverage.js @@ -1,6 +1,6 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } Object.defineProperty(exports, "__esModule", { value: true }); @@ -8,19 +8,20 @@ exports.saveCoverage = exports.initCoverage = void 0; var _fs = _interopRequireDefault(require("fs")); var _path = _interopRequireDefault(require("path")); var _crypto = _interopRequireDefault(require("crypto")); +var _ref, _ref2; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var istanbulCLIOutput = _path["default"].join(process.cwd(), ".nyc_output"); var generateUUID = function generateUUID() { return _crypto["default"].randomBytes(16).toString("hex"); }; -var initCoverage = /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(context) { +var initCoverage = function initCoverage(_x) { + return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(context) { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: @@ -44,14 +45,11 @@ var initCoverage = /*#__PURE__*/function () { return _context.stop(); } }, _callee); - })); - return function initCoverage(_x) { - return _ref.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.initCoverage = initCoverage; -var saveCoverage = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(context) { +var saveCoverage = function saveCoverage(_x2) { + return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(context) { var _iterator, _step, page; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { @@ -93,9 +91,6 @@ var saveCoverage = /*#__PURE__*/function () { return _context2.stop(); } }, _callee2, null, [[1, 11, 14, 17]]); - })); - return function saveCoverage(_x2) { - return _ref2.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.saveCoverage = saveCoverage; \ No newline at end of file diff --git a/lib/playwright/playwright.test.js b/lib/playwright/playwright.test.js index de3308bd..9ed02905 100644 --- a/lib/playwright/playwright.test.js +++ b/lib/playwright/playwright.test.js @@ -1,14 +1,15 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _test = require("@playwright/test"); var _testUtils = require("./testUtils"); var _coverage = require("./coverage"); -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +var _ref2, _ref4, _ref6; +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -var initPage = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) { +var initPage = function initPage(_x) { + return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) { var baseURL, dragAndDrop, page; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { @@ -39,13 +40,10 @@ var initPage = /*#__PURE__*/function () { return _context.stop(); } }, _callee); - })); - return function initPage(_x) { - return _ref2.apply(this, arguments); - }; -}(); -_test.test.beforeEach( /*#__PURE__*/function () { - var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) { + }))).apply(this, arguments); +}; +_test.test.beforeEach(function (_x2) { + return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) { var context; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { @@ -58,13 +56,10 @@ _test.test.beforeEach( /*#__PURE__*/function () { return _context2.stop(); } }, _callee2); - })); - return function (_x2) { - return _ref4.apply(this, arguments); - }; -}()); -_test.test.afterEach( /*#__PURE__*/function () { - var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref5) { + }))).apply(this, arguments); +}); +_test.test.afterEach(function (_x3) { + return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref5) { var context; return _regeneratorRuntime().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { @@ -77,14 +72,12 @@ _test.test.afterEach( /*#__PURE__*/function () { return _context3.stop(); } }, _callee3); - })); - return function (_x3) { - return _ref6.apply(this, arguments); - }; -}()); + }))).apply(this, arguments); +}); _test.test.describe("without dragAndDrop", function () { - _test.test.beforeEach( /*#__PURE__*/function () { - var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref7) { + var _ref8, _ref10, _ref12; + _test.test.beforeEach(function (_x4) { + return (_ref8 = _ref8 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref7) { var baseURL, page; return _regeneratorRuntime().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { @@ -101,13 +94,10 @@ _test.test.describe("without dragAndDrop", function () { return _context4.stop(); } }, _callee4); - })); - return function (_x4) { - return _ref8.apply(this, arguments); - }; - }()); - (0, _test.test)("displays a tree", /*#__PURE__*/function () { - var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref9) { + }))).apply(this, arguments); + }); + (0, _test.test)("displays a tree", function (_x5) { + return (_ref10 = _ref10 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref9) { var page, screenshot; return _regeneratorRuntime().wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { @@ -132,13 +122,10 @@ _test.test.describe("without dragAndDrop", function () { return _context5.stop(); } }, _callee5); - })); - return function (_x5) { - return _ref10.apply(this, arguments); - }; - }()); - (0, _test.test)("selects a node", /*#__PURE__*/function () { - var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref11) { + }))).apply(this, arguments); + }); + (0, _test.test)("selects a node", function (_x6) { + return (_ref12 = _ref12 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref11) { var page, saurischia, screenshot; return _regeneratorRuntime().wrap(function _callee6$(_context6) { while (1) switch (_context6.prev = _context6.next) { @@ -164,15 +151,13 @@ _test.test.describe("without dragAndDrop", function () { return _context6.stop(); } }, _callee6); - })); - return function (_x6) { - return _ref12.apply(this, arguments); - }; - }()); + }))).apply(this, arguments); + }); }); _test.test.describe("with dragAndDrop", function () { - _test.test.beforeEach( /*#__PURE__*/function () { - var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref13) { + var _ref14, _ref16; + _test.test.beforeEach(function (_x7) { + return (_ref14 = _ref14 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref13) { var baseURL, page; return _regeneratorRuntime().wrap(function _callee7$(_context7) { while (1) switch (_context7.prev = _context7.next) { @@ -189,13 +174,10 @@ _test.test.describe("with dragAndDrop", function () { return _context7.stop(); } }, _callee7); - })); - return function (_x7) { - return _ref14.apply(this, arguments); - }; - }()); - (0, _test.test)("moves a node", /*#__PURE__*/function () { - var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_ref15) { + }))).apply(this, arguments); + }); + (0, _test.test)("moves a node", function (_x8) { + return (_ref16 = _ref16 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_ref15) { var page, structure, screenshot; return _regeneratorRuntime().wrap(function _callee8$(_context8) { while (1) switch (_context8.prev = _context8.next) { @@ -241,9 +223,6 @@ _test.test.describe("with dragAndDrop", function () { return _context8.stop(); } }, _callee8); - })); - return function (_x8) { - return _ref16.apply(this, arguments); - }; - }()); + }))).apply(this, arguments); + }); }); \ No newline at end of file diff --git a/lib/playwright/testUtils.js b/lib/playwright/testUtils.js index c8aa480a..9a1eade2 100644 --- a/lib/playwright/testUtils.js +++ b/lib/playwright/testUtils.js @@ -1,11 +1,12 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } Object.defineProperty(exports, "__esModule", { value: true }); exports.selectNode = exports.getTreeStructure = exports.findNodeElement = exports.dragAndDrop = void 0; -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +var _ref, _ref2, _ref3, _ref4, _ref5, _ref6; +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var locateTitle = function locateTitle(page, title) { @@ -13,8 +14,8 @@ var locateTitle = function locateTitle(page, title) { hasText: title }); }; -var findNodeElement = /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(page, title) { +var findNodeElement = function findNodeElement(_x, _x2) { + return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(page, title) { var titleElement, nodeElement; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { @@ -45,14 +46,11 @@ var findNodeElement = /*#__PURE__*/function () { return _context.stop(); } }, _callee); - })); - return function findNodeElement(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.findNodeElement = findNodeElement; -var selectNode = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(nodeElement) { +var selectNode = function selectNode(_x3) { + return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(nodeElement) { var titleHandle; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { @@ -74,14 +72,11 @@ var selectNode = /*#__PURE__*/function () { return _context2.stop(); } }, _callee2); - })); - return function selectNode(_x3) { - return _ref2.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.selectNode = selectNode; -var getRect = /*#__PURE__*/function () { - var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(elementHandle) { +var getRect = function getRect(_x4) { + return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(elementHandle) { var boundingBox; return _regeneratorRuntime().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { @@ -102,13 +97,10 @@ var getRect = /*#__PURE__*/function () { return _context3.stop(); } }, _callee3); - })); - return function getRect(_x4) { - return _ref3.apply(this, arguments); - }; -}(); -var getTreeStructure = /*#__PURE__*/function () { - var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(page) { + }))).apply(this, arguments); +}; +var getTreeStructure = function getTreeStructure(_x5) { + return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(page) { var structure; return _regeneratorRuntime().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { @@ -123,14 +115,11 @@ var getTreeStructure = /*#__PURE__*/function () { return _context4.stop(); } }, _callee4); - })); - return function getTreeStructure(_x5) { - return _ref4.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.getTreeStructure = getTreeStructure; -var getNodeRect = /*#__PURE__*/function () { - var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(page, title) { +var getNodeRect = function getNodeRect(_x6, _x7) { + return (_ref5 = _ref5 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(page, title) { var titleElement, rect; return _regeneratorRuntime().wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { @@ -155,13 +144,10 @@ var getNodeRect = /*#__PURE__*/function () { return _context5.stop(); } }, _callee5); - })); - return function getNodeRect(_x6, _x7) { - return _ref5.apply(this, arguments); - }; -}(); -var dragAndDrop = /*#__PURE__*/function () { - var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(page, from, to) { + }))).apply(this, arguments); +}; +var dragAndDrop = function dragAndDrop(_x8, _x9, _x10) { + return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(page, from, to) { var fromRect, toRect; return _regeneratorRuntime().wrap(function _callee6$(_context6) { while (1) switch (_context6.prev = _context6.next) { @@ -193,9 +179,6 @@ var dragAndDrop = /*#__PURE__*/function () { return _context6.stop(); } }, _callee6); - })); - return function dragAndDrop(_x8, _x9, _x10) { - return _ref6.apply(this, arguments); - }; -}(); + }))).apply(this, arguments); +}; exports.dragAndDrop = dragAndDrop; \ No newline at end of file diff --git a/lib/saveStateHandler.js b/lib/saveStateHandler.js index ab125f01..c29f4bef 100644 --- a/lib/saveStateHandler.js +++ b/lib/saveStateHandler.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports["default"] = void 0; var _util = require("./util"); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } diff --git a/lib/scrollHandler.js b/lib/scrollHandler.js index 4b2edad1..317c1093 100644 --- a/lib/scrollHandler.js +++ b/lib/scrollHandler.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } diff --git a/lib/selectNodeHandler.js b/lib/selectNodeHandler.js index 03cda631..49bbee9e 100644 --- a/lib/selectNodeHandler.js +++ b/lib/selectNodeHandler.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } diff --git a/lib/simple.widget.js b/lib/simple.widget.js index 98ffea1b..af08be2b 100644 --- a/lib/simple.widget.js +++ b/lib/simple.widget.js @@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } diff --git a/lib/test/jqTree/accessibility.test.js b/lib/test/jqTree/accessibility.test.js index bc133e07..b4b5617b 100644 --- a/lib/test/jqTree/accessibility.test.js +++ b/lib/test/jqTree/accessibility.test.js @@ -1,11 +1,11 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _jestAxe = require("jest-axe"); require("../../tree.jquery"); var _exampleData = _interopRequireDefault(require("../support/exampleData")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } expect.extend(_jestAxe.toHaveNoViolations); diff --git a/lib/test/jqTree/events.test.js b/lib/test/jqTree/events.test.js index 63cb2fe2..767489c7 100644 --- a/lib/test/jqTree/events.test.js +++ b/lib/test/jqTree/events.test.js @@ -1,6 +1,6 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _givens = _interopRequireDefault(require("givens")); var _msw = require("msw"); var _node = require("msw/node"); @@ -9,7 +9,7 @@ require("../../tree.jquery"); var _exampleData = _interopRequireDefault(require("../support/exampleData")); var _testUtil = require("../support/testUtil"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var context = describe; diff --git a/lib/test/jqTree/loadOnDemand.test.js b/lib/test/jqTree/loadOnDemand.test.js index c0157d70..8f79458c 100644 --- a/lib/test/jqTree/loadOnDemand.test.js +++ b/lib/test/jqTree/loadOnDemand.test.js @@ -1,6 +1,6 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _givens = _interopRequireDefault(require("givens")); var _dom = require("@testing-library/dom"); var _msw = require("msw"); @@ -8,7 +8,7 @@ var _node = require("msw/node"); require("../../tree.jquery"); var _testUtil = require("../support/testUtil"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var context = describe; @@ -141,8 +141,9 @@ context("when a node has load_on_demand in the data", function () { }); context("when the node is selected and doesn't have the focus", function () { beforeEach(function () { - given.$tree.tree("selectNode", given.node); - document.activeElement.blur(); + given.$tree.tree("selectNode", given.node, { + mustSetFocus: false + }); }); it("keeps the node selected and not focused", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { return _regeneratorRuntime().wrap(function _callee4$(_context4) { diff --git a/lib/test/jqTree/methods.test.js b/lib/test/jqTree/methods.test.js index c5010a6d..5d35bfd1 100644 --- a/lib/test/jqTree/methods.test.js +++ b/lib/test/jqTree/methods.test.js @@ -1,6 +1,6 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _givens = _interopRequireDefault(require("givens")); var _dom = require("@testing-library/dom"); var _msw = require("msw"); @@ -10,7 +10,7 @@ var _exampleData = _interopRequireDefault(require("../support/exampleData")); var _testUtil = require("../support/testUtil"); var _version = _interopRequireDefault(require("../../version")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var context = describe; diff --git a/lib/test/jqTree/options.test.js b/lib/test/jqTree/options.test.js index 6975fdb6..ef7106ec 100644 --- a/lib/test/jqTree/options.test.js +++ b/lib/test/jqTree/options.test.js @@ -1,6 +1,6 @@ "use strict"; -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _givens = _interopRequireDefault(require("givens")); var _dom = require("@testing-library/dom"); var _msw = require("msw"); @@ -9,7 +9,7 @@ require("../../tree.jquery"); var _exampleData = _interopRequireDefault(require("../support/exampleData")); var _testUtil = require("../support/testUtil"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var context = describe; diff --git a/lib/test/node.test.js b/lib/test/node.test.js index 993885f1..05a9f1bb 100644 --- a/lib/test/node.test.js +++ b/lib/test/node.test.js @@ -487,8 +487,8 @@ describe("getLastChild", function () { context("when its last child is open and has children", function () { beforeEach(function () { var child2 = given.node.children[1]; - child2 === null || child2 === void 0 ? void 0 : child2.append("child2a"); - child2 === null || child2 === void 0 ? void 0 : child2.append("child2b"); + child2 === null || child2 === void 0 || child2.append("child2a"); + child2 === null || child2 === void 0 || child2.append("child2b"); }); context("and the last child is open", function () { beforeEach(function () { diff --git a/lib/tree.jquery.js b/lib/tree.jquery.js index eb8bf8a2..4cd91466 100644 --- a/lib/tree.jquery.js +++ b/lib/tree.jquery.js @@ -18,15 +18,15 @@ var _node6 = require("./node"); var _util = require("./util"); var _nodeElement = require("./nodeElement"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } diff --git a/package.json b/package.json index 6de2e2c3..86832c8f 100644 --- a/package.json +++ b/package.json @@ -28,51 +28,51 @@ "test": "pnpm jest && pnpm playwright" }, "dependencies": { - "jquery": "^3.7.0" + "jquery": "^3.7.1" }, "devDependencies": { - "@babel/cli": "^7.22.9", - "@babel/core": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/preset-typescript": "^7.22.5", - "@playwright/test": "^1.36.2", + "@babel/cli": "^7.22.15", + "@babel/core": "^7.22.17", + "@babel/preset-env": "^7.22.15", + "@babel/preset-typescript": "^7.22.15", + "@playwright/test": "^1.38.0", "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@rollup/plugin-terser": "^0.4.3", "@testing-library/dom": "^9.3.1", "@types/debug": "^4.1.8", - "@types/jest": "^29.5.3", + "@types/jest": "^29.5.4", "@types/jest-axe": "^3.5.5", - "@types/jquery": "^3.5.16", - "@types/node": "^20.4.7", - "@typescript-eslint/eslint-plugin": "^6.2.1", - "@typescript-eslint/parser": "^6.2.1", - "autoprefixer": "^10.4.14", - "babel-jest": "^29.6.2", + "@types/jquery": "^3.5.18", + "@types/node": "^20.6.0", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", + "autoprefixer": "^10.4.15", + "babel-jest": "^29.7.0", "babel-plugin-istanbul": "^6.1.1", - "eslint": "^8.46.0", - "eslint-plugin-import": "^2.28.0", + "eslint": "^8.49.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-playwright": "^0.15.3", - "eslint-plugin-testing-library": "^5.11.0", + "eslint-plugin-playwright": "^0.16.0", + "eslint-plugin-testing-library": "^6.0.1", "givens": "^1.3.9", - "graphql": "^16.7.1", - "jest": "^29.6.2", + "graphql": "^16.8.0", + "jest": "^29.7.0", "jest-axe": "^8.0.0", - "jest-environment-jsdom": "^29.6.2", + "jest-environment-jsdom": "^29.7.0", "jest-extended": "^4.0.1", "jsonfile": "^6.1.0", "lodash.template": "^4.5.0", - "msw": "^1.2.3", - "postcss": "^8.4.27", + "msw": "^1.3.1", + "postcss": "^8.4.29", "postcss-cli": "^10.1.0", "postcss-import": "^15.1.0", "postcss-load-config": "^4.0.1", "postcss-nested": "^6.0.1", - "prettier": "^3.0.1", - "rollup": "^3.27.2", + "prettier": "^3.0.3", + "rollup": "^3.29.1", "rollup-plugin-serve": "^2.0.2", - "tslib": "^2.6.1", - "typescript": "~5.1.6" + "tslib": "^2.6.2", + "typescript": "^5.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42d11b69..4b85b677 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,34 +6,34 @@ settings: dependencies: jquery: - specifier: ^3.7.0 - version: 3.7.0 + specifier: ^3.7.1 + version: 3.7.1 devDependencies: '@babel/cli': - specifier: ^7.22.9 - version: 7.22.9(@babel/core@7.22.9) + specifier: ^7.22.15 + version: 7.22.15(@babel/core@7.22.17) '@babel/core': - specifier: ^7.22.9 - version: 7.22.9 + specifier: ^7.22.17 + version: 7.22.17 '@babel/preset-env': - specifier: ^7.22.9 - version: 7.22.9(@babel/core@7.22.9) + specifier: ^7.22.15 + version: 7.22.15(@babel/core@7.22.17) '@babel/preset-typescript': - specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.9) + specifier: ^7.22.15 + version: 7.22.15(@babel/core@7.22.17) '@playwright/test': - specifier: ^1.36.2 - version: 1.36.2 + specifier: ^1.38.0 + version: 1.38.0 '@rollup/plugin-babel': specifier: ^6.0.3 - version: 6.0.3(@babel/core@7.22.9)(rollup@3.27.2) + version: 6.0.3(@babel/core@7.22.17)(rollup@3.29.1) '@rollup/plugin-node-resolve': - specifier: ^15.1.0 - version: 15.1.0(rollup@3.27.2) + specifier: ^15.2.1 + version: 15.2.1(rollup@3.29.1) '@rollup/plugin-terser': specifier: ^0.4.3 - version: 0.4.3(rollup@3.27.2) + version: 0.4.3(rollup@3.29.1) '@testing-library/dom': specifier: ^9.3.1 version: 9.3.1 @@ -41,65 +41,65 @@ devDependencies: specifier: ^4.1.8 version: 4.1.8 '@types/jest': - specifier: ^29.5.3 - version: 29.5.3 + specifier: ^29.5.4 + version: 29.5.4 '@types/jest-axe': specifier: ^3.5.5 version: 3.5.5 '@types/jquery': - specifier: ^3.5.16 - version: 3.5.16 + specifier: ^3.5.18 + version: 3.5.18 '@types/node': - specifier: ^20.4.7 - version: 20.4.7 + specifier: ^20.6.0 + version: 20.6.0 '@typescript-eslint/eslint-plugin': - specifier: ^6.2.1 - version: 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) + specifier: ^6.7.0 + version: 6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.2.1 - version: 6.2.1(eslint@8.46.0)(typescript@5.1.6) + specifier: ^6.7.0 + version: 6.7.0(eslint@8.49.0)(typescript@5.2.2) autoprefixer: - specifier: ^10.4.14 - version: 10.4.14(postcss@8.4.27) + specifier: ^10.4.15 + version: 10.4.15(postcss@8.4.29) babel-jest: - specifier: ^29.6.2 - version: 29.6.2(@babel/core@7.22.9) + specifier: ^29.7.0 + version: 29.7.0(@babel/core@7.22.17) babel-plugin-istanbul: specifier: ^6.1.1 version: 6.1.1 eslint: - specifier: ^8.46.0 - version: 8.46.0 + specifier: ^8.49.0 + version: 8.49.0 eslint-plugin-import: - specifier: ^2.28.0 - version: 2.28.0(@typescript-eslint/parser@6.2.1)(eslint@8.46.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@6.7.0)(eslint@8.49.0) eslint-plugin-jest: specifier: ^27.2.3 - version: 27.2.3(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0)(jest@29.6.2)(typescript@5.1.6) + version: 27.2.3(@typescript-eslint/eslint-plugin@6.7.0)(eslint@8.49.0)(jest@29.7.0)(typescript@5.2.2) eslint-plugin-playwright: - specifier: ^0.15.3 - version: 0.15.3(eslint-plugin-jest@27.2.3)(eslint@8.46.0) + specifier: ^0.16.0 + version: 0.16.0(eslint-plugin-jest@27.2.3)(eslint@8.49.0) eslint-plugin-testing-library: - specifier: ^5.11.0 - version: 5.11.0(eslint@8.46.0)(typescript@5.1.6) + specifier: ^6.0.1 + version: 6.0.1(eslint@8.49.0)(typescript@5.2.2) givens: specifier: ^1.3.9 version: 1.3.9 graphql: - specifier: ^16.7.1 - version: 16.7.1 + specifier: ^16.8.0 + version: 16.8.0 jest: - specifier: ^29.6.2 - version: 29.6.2(@types/node@20.4.7) + specifier: ^29.7.0 + version: 29.7.0(@types/node@20.6.0) jest-axe: specifier: ^8.0.0 version: 8.0.0 jest-environment-jsdom: - specifier: ^29.6.2 - version: 29.6.2 + specifier: ^29.7.0 + version: 29.7.0 jest-extended: specifier: ^4.0.1 - version: 4.0.1(jest@29.6.2) + version: 4.0.1(jest@29.7.0) jsonfile: specifier: ^6.1.0 version: 6.1.0 @@ -107,38 +107,38 @@ devDependencies: specifier: ^4.5.0 version: 4.5.0 msw: - specifier: ^1.2.3 - version: 1.2.3(typescript@5.1.6) + specifier: ^1.3.1 + version: 1.3.1(typescript@5.2.2) postcss: - specifier: ^8.4.27 - version: 8.4.27 + specifier: ^8.4.29 + version: 8.4.29 postcss-cli: specifier: ^10.1.0 - version: 10.1.0(postcss@8.4.27) + version: 10.1.0(postcss@8.4.29) postcss-import: specifier: ^15.1.0 - version: 15.1.0(postcss@8.4.27) + version: 15.1.0(postcss@8.4.29) postcss-load-config: specifier: ^4.0.1 - version: 4.0.1(postcss@8.4.27) + version: 4.0.1(postcss@8.4.29) postcss-nested: specifier: ^6.0.1 - version: 6.0.1(postcss@8.4.27) + version: 6.0.1(postcss@8.4.29) prettier: - specifier: ^3.0.1 - version: 3.0.1 + specifier: ^3.0.3 + version: 3.0.3 rollup: - specifier: ^3.27.2 - version: 3.27.2 + specifier: ^3.29.1 + version: 3.29.1 rollup-plugin-serve: specifier: ^2.0.2 version: 2.0.2 tslib: - specifier: ^2.6.1 - version: 2.6.1 + specifier: ^2.6.2 + version: 2.6.2 typescript: - specifier: ~5.1.6 - version: 5.1.6 + specifier: ^5.2.2 + version: 5.2.2 packages: @@ -152,18 +152,18 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@babel/cli@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-nb2O7AThqRo7/E53EGiuAkMaRbb7J5Qp3RvN+dmua1U+kydm0oznkhqbTEG15yk26G/C3yL6OdZjzgl+DMXVVA==} + /@babel/cli@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-prtg5f6zCERIaECeTZzd2fMtVjlfjhUcO+fBLQ6DXXdq5FljN+excVitJ2nogsusdf31LeqkjAfXZ7Xq+HmN8g==} engines: {node: '>=6.9.0'} hasBin: true peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@jridgewell/trace-mapping': 0.3.18 + '@babel/core': 7.22.17 + '@jridgewell/trace-mapping': 0.3.19 commander: 4.1.1 convert-source-map: 1.9.0 fs-readdir-recursive: 1.1.0 @@ -175,18 +175,12 @@ packages: chokidar: 3.5.3 dev: true - /@babel/code-frame@7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 - dev: true - - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.13 + chalk: 2.4.2 dev: true /@babel/compat-data@7.22.9: @@ -194,20 +188,20 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.22.9: - resolution: {integrity: sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==} + /@babel/core@7.22.17: + resolution: {integrity: sha512-2EENLmhpwplDux5PSsZnSbnSkB3tZ6QTksgO25xwEL7pIDcNOMhF5v/s6RzwjMZzZzw9Ofc30gHv5ChCC8pifQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) - '@babel/helpers': 7.22.6 - '@babel/parser': 7.22.7 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) + '@babel/helpers': 7.22.15 + '@babel/parser': 7.22.16 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.17 + '@babel/types': 7.22.17 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -217,113 +211,82 @@ packages: - supports-color dev: true - /@babel/generator@7.21.4: - resolution: {integrity: sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.21.4 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - dev: true - - /@babel/generator@7.22.9: - resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} + /@babel/generator@7.22.15: + resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 dev: true - /@babel/helper-annotate-as-pure@7.18.6: - resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - dev: true - /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true - /@babel/helper-builder-binary-assignment-operator-visitor@7.22.5: - resolution: {integrity: sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==} + /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: + resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true - /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-validator-option': 7.22.5 + '@babel/helper-validator-option': 7.22.15 browserslist: 4.21.10 lru-cache: 5.1.1 semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ==} + /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-member-expression-to-functions': 7.22.15 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 dev: true - /@babel/helper-create-regexp-features-plugin@7.21.4(@babel/core@7.22.9): - resolution: {integrity: sha512-M00OuhU+0GyZ5iBBN9czjugzWrEq2vDpf/zCYHxxf93ul/Q5rv+a5h+/+0WnI1AebHNVtl5bFV0qsJoH23DbfA==} + /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-annotate-as-pure': 7.18.6 - regexpu-core: 5.3.2 - dev: true - - /@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.9): + /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.17): resolution: {integrity: sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.2 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -337,62 +300,50 @@ packages: resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/template': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 - dev: true - - /@babel/helper-member-expression-to-functions@7.22.5: - resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true - /@babel/helper-module-imports@7.21.4: - resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==} + /@babel/helper-member-expression-to-functions@7.22.15: + resolution: {integrity: sha512-qLNsZbgrNh0fDQBCPocSL8guki1hcPvltGDv/NxvUoABwFq7GkKSu1nRXeJkVZc+wJvne2E0RKQz+2SQrz6eAA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.4 + '@babel/types': 7.22.17 dev: true - /@babel/helper-module-imports@7.22.5: - resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true - /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} + /@babel/helper-module-transforms@7.22.17(@babel/core@7.22.17): + resolution: {integrity: sha512-XouDDhQESrLHTpnBtCKExJdyY4gJCdrvH2Pyv8r8kovX2U8G0dRUOT45T9XlbLtuu9CLXP15eusnkprhoPV5iQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-module-imports': 7.22.5 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 dev: true /@babel/helper-optimise-call-expression@7.22.5: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 - dev: true - - /@babel/helper-plugin-utils@7.20.2: - resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} - engines: {node: '>=6.9.0'} + '@babel/types': 7.22.17 dev: true /@babel/helper-plugin-utils@7.22.5: @@ -400,27 +351,27 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==} + /@babel/helper-remap-async-to-generator@7.22.17(@babel/core@7.22.17): + resolution: {integrity: sha512-bxH77R5gjH3Nkde6/LuncQoLaP16THYPscurp1S8z7S9ZgezCyV3G8Hc+TZiCmY8pz4fp8CvKSgtJMW0FkLAxA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-wrap-function': 7.22.9 + '@babel/helper-wrap-function': 7.22.17 dev: true - /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.9): + /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.17): resolution: {integrity: sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-member-expression-to-functions': 7.22.15 '@babel/helper-optimise-call-expression': 7.22.5 dev: true @@ -428,26 +379,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 - dev: true - - /@babel/helper-string-parser@7.19.4: - resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} - engines: {node: '>=6.9.0'} + '@babel/types': 7.22.17 dev: true /@babel/helper-string-parser@7.22.5: @@ -455,1060 +401,987 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-identifier@7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + /@babel/helper-validator-identifier@7.22.15: + resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option@7.22.5: - resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-wrap-function@7.22.9: - resolution: {integrity: sha512-sZ+QzfauuUEfxSEjKFmi3qDSHgLsTPK/pEpoD/qonZKOtTPTLbf59oabPQ4rKekt9lFcj/hTZaOhWwFYrgjk+Q==} + /@babel/helper-wrap-function@7.22.17: + resolution: {integrity: sha512-nAhoheCMlrqU41tAojw9GpVEKDlTS8r3lzFmF0lP52LwblCPbuFSO7nGIZoIcoU5NIm1ABrna0cJExE4Ay6l2Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.22.5 - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/template': 7.22.15 + '@babel/types': 7.22.17 dev: true - /@babel/helpers@7.22.6: - resolution: {integrity: sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==} + /@babel/helpers@7.22.15: + resolution: {integrity: sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.17 + '@babel/types': 7.22.17 transitivePeerDependencies: - supports-color dev: true - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + /@babel/highlight@7.22.13: + resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.15 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - - /@babel/parser@7.21.4: - resolution: {integrity: sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.21.4 - dev: true - - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.22.16: + resolution: {integrity: sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==} + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.22.9) + '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.17) dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.9): + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.17): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - dev: true - - /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.22.9): - resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==} - engines: {node: '>=4'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.21.4(@babel/core@7.22.9) - '@babel/helper-plugin-utils': 7.22.5 + '@babel/core': 7.22.17 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.9): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.17): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.22.17 + '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.9): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.17): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-jsx@7.21.4(@babel/core@7.22.9): - resolution: {integrity: sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.9 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - - /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-typescript@7.21.4(@babel/core@7.22.9): - resolution: {integrity: sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.9 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - - /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.9): + /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.17): resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.21.4(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-async-generator-functions@7.22.7(@babel/core@7.22.9): - resolution: {integrity: sha512-7HmE7pk/Fmke45TODvxvkxRMV9RazV+ZZzhOL9AG8G29TLrr3jkjwF7uJfxZ30EoXpO+LJkq4oA8NjO2DTnEDg==} + /@babel/plugin-transform-async-generator-functions@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.9) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) + '@babel/helper-remap-async-to-generator': 7.22.17(@babel/core@7.22.17) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-imports': 7.22.5 + '@babel/core': 7.22.17 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.9) + '@babel/helper-remap-async-to-generator': 7.22.17(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==} + /@babel/plugin-transform-block-scoping@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-G1czpdJBZCtngoK1sJgloLiOHUnkb/bLZwqVZD8kXmq0ZnVfTTWUcs9OWtp0mBtYJ+4LQY1fllqBkOIPhXmFmw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==} + /@babel/plugin-transform-class-static-block@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.9) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-classes@7.22.6(@babel/core@7.22.9): - resolution: {integrity: sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ==} + /@babel/plugin-transform-classes@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 dev: true - /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/template': 7.22.5 + '@babel/template': 7.22.15 dev: true - /@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==} + /@babel/plugin-transform-destructuring@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-HzG8sFl1ZVGTme74Nw+X01XsUTqERVQ6/RLHo3XjGRzm7XD6QTtfS3NJotVgCGy8BzkDqRjRBD8dAyJn5TuvSQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==} + /@babel/plugin-transform-dynamic-import@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 + '@babel/core': 7.22.17 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==} + /@babel/plugin-transform-export-namespace-from@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==} + /@babel/plugin-transform-for-of@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==} + /@babel/plugin-transform-json-strings@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==} + /@babel/plugin-transform-logical-assignment-operators@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==} + /@babel/plugin-transform-modules-commonjs@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-jWL4eh90w0HQOTKP2MoXXUpVxilxsB2Vl4ji69rSjS3EcZ/v4sBmn+A3NpepuJzBhOaEBbR7udonlHHn5DWidg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 dev: true - /@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==} + /@babel/plugin-transform-modules-systemjs@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 dev: true - /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==} + /@babel/plugin-transform-nullish-coalescing-operator@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==} + /@babel/plugin-transform-numeric-separator@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==} + /@babel/plugin-transform-object-rest-spread@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==} + /@babel/plugin-transform-optional-catch-binding@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-optional-chaining@7.22.6(@babel/core@7.22.9): - resolution: {integrity: sha512-Vd5HiWml0mDVtcLHIoEU5sw6HOUW/Zk0acLs/SAeuLzkGNOPc9DB4nkUajemhCmTIz3eiaKREZn2hQQqF79YTg==} + /@babel/plugin-transform-optional-chaining@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-ngQ2tBhq5vvSJw2Q2Z9i7ealNkpDMU0rGWnHPKqRZO0tzZ5tlaoz4hDvhXioOoaE0X2vfNss1djwg0DXlfu30A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==} + /@babel/plugin-transform-parameters@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==} + /@babel/plugin-transform-private-property-in-object@7.22.11(@babel/core@7.22.17): + resolution: {integrity: sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.9) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==} + /@babel/plugin-transform-regenerator@7.22.10(@babel/core@7.22.17): + resolution: {integrity: sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - regenerator-transform: 0.15.1 + regenerator-transform: 0.15.2 dev: true - /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-typescript@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-BnVR1CpKiuD0iobHPaM1iLvcwPYN2uVFAqoLVSpEDKWuOikoCv5HbKLxclhKYUXlWkX86DoZGtqI4XhbOsyrMg==} + /@babel/plugin-transform-typescript@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-1uirS0TnijxvQLnlv5wQBwOX3E1wCFX7ITv+9pBV2wKEk4K+M5tqDaoNXnTH8tjEIYHLO98MwiTWO04Ggz4XuA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.9) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==} + /@babel/plugin-transform-unicode-escapes@7.22.10(@babel/core@7.22.17): + resolution: {integrity: sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/preset-env@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-wNi5H/Emkhll/bqPjsjQorSykrlfY5OWakd6AulLvMEytpKasMVUpVy8RL4qBIBs5Ac6/5i0/Rv0b/Fg6Eag/g==} + /@babel/preset-env@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-tZFHr54GBkHk6hQuVA8w4Fmq+MSPsfvMG0vPnOYyTnJpyfMqybL8/MbNCPRT9zc2KBO2pe4tq15g6Uno4Jpoag==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.9) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.9) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.9) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-async-generator-functions': 7.22.7(@babel/core@7.22.9) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-classes': 7.22.6(@babel/core@7.22.9) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.22.9) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.9) - '@babel/preset-modules': 0.1.5(@babel/core@7.22.9) - '@babel/types': 7.22.5 - babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.9) - babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.9) - babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.9) - core-js-compat: 3.32.0 + '@babel/helper-validator-option': 7.22.15 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.17) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.17) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.17) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.17) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-async-generator-functions': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-block-scoping': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-class-static-block': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-classes': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-destructuring': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-dynamic-import': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-export-namespace-from': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-for-of': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-json-strings': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-logical-assignment-operators': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-modules-commonjs': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-modules-systemjs': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-nullish-coalescing-operator': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-numeric-separator': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-object-rest-spread': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-optional-catch-binding': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-private-property-in-object': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-regenerator': 7.22.10(@babel/core@7.22.17) + '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-escapes': 7.22.10(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.17) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.22.17) + '@babel/types': 7.22.17 + babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.17) + babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.17) + babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.17) + core-js-compat: 3.32.2 semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/preset-modules@0.1.5(@babel/core@7.22.9): - resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==} + /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.22.17): + resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.22.9) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.9) - '@babel/types': 7.22.5 + '@babel/types': 7.22.17 esutils: 2.0.3 dev: true - /@babel/preset-typescript@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==} + /@babel/preset-typescript@7.22.15(@babel/core@7.22.17): + resolution: {integrity: sha512-HblhNmh6yM+cU4VwbBRpxFhxsTdfS1zsvH9W+gEjD0ARV9+8B4sNfpI6GuhePti84nuvhiwKS539jKPFHskA9A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-typescript': 7.22.9(@babel/core@7.22.9) + '@babel/helper-validator-option': 7.22.15 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-modules-commonjs': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.22.17) dev: true /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime@7.21.0: - resolution: {integrity: sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - dev: true - - /@babel/template@7.20.7: - resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} + /@babel/runtime@7.22.15: + resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.21.4 - '@babel/parser': 7.21.4 - '@babel/types': 7.21.4 + regenerator-runtime: 0.14.0 dev: true - /@babel/template@7.22.5: - resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.17 dev: true - /@babel/traverse@7.22.8: - resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} + /@babel/traverse@7.22.17: + resolution: {integrity: sha512-xK4Uwm0JnAMvxYZxOVecss85WxTEIbTa7bnGyf/+EgCL5Zt3U7htUpEOWv9detPlamGKuRzCqw74xVglDWpPdg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.17 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.21.4: - resolution: {integrity: sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.19.4 - '@babel/helper-validator-identifier': 7.19.1 - to-fast-properties: 2.0.0 - dev: true - - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + /@babel/types@7.22.17: + resolution: {integrity: sha512-YSQPHLFtQNE5xN9tHuZnzu8vPr61wVTBZdfv1meex1NBosa4iT05k/Jw06ddJugi4bk7The/oSwQGFcksmEJQg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 to-fast-properties: 2.0.0 dev: true @@ -1516,29 +1389,29 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.49.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.46.0 - eslint-visitor-keys: 3.4.2 + eslint: 8.49.0 + eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.6.2: - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} + /@eslint-community/regexpp@4.8.1: + resolution: {integrity: sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.1: - resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} + /@eslint/eslintrc@2.1.2: + resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 espree: 9.6.1 - globals: 13.20.0 + globals: 13.21.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1548,13 +1421,13 @@ packages: - supports-color dev: true - /@eslint/js@8.46.0: - resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} + /@eslint/js@8.49.0: + resolution: {integrity: sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + /@humanwhocodes/config-array@0.11.11: + resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -1589,20 +1462,20 @@ packages: engines: {node: '>=8'} dev: true - /@jest/console@29.6.2: - resolution: {integrity: sha512-0N0yZof5hi44HAR2pPS+ikJ3nzKNoZdVu8FffRf3wy47I7Dm7etk/3KetMdRUqzVd16V4O2m2ISpNTbnIuqy1w==} + /@jest/console@29.7.0: + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 chalk: 4.1.2 - jest-message-util: 29.6.2 - jest-util: 29.6.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 slash: 3.0.0 dev: true - /@jest/core@29.6.2: - resolution: {integrity: sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg==} + /@jest/core@29.7.0: + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1610,32 +1483,32 @@ packages: node-notifier: optional: true dependencies: - '@jest/console': 29.6.2 - '@jest/reporters': 29.6.2 - '@jest/test-result': 29.6.2 - '@jest/transform': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 - jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.7) - jest-haste-map: 29.6.2 - jest-message-util: 29.6.2 - jest-regex-util: 29.4.3 - jest-resolve: 29.6.2 - jest-resolve-dependencies: 29.6.2 - jest-runner: 29.6.2 - jest-runtime: 29.6.2 - jest-snapshot: 29.6.2 - jest-util: 29.6.2 - jest-validate: 29.6.2 - jest-watcher: 29.6.2 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.6.0) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 micromatch: 4.0.5 - pretty-format: 29.6.2 + pretty-format: 29.7.0 slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: @@ -1644,66 +1517,59 @@ packages: - ts-node dev: true - /@jest/environment@29.6.2: - resolution: {integrity: sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q==} + /@jest/environment@29.7.0: + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/fake-timers': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 - jest-mock: 29.6.2 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 + jest-mock: 29.7.0 dev: true - /@jest/expect-utils@29.5.0: - resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} + /@jest/expect-utils@29.7.0: + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 dev: true - /@jest/expect-utils@29.6.2: - resolution: {integrity: sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==} + /@jest/expect@29.7.0: + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 - dev: true - - /@jest/expect@29.6.2: - resolution: {integrity: sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - expect: 29.6.2 - jest-snapshot: 29.6.2 + expect: 29.7.0 + jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color dev: true - /@jest/fake-timers@29.6.2: - resolution: {integrity: sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA==} + /@jest/fake-timers@29.7.0: + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 - '@sinonjs/fake-timers': 10.0.2 - '@types/node': 20.4.7 - jest-message-util: 29.6.2 - jest-mock: 29.6.2 - jest-util: 29.6.2 + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 20.6.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 dev: true - /@jest/globals@29.6.2: - resolution: {integrity: sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw==} + /@jest/globals@29.7.0: + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.2 - '@jest/expect': 29.6.2 - '@jest/types': 29.6.1 - jest-mock: 29.6.2 + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 transitivePeerDependencies: - supports-color dev: true - /@jest/reporters@29.6.2: - resolution: {integrity: sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw==} + /@jest/reporters@29.7.0: + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1712,25 +1578,25 @@ packages: optional: true dependencies: '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.6.2 - '@jest/test-result': 29.6.2 - '@jest/transform': 29.6.2 - '@jest/types': 29.6.1 - '@jridgewell/trace-mapping': 0.3.18 - '@types/node': 20.4.7 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.19 + '@types/node': 20.6.0 chalk: 4.1.2 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 exit: 0.1.2 glob: 7.2.3 graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 5.2.1 - istanbul-lib-report: 3.0.0 + istanbul-lib-instrument: 6.0.0 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - jest-message-util: 29.6.2 - jest-util: 29.6.2 - jest-worker: 29.6.2 + istanbul-reports: 3.1.6 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 slash: 3.0.0 string-length: 4.0.2 strip-ansi: 6.0.1 @@ -1739,92 +1605,73 @@ packages: - supports-color dev: true - /@jest/schemas@29.4.3: - resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.25.24 - dev: true - - /@jest/schemas@29.6.0: - resolution: {integrity: sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==} + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 dev: true - /@jest/source-map@29.6.0: - resolution: {integrity: sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==} + /@jest/source-map@29.6.3: + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 callsites: 3.1.0 graceful-fs: 4.2.11 dev: true - /@jest/test-result@29.6.2: - resolution: {integrity: sha512-3VKFXzcV42EYhMCsJQURptSqnyjqCGbtLuX5Xxb6Pm6gUf1wIRIl+mandIRGJyWKgNKYF9cnstti6Ls5ekduqw==} + /@jest/test-result@29.7.0: + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.6.2 - '@jest/types': 29.6.1 + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 dev: true - /@jest/test-sequencer@29.6.2: - resolution: {integrity: sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw==} + /@jest/test-sequencer@29.7.0: + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.6.2 + '@jest/test-result': 29.7.0 graceful-fs: 4.2.11 - jest-haste-map: 29.6.2 + jest-haste-map: 29.7.0 slash: 3.0.0 dev: true - /@jest/transform@29.6.2: - resolution: {integrity: sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg==} + /@jest/transform@29.7.0: + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.9 - '@jest/types': 29.6.1 - '@jridgewell/trace-mapping': 0.3.18 + '@babel/core': 7.22.17 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.19 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.11 - jest-haste-map: 29.6.2 - jest-regex-util: 29.4.3 - jest-util: 29.6.2 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 micromatch: 4.0.5 - pirates: 4.0.5 + pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color dev: true - /@jest/types@29.5.0: - resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 20.4.7 - '@types/yargs': 17.0.24 - chalk: 4.1.2 - dev: true - - /@jest/types@29.6.1: - resolution: {integrity: sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==} + /@jest/types@29.6.3: + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.6.0 + '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 20.4.7 + '@types/node': 20.6.0 '@types/yargs': 17.0.24 chalk: 4.1.2 dev: true @@ -1835,11 +1682,11 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true @@ -1848,45 +1695,41 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/source-map@0.3.3: - resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - dev: true - - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + '@jridgewell/trace-mapping': 0.3.19 dev: true /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@mswjs/cookies@0.2.2: resolution: {integrity: sha512-mlN83YSrcFgk7Dm1Mys40DLssI1KdJji2CMKN8eOlBqsTADYzj2+jWzsANsUTFbxDMWPD5e9bfA1RGqBpS3O1g==} engines: {node: '>=14'} dependencies: - '@types/set-cookie-parser': 2.4.2 + '@types/set-cookie-parser': 2.4.3 set-cookie-parser: 2.6.0 dev: true - /@mswjs/interceptors@0.17.9: - resolution: {integrity: sha512-4LVGt03RobMH/7ZrbHqRxQrS9cc2uh+iNKSj8UWr8M26A2i793ju+csaB5zaqYltqJmA2jUq4VeYfKmVqvsXQg==} + /@mswjs/interceptors@0.17.10: + resolution: {integrity: sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw==} engines: {node: '>=14'} dependencies: '@open-draft/until': 1.0.3 '@types/debug': 4.1.8 - '@xmldom/xmldom': 0.8.7 + '@xmldom/xmldom': 0.8.10 debug: 4.3.4 - headers-polyfill: 3.1.2 + headers-polyfill: 3.2.5 outvariant: 1.4.0 strict-event-emitter: 0.2.8 web-encoding: 1.1.5 @@ -1925,18 +1768,15 @@ packages: resolution: {integrity: sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==} dev: true - /@playwright/test@1.36.2: - resolution: {integrity: sha512-2rVZeyPRjxfPH6J0oGJqE8YxiM1IBRyM8hyrXYK7eSiAqmbNhxwcLa7dZ7fy9Kj26V7FYia5fh9XJRq4Dqme+g==} + /@playwright/test@1.38.0: + resolution: {integrity: sha512-xis/RXXsLxwThKnlIXouxmIvvT3zvQj1JE39GsNieMUrMpb3/GySHDh2j8itCG22qKVD4MYLBp7xB73cUW/UUw==} engines: {node: '>=16'} hasBin: true dependencies: - '@types/node': 20.4.7 - playwright-core: 1.36.2 - optionalDependencies: - fsevents: 2.3.2 + playwright: 1.38.0 dev: true - /@rollup/plugin-babel@6.0.3(@babel/core@7.22.9)(rollup@3.27.2): + /@rollup/plugin-babel@6.0.3(@babel/core@7.22.17)(rollup@3.29.1): resolution: {integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1949,14 +1789,14 @@ packages: rollup: optional: true dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-imports': 7.21.4 - '@rollup/pluginutils': 5.0.2(rollup@3.27.2) - rollup: 3.27.2 + '@babel/core': 7.22.17 + '@babel/helper-module-imports': 7.22.15 + '@rollup/pluginutils': 5.0.4(rollup@3.29.1) + rollup: 3.29.1 dev: true - /@rollup/plugin-node-resolve@15.1.0(rollup@3.27.2): - resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==} + /@rollup/plugin-node-resolve@15.2.1(rollup@3.29.1): + resolution: {integrity: sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0 @@ -1964,16 +1804,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.2) + '@rollup/pluginutils': 5.0.4(rollup@3.29.1) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 - resolve: 1.22.2 - rollup: 3.27.2 + resolve: 1.22.4 + rollup: 3.29.1 dev: true - /@rollup/plugin-terser@0.4.3(rollup@3.27.2): + /@rollup/plugin-terser@0.4.3(rollup@3.29.1): resolution: {integrity: sha512-EF0oejTMtkyhrkwCdg0HJ0IpkcaVg1MMSf2olHb2Jp+1mnLM04OhjpJWGma4HobiDTF0WCyViWuvadyE9ch2XA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1982,14 +1822,14 @@ packages: rollup: optional: true dependencies: - rollup: 3.27.2 + rollup: 3.29.1 serialize-javascript: 6.0.1 smob: 1.4.0 - terser: 5.19.2 + terser: 5.19.4 dev: true - /@rollup/pluginutils@5.0.2(rollup@3.27.2): - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + /@rollup/pluginutils@5.0.4(rollup@3.29.1): + resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0 @@ -1997,38 +1837,34 @@ packages: rollup: optional: true dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.27.2 - dev: true - - /@sinclair/typebox@0.25.24: - resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} + rollup: 3.29.1 dev: true /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sinonjs/commons@2.0.0: - resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} + /@sinonjs/commons@3.0.0: + resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} dependencies: type-detect: 4.0.8 dev: true - /@sinonjs/fake-timers@10.0.2: - resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} + /@sinonjs/fake-timers@10.3.0: + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} dependencies: - '@sinonjs/commons': 2.0.0 + '@sinonjs/commons': 3.0.0 dev: true /@testing-library/dom@9.3.1: resolution: {integrity: sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==} engines: {node: '>=14'} dependencies: - '@babel/code-frame': 7.21.4 - '@babel/runtime': 7.21.0 + '@babel/code-frame': 7.22.13 + '@babel/runtime': 7.22.15 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 @@ -2046,33 +1882,33 @@ packages: resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} dev: true - /@types/babel__core@7.20.0: - resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} + /@types/babel__core@7.20.1: + resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==} dependencies: - '@babel/parser': 7.21.4 - '@babel/types': 7.21.4 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.17 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.18.3 + '@types/babel__traverse': 7.20.1 dev: true /@types/babel__generator@7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.21.4 + '@babel/types': 7.22.17 dev: true /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.21.4 - '@babel/types': 7.21.4 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.17 dev: true - /@types/babel__traverse@7.18.3: - resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==} + /@types/babel__traverse@7.20.1: + resolution: {integrity: sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==} dependencies: - '@babel/types': 7.21.4 + '@babel/types': 7.22.17 dev: true /@types/cookie@0.4.1: @@ -2085,14 +1921,14 @@ packages: '@types/ms': 0.7.31 dev: true - /@types/estree@1.0.0: - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} + /@types/estree@1.0.1: + resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} dev: true /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: - '@types/node': 20.4.7 + '@types/node': 20.6.0 dev: true /@types/istanbul-lib-coverage@2.0.4: @@ -2114,19 +1950,19 @@ packages: /@types/jest-axe@3.5.5: resolution: {integrity: sha512-b8WDIdoeKtr/JDJ2+QjFXMuS8UhfdMA6+15Z5KjjIie3jQrSXD9KZWMSQxc0nPtx7L9rIFKdiDpQk+m7s4a/8w==} dependencies: - '@types/jest': 29.5.3 + '@types/jest': 29.5.4 axe-core: 3.5.6 dev: true - /@types/jest@29.5.3: - resolution: {integrity: sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==} + /@types/jest@29.5.4: + resolution: {integrity: sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==} dependencies: - expect: 29.5.0 - pretty-format: 29.5.0 + expect: 29.7.0 + pretty-format: 29.7.0 dev: true - /@types/jquery@3.5.16: - resolution: {integrity: sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==} + /@types/jquery@3.5.18: + resolution: {integrity: sha512-sNm7O6LECFhHmF+3KYo6QIl2fIbjlPYa0PDgDQwfOaEJzwpK20Eub9Ke7VKkGsSJ2K0HUR50S266qYzRX4GlSw==} dependencies: '@types/sizzle': 2.3.3 dev: true @@ -2138,15 +1974,11 @@ packages: /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 20.4.7 - '@types/tough-cookie': 4.0.2 + '@types/node': 20.6.0 + '@types/tough-cookie': 4.0.3 parse5: 7.1.2 dev: true - /@types/json-schema@7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} - dev: true - /@types/json-schema@7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true @@ -2159,26 +1991,22 @@ packages: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: true - /@types/node@20.4.7: - resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} + /@types/node@20.6.0: + resolution: {integrity: sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==} dev: true /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} - dev: true - - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + /@types/semver@7.5.2: + resolution: {integrity: sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==} dev: true - /@types/set-cookie-parser@2.4.2: - resolution: {integrity: sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==} + /@types/set-cookie-parser@2.4.3: + resolution: {integrity: sha512-7QhnH7bi+6KAhBB+Auejz1uV9DHiopZqu7LfR/5gZZTkejJV5nYeZZpgfFoE0N8aDsXuiYpfKyfyMatCwQhyTQ==} dependencies: - '@types/node': 20.4.7 + '@types/node': 20.6.0 dev: true /@types/sizzle@2.3.3: @@ -2189,8 +2017,8 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true - /@types/tough-cookie@4.0.2: - resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} + /@types/tough-cookie@4.0.3: + resolution: {integrity: sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==} dev: true /@types/yargs-parser@21.0.0: @@ -2203,8 +2031,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin@6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw==} + /@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -2214,27 +2042,26 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/type-utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.2.1 + '@eslint-community/regexpp': 4.8.1 + '@typescript-eslint/parser': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/type-utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 - eslint: 8.46.0 + eslint: 8.49.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 - natural-compare-lite: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg==} + /@typescript-eslint/parser@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2243,35 +2070,35 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 - eslint: 8.46.0 - typescript: 5.1.6 + eslint: 8.49.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@5.58.0: - resolution: {integrity: sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==} + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.58.0 - '@typescript-eslint/visitor-keys': 5.58.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@6.2.1: - resolution: {integrity: sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==} + /@typescript-eslint/scope-manager@6.7.0: + resolution: {integrity: sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/visitor-keys': 6.7.0 dev: true - /@typescript-eslint/type-utils@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ==} + /@typescript-eslint/type-utils@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2280,28 +2107,28 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) - '@typescript-eslint/utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.46.0 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + eslint: 8.49.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.58.0: - resolution: {integrity: sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==} + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.2.1: - resolution: {integrity: sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==} + /@typescript-eslint/types@6.7.0: + resolution: {integrity: sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.58.0(typescript@5.1.6): - resolution: {integrity: sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==} + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2309,20 +2136,20 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.58.0 - '@typescript-eslint/visitor-keys': 5.58.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.4.0 - tsutils: 3.21.0(typescript@5.1.6) - typescript: 5.1.6 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.2.1(typescript@5.1.6): - resolution: {integrity: sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==} + /@typescript-eslint/typescript-estree@6.7.0(typescript@5.2.2): + resolution: {integrity: sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -2330,75 +2157,75 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.58.0(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==} + /@typescript-eslint/utils@5.62.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.58.0 - '@typescript-eslint/types': 5.58.0 - '@typescript-eslint/typescript-estree': 5.58.0(typescript@5.1.6) - eslint: 8.46.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.2 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + eslint: 8.49.0 eslint-scope: 5.1.1 - semver: 7.4.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==} + /@typescript-eslint/utils@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) - eslint: 8.46.0 + '@types/semver': 7.5.2 + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) + eslint: 8.49.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@5.58.0: - resolution: {integrity: sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==} + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.58.0 - eslint-visitor-keys: 3.4.0 + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@6.2.1: - resolution: {integrity: sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==} + /@typescript-eslint/visitor-keys@6.7.0: + resolution: {integrity: sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.2.1 - eslint-visitor-keys: 3.4.2 + '@typescript-eslint/types': 6.7.0 + eslint-visitor-keys: 3.4.3 dev: true - /@xmldom/xmldom@0.8.7: - resolution: {integrity: sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==} + /@xmldom/xmldom@0.8.10: + resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} engines: {node: '>=10.0.0'} dev: true @@ -2415,7 +2242,7 @@ packages: /acorn-globals@7.0.1: resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} dependencies: - acorn: 8.8.2 + acorn: 8.10.0 acorn-walk: 8.2.0 dev: true @@ -2438,12 +2265,6 @@ packages: hasBin: true dev: true - /acorn@8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -2514,7 +2335,7 @@ packages: /aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} dependencies: - deep-equal: 2.2.0 + deep-equal: 2.2.2 dev: true /array-buffer-byte-length@1.0.0: @@ -2524,14 +2345,14 @@ packages: is-array-buffer: 3.0.2 dev: true - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} + /array-includes@3.1.7: + resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.0 + define-properties: 1.2.1 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 is-string: 1.0.7 dev: true @@ -2540,54 +2361,67 @@ packages: engines: {node: '>=8'} dev: true - /array.prototype.findlastindex@1.2.2: - resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} + /array.prototype.findlastindex@1.2.3: + resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 dev: true - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} + /array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 dev: true + /arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 + dev: true + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /autoprefixer@10.4.14(postcss@8.4.27): - resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==} + /autoprefixer@10.4.15(postcss@8.4.29): + resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.5 - caniuse-lite: 1.0.30001477 - fraction.js: 4.2.0 + browserslist: 4.21.10 + caniuse-lite: 1.0.30001534 + fraction.js: 4.3.6 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.27 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true @@ -2606,17 +2440,17 @@ packages: engines: {node: '>=4'} dev: true - /babel-jest@29.6.2(@babel/core@7.22.9): - resolution: {integrity: sha512-BYCzImLos6J3BH/+HvUCHG1dTf2MzmAB4jaVxHV+29RZLjR29XuYTmsf2sdDwkrb+FczkGo3kOhE7ga6sI0P4A==} + /babel-jest@29.7.0(@babel/core@7.22.17): + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.22.9 - '@jest/transform': 29.6.2 - '@types/babel__core': 7.20.0 + '@babel/core': 7.22.17 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.1 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.5.0(@babel/core@7.22.9) + babel-preset-jest: 29.6.3(@babel/core@7.22.17) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -2628,7 +2462,7 @@ packages: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.22.5 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -2637,81 +2471,81 @@ packages: - supports-color dev: true - /babel-plugin-jest-hoist@29.5.0: - resolution: {integrity: sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==} + /babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.21.4 - '@types/babel__core': 7.20.0 - '@types/babel__traverse': 7.18.3 + '@babel/template': 7.22.15 + '@babel/types': 7.22.17 + '@types/babel__core': 7.20.1 + '@types/babel__traverse': 7.20.1 dev: true - /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.9): + /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.17): resolution: {integrity: sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.9): + /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.9) - core-js-compat: 3.32.0 + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) + core-js-compat: 3.32.2 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.9): + /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.17): resolution: {integrity: sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) transitivePeerDependencies: - supports-color dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.9): + /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.17): resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.9) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.9) - dev: true - - /babel-preset-jest@29.5.0(@babel/core@7.22.9): - resolution: {integrity: sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==} + '@babel/core': 7.22.17 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.17) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.17) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.17) + dev: true + + /babel-preset-jest@29.6.3(@babel/core@7.22.17): + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - babel-plugin-jest-hoist: 29.5.0 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.9) + '@babel/core': 7.22.17 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.17) dev: true /balanced-match@1.0.2: @@ -2725,6 +2559,7 @@ packages: /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} + requiresBuild: true dev: true /bl@4.1.0: @@ -2754,23 +2589,12 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001519 - electron-to-chromium: 1.4.485 + caniuse-lite: 1.0.30001534 + electron-to-chromium: 1.4.520 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true - /browserslist@4.21.5: - resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001477 - electron-to-chromium: 1.4.357 - node-releases: 2.0.10 - update-browserslist-db: 1.0.10(browserslist@4.21.5) - dev: true - /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: @@ -2797,7 +2621,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true /callsites@3.1.0: @@ -2815,12 +2639,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001477: - resolution: {integrity: sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==} - dev: true - - /caniuse-lite@1.0.30001519: - resolution: {integrity: sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==} + /caniuse-lite@1.0.30001534: + resolution: {integrity: sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==} dev: true /chalk@2.4.2: @@ -2832,14 +2652,6 @@ packages: supports-color: 5.5.0 dev: true - /chalk@4.1.1: - resolution: {integrity: sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -2869,7 +2681,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /ci-info@3.8.0: @@ -2877,8 +2689,8 @@ packages: engines: {node: '>=8'} dev: true - /cjs-module-lexer@1.2.2: - resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} + /cjs-module-lexer@1.2.3: + resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} dev: true /cli-cursor@3.1.0: @@ -2888,8 +2700,8 @@ packages: restore-cursor: 3.1.0 dev: true - /cli-spinners@2.8.0: - resolution: {integrity: sha512-/eG5sJcvEIwxcdYM86k5tPwn0MUzkX5YY3eImTGpJOZgVe4SdTMY14vQpcxgBzJ0wXwAYrS8E+c3uHeK4JNyzQ==} + /cli-spinners@2.9.1: + resolution: {integrity: sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==} engines: {node: '>=6'} dev: true @@ -2917,8 +2729,8 @@ packages: engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} dev: true - /collect-v8-coverage@1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} + /collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} dev: true /color-convert@1.9.3: @@ -2975,12 +2787,31 @@ packages: engines: {node: '>= 0.6'} dev: true - /core-js-compat@3.32.0: - resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==} + /core-js-compat@3.32.2: + resolution: {integrity: sha512-+GjlguTDINOijtVRUxrQOv3kfu9rl+qPNdX2LTbJ/ZyVTuxK+ksVSAGX1nHstu4hrv1En/uPTtWgq2gI5wt4AQ==} dependencies: browserslist: 4.21.10 dev: true + /create-jest@29.7.0(@types/node@20.6.0): + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.6.0) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3056,12 +2887,13 @@ packages: optional: true dev: true - /deep-equal@2.2.0: - resolution: {integrity: sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==} + /deep-equal@2.2.2: + resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==} dependencies: + array-buffer-byte-length: 1.0.0 call-bind: 1.0.2 es-get-iterator: 1.1.3 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-arguments: 1.1.1 is-array-buffer: 3.0.2 is-date-object: 1.0.5 @@ -3071,11 +2903,11 @@ packages: object-is: 1.1.5 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 side-channel: 1.0.4 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 - which-typed-array: 1.1.9 + which-typed-array: 1.1.11 dev: true /deep-is@0.1.4: @@ -3093,10 +2925,20 @@ packages: clone: 1.0.4 dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + /define-data-property@1.1.0: + resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} engines: {node: '>= 0.4'} dependencies: + get-intrinsic: 1.2.1 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + dev: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.0 has-property-descriptors: 1.0.0 object-keys: 1.1.1 dev: true @@ -3116,8 +2958,8 @@ packages: engines: {node: '>=8'} dev: true - /diff-sequences@29.4.3: - resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true @@ -3153,12 +2995,8 @@ packages: webidl-conversions: 7.0.0 dev: true - /electron-to-chromium@1.4.357: - resolution: {integrity: sha512-UTkCbNTAcGXABmEnQrGcW4m3cG6fcyBfD4KDF0iyEAlbrGZiY9dmslyDAGOD1Kr5biN2F743Y30aRCOtau35Vw==} - dev: true - - /electron-to-chromium@1.4.485: - resolution: {integrity: sha512-1ndQ5IBNEnFirPwvyud69GHL+31FkE09gH/CJ6m3KCbkx3i0EVOrjwz4UNxRmN9H8OVHbC6vMRZGN1yCvjSs9w==} + /electron-to-chromium@1.4.520: + resolution: {integrity: sha512-Frfus2VpYADsrh1lB3v/ft/WVFlVzOIm+Q0p7U7VqHI6qr7NWHYKe+Wif3W50n7JAFoBsWVsoU0+qDks6WQ60g==} dev: true /emittery@0.13.1: @@ -3170,8 +3008,8 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /entities@4.4.0: - resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} dev: true @@ -3181,17 +3019,18 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract@1.21.2: - resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} + /es-abstract@1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 call-bind: 1.0.2 es-set-tostringtag: 2.0.1 es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.0 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 @@ -3206,26 +3045,30 @@ packages: is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 is-weakref: 1.0.2 object-inspect: 1.12.3 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.0.1 safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 + which-typed-array: 1.1.11 dev: true /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -3239,7 +3082,7 @@ packages: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has: 1.0.3 has-tostringtag: 1.0.0 dev: true @@ -3279,21 +3122,20 @@ packages: engines: {node: '>=10'} dev: true - /escodegen@2.0.0: - resolution: {integrity: sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==} + /escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} engines: {node: '>=6.0'} hasBin: true dependencies: esprima: 4.0.1 estraverse: 5.3.0 esutils: 2.0.3 - optionator: 0.8.3 optionalDependencies: source-map: 0.6.1 dev: true - /eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 is-core-module: 2.13.0 @@ -3302,7 +3144,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.2.1)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.0)(eslint-import-resolver-node@0.3.9)(eslint@8.49.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -3323,16 +3165,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.7.0(eslint@8.49.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.46.0 - eslint-import-resolver-node: 0.3.7 + eslint: 8.49.0 + eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.28.0(@typescript-eslint/parser@6.2.1)(eslint@8.46.0): - resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.0)(eslint@8.49.0): + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3341,24 +3183,23 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - array-includes: 3.1.6 - array.prototype.findlastindex: 1.2.2 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 + '@typescript-eslint/parser': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + array-includes: 3.1.7 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.46.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.2.1)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0) + eslint: 8.49.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0)(eslint-import-resolver-node@0.3.9)(eslint@8.49.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 - object.fromentries: 2.0.6 - object.groupby: 1.0.0 - object.values: 1.1.6 - resolve: 1.22.4 + object.fromentries: 2.0.7 + object.groupby: 1.0.1 + object.values: 1.1.7 semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: @@ -3367,7 +3208,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0)(jest@29.6.2)(typescript@5.1.6): + /eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@6.7.0)(eslint@8.49.0)(jest@29.7.0)(typescript@5.2.2): resolution: {integrity: sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -3380,17 +3221,17 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/utils': 5.58.0(eslint@8.46.0)(typescript@5.1.6) - eslint: 8.46.0 - jest: 29.6.2(@types/node@20.4.7) + '@typescript-eslint/eslint-plugin': 6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.49.0)(typescript@5.2.2) + eslint: 8.49.0 + jest: 29.7.0(@types/node@20.6.0) transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-playwright@0.15.3(eslint-plugin-jest@27.2.3)(eslint@8.46.0): - resolution: {integrity: sha512-LQMW5y0DLK5Fnpya7JR1oAYL2/7Y9wDiYw6VZqlKqcRGSgjbVKNqxraphk7ra1U3Bb5EK444xMgUlQPbMg2M1g==} + /eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.2.3)(eslint@8.49.0): + resolution: {integrity: sha512-DcHpF0SLbNeh9MT4pMzUGuUSnJ7q5MWbP8sSEFIMS6j7Ggnduq8ghNlfhURgty4c1YFny7Ge9xYTO1FSAoV2Vw==} peerDependencies: eslint: '>=7' eslint-plugin-jest: '>=25' @@ -3398,18 +3239,18 @@ packages: eslint-plugin-jest: optional: true dependencies: - eslint: 8.46.0 - eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0)(jest@29.6.2)(typescript@5.1.6) + eslint: 8.49.0 + eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.7.0)(eslint@8.49.0)(jest@29.7.0)(typescript@5.2.2) dev: true - /eslint-plugin-testing-library@5.11.0(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-ELY7Gefo+61OfXKlQeXNIDVVLPcvKTeiQOoMZG9TeuWa7Ln4dUNRv8JdRWBQI9Mbb427XGlVB1aa1QPZxBJM8Q==} + /eslint-plugin-testing-library@6.0.1(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-CEYtjpcF3hAaQtYsTZqciR7s5z+T0LCMTwJeW+pz6kBnGtc866wAKmhaiK2Gsjc2jWNP7Gt6zhNr2DE1ZW4e+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} peerDependencies: eslint: ^7.5.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.58.0(eslint@8.46.0)(typescript@5.1.6) - eslint: 8.46.0 + '@typescript-eslint/utils': 5.62.0(eslint@8.49.0)(typescript@5.2.2) + eslint: 8.49.0 transitivePeerDependencies: - supports-color - typescript @@ -3431,26 +3272,21 @@ packages: estraverse: 5.3.0 dev: true - /eslint-visitor-keys@3.4.0: - resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==} + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint-visitor-keys@3.4.2: - resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /eslint@8.46.0: - resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} + /eslint@8.49.0: + resolution: {integrity: sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) - '@eslint-community/regexpp': 4.6.2 - '@eslint/eslintrc': 2.1.1 - '@eslint/js': 8.46.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@eslint-community/regexpp': 4.8.1 + '@eslint/eslintrc': 2.1.2 + '@eslint/js': 8.49.0 + '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -3460,7 +3296,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -3468,7 +3304,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 + globals: 13.21.0 graphemer: 1.4.0 ignore: 5.2.4 imurmurhash: 0.1.4 @@ -3493,7 +3329,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 dev: true /esprima@4.0.1: @@ -3560,27 +3396,15 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect@29.5.0: - resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.5.0 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 - dev: true - - /expect@29.6.2: - resolution: {integrity: sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==} + /expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.6.2 - '@types/node': 20.4.7 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.6.2 - jest-message-util: 29.6.2 - jest-util: 29.6.2 + '@jest/expect-utils': 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 dev: true /external-editor@3.1.0: @@ -3596,8 +3420,8 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3638,12 +3462,13 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.0.4 + flat-cache: 3.1.0 dev: true /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + requiresBuild: true dependencies: to-regex-range: 5.0.1 dev: true @@ -3664,11 +3489,12 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} + /flat-cache@3.1.0: + resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} + engines: {node: '>=12.0.0'} dependencies: flatted: 3.2.7 + keyv: 4.5.3 rimraf: 3.0.2 dev: true @@ -3691,8 +3517,8 @@ packages: mime-types: 2.1.35 dev: true - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} + /fraction.js@4.3.6: + resolution: {integrity: sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==} dev: true /fs-extra@11.1.1: @@ -3720,17 +3546,25 @@ packages: dev: true optional: true + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 functions-have-names: 1.2.3 dev: true @@ -3748,14 +3582,6 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-intrinsic@1.2.0: - resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - dev: true - /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -3785,7 +3611,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true /givens@1.3.9: @@ -3822,8 +3648,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.21.0: + resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -3833,7 +3659,7 @@ packages: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /globby@11.1.0: @@ -3842,18 +3668,18 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 dev: true - /globby@13.1.3: - resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 @@ -3862,7 +3688,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true /graceful-fs@4.2.11: @@ -3873,8 +3699,8 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /graphql@16.7.1: - resolution: {integrity: sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg==} + /graphql@16.8.0: + resolution: {integrity: sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} dev: true @@ -3895,7 +3721,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true /has-proto@1.0.1: @@ -3922,8 +3748,8 @@ packages: function-bind: 1.1.1 dev: true - /headers-polyfill@3.1.2: - resolution: {integrity: sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==} + /headers-polyfill@3.2.5: + resolution: {integrity: sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA==} dev: true /html-encoding-sniffer@3.0.0: @@ -4019,8 +3845,8 @@ packages: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true - /inquirer@8.2.5: - resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} + /inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} engines: {node: '>=12.0.0'} dependencies: ansi-escapes: 4.3.2 @@ -4033,18 +3859,18 @@ packages: mute-stream: 0.0.8 ora: 5.4.1 run-async: 2.4.1 - rxjs: 7.8.0 + rxjs: 7.8.1 string-width: 4.2.3 strip-ansi: 6.0.1 through: 2.3.8 - wrap-ansi: 7.0.0 + wrap-ansi: 6.2.0 dev: true /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has: 1.0.3 side-channel: 1.0.4 dev: true @@ -4061,8 +3887,8 @@ packages: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-typed-array: 1.1.10 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 dev: true /is-arrayish@0.2.1: @@ -4078,6 +3904,7 @@ packages: /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + requiresBuild: true dependencies: binary-extensions: 2.2.0 dev: true @@ -4102,12 +3929,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-core-module@2.12.0: - resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} - dependencies: - has: 1.0.3 - dev: true - /is-core-module@2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: @@ -4182,6 +4003,7 @@ packages: /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + requiresBuild: true dev: true /is-path-inside@3.0.3: @@ -4230,15 +4052,11 @@ packages: has-symbols: 1.0.3 dev: true - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + which-typed-array: 1.1.11 dev: true /is-unicode-supported@0.1.0: @@ -4260,7 +4078,7 @@ packages: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true /isarray@2.0.5: @@ -4280,21 +4098,34 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.22.9 - '@babel/parser': 7.21.4 + '@babel/core': 7.22.17 + '@babel/parser': 7.22.16 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} + /istanbul-lib-instrument@6.0.0: + resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==} + engines: {node: '>=10'} dependencies: + '@babel/core': 7.22.17 + '@babel/parser': 7.22.16 + '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: true + + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + dependencies: + istanbul-lib-coverage: 3.2.0 + make-dir: 4.0.0 supports-color: 7.2.0 dev: true @@ -4309,12 +4140,12 @@ packages: - supports-color dev: true - /istanbul-reports@3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 dev: true /jest-axe@8.0.0: @@ -4327,36 +4158,37 @@ packages: lodash.merge: 4.6.2 dev: true - /jest-changed-files@29.5.0: - resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} + /jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: execa: 5.1.1 + jest-util: 29.7.0 p-limit: 3.1.0 dev: true - /jest-circus@29.6.2: - resolution: {integrity: sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw==} + /jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.2 - '@jest/expect': 29.6.2 - '@jest/test-result': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 is-generator-fn: 2.1.0 - jest-each: 29.6.2 - jest-matcher-utils: 29.6.2 - jest-message-util: 29.6.2 - jest-runtime: 29.6.2 - jest-snapshot: 29.6.2 - jest-util: 29.6.2 + jest-each: 29.7.0 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 p-limit: 3.1.0 - pretty-format: 29.6.2 - pure-rand: 6.0.1 + pretty-format: 29.7.0 + pure-rand: 6.0.3 slash: 3.0.0 stack-utils: 2.0.6 transitivePeerDependencies: @@ -4364,8 +4196,8 @@ packages: - supports-color dev: true - /jest-cli@29.6.2(@types/node@20.4.7): - resolution: {integrity: sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q==} + /jest-cli@29.7.0(@types/node@20.6.0): + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -4374,18 +4206,17 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.6.2 - '@jest/test-result': 29.6.2 - '@jest/types': 29.6.1 + '@jest/core': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.6.0) exit: 0.1.2 - graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.4.7) - jest-util: 29.6.2 - jest-validate: 29.6.2 - prompts: 2.4.2 - yargs: 17.7.1 + jest-config: 29.7.0(@types/node@20.6.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4393,8 +4224,8 @@ packages: - ts-node dev: true - /jest-config@29.6.2(@types/node@20.4.7): - resolution: {integrity: sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw==} + /jest-config@29.7.0(@types/node@20.6.0): + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@types/node': '*' @@ -4405,27 +4236,27 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.22.9 - '@jest/test-sequencer': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 - babel-jest: 29.6.2(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 + babel-jest: 29.7.0(@babel/core@7.22.17) chalk: 4.1.2 ci-info: 3.8.0 deepmerge: 4.3.1 glob: 7.2.3 graceful-fs: 4.2.11 - jest-circus: 29.6.2 - jest-environment-node: 29.6.2 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.6.2 - jest-runner: 29.6.2 - jest-util: 29.6.2 - jest-validate: 29.6.2 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 micromatch: 4.0.5 parse-json: 5.2.0 - pretty-format: 29.6.2 + pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -4433,46 +4264,36 @@ packages: - supports-color dev: true - /jest-diff@29.5.0: - resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 - dev: true - - /jest-diff@29.6.2: - resolution: {integrity: sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==} + /jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - diff-sequences: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.6.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: true - /jest-docblock@29.4.3: - resolution: {integrity: sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==} + /jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: detect-newline: 3.1.0 dev: true - /jest-each@29.6.2: - resolution: {integrity: sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw==} + /jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 + '@jest/types': 29.6.3 chalk: 4.1.2 - jest-get-type: 29.4.3 - jest-util: 29.6.2 - pretty-format: 29.6.2 + jest-get-type: 29.6.3 + jest-util: 29.7.0 + pretty-format: 29.7.0 dev: true - /jest-environment-jsdom@29.6.2: - resolution: {integrity: sha512-7oa/+266AAEgkzae8i1awNEfTfjwawWKLpiw2XesZmaoVVj9u9t8JOYx18cG29rbPNtkUlZ8V4b5Jb36y/VxoQ==} + /jest-environment-jsdom@29.7.0: + resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: canvas: ^2.5.0 @@ -4480,13 +4301,13 @@ packages: canvas: optional: true dependencies: - '@jest/environment': 29.6.2 - '@jest/fake-timers': 29.6.2 - '@jest/types': 29.6.1 + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.4.7 - jest-mock: 29.6.2 - jest-util: 29.6.2 + '@types/node': 20.6.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 jsdom: 20.0.3 transitivePeerDependencies: - bufferutil @@ -4494,19 +4315,19 @@ packages: - utf-8-validate dev: true - /jest-environment-node@29.6.2: - resolution: {integrity: sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ==} + /jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.2 - '@jest/fake-timers': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 - jest-mock: 29.6.2 - jest-util: 29.6.2 + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 dev: true - /jest-extended@4.0.1(jest@29.6.2): + /jest-extended@4.0.1(jest@29.7.0): resolution: {integrity: sha512-KM6dwuBUAgy6QONuR19CGubZB9Hkjqvl/d5Yc/FXsdB8+gsGxB2VQ+NEdOrr95J4GMPeLnDoPOKyi6+mKCCnZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -4515,41 +4336,41 @@ packages: jest: optional: true dependencies: - jest: 29.6.2(@types/node@20.4.7) - jest-diff: 29.5.0 - jest-get-type: 29.4.3 + jest: 29.7.0(@types/node@20.6.0) + jest-diff: 29.7.0 + jest-get-type: 29.6.3 dev: true - /jest-get-type@29.4.3: - resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} + /jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-haste-map@29.6.2: - resolution: {integrity: sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==} + /jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 + '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.6 - '@types/node': 20.4.7 + '@types/node': 20.6.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 - jest-regex-util: 29.4.3 - jest-util: 29.6.2 - jest-worker: 29.6.2 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true - /jest-leak-detector@29.6.2: - resolution: {integrity: sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ==} + /jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 - pretty-format: 29.6.2 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: true /jest-matcher-utils@29.2.2: @@ -4557,71 +4378,46 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 - dev: true - - /jest-matcher-utils@29.5.0: - resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: true - /jest-matcher-utils@29.6.2: - resolution: {integrity: sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==} + /jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.6.2 - jest-get-type: 29.4.3 - pretty-format: 29.6.2 - dev: true - - /jest-message-util@29.5.0: - resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.21.4 - '@jest/types': 29.5.0 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.11 - micromatch: 4.0.5 - pretty-format: 29.5.0 - slash: 3.0.0 - stack-utils: 2.0.6 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: true - /jest-message-util@29.6.2: - resolution: {integrity: sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==} + /jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.21.4 - '@jest/types': 29.6.1 + '@babel/code-frame': 7.22.13 + '@jest/types': 29.6.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.6.2 + pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 dev: true - /jest-mock@29.6.2: - resolution: {integrity: sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg==} + /jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 - '@types/node': 20.4.7 - jest-util: 29.6.2 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 + jest-util: 29.7.0 dev: true - /jest-pnp-resolver@1.2.3(jest-resolve@29.6.2): + /jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} engines: {node: '>=6'} peerDependencies: @@ -4630,188 +4426,176 @@ packages: jest-resolve: optional: true dependencies: - jest-resolve: 29.6.2 + jest-resolve: 29.7.0 dev: true - /jest-regex-util@29.4.3: - resolution: {integrity: sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==} + /jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-resolve-dependencies@29.6.2: - resolution: {integrity: sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w==} + /jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-regex-util: 29.4.3 - jest-snapshot: 29.6.2 + jest-regex-util: 29.6.3 + jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color dev: true - /jest-resolve@29.6.2: - resolution: {integrity: sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw==} + /jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 graceful-fs: 4.2.11 - jest-haste-map: 29.6.2 - jest-pnp-resolver: 1.2.3(jest-resolve@29.6.2) - jest-util: 29.6.2 - jest-validate: 29.6.2 - resolve: 1.22.2 + jest-haste-map: 29.7.0 + jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + resolve: 1.22.4 resolve.exports: 2.0.2 slash: 3.0.0 dev: true - /jest-runner@29.6.2: - resolution: {integrity: sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w==} + /jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.6.2 - '@jest/environment': 29.6.2 - '@jest/test-result': 29.6.2 - '@jest/transform': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/console': 29.7.0 + '@jest/environment': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 - jest-docblock: 29.4.3 - jest-environment-node: 29.6.2 - jest-haste-map: 29.6.2 - jest-leak-detector: 29.6.2 - jest-message-util: 29.6.2 - jest-resolve: 29.6.2 - jest-runtime: 29.6.2 - jest-util: 29.6.2 - jest-watcher: 29.6.2 - jest-worker: 29.6.2 + jest-docblock: 29.7.0 + jest-environment-node: 29.7.0 + jest-haste-map: 29.7.0 + jest-leak-detector: 29.7.0 + jest-message-util: 29.7.0 + jest-resolve: 29.7.0 + jest-runtime: 29.7.0 + jest-util: 29.7.0 + jest-watcher: 29.7.0 + jest-worker: 29.7.0 p-limit: 3.1.0 source-map-support: 0.5.13 transitivePeerDependencies: - supports-color dev: true - /jest-runtime@29.6.2: - resolution: {integrity: sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg==} + /jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.2 - '@jest/fake-timers': 29.6.2 - '@jest/globals': 29.6.2 - '@jest/source-map': 29.6.0 - '@jest/test-result': 29.6.2 - '@jest/transform': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/globals': 29.7.0 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 chalk: 4.1.2 - cjs-module-lexer: 1.2.2 - collect-v8-coverage: 1.0.1 + cjs-module-lexer: 1.2.3 + collect-v8-coverage: 1.0.2 glob: 7.2.3 graceful-fs: 4.2.11 - jest-haste-map: 29.6.2 - jest-message-util: 29.6.2 - jest-mock: 29.6.2 - jest-regex-util: 29.4.3 - jest-resolve: 29.6.2 - jest-snapshot: 29.6.2 - jest-util: 29.6.2 + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 slash: 3.0.0 strip-bom: 4.0.0 transitivePeerDependencies: - supports-color dev: true - /jest-snapshot@29.6.2: - resolution: {integrity: sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA==} + /jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.9 - '@babel/generator': 7.21.4 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.9) - '@babel/plugin-syntax-typescript': 7.21.4(@babel/core@7.22.9) - '@babel/types': 7.21.4 - '@jest/expect-utils': 29.6.2 - '@jest/transform': 29.6.2 - '@jest/types': 29.6.1 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.9) + '@babel/core': 7.22.17 + '@babel/generator': 7.22.15 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.17) + '@babel/types': 7.22.17 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.17) chalk: 4.1.2 - expect: 29.6.2 + expect: 29.7.0 graceful-fs: 4.2.11 - jest-diff: 29.6.2 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.6.2 - jest-message-util: 29.6.2 - jest-util: 29.6.2 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 natural-compare: 1.4.0 - pretty-format: 29.6.2 + pretty-format: 29.7.0 semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true - /jest-util@29.5.0: - resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} + /jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 - '@types/node': 20.4.7 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 dev: true - /jest-util@29.6.2: - resolution: {integrity: sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==} + /jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.6.1 - '@types/node': 20.4.7 - chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - dev: true - - /jest-validate@29.6.2: - resolution: {integrity: sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.1 + '@jest/types': 29.6.3 camelcase: 6.3.0 chalk: 4.1.2 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 leven: 3.1.0 - pretty-format: 29.6.2 + pretty-format: 29.7.0 dev: true - /jest-watcher@29.6.2: - resolution: {integrity: sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA==} + /jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.6.2 - '@jest/types': 29.6.1 - '@types/node': 20.4.7 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.6.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 - jest-util: 29.6.2 + jest-util: 29.7.0 string-length: 4.0.2 dev: true - /jest-worker@29.6.2: - resolution: {integrity: sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ==} + /jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.4.7 - jest-util: 29.6.2 + '@types/node': 20.6.0 + jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.6.2(@types/node@20.4.7): - resolution: {integrity: sha512-8eQg2mqFbaP7CwfsTpCxQ+sHzw1WuNWL5UUvjnWP4hx2riGz9fPSzYOaU5q8/GqWn1TfgZIVTqYJygbGbWAANg==} + /jest@29.7.0(@types/node@20.6.0): + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -4820,10 +4604,10 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.6.2 - '@jest/types': 29.6.1 + '@jest/core': 29.7.0 + '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.4.7) + jest-cli: 29.7.0(@types/node@20.6.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4831,8 +4615,8 @@ packages: - ts-node dev: true - /jquery@3.7.0: - resolution: {integrity: sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==} + /jquery@3.7.1: + resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==} dev: false /js-levenshtein@1.1.6: @@ -4869,20 +4653,20 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.8.2 + acorn: 8.10.0 acorn-globals: 7.0.1 cssom: 0.5.0 cssstyle: 2.3.0 data-urls: 3.0.2 decimal.js: 10.4.3 domexception: 4.0.0 - escodegen: 2.0.0 + escodegen: 2.1.0 form-data: 4.0.0 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.3 + nwsapi: 2.2.7 parse5: 7.1.2 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -4892,7 +4676,7 @@ packages: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.13.0 + ws: 8.14.1 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -4911,6 +4695,10 @@ packages: hasBin: true dev: true + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true @@ -4944,6 +4732,12 @@ packages: graceful-fs: 4.2.11 dev: true + /keyv@4.5.3: + resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} + dependencies: + json-buffer: 3.0.1 + dev: true + /kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -4954,14 +4748,6 @@ packages: engines: {node: '>=6'} dev: true - /levn@0.3.0: - resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - dev: true - /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -5053,14 +4839,14 @@ packages: engines: {node: '>=6'} dependencies: pify: 4.0.1 - semver: 5.7.1 + semver: 5.7.2 dev: true - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: - semver: 6.3.0 + semver: 7.5.4 dev: true /makeerror@1.0.12: @@ -5127,37 +4913,37 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /msw@1.2.3(typescript@5.1.6): - resolution: {integrity: sha512-Fqy/TaLKR32x4IkMwudJHJysBzVM/v/lSoMPS9f3QaHLOmb3xHN9YurSUnRt+2eEvNXLjVPij1wMBQtLmTbKsg==} + /msw@1.3.1(typescript@5.2.2): + resolution: {integrity: sha512-GhP5lHSTXNlZb9EaKgPRJ01YAnVXwzkvnTzRn4W8fxU2DXuJrRO+Nb6OHdYqB4fCkwSNpIJH9JkON5Y6rHqJMQ==} engines: {node: '>=14'} hasBin: true requiresBuild: true peerDependencies: - typescript: '>= 4.4.x <= 5.1.x' + typescript: '>= 4.4.x <= 5.2.x' peerDependenciesMeta: typescript: optional: true dependencies: '@mswjs/cookies': 0.2.2 - '@mswjs/interceptors': 0.17.9 + '@mswjs/interceptors': 0.17.10 '@open-draft/until': 1.0.3 '@types/cookie': 0.4.1 '@types/js-levenshtein': 1.1.1 - chalk: 4.1.1 + chalk: 4.1.2 chokidar: 3.5.3 cookie: 0.4.2 - graphql: 16.7.1 - headers-polyfill: 3.1.2 - inquirer: 8.2.5 + graphql: 16.8.0 + headers-polyfill: 3.2.5 + inquirer: 8.2.6 is-node-process: 1.2.0 js-levenshtein: 1.1.6 - node-fetch: 2.6.9 + node-fetch: 2.7.0 outvariant: 1.4.0 path-to-regexp: 6.2.1 strict-event-emitter: 0.4.6 type-fest: 2.19.0 - typescript: 5.1.6 - yargs: 17.7.1 + typescript: 5.2.2 + yargs: 17.7.2 transitivePeerDependencies: - encoding - supports-color @@ -5173,16 +4959,12 @@ packages: hasBin: true dev: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /node-fetch@2.6.9: - resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -5197,10 +4979,6 @@ packages: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true - /node-releases@2.0.10: - resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} - dev: true - /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true @@ -5208,6 +4986,7 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /normalize-range@0.1.2: @@ -5222,8 +5001,8 @@ packages: path-key: 3.1.1 dev: true - /nwsapi@2.2.3: - resolution: {integrity: sha512-jscxIO4/VKScHlbmFBdV1Z6LXnLO+ZR4VMtypudUdfwtKxUN3TQcNFIHLwKtrUbDyHN4/GycY9+oRGZ2XMXYPw==} + /nwsapi@2.2.7: + resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true /object-inspect@1.12.3: @@ -5235,7 +5014,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /object-keys@1.1.1: @@ -5248,36 +5027,36 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true - /object.fromentries@2.0.6: - resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} + /object.fromentries@2.0.7: + resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 dev: true - /object.groupby@1.0.0: - resolution: {integrity: sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==} + /object.groupby@1.0.1: + resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 get-intrinsic: 1.2.1 dev: true - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} + /object.values@1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 dev: true /once@1.4.0: @@ -5298,18 +5077,6 @@ packages: hasBin: true dev: true - /optionator@0.8.3: - resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - word-wrap: 1.2.4 - dev: true - /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -5329,7 +5096,7 @@ packages: bl: 4.1.0 chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.8.0 + cli-spinners: 2.9.1 is-interactive: 1.0.0 is-unicode-supported: 0.1.0 log-symbols: 4.1.0 @@ -5390,7 +5157,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.13 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -5399,7 +5166,7 @@ packages: /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: - entities: 4.4.0 + entities: 4.5.0 dev: true /path-exists@4.0.0: @@ -5449,8 +5216,8 @@ packages: engines: {node: '>=6'} dev: true - /pirates@4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} dev: true @@ -5461,13 +5228,23 @@ packages: find-up: 4.1.0 dev: true - /playwright-core@1.36.2: - resolution: {integrity: sha512-sQYZt31dwkqxOrP7xy2ggDfEzUxM1lodjhsQ3NMMv5uGTRDsLxU0e4xf4wwMkF2gplIxf17QMBCodSFgm6bFVQ==} + /playwright-core@1.38.0: + resolution: {integrity: sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==} + engines: {node: '>=16'} + hasBin: true + dev: true + + /playwright@1.38.0: + resolution: {integrity: sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==} engines: {node: '>=16'} hasBin: true + dependencies: + playwright-core: 1.38.0 + optionalDependencies: + fsevents: 2.3.2 dev: true - /postcss-cli@10.1.0(postcss@8.4.27): + /postcss-cli@10.1.0(postcss@8.4.29): resolution: {integrity: sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA==} engines: {node: '>=14'} hasBin: true @@ -5478,32 +5255,32 @@ packages: dependency-graph: 0.11.0 fs-extra: 11.1.1 get-stdin: 9.0.0 - globby: 13.1.3 + globby: 13.2.2 picocolors: 1.0.0 - postcss: 8.4.27 - postcss-load-config: 4.0.1(postcss@8.4.27) - postcss-reporter: 7.0.5(postcss@8.4.27) + postcss: 8.4.29 + postcss-load-config: 4.0.1(postcss@8.4.29) + postcss-reporter: 7.0.5(postcss@8.4.29) pretty-hrtime: 1.0.3 read-cache: 1.0.0 - slash: 5.0.0 - yargs: 17.7.1 + slash: 5.1.0 + yargs: 17.7.2 transitivePeerDependencies: - ts-node dev: true - /postcss-import@15.1.0(postcss@8.4.27): + /postcss-import@15.1.0(postcss@8.4.29): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.27 + postcss: 8.4.29 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.2 + resolve: 1.22.4 dev: true - /postcss-load-config@4.0.1(postcss@8.4.27): + /postcss-load-config@4.0.1(postcss@8.4.29): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -5516,33 +5293,33 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.27 - yaml: 2.2.1 + postcss: 8.4.29 + yaml: 2.3.2 dev: true - /postcss-nested@6.0.1(postcss@8.4.27): + /postcss-nested@6.0.1(postcss@8.4.29): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.27 - postcss-selector-parser: 6.0.11 + postcss: 8.4.29 + postcss-selector-parser: 6.0.13 dev: true - /postcss-reporter@7.0.5(postcss@8.4.27): + /postcss-reporter@7.0.5(postcss@8.4.29): resolution: {integrity: sha512-glWg7VZBilooZGOFPhN9msJ3FQs19Hie7l5a/eE6WglzYqVeH3ong3ShFcp9kDWJT1g2Y/wd59cocf9XxBtkWA==} engines: {node: '>=10'} peerDependencies: postcss: ^8.1.0 dependencies: picocolors: 1.0.0 - postcss: 8.4.27 + postcss: 8.4.29 thenby: 1.3.4 dev: true - /postcss-selector-parser@6.0.11: - resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} + /postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} engines: {node: '>=4'} dependencies: cssesc: 3.0.0 @@ -5553,8 +5330,8 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + /postcss@8.4.29: + resolution: {integrity: sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -5562,18 +5339,13 @@ packages: source-map-js: 1.0.2 dev: true - /prelude-ls@1.1.2: - resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} - engines: {node: '>= 0.8.0'} - dev: true - /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} dev: true - /prettier@3.0.1: - resolution: {integrity: sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==} + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} engines: {node: '>=14'} hasBin: true dev: true @@ -5587,20 +5359,11 @@ packages: react-is: 17.0.2 dev: true - /pretty-format@29.5.0: - resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - - /pretty-format@29.6.2: - resolution: {integrity: sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==} + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.6.0 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -5627,8 +5390,8 @@ packages: engines: {node: '>=6'} dev: true - /pure-rand@6.0.1: - resolution: {integrity: sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg==} + /pure-rand@6.0.3: + resolution: {integrity: sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==} dev: true /querystringify@2.2.0: @@ -5671,6 +5434,7 @@ packages: /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + requiresBuild: true dependencies: picomatch: 2.3.1 dev: true @@ -5686,23 +5450,23 @@ packages: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} dev: true - /regenerator-transform@0.15.1: - resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} + /regenerator-transform@0.15.2: + resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.21.0 + '@babel/runtime': 7.22.15 dev: true - /regexp.prototype.flags@1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + /regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 + define-properties: 1.2.1 + set-function-name: 2.0.1 dev: true /regexpu-core@5.3.2: @@ -5755,15 +5519,6 @@ packages: engines: {node: '>=10'} dev: true - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} - hasBin: true - dependencies: - is-core-module: 2.12.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - /resolve@1.22.4: resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true @@ -5800,12 +5555,12 @@ packages: opener: 1.5.2 dev: true - /rollup@3.27.2: - resolution: {integrity: sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==} + /rollup@3.29.1: + resolution: {integrity: sha512-c+ebvQz0VIH4KhhCpDsI+Bik0eT8ZFEVZEYw0cGMVqIP8zc+gnwl7iXCamTw7vzv2MeuZFZfdx5JJIq+ehzDlg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /run-async@2.4.1: @@ -5819,10 +5574,20 @@ packages: queue-microtask: 1.2.3 dev: true - /rxjs@7.8.0: - resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==} + /rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + dependencies: + tslib: 2.6.2 + dev: true + + /safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} dependencies: - tslib: 2.6.1 + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 dev: true /safe-buffer@5.2.1: @@ -5833,7 +5598,7 @@ packages: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-regex: 1.1.4 dev: true @@ -5848,13 +5613,8 @@ packages: xmlchars: 2.2.0 dev: true - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} - hasBin: true - dev: true - - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: true @@ -5863,14 +5623,6 @@ packages: hasBin: true dev: true - /semver@7.4.0: - resolution: {integrity: sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -5889,6 +5641,15 @@ packages: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} dev: true + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.0 + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5905,7 +5666,7 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 object-inspect: 1.12.3 dev: true @@ -5932,8 +5693,8 @@ packages: engines: {node: '>=12'} dev: true - /slash@5.0.0: - resolution: {integrity: sha512-n6KkmvKS0623igEVj3FF0OZs1gYYJ0o0Hj939yc1fyxl2xt+xYpLnzJB6xBSqOfV9ZFLEWodBBN/heZJahuIJQ==} + /slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} dev: true @@ -6010,29 +5771,29 @@ packages: strip-ansi: 6.0.1 dev: true - /string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 dev: true - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 dev: true - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 dev: true /string_decoder@1.3.0: @@ -6098,13 +5859,13 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: true - /terser@5.19.2: - resolution: {integrity: sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==} + /terser@5.19.4: + resolution: {integrity: sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==} engines: {node: '>=10'} hasBin: true dependencies: - '@jridgewell/source-map': 0.3.3 - acorn: 8.8.2 + '@jridgewell/source-map': 0.3.5 + acorn: 8.10.0 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -6149,6 +5910,7 @@ packages: /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + requiresBuild: true dependencies: is-number: 7.0.0 dev: true @@ -6174,13 +5936,13 @@ packages: punycode: 2.3.0 dev: true - /ts-api-utils@1.0.1(typescript@5.1.6): - resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + /ts-api-utils@1.0.3(typescript@5.2.2): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.1.6 + typescript: 5.2.2 dev: true /tsconfig-paths@3.14.2: @@ -6196,25 +5958,18 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.6.1: - resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true - /tsutils@3.21.0(typescript@5.1.6): + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.6 - dev: true - - /type-check@0.3.2: - resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 + typescript: 5.2.2 dev: true /type-check@0.4.0: @@ -6244,16 +5999,46 @@ packages: engines: {node: '>=12.20'} dev: true + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: call-bind: 1.0.2 for-each: 0.3.3 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 dev: true - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -6300,17 +6085,6 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /update-browserslist-db@1.0.10(browserslist@4.21.5): - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.21.5 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - /update-browserslist-db@1.0.11(browserslist@4.21.10): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true @@ -6345,15 +6119,15 @@ packages: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.10 - which-typed-array: 1.1.9 + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 dev: true /v8-to-istanbul@9.1.0: resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 dev: true @@ -6440,8 +6214,8 @@ packages: is-weakset: 2.0.2 dev: true - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 @@ -6449,7 +6223,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 dev: true /which@2.0.2: @@ -6460,9 +6233,13 @@ packages: isexe: 2.0.0 dev: true - /word-wrap@1.2.4: - resolution: {integrity: sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==} - engines: {node: '>=0.10.0'} + /wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 dev: true /wrap-ansi@7.0.0: @@ -6486,8 +6263,8 @@ packages: signal-exit: 3.0.7 dev: true - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + /ws@8.14.1: + resolution: {integrity: sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -6521,8 +6298,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yaml@2.2.1: - resolution: {integrity: sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==} + /yaml@2.3.2: + resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} engines: {node: '>= 14'} dev: true @@ -6531,8 +6308,8 @@ packages: engines: {node: '>=12'} dev: true - /yargs@17.7.1: - resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} dependencies: cliui: 8.0.1 diff --git a/src/test/.eslintrc b/src/test/.eslintrc index 83145268..9cb152df 100644 --- a/src/test/.eslintrc +++ b/src/test/.eslintrc @@ -11,6 +11,7 @@ "jest/prefer-expect-assertions": "off", "jest/prefer-strict-equal": "off", "jest/require-hook": "off", - "jest/require-top-level-describe": "off" + "jest/require-top-level-describe": "off", + "testing-library/no-node-access": "off" } } diff --git a/src/test/jqTree/loadOnDemand.test.ts b/src/test/jqTree/loadOnDemand.test.ts index 53a5f201..5a2999b5 100644 --- a/src/test/jqTree/loadOnDemand.test.ts +++ b/src/test/jqTree/loadOnDemand.test.ts @@ -53,12 +53,12 @@ context("when a node has load_on_demand in the data", () => { if (parentId === "1") { return response( ctx.status(200), - ctx.json([{ id: 2, name: "loaded-on-demand" }]) + ctx.json([{ id: 2, name: "loaded-on-demand" }]), ); } else { return response(ctx.status(400)); } - }) + }), ); }); @@ -87,7 +87,7 @@ context("when a node has load_on_demand in the data", () => { context("when the node is opened", () => { given("node", () => - given.$tree.tree("getNodeByNameMustExist", "parent-node") + given.$tree.tree("getNodeByNameMustExist", "parent-node"), ); it("loads the subtree", async () => { @@ -136,8 +136,9 @@ context("when a node has load_on_demand in the data", () => { context("when the node is selected and doesn't have the focus", () => { beforeEach(() => { - given.$tree.tree("selectNode", given.node); - (document.activeElement as HTMLElement).blur(); + given.$tree.tree("selectNode", given.node, { + mustSetFocus: false, + }); }); it("keeps the node selected and not focused", async () => { diff --git a/src/test/jqTree/methods.test.ts b/src/test/jqTree/methods.test.ts index f2decca9..dfc215d3 100644 --- a/src/test/jqTree/methods.test.ts +++ b/src/test/jqTree/methods.test.ts @@ -146,7 +146,7 @@ describe("addToSelection", () => { it("selects the nodes", () => { expect(given.$tree.tree("getSelectedNodes")).toEqual( - expect.arrayContaining([given.child1, given.child2]) + expect.arrayContaining([given.child1, given.child2]), ); }); @@ -207,7 +207,7 @@ describe("appendNode", () => { context("when appending to a parent node", () => { given("parent", () => - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); it("appends the node to parent node", () => { @@ -244,7 +244,7 @@ describe("appendNode", () => { it("sets the properties of the object", () => { expect(given.$tree.tree("getNodeById", 99)).toMatchObject( - given.nodeData + given.nodeData, ); }); }); @@ -302,7 +302,7 @@ describe("getNodeByHtmlElement", () => { const given = getGiven(); given("htmlElement", () => - screen.getByText("node1", { selector: ".jqtree-title" }) + screen.getByText("node1", { selector: ".jqtree-title" }), ); given("$tree", () => $("#tree1")); @@ -312,7 +312,7 @@ describe("getNodeByHtmlElement", () => { it("returns the node", () => { expect( - given.$tree.tree("getNodeByHtmlElement", given.htmlElement) + given.$tree.tree("getNodeByHtmlElement", given.htmlElement), ).toEqual(expect.objectContaining({ name: "node1" })); }); }); @@ -394,7 +394,7 @@ describe("getNodesByProperty", () => { it("gets nodes by property", () => { expect( - given.$tree.tree("getNodesByProperty", "intProperty", 1) + given.$tree.tree("getNodesByProperty", "intProperty", 1), ).toEqual([given.node1]); }); }); @@ -417,7 +417,7 @@ describe("getSelectedNode", () => { context("when nodes have ids", () => { given("node", () => - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); given("treeData", () => exampleData); @@ -440,7 +440,7 @@ describe("getSelectedNode", () => { context("when nodes don't have ids", () => { given("node", () => - given.$tree.tree("getNodeByNameMustExist", "without-id1") + given.$tree.tree("getNodeByNameMustExist", "without-id1"), ); given("treeData", () => ["without-id1", "without-id2"]); @@ -494,7 +494,7 @@ describe("getSelectedNodes", () => { it("returns the selected nodes", () => { expect(given.$tree.tree("getSelectedNodes")).toEqual( - expect.arrayContaining([given.child1, given.child2]) + expect.arrayContaining([given.child1, given.child2]), ); }); }); @@ -659,7 +659,7 @@ describe("loadData", () => { given.$tree.tree( "loadData", exampleData, - given.$tree.tree("getNodeByNameMustExist", "initial1") + given.$tree.tree("getNodeByNameMustExist", "initial1"), ); }); @@ -688,7 +688,7 @@ describe("loadData", () => { beforeEach(() => { given.$tree.tree( "selectNode", - given.$tree.tree("getNodeByNameMustExist", "child1") + given.$tree.tree("getNodeByNameMustExist", "child1"), ); }); @@ -696,7 +696,7 @@ describe("loadData", () => { given.$tree.tree( "loadData", ["new-child1"], - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); expect(given.$tree.tree("getSelectedNode")).toBeFalse(); @@ -712,7 +712,7 @@ describe("loadData", () => { given.$tree.tree( "loadData", ["new-child1"], - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); expect(given.$tree.tree("getSelectedNode")).toBeFalse(); @@ -723,7 +723,7 @@ describe("loadData", () => { given.$tree.tree( "loadData", ["new-child1"], - given.$tree.tree("getNodeByNameMustExist", "node2") + given.$tree.tree("getNodeByNameMustExist", "node2"), ); expect(given.$tree.tree("getSelectedNode")).toMatchObject({ @@ -750,8 +750,8 @@ describe("loadDataFromUrl", () => { beforeEach(() => { server.use( rest.get("/tree/", (_request, response, ctx) => - response(ctx.status(200), ctx.json(given.serverData)) - ) + response(ctx.status(200), ctx.json(given.serverData)), + ), ); given.$tree.tree({ data: given.initialData }); @@ -775,7 +775,7 @@ describe("loadDataFromUrl", () => { it("loads a subtree", async () => { const parentNode = given.$tree.tree( "getNodeByNameMustExist", - "initial1" + "initial1", ); given.$tree.tree("loadDataFromUrl", "/tree/", parentNode); await screen.findByText("new1"); @@ -949,7 +949,7 @@ describe("prependNode", () => { context("with a parent node", () => { given("parent", () => - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); it("prepends the node to the parent", () => { @@ -1013,8 +1013,8 @@ describe("reload", () => { beforeEach(async () => { server.use( rest.get("/tree2/", (_request, response, ctx) => - response(ctx.status(200), ctx.json(exampleData)) - ) + response(ctx.status(200), ctx.json(exampleData)), + ), ); given.$tree.tree({ dataUrl: "/tree2/" }); @@ -1070,7 +1070,7 @@ describe("removeNode", () => { context("with a child node", () => { given("node", () => - given.$tree.tree("getNodeByNameMustExist", "child1") + given.$tree.tree("getNodeByNameMustExist", "child1"), ); it("removes the node", () => { @@ -1103,7 +1103,7 @@ describe("removeNode", () => { context("with a parent node and its children", () => { given("node", () => - given.$tree.tree("getNodeByNameMustExist", "node1") + given.$tree.tree("getNodeByNameMustExist", "node1"), ); it("removes the node", () => { @@ -1121,7 +1121,7 @@ describe("removeNode", () => { beforeEach(() => { const child1 = given.$tree.tree( "getNodeByNameMustExist", - "child1" + "child1", ); given.$tree.tree("selectNode", child1); }); @@ -1139,7 +1139,7 @@ describe("removeNode", () => { it("raises an exception", () => { expect(() => given.$tree.tree("removeNode", given.node)).toThrow( - "Node has no parent" + "Node has no parent", ); }); }); @@ -1382,7 +1382,7 @@ describe("updateNode", () => { expect.objectContaining({ name: "node2" }), ]); expect(given.$tree.tree("getNodeById", 999)).toMatchObject( - given.nodeData + given.nodeData, ); }); }); @@ -1406,7 +1406,7 @@ describe("updateNode", () => { context("when adding a child to a child node", () => { given("nodeData", () => ({ children: ["new-child"] })); given("node", () => - given.$tree.tree("getNodeByNameMustExist", "child1") + given.$tree.tree("getNodeByNameMustExist", "child1"), ); it("adds the child node", () => { diff --git a/src/tree.jquery.d.ts b/src/tree.jquery.d.ts index 19c70333..37c17397 100644 --- a/src/tree.jquery.d.ts +++ b/src/tree.jquery.d.ts @@ -34,6 +34,11 @@ interface ClickNodeEvent { previous_node?: INode; } +interface SelectNodeOptions { + mustToggle?: boolean; + mustSetFocus?: boolean; +} + interface SavedState { open_nodes: NodeId[]; selected_node: NodeId[]; @@ -145,7 +150,11 @@ interface IJQTreePlugin { (behavior: "removeFromSelection", node: INode): JQuery; (behavior: "removeNode", node: INode): JQuery; (behavior: "scrollToNode", node: INode): JQuery; - (behavior: "selectNode", node: INode | null): JQuery; + ( + behavior: "selectNode", + node: INode | null, + optionsParam?: SelectNodeOptions, + ): JQuery; (behavior: "setOption", option: string, value: unknown): JQuery; (behavior: "setState", options: Record): JQuery; (behavior: "toggle", node: INode, slideParam?: boolean): JQuery; diff --git a/tree.jquery.debug.js b/tree.jquery.debug.js index c80de550..d09e9249 100644 --- a/tree.jquery.debug.js +++ b/tree.jquery.debug.js @@ -20,62 +20,62 @@ limitations under the License. var jqtree = (function (exports) { 'use strict'; - function _iterableToArrayLimit(arr, i) { - var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; + function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; try { - if (_x = (_i = _i.call(arr)).next, 0 === i) { - if (Object(_i) !== _i) return; - _n = !1; - } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); - } catch (err) { - _d = !0, _e = err; + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; } finally { try { - if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { - if (_d) throw _e; + if (o) throw n; } } - return _arr; + return a; } } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); + function ownKeys(e, r) { + var t = Object.keys(e); if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); } - return keys; + return t; } - function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } - return target; + return e; } - function _typeof(obj) { + function _typeof(o) { "@babel/helpers - typeof"; - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { @@ -777,7 +777,7 @@ var jqtree = (function (exports) { var _this = this; this.iterate(function (child) { var _this$tree; - (_this$tree = _this.tree) === null || _this$tree === void 0 ? void 0 : _this$tree.removeNodeFromIndex(child); + (_this$tree = _this.tree) === null || _this$tree === void 0 || _this$tree.removeNodeFromIndex(child); return true; }); this.children = []; @@ -967,14 +967,14 @@ var jqtree = (function (exports) { var _this$tree2; this.parent = parent; this.tree = parent.tree; - (_this$tree2 = this.tree) === null || _this$tree2 === void 0 ? void 0 : _this$tree2.addNodeToIndex(this); + (_this$tree2 = this.tree) === null || _this$tree2 === void 0 || _this$tree2.addNodeToIndex(this); } }, { key: "doRemoveChild", value: function doRemoveChild(node) { var _this$tree3; this.children.splice(this.getChildIndex(node), 1); - (_this$tree3 = this.tree) === null || _this$tree3 === void 0 ? void 0 : _this$tree3.removeNodeFromIndex(node); + (_this$tree3 = this.tree) === null || _this$tree3 === void 0 || _this$tree3.removeNodeFromIndex(node); } }, { key: "getNodeClass", diff --git a/tree.jquery.debug.js.map b/tree.jquery.debug.js.map index 52546eb0..f387625d 100644 --- a/tree.jquery.debug.js.map +++ b/tree.jquery.debug.js.map @@ -1 +1 @@ -{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,OAAO,GAAG,OAAO;;ECIXC,IAAAA,QAAQ,0B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U,SAAS;EACvB6U,EAAAA,SAAS,EAAE7U,SAAS;EACpBwb,EAAAA,qBAAqB,EAAExb,SAAS;EAChCqQ,EAAAA,UAAU,EAAE,UAAU;EACtBzE,EAAAA,eAAe,EAAE,GAAG;EAAE;EACtB;EACA;EACA2F,EAAAA,GAAG,EAAEvR,SAAS;EAAE;EAChBob,EAAAA,SAAS,EAAE,KAAK;EAAE;EAClB+P,EAAAA,UAAU,EAAE,IAAI;EAChBjZ,EAAAA,eAAe,EAAE,KAAK;EACtBvG,EAAAA,KAAK,EAAE,IAAI;EAAE;EACb2d,EAAAA,aAAa,EAAE,GAAG;EAAE;EACpBjW,EAAAA,QAAQ,EAAE,CAAC;EACX8V,EAAAA,cAAc,EAAE,IAAA;EACpB,CAAC,CAAA,CAAA;EAwlCLnR,YAAY,CAACP,QAAQ,CAACiN,YAAY,EAAE,MAAM,CAAC;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,OAAO,GAAG,OAAO;;ECIXC,IAAAA,QAAQ,0BAARA,QAAQ,EAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA,CAAA;EAAA,EAAA,OAARA,Q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AAE,IAAA;EACpB,CAAC,CAAA,CAAA;EAwlCLnR,YAAY,CAACP,QAAQ,CAACiN,YAAY,EAAE,MAAM,CAAC;;;;;;;;;;"} \ No newline at end of file From c08f26f0238394bd77c4c42f42bd803bdf379148 Mon Sep 17 00:00:00 2001 From: Marco Braak Date: Thu, 14 Sep 2023 14:59:07 +0200 Subject: [PATCH 12/12] Version 1.7.2 --- bower.json | 2 +- docs/_config.yml | 2 +- docs/_entries/10_changelog.md | 2 +- docs/tree.jquery.js | 4 ++-- lib/version.js | 2 +- package.json | 2 +- src/version.ts | 2 +- tree.jquery.debug.js | 4 ++-- tree.jquery.debug.js.map | 2 +- tree.jquery.js | 4 ++-- tree.jquery.js.map | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bower.json b/bower.json index 6f642477..90d89359 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jqTree", - "version": "1.7.1", + "version": "1.7.2", "main": [ "jqtree.css", "jqtree-circle.png", diff --git a/docs/_config.yml b/docs/_config.yml index 73f726f3..4a376abc 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -18,7 +18,7 @@ defaults: values: layout: "example" -jqtree_version: 1.7.1 +jqtree_version: 1.7.2 # Build settings markdown: kramdown diff --git a/docs/_entries/10_changelog.md b/docs/_entries/10_changelog.md index 559e64c6..08288efc 100644 --- a/docs/_entries/10_changelog.md +++ b/docs/_entries/10_changelog.md @@ -3,7 +3,7 @@ title: Changelog name: changelog --- -#### Development +#### 1.7.2 (september 14 2023) - Issue #732: improve types of closedIcon and openedIcon - Issue #736: use the bundle in the package.json diff --git a/docs/tree.jquery.js b/docs/tree.jquery.js index d4f963eb..7078524b 100644 --- a/docs/tree.jquery.js +++ b/docs/tree.jquery.js @@ -1,5 +1,5 @@ /* -JqTree 1.7.1 +JqTree 1.7.2 Copyright 2023 Marco Braak @@ -17,5 +17,5 @@ limitations under the License. @license */ -var jqtree=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var k=function(e){return e[e.Before=1]="Before",e[e.After=2]="After",e[e.Inside=3]="Inside",e[e.None=4]="None",e}({}),N={before:k.Before,after:k.After,inside:k.Inside,none:k.None},S=function(e){for(var t in N)if(Object.prototype.hasOwnProperty.call(N,t)&&N[t]===e)return t;return""},b=function(e){return"object"===i(e)&&"children"in e&&e.children instanceof Array},_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;r(this,e),a(this,"id",void 0),a(this,"name",void 0),a(this,"children",void 0),a(this,"parent",void 0),a(this,"idMapping",void 0),a(this,"tree",void 0),a(this,"nodeClass",void 0),a(this,"load_on_demand",void 0),a(this,"is_open",void 0),a(this,"element",void 0),a(this,"is_loading",void 0),a(this,"isEmptyFolder",void 0),this.name="",this.isEmptyFolder=!1,this.load_on_demand=!1,this.setData(t),this.children=[],this.parent=null,n&&(this.idMapping=new Map,this.tree=this,this.nodeClass=i)}return s(e,[{key:"setData",value:function(e){if(e)if("string"==typeof e)this.name=e;else if("object"===i(e))for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];"label"===t||"name"===t?"string"==typeof n&&(this.name=n):"children"!==t&&"parent"!==t&&(this[t]=n)}}},{key:"loadFromData",value:function(e){this.removeChildren();var t,n=m(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,r=this.createNode(i);this.addChild(r),b(i)&&(0===i.children.length?r.isEmptyFolder=!0:r.loadFromData(i.children))}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addChild",value:function(e){this.children.push(e),e.setParent(this)}},{key:"addChildAtPosition",value:function(e,t){this.children.splice(t,0,e),e.setParent(this)}},{key:"removeChild",value:function(e){e.removeChildren(),this.doRemoveChild(e)}},{key:"getChildIndex",value:function(e){return this.children.indexOf(e)}},{key:"hasChildren",value:function(){return 0!==this.children.length}},{key:"isFolder",value:function(){return this.hasChildren()||this.load_on_demand}},{key:"iterate",value:function(e){!function t(n,i){if(n.children){var r,o=m(n.children);try{for(o.s();!(r=o.n()).done;){var s=r.value;e(s,i)&&s.hasChildren()&&t(s,i+1)}}catch(e){o.e(e)}finally{o.f()}}}(this,0)}},{key:"moveNode",value:function(e,t,n){if(!e.parent||e.isParentOf(t))return!1;switch(e.parent.doRemoveChild(e),n){case k.After:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1),!0);case k.Before:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)),!0);case k.Inside:return t.addChildAtPosition(e,0),!0;default:return!1}}},{key:"getData",value:function(){var e=function e(t){return t.map((function(t){var n={};for(var i in t)if(-1===["parent","children","element","idMapping","load_on_demand","nodeClass","tree","isEmptyFolder"].indexOf(i)&&Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];n[i]=r}return t.hasChildren()&&(n.children=e(t.children)),n}))};return e(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[this]:this.children)}},{key:"getNodeByName",value:function(e){return this.getNodeByCallback((function(t){return t.name===e}))}},{key:"getNodeByNameMustExist",value:function(e){var t=this.getNodeByCallback((function(t){return t.name===e}));if(!t)throw"Node with name ".concat(e," not found");return t}},{key:"getNodeByCallback",value:function(e){var t=null;return this.iterate((function(n){return!t&&(!e(n)||(t=n,!1))})),t}},{key:"addAfter",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n+1),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addBefore",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addParent",value:function(e){if(this.parent){var t=this.createNode(e);this.tree&&t.setParent(this.tree);var n,i=this.parent,r=m(i.children);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.addChild(o)}}catch(e){r.e(e)}finally{r.f()}return i.children=[],i.addChild(t),t}return null}},{key:"remove",value:function(){this.parent&&(this.parent.removeChild(this),this.parent=null)}},{key:"append",value:function(e){var t=this.createNode(e);return this.addChild(t),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"prepend",value:function(e){var t=this.createNode(e);return this.addChildAtPosition(t,0),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"isParentOf",value:function(e){for(var t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1}},{key:"getLevel",value:function(){for(var e=0,t=this;t.parent;)e+=1,t=t.parent;return e}},{key:"getNodeById",value:function(e){return this.idMapping.get(e)||null}},{key:"addNodeToIndex",value:function(e){null!=e.id&&this.idMapping.set(e.id,e)}},{key:"removeNodeFromIndex",value:function(e){null!=e.id&&this.idMapping.delete(e.id)}},{key:"removeChildren",value:function(){var e=this;this.iterate((function(t){var n;return null===(n=e.tree)||void 0===n||n.removeNodeFromIndex(t),!0})),this.children=[]}},{key:"getPreviousSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)-1;return e>=0&&this.parent.children[e]||null}return null}},{key:"getNextSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)+1;return e0&&void 0!==arguments[0])||arguments[0])&&this.hasChildren())return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getNextVisibleNode",value:function(){if(this.hasChildren()&&this.is_open)return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getPreviousNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()?e.getLastChild():e:this.getParent()}return null}},{key:"getPreviousVisibleNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()&&e.is_open?e.getLastChild():e:this.getParent()}return null}},{key:"getParent",value:function(){return this.parent&&this.parent.parent?this.parent:null}},{key:"getLastChild",value:function(){if(this.hasChildren()){var e=this.children[this.children.length-1];return e?e.hasChildren()&&e.is_open?null==e?void 0:e.getLastChild():e:null}return null}},{key:"initFromData",value:function(e){var t,n=this,i=function(e){var t,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=n.createNode();o.initFromData(r),n.addChild(o)}}catch(e){i.e(e)}finally{i.f()}};t=e,n.setData(t),b(t)&&t.children.length&&i(t.children)}},{key:"setParent",value:function(e){var t;this.parent=e,this.tree=e.tree,null===(t=this.tree)||void 0===t||t.addNodeToIndex(this)}},{key:"doRemoveChild",value:function(e){var t;this.children.splice(this.getChildIndex(e),1),null===(t=this.tree)||void 0===t||t.removeNodeFromIndex(e)}},{key:"getNodeClass",value:function(){var t;return this.nodeClass||(null==this||null===(t=this.tree)||void 0===t?void 0:t.nodeClass)||e}},{key:"createNode",value:function(e){return new(this.getNodeClass())(e)}}]),e}(),D=function(){function e(t){r(this,e),a(this,"hitAreas",void 0),a(this,"isDragging",void 0),a(this,"currentItem",void 0),a(this,"hoveredArea",void 0),a(this,"positionInfo",void 0),a(this,"treeWidget",void 0),a(this,"dragElement",void 0),a(this,"previousGhost",void 0),a(this,"openFolderTimer",void 0),this.treeWidget=t,this.hoveredArea=null,this.hitAreas=[],this.isDragging=!1,this.currentItem=null,this.positionInfo=null}return s(e,[{key:"mouseCapture",value:function(e){var t=jQuery(e.target);if(!this.mustCaptureElement(t))return null;if(this.treeWidget.options.onIsMoveHandle&&!this.treeWidget.options.onIsMoveHandle(t))return null;var n=this.treeWidget._getNodeElement(t);return n&&this.treeWidget.options.onCanMove&&(this.treeWidget.options.onCanMove(n.node)||(n=null)),this.currentItem=n,null!=this.currentItem}},{key:"mouseStart",value:function(e){var t;if(!this.currentItem||void 0===e.pageX||void 0===e.pageY)return!1;this.refresh();var n=jQuery(e.target).offset(),i=n?n.left:0,r=n?n.top:0,o=this.currentItem.node;return this.dragElement=new j(o.name,e.pageX-i,e.pageY-r,this.treeWidget.element,null===(t=this.treeWidget.options.autoEscape)||void 0===t||t),this.isDragging=!0,this.positionInfo=e,this.currentItem.$element.addClass("jqtree-moving"),!0}},{key:"mouseDrag",value:function(e){if(!this.currentItem||!this.dragElement||void 0===e.pageX||void 0===e.pageY)return!1;this.dragElement.move(e.pageX,e.pageY),this.positionInfo=e;var t=this.findHoveredArea(e.pageX,e.pageY);return t&&this.canMoveToArea(t)?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hoveredArea!==t&&(this.hoveredArea=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeDropHint(),this.stopOpenFolderTimer(),this.hoveredArea=t),t||this.treeWidget.options.onDragMove&&this.treeWidget.options.onDragMove(this.currentItem.node,e.originalEvent),!0}},{key:"mouseStop",value:function(e){this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas();var t=this.currentItem;return this.currentItem&&(this.currentItem.$element.removeClass("jqtree-moving"),this.currentItem=null),this.isDragging=!1,this.positionInfo=null,!this.hoveredArea&&t&&this.treeWidget.options.onDragStop&&this.treeWidget.options.onDragStop(t.node,e.originalEvent),!1}},{key:"refresh",value:function(){this.removeHitAreas(),this.currentItem&&(this.generateHitAreas(),this.currentItem=this.treeWidget._getNodeElementForNode(this.currentItem.node),this.isDragging&&this.currentItem.$element.addClass("jqtree-moving"))}},{key:"generateHitAreas",value:function(){if(this.currentItem){var e=new I(this.treeWidget.tree,this.currentItem.node,this.getTreeDimensions().bottom);this.hitAreas=e.generate()}else this.hitAreas=[]}},{key:"mustCaptureElement",value:function(e){return!e.is("input,select,textarea")}},{key:"canMoveToArea",value:function(e){if(!this.treeWidget.options.onCanMoveTo)return!0;if(!this.currentItem)return!1;var t=S(e.position);return this.treeWidget.options.onCanMoveTo(this.currentItem.node,e.node,t)}},{key:"removeHitAreas",value:function(){this.hitAreas=[]}},{key:"clear",value:function(){this.dragElement&&(this.dragElement.remove(),this.dragElement=null)}},{key:"removeDropHint",value:function(){this.previousGhost&&this.previousGhost.remove()}},{key:"removeHover",value:function(){this.hoveredArea=null}},{key:"findHoveredArea",value:function(e,t){var n=this.getTreeDimensions();if(en.right||t>n.bottom)return null;for(var i=0,r=this.hitAreas.length;i>1,s=this.hitAreas[o];if(!s)return null;if(ts.bottom))return s;i=o+1}}return null}},{key:"mustOpenFolderTimer",value:function(e){var t=e.node;return t.isFolder()&&!t.is_open&&e.position===k.Inside}},{key:"updateDropHint",value:function(){if(this.hoveredArea){this.removeDropHint();var e=this.treeWidget._getNodeElementForNode(this.hoveredArea.node);this.previousGhost=e.addDropHint(this.hoveredArea.position)}}},{key:"startOpenFolderTimer",value:function(e){var t=this;this.stopOpenFolderTimer();var n=this.treeWidget.options.openFolderDelay;!1!==n&&(this.openFolderTimer=window.setTimeout((function(){t.treeWidget._openNode(e,t.treeWidget.options.slide,(function(){t.refresh(),t.updateDropHint()}))}),n))}},{key:"stopOpenFolderTimer",value:function(){this.openFolderTimer&&(clearTimeout(this.openFolderTimer),this.openFolderTimer=null)}},{key:"moveItem",value:function(e){var t=this;if(this.currentItem&&this.hoveredArea&&this.hoveredArea.position!==k.None&&this.canMoveToArea(this.hoveredArea)){var n=this.currentItem.node,i=this.hoveredArea.node,r=this.hoveredArea.position,o=n.parent;r===k.Inside&&(this.hoveredArea.node.is_open=!0);var s=function(){t.treeWidget.tree.moveNode(n,i,r),t.treeWidget.element.empty(),t.treeWidget._refreshElements(null)};this.treeWidget._triggerEvent("tree.move",{move_info:{moved_node:n,target_node:i,position:S(r),previous_parent:o,do_move:s,original_event:e.originalEvent}}).isDefaultPrevented()||s()}}},{key:"getTreeDimensions",value:function(){var e=this.treeWidget.element.offset();if(e){var t=this.treeWidget.element,n=t.width()||0,i=t.height()||0,r=e.left+this.treeWidget._getScrollLeft();return{left:r,top:e.top,right:r+n,bottom:e.top+i+16}}return{left:0,top:0,right:0,bottom:0}}}]),e}(),I=function(e){l(n,e);var t=c(n);function n(e,i,o){var s;return r(this,n),a(h(s=t.call(this,e)),"currentNode",void 0),a(h(s),"treeBottom",void 0),a(h(s),"positions",void 0),a(h(s),"lastTop",void 0),s.currentNode=i,s.treeBottom=o,s}return s(n,[{key:"generate",value:function(){return this.positions=[],this.lastTop=0,this.iterate(),this.generateHitAreas(this.positions)}},{key:"generateHitAreas",value:function(e){var t,n=-1,i=[],r=[],o=m(e);try{for(o.s();!(t=o.n()).done;){var s=t.value;s.top!==n&&i.length&&(i.length&&this.generateHitAreasForGroup(r,i,n,s.top),n=s.top,i=[]),i.push(s)}}catch(e){o.e(e)}finally{o.f()}return this.generateHitAreasForGroup(r,i,n,this.treeBottom),r}},{key:"handleOpenFolder",value:function(e,t){return e!==this.currentNode&&(e.children[0]!==this.currentNode&&this.addPosition(e,k.Inside,this.getTop(t)),!0)}},{key:"handleClosedFolder",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):(this.addPosition(e,k.Inside,i),t!==this.currentNode&&this.addPosition(e,k.After,i))}},{key:"handleFirstNode",value:function(e){e!==this.currentNode&&this.addPosition(e,k.Before,this.getTop(jQuery(e.element)))}},{key:"handleAfterOpenFolder",value:function(e,t){e===this.currentNode||t===this.currentNode?this.addPosition(e,k.None,this.lastTop):this.addPosition(e,k.After,this.lastTop)}},{key:"handleNode",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.Inside,i),t===this.currentNode||e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.After,i)}},{key:"getTop",value:function(e){var t=e.offset();return t?t.top:0}},{key:"addPosition",value:function(e,t,n){var i={top:n,bottom:0,node:e,position:t};this.positions.push(i),this.lastTop=n}},{key:"generateHitAreasForGroup",value:function(e,t,n,i){for(var r=Math.min(t.length,4),o=Math.round((i-n)/r),s=n,a=0;a").addClass("jqtree-title jqtree-dragging"),s?this.$element.text(t):this.$element.html(t),this.$element.css("position","absolute"),o.append(this.$element)}return s(e,[{key:"move",value:function(e,t){this.$element.offset({left:e-this.offsetX,top:t-this.offsetY})}},{key:"remove",value:function(){this.$element.remove()}}]),e}(),E=function(e){return e?"true":"false"},C=function(){function e(t){r(this,e),a(this,"openedIconElement",void 0),a(this,"closedIconElement",void 0),a(this,"treeWidget",void 0),this.treeWidget=t,this.openedIconElement=this.createButtonElement(t.options.openedIcon||"+"),this.closedIconElement=this.createButtonElement(t.options.closedIcon||"-")}return s(e,[{key:"render",value:function(e){e&&e.parent?this.renderFromNode(e):this.renderFromRoot()}},{key:"renderFromRoot",value:function(){var e=this.treeWidget.element;e.empty(),e[0]&&this.createDomElements(e[0],this.treeWidget.tree.children,!0,1)}},{key:"renderFromNode",value:function(e){var t=jQuery(e.element),n=this.createLi(e,e.getLevel());this.attachNodeData(e,n),t.after(n),t.remove(),e.children&&this.createDomElements(n,e.children,!1,e.getLevel()+1)}},{key:"createDomElements",value:function(e,t,n,i){var r=this.createUl(n);e.appendChild(r);var o,s=m(t);try{for(s.s();!(o=s.n()).done;){var a=o.value,l=this.createLi(a,i);r.appendChild(l),this.attachNodeData(a,l),a.hasChildren()&&this.createDomElements(l,a.children,!1,i+1)}}catch(e){s.e(e)}finally{s.f()}}},{key:"attachNodeData",value:function(e,t){e.element=t,jQuery(t).data("node",e)}},{key:"createUl",value:function(e){var t,n;e?(t="jqtree-tree",n="tree",this.treeWidget.options.rtl&&(t+=" jqtree-rtl")):(t="",n="group"),this.treeWidget.options.dragAndDrop&&(t+=" jqtree-dnd");var i=document.createElement("ul");return i.className="jqtree_common ".concat(t),i.setAttribute("role",n),i}},{key:"createLi",value:function(e,t){var n=Boolean(this.treeWidget.selectNodeHandler.isNodeSelected(e)),i=e.isFolder()||e.isEmptyFolder&&this.treeWidget.options.showEmptyFolder?this.createFolderLi(e,t,n):this.createNodeLi(e,t,n);return this.treeWidget.options.onCreateLi&&this.treeWidget.options.onCreateLi(e,jQuery(i),n),i}},{key:"setTreeItemAriaAttributes",value:function(e,t,n,i){e.setAttribute("aria-label",t),e.setAttribute("aria-level","".concat(n)),e.setAttribute("aria-selected",E(i)),e.setAttribute("role","treeitem")}},{key:"createFolderLi",value:function(e,t,n){var i=this.getButtonClasses(e),r=this.getFolderClasses(e,n),o=e.is_open?this.openedIconElement:this.closedIconElement,s=document.createElement("li");s.className="jqtree_common ".concat(r),s.setAttribute("role","none");var a=document.createElement("div");a.className="jqtree-element jqtree_common",a.setAttribute("role","none"),s.appendChild(a);var l=document.createElement("a");l.className=i,o&&l.appendChild(o.cloneNode(!0)),this.treeWidget.options.buttonLeft&&a.appendChild(l);var d=this.createTitleSpan(e.name,n,!0,t);return d.setAttribute("aria-expanded",E(e.is_open)),a.appendChild(d),this.treeWidget.options.buttonLeft||a.appendChild(l),s}},{key:"createNodeLi",value:function(e,t,n){var i=["jqtree_common"];n&&i.push("jqtree-selected");var r=i.join(" "),o=document.createElement("li");o.className=r,o.setAttribute("role","none");var s=document.createElement("div");s.className="jqtree-element jqtree_common",s.setAttribute("role","none"),o.appendChild(s);var a=this.createTitleSpan(e.name,n,!1,t);return s.appendChild(a),o}},{key:"createTitleSpan",value:function(e,t,n,i){var r=document.createElement("span"),o="jqtree-title jqtree_common";if(n&&(o+=" jqtree-title-folder"),o+=" jqtree-title-button-".concat(this.treeWidget.options.buttonLeft?"left":"right"),r.className=o,t){var s=this.treeWidget.options.tabIndex;void 0!==s&&r.setAttribute("tabindex","".concat(s))}return this.setTreeItemAriaAttributes(r,e,i,t),this.treeWidget.options.autoEscape?r.textContent=e:r.innerHTML=e,r}},{key:"getButtonClasses",value:function(e){var t=["jqtree-toggler","jqtree_common"];return e.is_open||t.push("jqtree-closed"),this.treeWidget.options.buttonLeft?t.push("jqtree-toggler-left"):t.push("jqtree-toggler-right"),t.join(" ")}},{key:"getFolderClasses",value:function(e,t){var n=["jqtree-folder"];return e.is_open||n.push("jqtree-closed"),t&&n.push("jqtree-selected"),e.is_loading&&n.push("jqtree-loading"),n.join(" ")}},{key:"createButtonElement",value:function(e){if("string"==typeof e){var t=document.createElement("div");return t.innerHTML=e,document.createTextNode(t.innerHTML)}return jQuery(e)[0]}}]),e}(),w=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),this.treeWidget=t}return s(e,[{key:"loadFromUrl",value:function(e,t,n){var i=this;if(e){var r=this.getDomElement(t);this.addLoadingClass(r),this.notifyLoading(!0,t,r);var o=function(){i.removeLoadingClass(r),i.notifyLoading(!1,t,r)};this.submitRequest(e,(function(e){o(),i.treeWidget.loadData(i.parseData(e),t),n&&"function"==typeof n&&n()}),(function(e){o(),i.treeWidget.options.onLoadFailed&&i.treeWidget.options.onLoadFailed(e)}))}}},{key:"addLoadingClass",value:function(e){e&&e.addClass("jqtree-loading")}},{key:"removeLoadingClass",value:function(e){e&&e.removeClass("jqtree-loading")}},{key:"getDomElement",value:function(e){return e?jQuery(e.element):this.treeWidget.element}},{key:"notifyLoading",value:function(e,t,n){this.treeWidget.options.onLoading&&this.treeWidget.options.onLoading(e,t,n),this.treeWidget._triggerEvent("tree.loading_data",{isLoading:e,node:t,$el:n})}},{key:"submitRequest",value:function(e,t,i){var r,o=n({method:"GET",cache:!1,dataType:"json",success:t,error:i},"string"==typeof e?{url:e}:e);o.method=(null===(r=o.method)||void 0===r?void 0:r.toUpperCase())||"GET",jQuery.ajax(o)}},{key:"parseData",value:function(e){var t=this.treeWidget.options.dataFilter,n="string"==typeof e?JSON.parse(e):e;return t?t(n):n}}]),e}(),F=function(){function e(t){var n=this;r(this,e),a(this,"treeWidget",void 0),a(this,"handleKeyDown",(function(t){if(!n.canHandleKeyboard())return!0;var i=n.treeWidget.getSelectedNode();if(!i)return!0;switch(t.which){case e.DOWN:return n.moveDown(i);case e.UP:return n.moveUp(i);case e.RIGHT:return n.moveRight(i);case e.LEFT:return n.moveLeft(i);default:return!0}})),this.treeWidget=t,t.options.keyboardSupport&&jQuery(document).on("keydown.jqtree",this.handleKeyDown)}return s(e,[{key:"deinit",value:function(){jQuery(document).off("keydown.jqtree")}},{key:"moveDown",value:function(e){return this.selectNode(e.getNextVisibleNode())}},{key:"moveUp",value:function(e){return this.selectNode(e.getPreviousVisibleNode())}},{key:"moveRight",value:function(e){return!e.isFolder()||(e.is_open?this.selectNode(e.getNextVisibleNode()):(this.treeWidget.openNode(e),!1))}},{key:"moveLeft",value:function(e){return e.isFolder()&&e.is_open?(this.treeWidget.closeNode(e),!1):this.selectNode(e.getParent())}},{key:"selectNode",value:function(e){return!e||(this.treeWidget.selectNode(e),this.treeWidget.scrollHandler.isScrolledIntoView(jQuery(e.element).find(".jqtree-element"))||this.treeWidget.scrollToNode(e),!1)}},{key:"canHandleKeyboard",value:function(){return!!this.treeWidget.options.keyboardSupport&&this.treeWidget.selectNodeHandler.isFocusOnTree()}}]),e}();a(F,"LEFT",37),a(F,"UP",38),a(F,"RIGHT",39),a(F,"DOWN",40);var W=function(e,t){var n=function(){return"simple_widget_".concat(t)},r=function(e,t){var n=jQuery.data(e,t);return n&&n instanceof T?n:null},o=function(t,i){var o,s=n(),a=m(t.get());try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!r(l,s)){var d=new e(l,i);jQuery.data(l,s)||jQuery.data(l,s,d),d.init()}}}catch(e){a.e(e)}finally{a.f()}return t};jQuery.fn[t]=function(t){if(!t)return o(this,null);if("object"===i(t))return o(this,t);if("string"==typeof t&&"_"!==t[0]){var s=t;if("destroy"===s)return function(e){var t,i=n(),o=m(e.get());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=r(s,i);a&&a.destroy(),jQuery.removeData(s,i)}}catch(e){o.e(e)}finally{o.f()}}(this);if("get_widget_class"===s)return e;for(var a=arguments.length,l=new Array(a>1?a-1:0),d=1;d1)){var n=t.changedTouches[0];n&&e.handleMouseDown(A(n,t))}})),a(h(e),"touchMove",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseMove(t,A(n,t))}})),a(h(e),"touchEnd",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseUp(A(n,t))}})),e}return s(n,[{key:"init",value:function(){var e=this.$el.get(0);e&&(e.addEventListener("mousedown",this.mouseDown,{passive:!1}),e.addEventListener("touchstart",this.touchStart,{passive:!1})),this.isMouseStarted=!1,this.mouseDelayTimer=null,this.isMouseDelayMet=!1,this.mouseDownInfo=null}},{key:"deinit",value:function(){var e=this.$el.get(0);e&&(e.removeEventListener("mousedown",this.mouseDown,{passive:!1}),e.removeEventListener("touchstart",this.touchStart,{passive:!1})),this.removeMouseMoveEventListeners()}},{key:"handleMouseDown",value:function(e){return this.isMouseStarted&&this.handleMouseUp(e),this.mouseDownInfo=e,!!this.mouseCapture(e)&&(this.handleStartMouse(),!0)}},{key:"handleStartMouse",value:function(){document.addEventListener("mousemove",this.mouseMove,{passive:!1}),document.addEventListener("touchmove",this.touchMove,{passive:!1}),document.addEventListener("mouseup",this.mouseUp,{passive:!1}),document.addEventListener("touchend",this.touchEnd,{passive:!1});var e=this.getMouseDelay();e?this.startMouseDelayTimer(e):this.isMouseDelayMet=!0}},{key:"startMouseDelayTimer",value:function(e){var t=this;this.mouseDelayTimer&&clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=window.setTimeout((function(){t.mouseDownInfo&&(t.isMouseDelayMet=!0)}),e),this.isMouseDelayMet=!1}},{key:"handleMouseMove",value:function(e,t){if(this.isMouseStarted)return this.mouseDrag(t),void(e.cancelable&&e.preventDefault());this.isMouseDelayMet&&(this.mouseDownInfo&&(this.isMouseStarted=!1!==this.mouseStart(this.mouseDownInfo)),this.isMouseStarted?(this.mouseDrag(t),e.cancelable&&e.preventDefault()):this.handleMouseUp(t))}},{key:"handleMouseUp",value:function(e){this.removeMouseMoveEventListeners(),this.isMouseDelayMet=!1,this.mouseDownInfo=null,this.isMouseStarted&&(this.isMouseStarted=!1,this.mouseStop(e))}},{key:"removeMouseMoveEventListeners",value:function(){document.removeEventListener("mousemove",this.mouseMove,{passive:!1}),document.removeEventListener("touchmove",this.touchMove,{passive:!1}),document.removeEventListener("mouseup",this.mouseUp,{passive:!1}),document.removeEventListener("touchend",this.touchEnd,{passive:!1})}}]),n}(T),O=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"_supportsLocalStorage",void 0),this.treeWidget=t}return s(e,[{key:"saveState",value:function(){var e=JSON.stringify(this.getState());this.treeWidget.options.onSetStateFromStorage?this.treeWidget.options.onSetStateFromStorage(e):this.supportsLocalStorage()&&localStorage.setItem(this.getKeyName(),e)}},{key:"getStateFromStorage",value:function(){var e=this.loadFromStorage();return e?this.parseState(e):null}},{key:"getState",value:function(){var e,t,n=this;return{open_nodes:(t=[],n.treeWidget.tree.iterate((function(e){return e.is_open&&e.id&&e.hasChildren()&&t.push(e.id),!0})),t),selected_node:(e=[],n.treeWidget.getSelectedNodes().forEach((function(t){null!=t.id&&e.push(t.id)})),e)}}},{key:"setInitialState",value:function(e){if(e){var t=!1;return e.open_nodes&&(t=this.openInitialNodes(e.open_nodes)),e.selected_node&&(this.resetSelection(),this.selectInitialNodes(e.selected_node)),t}return!1}},{key:"setInitialStateOnDemand",value:function(e,t){e?this.doSetInitialStateOnDemand(e.open_nodes,e.selected_node,t):t()}},{key:"getNodeIdToBeSelected",value:function(){var e=this.getStateFromStorage();return e&&e.selected_node&&e.selected_node[0]||null}},{key:"parseState",value:function(e){var t,n=JSON.parse(e);return n&&n.selected_node&&("number"==typeof(t=n.selected_node)&&t%1==0)&&(n.selected_node=[n.selected_node]),n}},{key:"loadFromStorage",value:function(){return this.treeWidget.options.onGetStateFromStorage?this.treeWidget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getKeyName()):null}},{key:"openInitialNodes",value:function(e){var t,n=!1,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(o.load_on_demand?n=!0:o.is_open=!0)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"selectInitialNodes",value:function(e){var t,n=0,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(n+=1,this.treeWidget.selectNodeHandler.addToSelection(o))}}catch(e){i.e(e)}finally{i.f()}return 0!==n}},{key:"resetSelection",value:function(){var e=this.treeWidget.selectNodeHandler;e.getSelectedNodes().forEach((function(t){e.removeFromSelection(t)}))}},{key:"doSetInitialStateOnDemand",value:function(e,t,n){var i=this,r=0,o=e,s=function(){var e,s=[],l=m(o);try{for(l.s();!(e=l.n()).done;){var d=e.value,u=i.treeWidget.getNodeById(d);u?u.is_loading||(u.load_on_demand?a(u):i.treeWidget._openNode(u,!1,null)):s.push(d)}}catch(e){l.e(e)}finally{l.f()}o=s,i.selectInitialNodes(t)&&i.treeWidget._refreshElements(null),0===r&&n()},a=function(e){r+=1,i.treeWidget._openNode(e,!1,(function(){r-=1,s()}))};s()}},{key:"getKeyName",value:function(){return"string"==typeof this.treeWidget.options.saveState?this.treeWidget.options.saveState:"tree"}},{key:"supportsLocalStorage",value:function(){return null==this._supportsLocalStorage&&(this._supportsLocalStorage=function(){if(null==localStorage)return!1;try{var e="_storage_test";sessionStorage.setItem(e,"value"),sessionStorage.removeItem(e)}catch(e){return!1}return!0}()),this._supportsLocalStorage}}]),e}(),H=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"previousTop",void 0),a(this,"isInitialized",void 0),a(this,"$scrollParent",void 0),a(this,"scrollParentTop",void 0),this.treeWidget=t,this.previousTop=-1,this.isInitialized=!1}return s(e,[{key:"checkScrolling",value:function(){this.ensureInit(),this.checkVerticalScrolling(),this.checkHorizontalScrolling()}},{key:"scrollToY",value:function(e){if(this.ensureInit(),this.$scrollParent&&this.$scrollParent[0])this.$scrollParent[0].scrollTop=e;else{var t=this.treeWidget.$el.offset(),n=t?t.top:0;jQuery(document).scrollTop(e+n)}}},{key:"isScrolledIntoView",value:function(e){var t,n,i,r;this.ensureInit();var o=e.height()||0;if(this.$scrollParent){r=0,n=this.$scrollParent.height()||0;var s=e.offset();t=(i=(s?s.top:0)-this.scrollParentTop)+o}else{n=(r=jQuery(window).scrollTop()||0)+(jQuery(window).height()||0);var a=e.offset();t=(i=a?a.top:0)+o}return t<=n&&i>=r}},{key:"getScrollLeft",value:function(){return this.$scrollParent&&this.$scrollParent.scrollLeft()||0}},{key:"initScrollParent",value:function(){var e,t=this,n=function(){t.scrollParentTop=0,t.$scrollParent=null};"fixed"===this.treeWidget.$el.css("position")&&n();var i=function(){var e=["overflow","overflow-y"],n=function(t){for(var n=0,i=e;n0,s=n.left+i.clientWidth,a=n.left,l=e.pageX>s-20,d=e.pageX0,o=e.pageX>i-20,s=e.pageX-n<20;o?t.scrollLeft(n+20):s&&r&&t.scrollLeft(Math.max(n-20,0))}}}]),e}(),M=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"selectedNodes",void 0),a(this,"selectedSingleNode",void 0),this.treeWidget=t,this.selectedNodes=new Set,this.clear()}return s(e,[{key:"getSelectedNode",value:function(){var e=this.getSelectedNodes();return e.length&&e[0]||!1}},{key:"getSelectedNodes",value:function(){var e=this;if(this.selectedSingleNode)return[this.selectedSingleNode];var t=[];return this.selectedNodes.forEach((function(n){var i=e.treeWidget.getNodeById(n);i&&t.push(i)})),t}},{key:"getSelectedNodesUnder",value:function(e){if(this.selectedSingleNode)return e.isParentOf(this.selectedSingleNode)?[this.selectedSingleNode]:[];var t=[];for(var n in this.selectedNodes)if(Object.prototype.hasOwnProperty.call(this.selectedNodes,n)){var i=this.treeWidget.getNodeById(n);i&&e.isParentOf(i)&&t.push(i)}return t}},{key:"isNodeSelected",value:function(e){return null!=e.id?this.selectedNodes.has(e.id):!!this.selectedSingleNode&&this.selectedSingleNode.element===e.element}},{key:"clear",value:function(){this.selectedNodes.clear(),this.selectedSingleNode=null}},{key:"removeFromSelection",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null==e.id?this.selectedSingleNode&&e.element===this.selectedSingleNode.element&&(this.selectedSingleNode=null):(this.selectedNodes.delete(e.id),n&&e.iterate((function(){return null!=e.id&&t.selectedNodes.delete(e.id),!0})))}},{key:"addToSelection",value:function(e){null!=e.id?this.selectedNodes.add(e.id):this.selectedSingleNode=e}},{key:"isFocusOnTree",value:function(){var e=document.activeElement;return Boolean(e&&"SPAN"===e.tagName&&this.treeWidget._containsElement(e))}}]),e}(),x=function(){function e(t,n){r(this,e),a(this,"node",void 0),a(this,"$element",void 0),a(this,"treeWidget",void 0),this.init(t,n)}return s(e,[{key:"init",value:function(e,t){if(this.node=e,this.treeWidget=t,!e.element){var n=this.treeWidget.element.get(0);n&&(e.element=n)}e.element&&(this.$element=jQuery(e.element))}},{key:"addDropHint",value:function(e){return this.mustShowBorderDropHint(e)?new q(this.$element,this.treeWidget._getScrollLeft()):new B(this.node,this.$element,e)}},{key:"select",value:function(e){var t;this.getLi().addClass("jqtree-selected");var n=this.getSpan();n.attr("tabindex",null!==(t=this.treeWidget.options.tabIndex)&&void 0!==t?t:null),n.attr("aria-selected","true"),e&&n.trigger("focus")}},{key:"deselect",value:function(){this.getLi().removeClass("jqtree-selected");var e=this.getSpan();e.removeAttr("tabindex"),e.attr("aria-selected","false"),e.trigger("blur")}},{key:"getUl",value:function(){return this.$element.children("ul:first")}},{key:"getSpan",value:function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")}},{key:"getLi",value:function(){return this.$element}},{key:"mustShowBorderDropHint",value:function(e){return e===k.Inside}}]),e}(),$=function(e){l(n,e);var t=c(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"open",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fast";if(!this.node.is_open){this.node.is_open=!0;var r=this.getButton();r.removeClass("jqtree-closed"),r.html("");var o=r.get(0);if(o){var s=this.treeWidget.renderer.openedIconElement;if(s){var a=s.cloneNode(!0);o.appendChild(a)}}var l=function(){t.getLi().removeClass("jqtree-closed"),t.getSpan().attr("aria-expanded","true"),e&&e(t.node),t.treeWidget._triggerEvent("tree.open",{node:t.node})};n?this.getUl().slideDown(i,l):(this.getUl().show(),l())}}},{key:"close",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fast";if(this.node.is_open){this.node.is_open=!1;var i=this.getButton();i.addClass("jqtree-closed"),i.html("");var r=i.get(0);if(r){var o=this.treeWidget.renderer.closedIconElement;if(o){var s=o.cloneNode(!0);r.appendChild(s)}}var a=function(){e.getLi().addClass("jqtree-closed"),e.getSpan().attr("aria-expanded","false"),e.treeWidget._triggerEvent("tree.close",{node:e.node})};t?this.getUl().slideUp(n,a):(this.getUl().hide(),a())}}},{key:"mustShowBorderDropHint",value:function(e){return!this.node.is_open&&e===k.Inside}},{key:"getButton",value:function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")}}]),n}(x),q=function(){function e(t,n){r(this,e),a(this,"$hint",void 0);var i=t.children(".jqtree-element"),o=t.width()||0,s=Math.max(o+n-4,0),l=i.outerHeight()||0,d=Math.max(l-4,0);this.$hint=jQuery(''),i.append(this.$hint),this.$hint.css({width:s,height:d})}return s(e,[{key:"remove",value:function(){this.$hint.remove()}}]),e}(),B=function(){function e(t,n,i){r(this,e),a(this,"$element",void 0),a(this,"node",void 0),a(this,"$ghost",void 0),this.$element=n,this.node=t,this.$ghost=jQuery('
  • \n
  • '),i===k.After?this.moveAfter():i===k.Before?this.moveBefore():i===k.Inside&&(t.isFolder()&&t.is_open?this.moveInsideOpenFolder():this.moveInside())}return s(e,[{key:"remove",value:function(){this.$ghost.remove()}},{key:"moveAfter",value:function(){this.$element.after(this.$ghost)}},{key:"moveBefore",value:function(){this.$element.before(this.$ghost)}},{key:"moveInsideOpenFolder",value:function(){var e,t=null===(e=this.node.children[0])||void 0===e?void 0:e.element;t&&jQuery(t).before(this.$ghost)}},{key:"moveInside",value:function(){this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")}}]),e}(),Q="Node parameter is empty",U="Parameter is empty: ",R=function(e){l(o,e);var t=c(o);function o(){var e;r(this,o);for(var n=arguments.length,i=new Array(n),s=0;s1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return e.is_open?this.closeNode(e,n):this.openNode(e,n),this.element}},{key:"getTree",value:function(){return this.tree}},{key:"selectNode",value:function(e,t){return this.doSelectNode(e,t),this.element}},{key:"getSelectedNode",value:function(){return this.selectNodeHandler.getSelectedNode()}},{key:"toJson",value:function(){return JSON.stringify(this.tree.getData())}},{key:"loadData",value:function(e,t){return this.doLoadData(e,t),this.element}},{key:"loadDataFromUrl",value:function(e,t,n){return"string"==typeof e?this.doLoadDataFromUrl(e,t,null!=n?n:null):this.doLoadDataFromUrl(null,e,t),this.element}},{key:"reload",value:function(e){return this.doLoadDataFromUrl(null,null,e),this.element}},{key:"refresh",value:function(){return this._refreshElements(null),this.element}},{key:"getNodeById",value:function(e){return this.tree.getNodeById(e)}},{key:"getNodeByName",value:function(e){return this.tree.getNodeByName(e)}},{key:"getNodeByNameMustExist",value:function(e){return this.tree.getNodeByNameMustExist(e)}},{key:"getNodesByProperty",value:function(e,t){return this.tree.getNodesByProperty(e,t)}},{key:"getNodeByHtmlElement",value:function(e){return this.getNode(jQuery(e))}},{key:"getNodeByCallback",value:function(e){return this.tree.getNodeByCallback(e)}},{key:"openNode",value:function(e,t,n){var i=this;if(!e)throw Error(Q);var r=function(){var e,r,o;("function"==typeof t?(e=t,r=null):(r=t,e=n),null==r)&&(r=null!==(o=i.options.slide)&&void 0!==o&&o);return[r,e]}(),o=f(r,2),s=o[0],a=o[1];return this._openNode(e,s,a),this.element}},{key:"closeNode",value:function(e,t){if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return(e.isFolder()||e.isEmptyFolder)&&(new $(e,this).close(n,this.options.animationSpeed),this.saveState()),this.element}},{key:"isDragging",value:function(){return this.dndHandler.isDragging}},{key:"refreshHitAreas",value:function(){return this.dndHandler.refresh(),this.element}},{key:"addNodeAfter",value:function(e,t){var n=t.addAfter(e);return n&&this._refreshElements(t.parent),n}},{key:"addNodeBefore",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addBefore(e);return n&&this._refreshElements(t.parent),n}},{key:"addParentNode",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addParent(e);return n&&this._refreshElements(n.parent),n}},{key:"removeNode",value:function(e){if(!e)throw Error(Q);if(!e.parent)throw Error("Node has no parent");this.selectNodeHandler.removeFromSelection(e,!0);var t=e.parent;return e.remove(),this._refreshElements(t),this.element}},{key:"appendNode",value:function(e,t){var n=t||this.tree,i=n.append(e);return this._refreshElements(n),i}},{key:"prependNode",value:function(e,t){var n=null!=t?t:this.tree,i=n.prepend(e);return this._refreshElements(n),i}},{key:"updateNode",value:function(e,t){if(!e)throw Error(Q);var n="object"===i(t)&&t.id&&t.id!==e.id;return n&&this.tree.removeNodeFromIndex(e),e.setData(t),n&&this.tree.addNodeToIndex(e),"object"===i(t)&&t.children&&t.children instanceof Array&&(e.removeChildren(),t.children.length&&e.loadFromData(t.children)),this._refreshElements(e),this.element}},{key:"isSelectedNodeInSubtree",value:function(e){var t=this.getSelectedNode();return!!t&&(e===t||e.isParentOf(t))}},{key:"moveNode",value:function(e,t,n){if(!e)throw Error(Q);if(!t)throw Error(U+"targetNode");var i=N[n];return void 0!==i&&(this.tree.moveNode(e,t,i),this._refreshElements(null)),this.element}},{key:"getStateFromStorage",value:function(){return this.saveStateHandler.getStateFromStorage()}},{key:"addToSelection",value:function(e,t){if(!e)throw Error(Q);return this.selectNodeHandler.addToSelection(e),this._getNodeElementForNode(e).select(void 0===t||t),this.saveState(),this.element}},{key:"getSelectedNodes",value:function(){return this.selectNodeHandler.getSelectedNodes()}},{key:"isNodeSelected",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.isNodeSelected(e)}},{key:"removeFromSelection",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this.saveState(),this.element}},{key:"scrollToNode",value:function(e){if(!e)throw Error(Q);var t=jQuery(e.element).offset(),n=t?t.top:0,i=this.$el.offset(),r=n-(i?i.top:0);return this.scrollHandler.scrollToY(r),this.element}},{key:"getState",value:function(){return this.saveStateHandler.getState()}},{key:"setState",value:function(e){return this.saveStateHandler.setInitialState(e),this._refreshElements(null),this.element}},{key:"setOption",value:function(e,t){return this.options[e]=t,this.element}},{key:"moveDown",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveDown(e),this.element}},{key:"moveUp",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveUp(e),this.element}},{key:"getVersion",value:function(){return"1.7.1"}},{key:"_triggerEvent",value:function(e,t){var n=jQuery.Event(e,t);return this.element.trigger(n),n}},{key:"_openNode",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=function(e,n,i){new $(e,t).open(i,n,t.options.animationSpeed)};if(e.isFolder()||e.isEmptyFolder)if(e.load_on_demand)this.loadFolderOnDemand(e,n,i);else{for(var o=e.parent;o;)o.parent&&r(o,!1,null),o=o.parent;r(e,n,i),this.saveState()}}},{key:"_refreshElements",value:function(e){var t=this.selectNodeHandler.isFocusOnTree(),n=!!e&&this.isSelectedNodeInSubtree(e);this.renderer.render(e),n&&this.selectCurrentNode(t),this._triggerEvent("tree.refresh")}},{key:"_getNodeElementForNode",value:function(e){return e.isFolder()?new $(e,this):new x(e,this)}},{key:"_getNodeElement",value:function(e){var t=this.getNode(e);return t?this._getNodeElementForNode(t):null}},{key:"_containsElement",value:function(e){var t=this.getNode(jQuery(e));return null!=t&&t.tree===this.tree}},{key:"_getScrollLeft",value:function(){return this.scrollHandler.getScrollLeft()}},{key:"init",value:function(){v(d(o.prototype),"init",this).call(this),this.element=this.$el,this.isInitialized=!1,this.options.rtl=this.getRtlOption(),null==this.options.closedIcon&&(this.options.closedIcon=this.getDefaultClosedIcon()),this.renderer=new C(this),this.dataLoader=new w(this),this.saveStateHandler=new O(this),this.selectNodeHandler=new M(this),this.dndHandler=new D(this),this.scrollHandler=new H(this),this.keyHandler=new F(this),this.initData(),this.element.on("click",this.handleClick),this.element.on("dblclick",this.handleDblclick),this.options.useContextMenu&&this.element.on("contextmenu",this.handleContextmenu)}},{key:"deinit",value:function(){this.element.empty(),this.element.off(),this.keyHandler.deinit(),this.tree=new _({},!0),v(d(o.prototype),"deinit",this).call(this)}},{key:"mouseCapture",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseCapture(e)}},{key:"mouseStart",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStart(e)}},{key:"mouseDrag",value:function(e){if(this.options.dragAndDrop){var t=this.dndHandler.mouseDrag(e);return this.scrollHandler.checkScrolling(),t}return!1}},{key:"mouseStop",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStop(e)}},{key:"getMouseDelay",value:function(){var e;return null!==(e=this.options.startDndDelay)&&void 0!==e?e:0}},{key:"initData",value:function(){this.options.data?this.doLoadData(this.options.data,null):this.getDataUrlInfo(null)?this.doLoadDataFromUrl(null,null,null):this.doLoadData([],null)}},{key:"getDataUrlInfo",value:function(e){var t,n=this,r=this.options.dataUrl||this.element.data("url"),o=function(t){if(null!=e&&e.id){var i={node:e.id};t.data=i}else{var r=n.getNodeIdToBeSelected();if(r){var o={selected_node:r};t.data=o}}};return"function"==typeof r?r(e):"string"==typeof r?(o(t={url:r}),t):r&&"object"===i(r)?(o(r),r):null}},{key:"getNodeIdToBeSelected",value:function(){return this.options.saveState?this.saveStateHandler.getNodeIdToBeSelected():null}},{key:"initTree",value:function(e){var t=this,n=function(){t.isInitialized||(t.isInitialized=!0,t._triggerEvent("tree.init"))};if(this.options.nodeClass){this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.selectNodeHandler.clear(),this.tree.loadFromData(e);var i=this.setInitialState();this._refreshElements(null),i?this.setInitialStateOnDemand(n):n()}}},{key:"setInitialState",value:function(){var e=this,t=f(function(){if(e.options.saveState){var t=e.saveStateHandler.getStateFromStorage();return t?[!0,e.saveStateHandler.setInitialState(t)]:[!1,!1]}return[!1,!1]}(),2),n=t[0],i=t[1];return n||(i=function(){if(!1===e.options.autoOpen)return!1;var t=e.getAutoOpenMaxLevel(),n=!1;return e.tree.iterate((function(e,i){return e.load_on_demand?(n=!0,!1):!!e.hasChildren()&&(e.is_open=!0,i!==t)})),n}()),i}},{key:"setInitialStateOnDemand",value:function(e){var t,n,i,r,o=this;(function(){if(o.options.saveState){var t=o.saveStateHandler.getStateFromStorage();return!!t&&(o.saveStateHandler.setInitialStateOnDemand(t,e),!0)}return!1})()||(t=o.getAutoOpenMaxLevel(),n=0,i=function(e){n+=1,o._openNode(e,!1,(function(){n-=1,r()}))},(r=function(){o.tree.iterate((function(e,n){return e.load_on_demand?(e.is_loading||i(e),!1):(o._openNode(e,!1,null),n!==t)})),0===n&&e()})())}},{key:"getAutoOpenMaxLevel",value:function(){return!0===this.options.autoOpen?-1:"number"==typeof this.options.autoOpen?this.options.autoOpen:"string"==typeof this.options.autoOpen?parseInt(this.options.autoOpen,10):0}},{key:"getClickTarget",value:function(e){var t=jQuery(e),n=t.closest(".jqtree-toggler");if(n.length){var i=this.getNode(n);if(i)return{type:"button",node:i}}else{var r=t.closest(".jqtree-element");if(r.length){var o=this.getNode(r);if(o)return{type:"label",node:o}}}return null}},{key:"getNode",value:function(e){var t=e.closest("li.jqtree_common");return 0===t.length?null:t.data("node")}},{key:"saveState",value:function(){this.options.saveState&&this.saveStateHandler.saveState()}},{key:"selectCurrentNode",value:function(e){var t=this.getSelectedNode();if(t){var n=this._getNodeElementForNode(t);n&&n.select(e)}}},{key:"deselectCurrentNode",value:function(){var e=this.getSelectedNode();e&&this.removeFromSelection(e)}},{key:"getDefaultClosedIcon",value:function(){return this.options.rtl?"◀":"►"}},{key:"getRtlOption",value:function(){if(null!=this.options.rtl)return this.options.rtl;var e=this.element.data("rtl");return null!==e&&!1!==e&&void 0!==e}},{key:"doSelectNode",value:function(e,t){var i=this,r=function(){i.options.saveState&&i.saveStateHandler.saveState()};if(!e)return this.deselectCurrentNode(),void r();var o=n(n({},{mustSetFocus:!0,mustToggle:!0}),t||{});if(i.options.onCanSelectNode?!0===i.options.selectable&&i.options.onCanSelectNode(e):!0===i.options.selectable){if(this.selectNodeHandler.isNodeSelected(e))o.mustToggle&&(this.deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e}));else{var s=this.getSelectedNode()||null;this.deselectCurrentNode(),this.addToSelection(e,o.mustSetFocus),this._triggerEvent("tree.select",{node:e,deselected_node:s}),(a=e.parent)&&a.parent&&!a.is_open&&i.openNode(a,!1)}var a;r()}}},{key:"doLoadData",value:function(e,t){e&&(t?(this.deselectNodes(t),this.loadSubtree(e,t)):this.initTree(e),this.isDragging()&&this.dndHandler.refresh()),this._triggerEvent("tree.load_data",{tree_data:e,parent_node:t})}},{key:"deselectNodes",value:function(e){var t,n=m(this.selectNodeHandler.getSelectedNodesUnder(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.selectNodeHandler.removeFromSelection(i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"loadSubtree",value:function(e,t){t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,this._refreshElements(t)}},{key:"doLoadDataFromUrl",value:function(e,t,n){var i=e||this.getDataUrlInfo(t);this.dataLoader.loadFromUrl(i,t,n)}},{key:"loadFolderOnDemand",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;e.is_loading=!0,this.doLoadDataFromUrl(null,e,(function(){t._openNode(e,n,i)}))}}]),o}(L);return a(R,"defaults",{animationSpeed:"fast",autoEscape:!0,autoOpen:!1,buttonLeft:!0,closedIcon:void 0,data:void 0,dataFilter:void 0,dataUrl:void 0,dragAndDrop:!1,keyboardSupport:!0,nodeClass:_,onCanMove:void 0,onCanMoveTo:void 0,onCanSelectNode:void 0,onCreateLi:void 0,onDragMove:void 0,onDragStop:void 0,onGetStateFromStorage:void 0,onIsMoveHandle:void 0,onLoadFailed:void 0,onLoading:void 0,onSetStateFromStorage:void 0,openedIcon:"▼",openFolderDelay:500,rtl:void 0,saveState:!1,selectable:!0,showEmptyFolder:!1,slide:!0,startDndDelay:300,tabIndex:0,useContextMenu:!0}),T.register(R,"tree"),e.JqTreeWidget=R,e}({}); +var jqtree=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var k=function(e){return e[e.Before=1]="Before",e[e.After=2]="After",e[e.Inside=3]="Inside",e[e.None=4]="None",e}({}),N={before:k.Before,after:k.After,inside:k.Inside,none:k.None},S=function(e){for(var t in N)if(Object.prototype.hasOwnProperty.call(N,t)&&N[t]===e)return t;return""},b=function(e){return"object"===i(e)&&"children"in e&&e.children instanceof Array},_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;r(this,e),a(this,"id",void 0),a(this,"name",void 0),a(this,"children",void 0),a(this,"parent",void 0),a(this,"idMapping",void 0),a(this,"tree",void 0),a(this,"nodeClass",void 0),a(this,"load_on_demand",void 0),a(this,"is_open",void 0),a(this,"element",void 0),a(this,"is_loading",void 0),a(this,"isEmptyFolder",void 0),this.name="",this.isEmptyFolder=!1,this.load_on_demand=!1,this.setData(t),this.children=[],this.parent=null,n&&(this.idMapping=new Map,this.tree=this,this.nodeClass=i)}return s(e,[{key:"setData",value:function(e){if(e)if("string"==typeof e)this.name=e;else if("object"===i(e))for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];"label"===t||"name"===t?"string"==typeof n&&(this.name=n):"children"!==t&&"parent"!==t&&(this[t]=n)}}},{key:"loadFromData",value:function(e){this.removeChildren();var t,n=m(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,r=this.createNode(i);this.addChild(r),b(i)&&(0===i.children.length?r.isEmptyFolder=!0:r.loadFromData(i.children))}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addChild",value:function(e){this.children.push(e),e.setParent(this)}},{key:"addChildAtPosition",value:function(e,t){this.children.splice(t,0,e),e.setParent(this)}},{key:"removeChild",value:function(e){e.removeChildren(),this.doRemoveChild(e)}},{key:"getChildIndex",value:function(e){return this.children.indexOf(e)}},{key:"hasChildren",value:function(){return 0!==this.children.length}},{key:"isFolder",value:function(){return this.hasChildren()||this.load_on_demand}},{key:"iterate",value:function(e){!function t(n,i){if(n.children){var r,o=m(n.children);try{for(o.s();!(r=o.n()).done;){var s=r.value;e(s,i)&&s.hasChildren()&&t(s,i+1)}}catch(e){o.e(e)}finally{o.f()}}}(this,0)}},{key:"moveNode",value:function(e,t,n){if(!e.parent||e.isParentOf(t))return!1;switch(e.parent.doRemoveChild(e),n){case k.After:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1),!0);case k.Before:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)),!0);case k.Inside:return t.addChildAtPosition(e,0),!0;default:return!1}}},{key:"getData",value:function(){var e=function e(t){return t.map((function(t){var n={};for(var i in t)if(-1===["parent","children","element","idMapping","load_on_demand","nodeClass","tree","isEmptyFolder"].indexOf(i)&&Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];n[i]=r}return t.hasChildren()&&(n.children=e(t.children)),n}))};return e(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[this]:this.children)}},{key:"getNodeByName",value:function(e){return this.getNodeByCallback((function(t){return t.name===e}))}},{key:"getNodeByNameMustExist",value:function(e){var t=this.getNodeByCallback((function(t){return t.name===e}));if(!t)throw"Node with name ".concat(e," not found");return t}},{key:"getNodeByCallback",value:function(e){var t=null;return this.iterate((function(n){return!t&&(!e(n)||(t=n,!1))})),t}},{key:"addAfter",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n+1),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addBefore",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addParent",value:function(e){if(this.parent){var t=this.createNode(e);this.tree&&t.setParent(this.tree);var n,i=this.parent,r=m(i.children);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.addChild(o)}}catch(e){r.e(e)}finally{r.f()}return i.children=[],i.addChild(t),t}return null}},{key:"remove",value:function(){this.parent&&(this.parent.removeChild(this),this.parent=null)}},{key:"append",value:function(e){var t=this.createNode(e);return this.addChild(t),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"prepend",value:function(e){var t=this.createNode(e);return this.addChildAtPosition(t,0),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"isParentOf",value:function(e){for(var t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1}},{key:"getLevel",value:function(){for(var e=0,t=this;t.parent;)e+=1,t=t.parent;return e}},{key:"getNodeById",value:function(e){return this.idMapping.get(e)||null}},{key:"addNodeToIndex",value:function(e){null!=e.id&&this.idMapping.set(e.id,e)}},{key:"removeNodeFromIndex",value:function(e){null!=e.id&&this.idMapping.delete(e.id)}},{key:"removeChildren",value:function(){var e=this;this.iterate((function(t){var n;return null===(n=e.tree)||void 0===n||n.removeNodeFromIndex(t),!0})),this.children=[]}},{key:"getPreviousSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)-1;return e>=0&&this.parent.children[e]||null}return null}},{key:"getNextSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)+1;return e0&&void 0!==arguments[0])||arguments[0])&&this.hasChildren())return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getNextVisibleNode",value:function(){if(this.hasChildren()&&this.is_open)return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getPreviousNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()?e.getLastChild():e:this.getParent()}return null}},{key:"getPreviousVisibleNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()&&e.is_open?e.getLastChild():e:this.getParent()}return null}},{key:"getParent",value:function(){return this.parent&&this.parent.parent?this.parent:null}},{key:"getLastChild",value:function(){if(this.hasChildren()){var e=this.children[this.children.length-1];return e?e.hasChildren()&&e.is_open?null==e?void 0:e.getLastChild():e:null}return null}},{key:"initFromData",value:function(e){var t,n=this,i=function(e){var t,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=n.createNode();o.initFromData(r),n.addChild(o)}}catch(e){i.e(e)}finally{i.f()}};t=e,n.setData(t),b(t)&&t.children.length&&i(t.children)}},{key:"setParent",value:function(e){var t;this.parent=e,this.tree=e.tree,null===(t=this.tree)||void 0===t||t.addNodeToIndex(this)}},{key:"doRemoveChild",value:function(e){var t;this.children.splice(this.getChildIndex(e),1),null===(t=this.tree)||void 0===t||t.removeNodeFromIndex(e)}},{key:"getNodeClass",value:function(){var t;return this.nodeClass||(null==this||null===(t=this.tree)||void 0===t?void 0:t.nodeClass)||e}},{key:"createNode",value:function(e){return new(this.getNodeClass())(e)}}]),e}(),D=function(){function e(t){r(this,e),a(this,"hitAreas",void 0),a(this,"isDragging",void 0),a(this,"currentItem",void 0),a(this,"hoveredArea",void 0),a(this,"positionInfo",void 0),a(this,"treeWidget",void 0),a(this,"dragElement",void 0),a(this,"previousGhost",void 0),a(this,"openFolderTimer",void 0),this.treeWidget=t,this.hoveredArea=null,this.hitAreas=[],this.isDragging=!1,this.currentItem=null,this.positionInfo=null}return s(e,[{key:"mouseCapture",value:function(e){var t=jQuery(e.target);if(!this.mustCaptureElement(t))return null;if(this.treeWidget.options.onIsMoveHandle&&!this.treeWidget.options.onIsMoveHandle(t))return null;var n=this.treeWidget._getNodeElement(t);return n&&this.treeWidget.options.onCanMove&&(this.treeWidget.options.onCanMove(n.node)||(n=null)),this.currentItem=n,null!=this.currentItem}},{key:"mouseStart",value:function(e){var t;if(!this.currentItem||void 0===e.pageX||void 0===e.pageY)return!1;this.refresh();var n=jQuery(e.target).offset(),i=n?n.left:0,r=n?n.top:0,o=this.currentItem.node;return this.dragElement=new j(o.name,e.pageX-i,e.pageY-r,this.treeWidget.element,null===(t=this.treeWidget.options.autoEscape)||void 0===t||t),this.isDragging=!0,this.positionInfo=e,this.currentItem.$element.addClass("jqtree-moving"),!0}},{key:"mouseDrag",value:function(e){if(!this.currentItem||!this.dragElement||void 0===e.pageX||void 0===e.pageY)return!1;this.dragElement.move(e.pageX,e.pageY),this.positionInfo=e;var t=this.findHoveredArea(e.pageX,e.pageY);return t&&this.canMoveToArea(t)?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hoveredArea!==t&&(this.hoveredArea=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeDropHint(),this.stopOpenFolderTimer(),this.hoveredArea=t),t||this.treeWidget.options.onDragMove&&this.treeWidget.options.onDragMove(this.currentItem.node,e.originalEvent),!0}},{key:"mouseStop",value:function(e){this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas();var t=this.currentItem;return this.currentItem&&(this.currentItem.$element.removeClass("jqtree-moving"),this.currentItem=null),this.isDragging=!1,this.positionInfo=null,!this.hoveredArea&&t&&this.treeWidget.options.onDragStop&&this.treeWidget.options.onDragStop(t.node,e.originalEvent),!1}},{key:"refresh",value:function(){this.removeHitAreas(),this.currentItem&&(this.generateHitAreas(),this.currentItem=this.treeWidget._getNodeElementForNode(this.currentItem.node),this.isDragging&&this.currentItem.$element.addClass("jqtree-moving"))}},{key:"generateHitAreas",value:function(){if(this.currentItem){var e=new I(this.treeWidget.tree,this.currentItem.node,this.getTreeDimensions().bottom);this.hitAreas=e.generate()}else this.hitAreas=[]}},{key:"mustCaptureElement",value:function(e){return!e.is("input,select,textarea")}},{key:"canMoveToArea",value:function(e){if(!this.treeWidget.options.onCanMoveTo)return!0;if(!this.currentItem)return!1;var t=S(e.position);return this.treeWidget.options.onCanMoveTo(this.currentItem.node,e.node,t)}},{key:"removeHitAreas",value:function(){this.hitAreas=[]}},{key:"clear",value:function(){this.dragElement&&(this.dragElement.remove(),this.dragElement=null)}},{key:"removeDropHint",value:function(){this.previousGhost&&this.previousGhost.remove()}},{key:"removeHover",value:function(){this.hoveredArea=null}},{key:"findHoveredArea",value:function(e,t){var n=this.getTreeDimensions();if(en.right||t>n.bottom)return null;for(var i=0,r=this.hitAreas.length;i>1,s=this.hitAreas[o];if(!s)return null;if(ts.bottom))return s;i=o+1}}return null}},{key:"mustOpenFolderTimer",value:function(e){var t=e.node;return t.isFolder()&&!t.is_open&&e.position===k.Inside}},{key:"updateDropHint",value:function(){if(this.hoveredArea){this.removeDropHint();var e=this.treeWidget._getNodeElementForNode(this.hoveredArea.node);this.previousGhost=e.addDropHint(this.hoveredArea.position)}}},{key:"startOpenFolderTimer",value:function(e){var t=this;this.stopOpenFolderTimer();var n=this.treeWidget.options.openFolderDelay;!1!==n&&(this.openFolderTimer=window.setTimeout((function(){t.treeWidget._openNode(e,t.treeWidget.options.slide,(function(){t.refresh(),t.updateDropHint()}))}),n))}},{key:"stopOpenFolderTimer",value:function(){this.openFolderTimer&&(clearTimeout(this.openFolderTimer),this.openFolderTimer=null)}},{key:"moveItem",value:function(e){var t=this;if(this.currentItem&&this.hoveredArea&&this.hoveredArea.position!==k.None&&this.canMoveToArea(this.hoveredArea)){var n=this.currentItem.node,i=this.hoveredArea.node,r=this.hoveredArea.position,o=n.parent;r===k.Inside&&(this.hoveredArea.node.is_open=!0);var s=function(){t.treeWidget.tree.moveNode(n,i,r),t.treeWidget.element.empty(),t.treeWidget._refreshElements(null)};this.treeWidget._triggerEvent("tree.move",{move_info:{moved_node:n,target_node:i,position:S(r),previous_parent:o,do_move:s,original_event:e.originalEvent}}).isDefaultPrevented()||s()}}},{key:"getTreeDimensions",value:function(){var e=this.treeWidget.element.offset();if(e){var t=this.treeWidget.element,n=t.width()||0,i=t.height()||0,r=e.left+this.treeWidget._getScrollLeft();return{left:r,top:e.top,right:r+n,bottom:e.top+i+16}}return{left:0,top:0,right:0,bottom:0}}}]),e}(),I=function(e){l(n,e);var t=c(n);function n(e,i,o){var s;return r(this,n),a(h(s=t.call(this,e)),"currentNode",void 0),a(h(s),"treeBottom",void 0),a(h(s),"positions",void 0),a(h(s),"lastTop",void 0),s.currentNode=i,s.treeBottom=o,s}return s(n,[{key:"generate",value:function(){return this.positions=[],this.lastTop=0,this.iterate(),this.generateHitAreas(this.positions)}},{key:"generateHitAreas",value:function(e){var t,n=-1,i=[],r=[],o=m(e);try{for(o.s();!(t=o.n()).done;){var s=t.value;s.top!==n&&i.length&&(i.length&&this.generateHitAreasForGroup(r,i,n,s.top),n=s.top,i=[]),i.push(s)}}catch(e){o.e(e)}finally{o.f()}return this.generateHitAreasForGroup(r,i,n,this.treeBottom),r}},{key:"handleOpenFolder",value:function(e,t){return e!==this.currentNode&&(e.children[0]!==this.currentNode&&this.addPosition(e,k.Inside,this.getTop(t)),!0)}},{key:"handleClosedFolder",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):(this.addPosition(e,k.Inside,i),t!==this.currentNode&&this.addPosition(e,k.After,i))}},{key:"handleFirstNode",value:function(e){e!==this.currentNode&&this.addPosition(e,k.Before,this.getTop(jQuery(e.element)))}},{key:"handleAfterOpenFolder",value:function(e,t){e===this.currentNode||t===this.currentNode?this.addPosition(e,k.None,this.lastTop):this.addPosition(e,k.After,this.lastTop)}},{key:"handleNode",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.Inside,i),t===this.currentNode||e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.After,i)}},{key:"getTop",value:function(e){var t=e.offset();return t?t.top:0}},{key:"addPosition",value:function(e,t,n){var i={top:n,bottom:0,node:e,position:t};this.positions.push(i),this.lastTop=n}},{key:"generateHitAreasForGroup",value:function(e,t,n,i){for(var r=Math.min(t.length,4),o=Math.round((i-n)/r),s=n,a=0;a").addClass("jqtree-title jqtree-dragging"),s?this.$element.text(t):this.$element.html(t),this.$element.css("position","absolute"),o.append(this.$element)}return s(e,[{key:"move",value:function(e,t){this.$element.offset({left:e-this.offsetX,top:t-this.offsetY})}},{key:"remove",value:function(){this.$element.remove()}}]),e}(),E=function(e){return e?"true":"false"},C=function(){function e(t){r(this,e),a(this,"openedIconElement",void 0),a(this,"closedIconElement",void 0),a(this,"treeWidget",void 0),this.treeWidget=t,this.openedIconElement=this.createButtonElement(t.options.openedIcon||"+"),this.closedIconElement=this.createButtonElement(t.options.closedIcon||"-")}return s(e,[{key:"render",value:function(e){e&&e.parent?this.renderFromNode(e):this.renderFromRoot()}},{key:"renderFromRoot",value:function(){var e=this.treeWidget.element;e.empty(),e[0]&&this.createDomElements(e[0],this.treeWidget.tree.children,!0,1)}},{key:"renderFromNode",value:function(e){var t=jQuery(e.element),n=this.createLi(e,e.getLevel());this.attachNodeData(e,n),t.after(n),t.remove(),e.children&&this.createDomElements(n,e.children,!1,e.getLevel()+1)}},{key:"createDomElements",value:function(e,t,n,i){var r=this.createUl(n);e.appendChild(r);var o,s=m(t);try{for(s.s();!(o=s.n()).done;){var a=o.value,l=this.createLi(a,i);r.appendChild(l),this.attachNodeData(a,l),a.hasChildren()&&this.createDomElements(l,a.children,!1,i+1)}}catch(e){s.e(e)}finally{s.f()}}},{key:"attachNodeData",value:function(e,t){e.element=t,jQuery(t).data("node",e)}},{key:"createUl",value:function(e){var t,n;e?(t="jqtree-tree",n="tree",this.treeWidget.options.rtl&&(t+=" jqtree-rtl")):(t="",n="group"),this.treeWidget.options.dragAndDrop&&(t+=" jqtree-dnd");var i=document.createElement("ul");return i.className="jqtree_common ".concat(t),i.setAttribute("role",n),i}},{key:"createLi",value:function(e,t){var n=Boolean(this.treeWidget.selectNodeHandler.isNodeSelected(e)),i=e.isFolder()||e.isEmptyFolder&&this.treeWidget.options.showEmptyFolder?this.createFolderLi(e,t,n):this.createNodeLi(e,t,n);return this.treeWidget.options.onCreateLi&&this.treeWidget.options.onCreateLi(e,jQuery(i),n),i}},{key:"setTreeItemAriaAttributes",value:function(e,t,n,i){e.setAttribute("aria-label",t),e.setAttribute("aria-level","".concat(n)),e.setAttribute("aria-selected",E(i)),e.setAttribute("role","treeitem")}},{key:"createFolderLi",value:function(e,t,n){var i=this.getButtonClasses(e),r=this.getFolderClasses(e,n),o=e.is_open?this.openedIconElement:this.closedIconElement,s=document.createElement("li");s.className="jqtree_common ".concat(r),s.setAttribute("role","none");var a=document.createElement("div");a.className="jqtree-element jqtree_common",a.setAttribute("role","none"),s.appendChild(a);var l=document.createElement("a");l.className=i,o&&l.appendChild(o.cloneNode(!0)),this.treeWidget.options.buttonLeft&&a.appendChild(l);var d=this.createTitleSpan(e.name,n,!0,t);return d.setAttribute("aria-expanded",E(e.is_open)),a.appendChild(d),this.treeWidget.options.buttonLeft||a.appendChild(l),s}},{key:"createNodeLi",value:function(e,t,n){var i=["jqtree_common"];n&&i.push("jqtree-selected");var r=i.join(" "),o=document.createElement("li");o.className=r,o.setAttribute("role","none");var s=document.createElement("div");s.className="jqtree-element jqtree_common",s.setAttribute("role","none"),o.appendChild(s);var a=this.createTitleSpan(e.name,n,!1,t);return s.appendChild(a),o}},{key:"createTitleSpan",value:function(e,t,n,i){var r=document.createElement("span"),o="jqtree-title jqtree_common";if(n&&(o+=" jqtree-title-folder"),o+=" jqtree-title-button-".concat(this.treeWidget.options.buttonLeft?"left":"right"),r.className=o,t){var s=this.treeWidget.options.tabIndex;void 0!==s&&r.setAttribute("tabindex","".concat(s))}return this.setTreeItemAriaAttributes(r,e,i,t),this.treeWidget.options.autoEscape?r.textContent=e:r.innerHTML=e,r}},{key:"getButtonClasses",value:function(e){var t=["jqtree-toggler","jqtree_common"];return e.is_open||t.push("jqtree-closed"),this.treeWidget.options.buttonLeft?t.push("jqtree-toggler-left"):t.push("jqtree-toggler-right"),t.join(" ")}},{key:"getFolderClasses",value:function(e,t){var n=["jqtree-folder"];return e.is_open||n.push("jqtree-closed"),t&&n.push("jqtree-selected"),e.is_loading&&n.push("jqtree-loading"),n.join(" ")}},{key:"createButtonElement",value:function(e){if("string"==typeof e){var t=document.createElement("div");return t.innerHTML=e,document.createTextNode(t.innerHTML)}return jQuery(e)[0]}}]),e}(),w=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),this.treeWidget=t}return s(e,[{key:"loadFromUrl",value:function(e,t,n){var i=this;if(e){var r=this.getDomElement(t);this.addLoadingClass(r),this.notifyLoading(!0,t,r);var o=function(){i.removeLoadingClass(r),i.notifyLoading(!1,t,r)};this.submitRequest(e,(function(e){o(),i.treeWidget.loadData(i.parseData(e),t),n&&"function"==typeof n&&n()}),(function(e){o(),i.treeWidget.options.onLoadFailed&&i.treeWidget.options.onLoadFailed(e)}))}}},{key:"addLoadingClass",value:function(e){e&&e.addClass("jqtree-loading")}},{key:"removeLoadingClass",value:function(e){e&&e.removeClass("jqtree-loading")}},{key:"getDomElement",value:function(e){return e?jQuery(e.element):this.treeWidget.element}},{key:"notifyLoading",value:function(e,t,n){this.treeWidget.options.onLoading&&this.treeWidget.options.onLoading(e,t,n),this.treeWidget._triggerEvent("tree.loading_data",{isLoading:e,node:t,$el:n})}},{key:"submitRequest",value:function(e,t,i){var r,o=n({method:"GET",cache:!1,dataType:"json",success:t,error:i},"string"==typeof e?{url:e}:e);o.method=(null===(r=o.method)||void 0===r?void 0:r.toUpperCase())||"GET",jQuery.ajax(o)}},{key:"parseData",value:function(e){var t=this.treeWidget.options.dataFilter,n="string"==typeof e?JSON.parse(e):e;return t?t(n):n}}]),e}(),F=function(){function e(t){var n=this;r(this,e),a(this,"treeWidget",void 0),a(this,"handleKeyDown",(function(t){if(!n.canHandleKeyboard())return!0;var i=n.treeWidget.getSelectedNode();if(!i)return!0;switch(t.which){case e.DOWN:return n.moveDown(i);case e.UP:return n.moveUp(i);case e.RIGHT:return n.moveRight(i);case e.LEFT:return n.moveLeft(i);default:return!0}})),this.treeWidget=t,t.options.keyboardSupport&&jQuery(document).on("keydown.jqtree",this.handleKeyDown)}return s(e,[{key:"deinit",value:function(){jQuery(document).off("keydown.jqtree")}},{key:"moveDown",value:function(e){return this.selectNode(e.getNextVisibleNode())}},{key:"moveUp",value:function(e){return this.selectNode(e.getPreviousVisibleNode())}},{key:"moveRight",value:function(e){return!e.isFolder()||(e.is_open?this.selectNode(e.getNextVisibleNode()):(this.treeWidget.openNode(e),!1))}},{key:"moveLeft",value:function(e){return e.isFolder()&&e.is_open?(this.treeWidget.closeNode(e),!1):this.selectNode(e.getParent())}},{key:"selectNode",value:function(e){return!e||(this.treeWidget.selectNode(e),this.treeWidget.scrollHandler.isScrolledIntoView(jQuery(e.element).find(".jqtree-element"))||this.treeWidget.scrollToNode(e),!1)}},{key:"canHandleKeyboard",value:function(){return!!this.treeWidget.options.keyboardSupport&&this.treeWidget.selectNodeHandler.isFocusOnTree()}}]),e}();a(F,"LEFT",37),a(F,"UP",38),a(F,"RIGHT",39),a(F,"DOWN",40);var W=function(e,t){var n=function(){return"simple_widget_".concat(t)},r=function(e,t){var n=jQuery.data(e,t);return n&&n instanceof T?n:null},o=function(t,i){var o,s=n(),a=m(t.get());try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!r(l,s)){var d=new e(l,i);jQuery.data(l,s)||jQuery.data(l,s,d),d.init()}}}catch(e){a.e(e)}finally{a.f()}return t};jQuery.fn[t]=function(t){if(!t)return o(this,null);if("object"===i(t))return o(this,t);if("string"==typeof t&&"_"!==t[0]){var s=t;if("destroy"===s)return function(e){var t,i=n(),o=m(e.get());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=r(s,i);a&&a.destroy(),jQuery.removeData(s,i)}}catch(e){o.e(e)}finally{o.f()}}(this);if("get_widget_class"===s)return e;for(var a=arguments.length,l=new Array(a>1?a-1:0),d=1;d1)){var n=t.changedTouches[0];n&&e.handleMouseDown(A(n,t))}})),a(h(e),"touchMove",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseMove(t,A(n,t))}})),a(h(e),"touchEnd",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseUp(A(n,t))}})),e}return s(n,[{key:"init",value:function(){var e=this.$el.get(0);e&&(e.addEventListener("mousedown",this.mouseDown,{passive:!1}),e.addEventListener("touchstart",this.touchStart,{passive:!1})),this.isMouseStarted=!1,this.mouseDelayTimer=null,this.isMouseDelayMet=!1,this.mouseDownInfo=null}},{key:"deinit",value:function(){var e=this.$el.get(0);e&&(e.removeEventListener("mousedown",this.mouseDown,{passive:!1}),e.removeEventListener("touchstart",this.touchStart,{passive:!1})),this.removeMouseMoveEventListeners()}},{key:"handleMouseDown",value:function(e){return this.isMouseStarted&&this.handleMouseUp(e),this.mouseDownInfo=e,!!this.mouseCapture(e)&&(this.handleStartMouse(),!0)}},{key:"handleStartMouse",value:function(){document.addEventListener("mousemove",this.mouseMove,{passive:!1}),document.addEventListener("touchmove",this.touchMove,{passive:!1}),document.addEventListener("mouseup",this.mouseUp,{passive:!1}),document.addEventListener("touchend",this.touchEnd,{passive:!1});var e=this.getMouseDelay();e?this.startMouseDelayTimer(e):this.isMouseDelayMet=!0}},{key:"startMouseDelayTimer",value:function(e){var t=this;this.mouseDelayTimer&&clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=window.setTimeout((function(){t.mouseDownInfo&&(t.isMouseDelayMet=!0)}),e),this.isMouseDelayMet=!1}},{key:"handleMouseMove",value:function(e,t){if(this.isMouseStarted)return this.mouseDrag(t),void(e.cancelable&&e.preventDefault());this.isMouseDelayMet&&(this.mouseDownInfo&&(this.isMouseStarted=!1!==this.mouseStart(this.mouseDownInfo)),this.isMouseStarted?(this.mouseDrag(t),e.cancelable&&e.preventDefault()):this.handleMouseUp(t))}},{key:"handleMouseUp",value:function(e){this.removeMouseMoveEventListeners(),this.isMouseDelayMet=!1,this.mouseDownInfo=null,this.isMouseStarted&&(this.isMouseStarted=!1,this.mouseStop(e))}},{key:"removeMouseMoveEventListeners",value:function(){document.removeEventListener("mousemove",this.mouseMove,{passive:!1}),document.removeEventListener("touchmove",this.touchMove,{passive:!1}),document.removeEventListener("mouseup",this.mouseUp,{passive:!1}),document.removeEventListener("touchend",this.touchEnd,{passive:!1})}}]),n}(T),O=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"_supportsLocalStorage",void 0),this.treeWidget=t}return s(e,[{key:"saveState",value:function(){var e=JSON.stringify(this.getState());this.treeWidget.options.onSetStateFromStorage?this.treeWidget.options.onSetStateFromStorage(e):this.supportsLocalStorage()&&localStorage.setItem(this.getKeyName(),e)}},{key:"getStateFromStorage",value:function(){var e=this.loadFromStorage();return e?this.parseState(e):null}},{key:"getState",value:function(){var e,t,n=this;return{open_nodes:(t=[],n.treeWidget.tree.iterate((function(e){return e.is_open&&e.id&&e.hasChildren()&&t.push(e.id),!0})),t),selected_node:(e=[],n.treeWidget.getSelectedNodes().forEach((function(t){null!=t.id&&e.push(t.id)})),e)}}},{key:"setInitialState",value:function(e){if(e){var t=!1;return e.open_nodes&&(t=this.openInitialNodes(e.open_nodes)),e.selected_node&&(this.resetSelection(),this.selectInitialNodes(e.selected_node)),t}return!1}},{key:"setInitialStateOnDemand",value:function(e,t){e?this.doSetInitialStateOnDemand(e.open_nodes,e.selected_node,t):t()}},{key:"getNodeIdToBeSelected",value:function(){var e=this.getStateFromStorage();return e&&e.selected_node&&e.selected_node[0]||null}},{key:"parseState",value:function(e){var t,n=JSON.parse(e);return n&&n.selected_node&&("number"==typeof(t=n.selected_node)&&t%1==0)&&(n.selected_node=[n.selected_node]),n}},{key:"loadFromStorage",value:function(){return this.treeWidget.options.onGetStateFromStorage?this.treeWidget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getKeyName()):null}},{key:"openInitialNodes",value:function(e){var t,n=!1,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(o.load_on_demand?n=!0:o.is_open=!0)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"selectInitialNodes",value:function(e){var t,n=0,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(n+=1,this.treeWidget.selectNodeHandler.addToSelection(o))}}catch(e){i.e(e)}finally{i.f()}return 0!==n}},{key:"resetSelection",value:function(){var e=this.treeWidget.selectNodeHandler;e.getSelectedNodes().forEach((function(t){e.removeFromSelection(t)}))}},{key:"doSetInitialStateOnDemand",value:function(e,t,n){var i=this,r=0,o=e,s=function(){var e,s=[],l=m(o);try{for(l.s();!(e=l.n()).done;){var d=e.value,u=i.treeWidget.getNodeById(d);u?u.is_loading||(u.load_on_demand?a(u):i.treeWidget._openNode(u,!1,null)):s.push(d)}}catch(e){l.e(e)}finally{l.f()}o=s,i.selectInitialNodes(t)&&i.treeWidget._refreshElements(null),0===r&&n()},a=function(e){r+=1,i.treeWidget._openNode(e,!1,(function(){r-=1,s()}))};s()}},{key:"getKeyName",value:function(){return"string"==typeof this.treeWidget.options.saveState?this.treeWidget.options.saveState:"tree"}},{key:"supportsLocalStorage",value:function(){return null==this._supportsLocalStorage&&(this._supportsLocalStorage=function(){if(null==localStorage)return!1;try{var e="_storage_test";sessionStorage.setItem(e,"value"),sessionStorage.removeItem(e)}catch(e){return!1}return!0}()),this._supportsLocalStorage}}]),e}(),H=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"previousTop",void 0),a(this,"isInitialized",void 0),a(this,"$scrollParent",void 0),a(this,"scrollParentTop",void 0),this.treeWidget=t,this.previousTop=-1,this.isInitialized=!1}return s(e,[{key:"checkScrolling",value:function(){this.ensureInit(),this.checkVerticalScrolling(),this.checkHorizontalScrolling()}},{key:"scrollToY",value:function(e){if(this.ensureInit(),this.$scrollParent&&this.$scrollParent[0])this.$scrollParent[0].scrollTop=e;else{var t=this.treeWidget.$el.offset(),n=t?t.top:0;jQuery(document).scrollTop(e+n)}}},{key:"isScrolledIntoView",value:function(e){var t,n,i,r;this.ensureInit();var o=e.height()||0;if(this.$scrollParent){r=0,n=this.$scrollParent.height()||0;var s=e.offset();t=(i=(s?s.top:0)-this.scrollParentTop)+o}else{n=(r=jQuery(window).scrollTop()||0)+(jQuery(window).height()||0);var a=e.offset();t=(i=a?a.top:0)+o}return t<=n&&i>=r}},{key:"getScrollLeft",value:function(){return this.$scrollParent&&this.$scrollParent.scrollLeft()||0}},{key:"initScrollParent",value:function(){var e,t=this,n=function(){t.scrollParentTop=0,t.$scrollParent=null};"fixed"===this.treeWidget.$el.css("position")&&n();var i=function(){var e=["overflow","overflow-y"],n=function(t){for(var n=0,i=e;n0,s=n.left+i.clientWidth,a=n.left,l=e.pageX>s-20,d=e.pageX0,o=e.pageX>i-20,s=e.pageX-n<20;o?t.scrollLeft(n+20):s&&r&&t.scrollLeft(Math.max(n-20,0))}}}]),e}(),M=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"selectedNodes",void 0),a(this,"selectedSingleNode",void 0),this.treeWidget=t,this.selectedNodes=new Set,this.clear()}return s(e,[{key:"getSelectedNode",value:function(){var e=this.getSelectedNodes();return e.length&&e[0]||!1}},{key:"getSelectedNodes",value:function(){var e=this;if(this.selectedSingleNode)return[this.selectedSingleNode];var t=[];return this.selectedNodes.forEach((function(n){var i=e.treeWidget.getNodeById(n);i&&t.push(i)})),t}},{key:"getSelectedNodesUnder",value:function(e){if(this.selectedSingleNode)return e.isParentOf(this.selectedSingleNode)?[this.selectedSingleNode]:[];var t=[];for(var n in this.selectedNodes)if(Object.prototype.hasOwnProperty.call(this.selectedNodes,n)){var i=this.treeWidget.getNodeById(n);i&&e.isParentOf(i)&&t.push(i)}return t}},{key:"isNodeSelected",value:function(e){return null!=e.id?this.selectedNodes.has(e.id):!!this.selectedSingleNode&&this.selectedSingleNode.element===e.element}},{key:"clear",value:function(){this.selectedNodes.clear(),this.selectedSingleNode=null}},{key:"removeFromSelection",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null==e.id?this.selectedSingleNode&&e.element===this.selectedSingleNode.element&&(this.selectedSingleNode=null):(this.selectedNodes.delete(e.id),n&&e.iterate((function(){return null!=e.id&&t.selectedNodes.delete(e.id),!0})))}},{key:"addToSelection",value:function(e){null!=e.id?this.selectedNodes.add(e.id):this.selectedSingleNode=e}},{key:"isFocusOnTree",value:function(){var e=document.activeElement;return Boolean(e&&"SPAN"===e.tagName&&this.treeWidget._containsElement(e))}}]),e}(),x=function(){function e(t,n){r(this,e),a(this,"node",void 0),a(this,"$element",void 0),a(this,"treeWidget",void 0),this.init(t,n)}return s(e,[{key:"init",value:function(e,t){if(this.node=e,this.treeWidget=t,!e.element){var n=this.treeWidget.element.get(0);n&&(e.element=n)}e.element&&(this.$element=jQuery(e.element))}},{key:"addDropHint",value:function(e){return this.mustShowBorderDropHint(e)?new q(this.$element,this.treeWidget._getScrollLeft()):new B(this.node,this.$element,e)}},{key:"select",value:function(e){var t;this.getLi().addClass("jqtree-selected");var n=this.getSpan();n.attr("tabindex",null!==(t=this.treeWidget.options.tabIndex)&&void 0!==t?t:null),n.attr("aria-selected","true"),e&&n.trigger("focus")}},{key:"deselect",value:function(){this.getLi().removeClass("jqtree-selected");var e=this.getSpan();e.removeAttr("tabindex"),e.attr("aria-selected","false"),e.trigger("blur")}},{key:"getUl",value:function(){return this.$element.children("ul:first")}},{key:"getSpan",value:function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")}},{key:"getLi",value:function(){return this.$element}},{key:"mustShowBorderDropHint",value:function(e){return e===k.Inside}}]),e}(),$=function(e){l(n,e);var t=c(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"open",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fast";if(!this.node.is_open){this.node.is_open=!0;var r=this.getButton();r.removeClass("jqtree-closed"),r.html("");var o=r.get(0);if(o){var s=this.treeWidget.renderer.openedIconElement;if(s){var a=s.cloneNode(!0);o.appendChild(a)}}var l=function(){t.getLi().removeClass("jqtree-closed"),t.getSpan().attr("aria-expanded","true"),e&&e(t.node),t.treeWidget._triggerEvent("tree.open",{node:t.node})};n?this.getUl().slideDown(i,l):(this.getUl().show(),l())}}},{key:"close",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fast";if(this.node.is_open){this.node.is_open=!1;var i=this.getButton();i.addClass("jqtree-closed"),i.html("");var r=i.get(0);if(r){var o=this.treeWidget.renderer.closedIconElement;if(o){var s=o.cloneNode(!0);r.appendChild(s)}}var a=function(){e.getLi().addClass("jqtree-closed"),e.getSpan().attr("aria-expanded","false"),e.treeWidget._triggerEvent("tree.close",{node:e.node})};t?this.getUl().slideUp(n,a):(this.getUl().hide(),a())}}},{key:"mustShowBorderDropHint",value:function(e){return!this.node.is_open&&e===k.Inside}},{key:"getButton",value:function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")}}]),n}(x),q=function(){function e(t,n){r(this,e),a(this,"$hint",void 0);var i=t.children(".jqtree-element"),o=t.width()||0,s=Math.max(o+n-4,0),l=i.outerHeight()||0,d=Math.max(l-4,0);this.$hint=jQuery(''),i.append(this.$hint),this.$hint.css({width:s,height:d})}return s(e,[{key:"remove",value:function(){this.$hint.remove()}}]),e}(),B=function(){function e(t,n,i){r(this,e),a(this,"$element",void 0),a(this,"node",void 0),a(this,"$ghost",void 0),this.$element=n,this.node=t,this.$ghost=jQuery('
  • \n
  • '),i===k.After?this.moveAfter():i===k.Before?this.moveBefore():i===k.Inside&&(t.isFolder()&&t.is_open?this.moveInsideOpenFolder():this.moveInside())}return s(e,[{key:"remove",value:function(){this.$ghost.remove()}},{key:"moveAfter",value:function(){this.$element.after(this.$ghost)}},{key:"moveBefore",value:function(){this.$element.before(this.$ghost)}},{key:"moveInsideOpenFolder",value:function(){var e,t=null===(e=this.node.children[0])||void 0===e?void 0:e.element;t&&jQuery(t).before(this.$ghost)}},{key:"moveInside",value:function(){this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")}}]),e}(),Q="Node parameter is empty",U="Parameter is empty: ",R=function(e){l(o,e);var t=c(o);function o(){var e;r(this,o);for(var n=arguments.length,i=new Array(n),s=0;s1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return e.is_open?this.closeNode(e,n):this.openNode(e,n),this.element}},{key:"getTree",value:function(){return this.tree}},{key:"selectNode",value:function(e,t){return this.doSelectNode(e,t),this.element}},{key:"getSelectedNode",value:function(){return this.selectNodeHandler.getSelectedNode()}},{key:"toJson",value:function(){return JSON.stringify(this.tree.getData())}},{key:"loadData",value:function(e,t){return this.doLoadData(e,t),this.element}},{key:"loadDataFromUrl",value:function(e,t,n){return"string"==typeof e?this.doLoadDataFromUrl(e,t,null!=n?n:null):this.doLoadDataFromUrl(null,e,t),this.element}},{key:"reload",value:function(e){return this.doLoadDataFromUrl(null,null,e),this.element}},{key:"refresh",value:function(){return this._refreshElements(null),this.element}},{key:"getNodeById",value:function(e){return this.tree.getNodeById(e)}},{key:"getNodeByName",value:function(e){return this.tree.getNodeByName(e)}},{key:"getNodeByNameMustExist",value:function(e){return this.tree.getNodeByNameMustExist(e)}},{key:"getNodesByProperty",value:function(e,t){return this.tree.getNodesByProperty(e,t)}},{key:"getNodeByHtmlElement",value:function(e){return this.getNode(jQuery(e))}},{key:"getNodeByCallback",value:function(e){return this.tree.getNodeByCallback(e)}},{key:"openNode",value:function(e,t,n){var i=this;if(!e)throw Error(Q);var r=function(){var e,r,o;("function"==typeof t?(e=t,r=null):(r=t,e=n),null==r)&&(r=null!==(o=i.options.slide)&&void 0!==o&&o);return[r,e]}(),o=f(r,2),s=o[0],a=o[1];return this._openNode(e,s,a),this.element}},{key:"closeNode",value:function(e,t){if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return(e.isFolder()||e.isEmptyFolder)&&(new $(e,this).close(n,this.options.animationSpeed),this.saveState()),this.element}},{key:"isDragging",value:function(){return this.dndHandler.isDragging}},{key:"refreshHitAreas",value:function(){return this.dndHandler.refresh(),this.element}},{key:"addNodeAfter",value:function(e,t){var n=t.addAfter(e);return n&&this._refreshElements(t.parent),n}},{key:"addNodeBefore",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addBefore(e);return n&&this._refreshElements(t.parent),n}},{key:"addParentNode",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addParent(e);return n&&this._refreshElements(n.parent),n}},{key:"removeNode",value:function(e){if(!e)throw Error(Q);if(!e.parent)throw Error("Node has no parent");this.selectNodeHandler.removeFromSelection(e,!0);var t=e.parent;return e.remove(),this._refreshElements(t),this.element}},{key:"appendNode",value:function(e,t){var n=t||this.tree,i=n.append(e);return this._refreshElements(n),i}},{key:"prependNode",value:function(e,t){var n=null!=t?t:this.tree,i=n.prepend(e);return this._refreshElements(n),i}},{key:"updateNode",value:function(e,t){if(!e)throw Error(Q);var n="object"===i(t)&&t.id&&t.id!==e.id;return n&&this.tree.removeNodeFromIndex(e),e.setData(t),n&&this.tree.addNodeToIndex(e),"object"===i(t)&&t.children&&t.children instanceof Array&&(e.removeChildren(),t.children.length&&e.loadFromData(t.children)),this._refreshElements(e),this.element}},{key:"isSelectedNodeInSubtree",value:function(e){var t=this.getSelectedNode();return!!t&&(e===t||e.isParentOf(t))}},{key:"moveNode",value:function(e,t,n){if(!e)throw Error(Q);if(!t)throw Error(U+"targetNode");var i=N[n];return void 0!==i&&(this.tree.moveNode(e,t,i),this._refreshElements(null)),this.element}},{key:"getStateFromStorage",value:function(){return this.saveStateHandler.getStateFromStorage()}},{key:"addToSelection",value:function(e,t){if(!e)throw Error(Q);return this.selectNodeHandler.addToSelection(e),this._getNodeElementForNode(e).select(void 0===t||t),this.saveState(),this.element}},{key:"getSelectedNodes",value:function(){return this.selectNodeHandler.getSelectedNodes()}},{key:"isNodeSelected",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.isNodeSelected(e)}},{key:"removeFromSelection",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this.saveState(),this.element}},{key:"scrollToNode",value:function(e){if(!e)throw Error(Q);var t=jQuery(e.element).offset(),n=t?t.top:0,i=this.$el.offset(),r=n-(i?i.top:0);return this.scrollHandler.scrollToY(r),this.element}},{key:"getState",value:function(){return this.saveStateHandler.getState()}},{key:"setState",value:function(e){return this.saveStateHandler.setInitialState(e),this._refreshElements(null),this.element}},{key:"setOption",value:function(e,t){return this.options[e]=t,this.element}},{key:"moveDown",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveDown(e),this.element}},{key:"moveUp",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveUp(e),this.element}},{key:"getVersion",value:function(){return"1.7.2"}},{key:"_triggerEvent",value:function(e,t){var n=jQuery.Event(e,t);return this.element.trigger(n),n}},{key:"_openNode",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=function(e,n,i){new $(e,t).open(i,n,t.options.animationSpeed)};if(e.isFolder()||e.isEmptyFolder)if(e.load_on_demand)this.loadFolderOnDemand(e,n,i);else{for(var o=e.parent;o;)o.parent&&r(o,!1,null),o=o.parent;r(e,n,i),this.saveState()}}},{key:"_refreshElements",value:function(e){var t=this.selectNodeHandler.isFocusOnTree(),n=!!e&&this.isSelectedNodeInSubtree(e);this.renderer.render(e),n&&this.selectCurrentNode(t),this._triggerEvent("tree.refresh")}},{key:"_getNodeElementForNode",value:function(e){return e.isFolder()?new $(e,this):new x(e,this)}},{key:"_getNodeElement",value:function(e){var t=this.getNode(e);return t?this._getNodeElementForNode(t):null}},{key:"_containsElement",value:function(e){var t=this.getNode(jQuery(e));return null!=t&&t.tree===this.tree}},{key:"_getScrollLeft",value:function(){return this.scrollHandler.getScrollLeft()}},{key:"init",value:function(){v(d(o.prototype),"init",this).call(this),this.element=this.$el,this.isInitialized=!1,this.options.rtl=this.getRtlOption(),null==this.options.closedIcon&&(this.options.closedIcon=this.getDefaultClosedIcon()),this.renderer=new C(this),this.dataLoader=new w(this),this.saveStateHandler=new O(this),this.selectNodeHandler=new M(this),this.dndHandler=new D(this),this.scrollHandler=new H(this),this.keyHandler=new F(this),this.initData(),this.element.on("click",this.handleClick),this.element.on("dblclick",this.handleDblclick),this.options.useContextMenu&&this.element.on("contextmenu",this.handleContextmenu)}},{key:"deinit",value:function(){this.element.empty(),this.element.off(),this.keyHandler.deinit(),this.tree=new _({},!0),v(d(o.prototype),"deinit",this).call(this)}},{key:"mouseCapture",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseCapture(e)}},{key:"mouseStart",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStart(e)}},{key:"mouseDrag",value:function(e){if(this.options.dragAndDrop){var t=this.dndHandler.mouseDrag(e);return this.scrollHandler.checkScrolling(),t}return!1}},{key:"mouseStop",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStop(e)}},{key:"getMouseDelay",value:function(){var e;return null!==(e=this.options.startDndDelay)&&void 0!==e?e:0}},{key:"initData",value:function(){this.options.data?this.doLoadData(this.options.data,null):this.getDataUrlInfo(null)?this.doLoadDataFromUrl(null,null,null):this.doLoadData([],null)}},{key:"getDataUrlInfo",value:function(e){var t,n=this,r=this.options.dataUrl||this.element.data("url"),o=function(t){if(null!=e&&e.id){var i={node:e.id};t.data=i}else{var r=n.getNodeIdToBeSelected();if(r){var o={selected_node:r};t.data=o}}};return"function"==typeof r?r(e):"string"==typeof r?(o(t={url:r}),t):r&&"object"===i(r)?(o(r),r):null}},{key:"getNodeIdToBeSelected",value:function(){return this.options.saveState?this.saveStateHandler.getNodeIdToBeSelected():null}},{key:"initTree",value:function(e){var t=this,n=function(){t.isInitialized||(t.isInitialized=!0,t._triggerEvent("tree.init"))};if(this.options.nodeClass){this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.selectNodeHandler.clear(),this.tree.loadFromData(e);var i=this.setInitialState();this._refreshElements(null),i?this.setInitialStateOnDemand(n):n()}}},{key:"setInitialState",value:function(){var e=this,t=f(function(){if(e.options.saveState){var t=e.saveStateHandler.getStateFromStorage();return t?[!0,e.saveStateHandler.setInitialState(t)]:[!1,!1]}return[!1,!1]}(),2),n=t[0],i=t[1];return n||(i=function(){if(!1===e.options.autoOpen)return!1;var t=e.getAutoOpenMaxLevel(),n=!1;return e.tree.iterate((function(e,i){return e.load_on_demand?(n=!0,!1):!!e.hasChildren()&&(e.is_open=!0,i!==t)})),n}()),i}},{key:"setInitialStateOnDemand",value:function(e){var t,n,i,r,o=this;(function(){if(o.options.saveState){var t=o.saveStateHandler.getStateFromStorage();return!!t&&(o.saveStateHandler.setInitialStateOnDemand(t,e),!0)}return!1})()||(t=o.getAutoOpenMaxLevel(),n=0,i=function(e){n+=1,o._openNode(e,!1,(function(){n-=1,r()}))},(r=function(){o.tree.iterate((function(e,n){return e.load_on_demand?(e.is_loading||i(e),!1):(o._openNode(e,!1,null),n!==t)})),0===n&&e()})())}},{key:"getAutoOpenMaxLevel",value:function(){return!0===this.options.autoOpen?-1:"number"==typeof this.options.autoOpen?this.options.autoOpen:"string"==typeof this.options.autoOpen?parseInt(this.options.autoOpen,10):0}},{key:"getClickTarget",value:function(e){var t=jQuery(e),n=t.closest(".jqtree-toggler");if(n.length){var i=this.getNode(n);if(i)return{type:"button",node:i}}else{var r=t.closest(".jqtree-element");if(r.length){var o=this.getNode(r);if(o)return{type:"label",node:o}}}return null}},{key:"getNode",value:function(e){var t=e.closest("li.jqtree_common");return 0===t.length?null:t.data("node")}},{key:"saveState",value:function(){this.options.saveState&&this.saveStateHandler.saveState()}},{key:"selectCurrentNode",value:function(e){var t=this.getSelectedNode();if(t){var n=this._getNodeElementForNode(t);n&&n.select(e)}}},{key:"deselectCurrentNode",value:function(){var e=this.getSelectedNode();e&&this.removeFromSelection(e)}},{key:"getDefaultClosedIcon",value:function(){return this.options.rtl?"◀":"►"}},{key:"getRtlOption",value:function(){if(null!=this.options.rtl)return this.options.rtl;var e=this.element.data("rtl");return null!==e&&!1!==e&&void 0!==e}},{key:"doSelectNode",value:function(e,t){var i=this,r=function(){i.options.saveState&&i.saveStateHandler.saveState()};if(!e)return this.deselectCurrentNode(),void r();var o=n(n({},{mustSetFocus:!0,mustToggle:!0}),t||{});if(i.options.onCanSelectNode?!0===i.options.selectable&&i.options.onCanSelectNode(e):!0===i.options.selectable){if(this.selectNodeHandler.isNodeSelected(e))o.mustToggle&&(this.deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e}));else{var s=this.getSelectedNode()||null;this.deselectCurrentNode(),this.addToSelection(e,o.mustSetFocus),this._triggerEvent("tree.select",{node:e,deselected_node:s}),(a=e.parent)&&a.parent&&!a.is_open&&i.openNode(a,!1)}var a;r()}}},{key:"doLoadData",value:function(e,t){e&&(t?(this.deselectNodes(t),this.loadSubtree(e,t)):this.initTree(e),this.isDragging()&&this.dndHandler.refresh()),this._triggerEvent("tree.load_data",{tree_data:e,parent_node:t})}},{key:"deselectNodes",value:function(e){var t,n=m(this.selectNodeHandler.getSelectedNodesUnder(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.selectNodeHandler.removeFromSelection(i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"loadSubtree",value:function(e,t){t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,this._refreshElements(t)}},{key:"doLoadDataFromUrl",value:function(e,t,n){var i=e||this.getDataUrlInfo(t);this.dataLoader.loadFromUrl(i,t,n)}},{key:"loadFolderOnDemand",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;e.is_loading=!0,this.doLoadDataFromUrl(null,e,(function(){t._openNode(e,n,i)}))}}]),o}(L);return a(R,"defaults",{animationSpeed:"fast",autoEscape:!0,autoOpen:!1,buttonLeft:!0,closedIcon:void 0,data:void 0,dataFilter:void 0,dataUrl:void 0,dragAndDrop:!1,keyboardSupport:!0,nodeClass:_,onCanMove:void 0,onCanMoveTo:void 0,onCanSelectNode:void 0,onCreateLi:void 0,onDragMove:void 0,onDragStop:void 0,onGetStateFromStorage:void 0,onIsMoveHandle:void 0,onLoadFailed:void 0,onLoading:void 0,onSetStateFromStorage:void 0,openedIcon:"▼",openFolderDelay:500,rtl:void 0,saveState:!1,selectable:!0,showEmptyFolder:!1,slide:!0,startDndDelay:300,tabIndex:0,useContextMenu:!0}),T.register(R,"tree"),e.JqTreeWidget=R,e}({}); //# sourceMappingURL=tree.jquery.js.map diff --git a/lib/version.js b/lib/version.js index b507aa23..77423cc6 100644 --- a/lib/version.js +++ b/lib/version.js @@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; -var version = "1.7.1"; +var version = "1.7.2"; var _default = version; exports["default"] = _default; \ No newline at end of file diff --git a/package.json b/package.json index 86832c8f..ca3e4a3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jqtree", - "version": "1.7.1", + "version": "1.7.2", "description": "Tree widget for jQuery", "keywords": [ "jquery-plugin", diff --git a/src/version.ts b/src/version.ts index d89b647e..267e26d9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,3 +1,3 @@ -const version = "1.7.1"; +const version = "1.7.2"; export default version; diff --git a/tree.jquery.debug.js b/tree.jquery.debug.js index d09e9249..9c81bddb 100644 --- a/tree.jquery.debug.js +++ b/tree.jquery.debug.js @@ -1,5 +1,5 @@ /* -JqTree 1.7.1 +JqTree 1.7.2 Copyright 2023 Marco Braak @@ -292,7 +292,7 @@ var jqtree = (function (exports) { return typeof key === "symbol" ? key : String(key); } - var version = "1.7.1"; + var version = "1.7.2"; var Position = /*#__PURE__*/function (Position) { Position[Position["Before"] = 1] = "Before"; diff --git a/tree.jquery.debug.js.map b/tree.jquery.debug.js.map index f387625d..bfa54d5f 100644 --- a/tree.jquery.debug.js.map +++ b/tree.jquery.debug.js.map @@ -1 +1 @@ -{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;EACrB4J,EAAAA,UAAU,EAAE5J,SAAS;EACrBoK,EAAAA,UAAU,EAAEpK,SAAS;EACrBid,EAAAA,qBAAqB,EAAEjd,SAAS;EAChCiI,EAAAA,cAAc,EAAEjI,SAAS;EACzB0U,EAAAA,YAAY,EAAE1U,SAAS;EACvB6U,EAAAA,SAAS,EAAE7U,SAAS;EACpBwb,EAAAA,qBAAqB,EAAExb,SAAS;EAChCqQ,EAAAA,UAAU,EAAE,UAAU;EACtBzE,EAAAA,eAAe,EAAE,GAAG;EAAE;EACtB;EACA;EACA2F,EAAAA,GAAG,EAAEvR,SAAS;EAAE;EAChBob,EAAAA,SAAS,EAAE,KAAK;EAAE;EAClB+P,EAAAA,UAAU,EAAE,IAAI;EAChBjZ,EAAAA,eAAe,EAAE,KAAK;EACtBvG,EAAAA,KAAK,EAAE,IAAI;EAAE;EACb2d,EAAAA,aAAa,EAAE,GAAG;EAAE;EACpBjW,EAAAA,QAAQ,EAAE,CAAC;EACX8V,EAAAA,cAAc,EAAE,IAAA;EACpB,CAAC,CAAA,CAAA;EAwlCLnR,YAAY,CAACP,QAAQ,CAACiN,YAAY,EAAE,MAAM,CAAC;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tree.jquery.debug.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.2\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["version","Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","getPosition","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","loadFromData","removeChildren","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","createNode","addChild","err","e","f","push","setParent","addChildAtPosition","index","splice","removeChild","doRemoveChild","getChildIndex","indexOf","hasChildren","isFolder","iterate","callback","_iterate","level","_iterator2","_step2","child","result","moveNode","movedNode","targetNode","isParentOf","getData","includeParent","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByName","getNodeByCallback","getNodeByNameMustExist","concat","addAfter","nodeInfo","childIndex","addBefore","addParent","newParent","originalParent","_iterator3","_step3","remove","append","prepend","getLevel","getNodeById","nodeId","get","addNodeToIndex","id","set","removeNodeFromIndex","_this","_this$tree","getPreviousSibling","previousIndex","getNextSibling","nextIndex","getNodesByProperty","filter","getNextNode","includeChildren","nextSibling","getNextVisibleNode","is_open","getPreviousNode","previousSibling","getParent","getLastChild","getPreviousVisibleNode","lastChild","initFromData","_this2","addNode","nodeData","addChildren","childrenData","_iterator4","_step4","_this$tree2","_this$tree3","getNodeClass","_this$tree4","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","mouseCapture","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","mouseStart","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","mouseDrag","move","area","findHoveredArea","canMoveToArea","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","mouseStop","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolder","_openNode","slide","openFolderDelay","openFolderTimer","window","setTimeout","clearTimeout","previousParent","doMove","empty","_refreshElements","event","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","nextNode","mustIterateInside","handleFirstNode","handleNode","handleOpenFolder","handleClosedFolder","childrenLength","forEach","_","i","nextChild","handleAfterOpenFolder","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","nodeName","offsetX","offsetY","$tree","text","html","css","isInt","isFunction","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","render","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","mustShowFolder","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","setTreeItemAriaAttributes","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","textContent","innerHTML","is_loading","createTextNode","DataLoader","loadFromUrl","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","handleSuccess","loadData","parseData","handleError","jqXHR","onLoadFailed","submitRequest","isLoading","onLoading","urlInfoInput","_ajaxSettings$method","url","ajaxSettings","_objectSpread","method","cache","dataType","success","error","toUpperCase","ajax","dataFilter","getParsedData","JSON","parse","parsedData","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","deinit","off","selectNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","existingWidget","simpleWidgetClass","init","destroyWidget","destroy","removeData","callFunction","functionName","args","simpleWidget","widgetFunction","apply","fn","argument1","_len","_key","defaults","constructor","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","SaveStateHandler","saveState","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","getStateFromStorage","jsonData","loadFromStorage","parseState","getOpenNodeIds","openNodes","getSelectedNodeIds","selectedNodeIds","getSelectedNodes","open_nodes","selected_node","setInitialState","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","setInitialStateOnDemand","cbFinished","doSetInitialStateOnDemand","getNodeIdToBeSelected","onGetStateFromStorage","getItem","nodeIds","selectCount","addToSelection","selectedNodes","removeFromSelection","nodeIdsParam","loadingCount","newNodesIds","loadAndOpenNode","testSupport","sessionStorage","removeItem","_supportsLocalStorage","ScrollHandler","isInitialized","checkScrolling","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","scrollToY","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","originalTop","scrollParentTop","windowHeight","getScrollLeft","scrollLeft","initScrollParent","_$scrollParent$","getParentWithOverflow","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","setDocumentAsScrollParent","tagName","handleVerticalScrollingWithScrollParent","scrollParent","distanceBottom","offsetHeight","refreshHitAreas","handleVerticalScrollingWithDocument","distanceTop","dndHandler","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","getSelectedNodesUnder","has","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","select","mustSetFocus","$li","getLi","$span","getSpan","trigger","deselect","removeAttr","getUl","FolderElement","_NodeElement","open","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","$titleSpan","slideDown","show","close","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","getTree","optionsParam","toJson","doLoadData","loadDataFromUrl","param1","param2","param3","doLoadDataFromUrl","reload","getNodeByHtmlElement","parseParams","_this2$options$slide","_parseParams","_parseParams2","_slicedToArray","addNodeAfter","newNodeInfo","existingNode","newNode","addNodeBefore","addParentNode","removeNode","appendNode","parentNodeParam","prependNode","updateNode","idIsChanged","isSelectedNodeInSubtree","subtree","positionIndex","saveStateHandler","nodeOffset","nodeTop","treeOffset","setState","setOption","option","keyHandler","getVersion","__version__","eventName","values","Event","doOpenNode","_node","_slide","_onFinished","folderElement","loadFolderOnDemand","mustSelect","selectCurrentNode","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","_this$options$startDn","startDndDelay","dataUrl","getDataUrlInfo","getUrlFromString","setUrlInfoData","selectedNodeId","initTree","_this5","doInit","_this6","restoreState","autoOpenNodes","autoOpen","maxLevel","getAutoOpenMaxLevel","_restoreState","_restoreState2","isRestored","_this7","parseInt","$target","deselectCurrentNode","dataRtl","_this8","defaultOptions","mustToggle","selectOptions","canSelect","onCanSelectNode","selectable","openParents","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","tree_data","parent_node","selectedNodesUnderParent","urlInfoParam","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,OAAO,GAAG,OAAO;;ECIXC,IAAAA,QAAQ,0BAARA,QAAQ,EAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA,CAAA;EAARA,EAAAA,QAAQ,CAARA,QAAQ,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;EAARA,EAAAA,QAAQ,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AAI;EAChBjZ,EAAAA,eAAe,EAAE,KAAK;EACtBvG,EAAAA,KAAK,EAAE,IAAI;EAAE;EACb2d,EAAAA,aAAa,EAAE,GAAG;EAAE;EACpBjW,EAAAA,QAAQ,EAAE,CAAC;EACX8V,EAAAA,cAAc,EAAE,IAAA;EACpB,CAAC,CAAA,CAAA;EAwlCLnR,YAAY,CAACP,QAAQ,CAACiN,YAAY,EAAE,MAAM,CAAC;;;;;;;;;;"} \ No newline at end of file diff --git a/tree.jquery.js b/tree.jquery.js index d4f963eb..7078524b 100644 --- a/tree.jquery.js +++ b/tree.jquery.js @@ -1,5 +1,5 @@ /* -JqTree 1.7.1 +JqTree 1.7.2 Copyright 2023 Marco Braak @@ -17,5 +17,5 @@ limitations under the License. @license */ -var jqtree=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var k=function(e){return e[e.Before=1]="Before",e[e.After=2]="After",e[e.Inside=3]="Inside",e[e.None=4]="None",e}({}),N={before:k.Before,after:k.After,inside:k.Inside,none:k.None},S=function(e){for(var t in N)if(Object.prototype.hasOwnProperty.call(N,t)&&N[t]===e)return t;return""},b=function(e){return"object"===i(e)&&"children"in e&&e.children instanceof Array},_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;r(this,e),a(this,"id",void 0),a(this,"name",void 0),a(this,"children",void 0),a(this,"parent",void 0),a(this,"idMapping",void 0),a(this,"tree",void 0),a(this,"nodeClass",void 0),a(this,"load_on_demand",void 0),a(this,"is_open",void 0),a(this,"element",void 0),a(this,"is_loading",void 0),a(this,"isEmptyFolder",void 0),this.name="",this.isEmptyFolder=!1,this.load_on_demand=!1,this.setData(t),this.children=[],this.parent=null,n&&(this.idMapping=new Map,this.tree=this,this.nodeClass=i)}return s(e,[{key:"setData",value:function(e){if(e)if("string"==typeof e)this.name=e;else if("object"===i(e))for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];"label"===t||"name"===t?"string"==typeof n&&(this.name=n):"children"!==t&&"parent"!==t&&(this[t]=n)}}},{key:"loadFromData",value:function(e){this.removeChildren();var t,n=m(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,r=this.createNode(i);this.addChild(r),b(i)&&(0===i.children.length?r.isEmptyFolder=!0:r.loadFromData(i.children))}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addChild",value:function(e){this.children.push(e),e.setParent(this)}},{key:"addChildAtPosition",value:function(e,t){this.children.splice(t,0,e),e.setParent(this)}},{key:"removeChild",value:function(e){e.removeChildren(),this.doRemoveChild(e)}},{key:"getChildIndex",value:function(e){return this.children.indexOf(e)}},{key:"hasChildren",value:function(){return 0!==this.children.length}},{key:"isFolder",value:function(){return this.hasChildren()||this.load_on_demand}},{key:"iterate",value:function(e){!function t(n,i){if(n.children){var r,o=m(n.children);try{for(o.s();!(r=o.n()).done;){var s=r.value;e(s,i)&&s.hasChildren()&&t(s,i+1)}}catch(e){o.e(e)}finally{o.f()}}}(this,0)}},{key:"moveNode",value:function(e,t,n){if(!e.parent||e.isParentOf(t))return!1;switch(e.parent.doRemoveChild(e),n){case k.After:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1),!0);case k.Before:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)),!0);case k.Inside:return t.addChildAtPosition(e,0),!0;default:return!1}}},{key:"getData",value:function(){var e=function e(t){return t.map((function(t){var n={};for(var i in t)if(-1===["parent","children","element","idMapping","load_on_demand","nodeClass","tree","isEmptyFolder"].indexOf(i)&&Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];n[i]=r}return t.hasChildren()&&(n.children=e(t.children)),n}))};return e(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[this]:this.children)}},{key:"getNodeByName",value:function(e){return this.getNodeByCallback((function(t){return t.name===e}))}},{key:"getNodeByNameMustExist",value:function(e){var t=this.getNodeByCallback((function(t){return t.name===e}));if(!t)throw"Node with name ".concat(e," not found");return t}},{key:"getNodeByCallback",value:function(e){var t=null;return this.iterate((function(n){return!t&&(!e(n)||(t=n,!1))})),t}},{key:"addAfter",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n+1),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addBefore",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addParent",value:function(e){if(this.parent){var t=this.createNode(e);this.tree&&t.setParent(this.tree);var n,i=this.parent,r=m(i.children);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.addChild(o)}}catch(e){r.e(e)}finally{r.f()}return i.children=[],i.addChild(t),t}return null}},{key:"remove",value:function(){this.parent&&(this.parent.removeChild(this),this.parent=null)}},{key:"append",value:function(e){var t=this.createNode(e);return this.addChild(t),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"prepend",value:function(e){var t=this.createNode(e);return this.addChildAtPosition(t,0),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"isParentOf",value:function(e){for(var t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1}},{key:"getLevel",value:function(){for(var e=0,t=this;t.parent;)e+=1,t=t.parent;return e}},{key:"getNodeById",value:function(e){return this.idMapping.get(e)||null}},{key:"addNodeToIndex",value:function(e){null!=e.id&&this.idMapping.set(e.id,e)}},{key:"removeNodeFromIndex",value:function(e){null!=e.id&&this.idMapping.delete(e.id)}},{key:"removeChildren",value:function(){var e=this;this.iterate((function(t){var n;return null===(n=e.tree)||void 0===n||n.removeNodeFromIndex(t),!0})),this.children=[]}},{key:"getPreviousSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)-1;return e>=0&&this.parent.children[e]||null}return null}},{key:"getNextSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)+1;return e0&&void 0!==arguments[0])||arguments[0])&&this.hasChildren())return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getNextVisibleNode",value:function(){if(this.hasChildren()&&this.is_open)return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getPreviousNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()?e.getLastChild():e:this.getParent()}return null}},{key:"getPreviousVisibleNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()&&e.is_open?e.getLastChild():e:this.getParent()}return null}},{key:"getParent",value:function(){return this.parent&&this.parent.parent?this.parent:null}},{key:"getLastChild",value:function(){if(this.hasChildren()){var e=this.children[this.children.length-1];return e?e.hasChildren()&&e.is_open?null==e?void 0:e.getLastChild():e:null}return null}},{key:"initFromData",value:function(e){var t,n=this,i=function(e){var t,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=n.createNode();o.initFromData(r),n.addChild(o)}}catch(e){i.e(e)}finally{i.f()}};t=e,n.setData(t),b(t)&&t.children.length&&i(t.children)}},{key:"setParent",value:function(e){var t;this.parent=e,this.tree=e.tree,null===(t=this.tree)||void 0===t||t.addNodeToIndex(this)}},{key:"doRemoveChild",value:function(e){var t;this.children.splice(this.getChildIndex(e),1),null===(t=this.tree)||void 0===t||t.removeNodeFromIndex(e)}},{key:"getNodeClass",value:function(){var t;return this.nodeClass||(null==this||null===(t=this.tree)||void 0===t?void 0:t.nodeClass)||e}},{key:"createNode",value:function(e){return new(this.getNodeClass())(e)}}]),e}(),D=function(){function e(t){r(this,e),a(this,"hitAreas",void 0),a(this,"isDragging",void 0),a(this,"currentItem",void 0),a(this,"hoveredArea",void 0),a(this,"positionInfo",void 0),a(this,"treeWidget",void 0),a(this,"dragElement",void 0),a(this,"previousGhost",void 0),a(this,"openFolderTimer",void 0),this.treeWidget=t,this.hoveredArea=null,this.hitAreas=[],this.isDragging=!1,this.currentItem=null,this.positionInfo=null}return s(e,[{key:"mouseCapture",value:function(e){var t=jQuery(e.target);if(!this.mustCaptureElement(t))return null;if(this.treeWidget.options.onIsMoveHandle&&!this.treeWidget.options.onIsMoveHandle(t))return null;var n=this.treeWidget._getNodeElement(t);return n&&this.treeWidget.options.onCanMove&&(this.treeWidget.options.onCanMove(n.node)||(n=null)),this.currentItem=n,null!=this.currentItem}},{key:"mouseStart",value:function(e){var t;if(!this.currentItem||void 0===e.pageX||void 0===e.pageY)return!1;this.refresh();var n=jQuery(e.target).offset(),i=n?n.left:0,r=n?n.top:0,o=this.currentItem.node;return this.dragElement=new j(o.name,e.pageX-i,e.pageY-r,this.treeWidget.element,null===(t=this.treeWidget.options.autoEscape)||void 0===t||t),this.isDragging=!0,this.positionInfo=e,this.currentItem.$element.addClass("jqtree-moving"),!0}},{key:"mouseDrag",value:function(e){if(!this.currentItem||!this.dragElement||void 0===e.pageX||void 0===e.pageY)return!1;this.dragElement.move(e.pageX,e.pageY),this.positionInfo=e;var t=this.findHoveredArea(e.pageX,e.pageY);return t&&this.canMoveToArea(t)?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hoveredArea!==t&&(this.hoveredArea=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeDropHint(),this.stopOpenFolderTimer(),this.hoveredArea=t),t||this.treeWidget.options.onDragMove&&this.treeWidget.options.onDragMove(this.currentItem.node,e.originalEvent),!0}},{key:"mouseStop",value:function(e){this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas();var t=this.currentItem;return this.currentItem&&(this.currentItem.$element.removeClass("jqtree-moving"),this.currentItem=null),this.isDragging=!1,this.positionInfo=null,!this.hoveredArea&&t&&this.treeWidget.options.onDragStop&&this.treeWidget.options.onDragStop(t.node,e.originalEvent),!1}},{key:"refresh",value:function(){this.removeHitAreas(),this.currentItem&&(this.generateHitAreas(),this.currentItem=this.treeWidget._getNodeElementForNode(this.currentItem.node),this.isDragging&&this.currentItem.$element.addClass("jqtree-moving"))}},{key:"generateHitAreas",value:function(){if(this.currentItem){var e=new I(this.treeWidget.tree,this.currentItem.node,this.getTreeDimensions().bottom);this.hitAreas=e.generate()}else this.hitAreas=[]}},{key:"mustCaptureElement",value:function(e){return!e.is("input,select,textarea")}},{key:"canMoveToArea",value:function(e){if(!this.treeWidget.options.onCanMoveTo)return!0;if(!this.currentItem)return!1;var t=S(e.position);return this.treeWidget.options.onCanMoveTo(this.currentItem.node,e.node,t)}},{key:"removeHitAreas",value:function(){this.hitAreas=[]}},{key:"clear",value:function(){this.dragElement&&(this.dragElement.remove(),this.dragElement=null)}},{key:"removeDropHint",value:function(){this.previousGhost&&this.previousGhost.remove()}},{key:"removeHover",value:function(){this.hoveredArea=null}},{key:"findHoveredArea",value:function(e,t){var n=this.getTreeDimensions();if(en.right||t>n.bottom)return null;for(var i=0,r=this.hitAreas.length;i>1,s=this.hitAreas[o];if(!s)return null;if(ts.bottom))return s;i=o+1}}return null}},{key:"mustOpenFolderTimer",value:function(e){var t=e.node;return t.isFolder()&&!t.is_open&&e.position===k.Inside}},{key:"updateDropHint",value:function(){if(this.hoveredArea){this.removeDropHint();var e=this.treeWidget._getNodeElementForNode(this.hoveredArea.node);this.previousGhost=e.addDropHint(this.hoveredArea.position)}}},{key:"startOpenFolderTimer",value:function(e){var t=this;this.stopOpenFolderTimer();var n=this.treeWidget.options.openFolderDelay;!1!==n&&(this.openFolderTimer=window.setTimeout((function(){t.treeWidget._openNode(e,t.treeWidget.options.slide,(function(){t.refresh(),t.updateDropHint()}))}),n))}},{key:"stopOpenFolderTimer",value:function(){this.openFolderTimer&&(clearTimeout(this.openFolderTimer),this.openFolderTimer=null)}},{key:"moveItem",value:function(e){var t=this;if(this.currentItem&&this.hoveredArea&&this.hoveredArea.position!==k.None&&this.canMoveToArea(this.hoveredArea)){var n=this.currentItem.node,i=this.hoveredArea.node,r=this.hoveredArea.position,o=n.parent;r===k.Inside&&(this.hoveredArea.node.is_open=!0);var s=function(){t.treeWidget.tree.moveNode(n,i,r),t.treeWidget.element.empty(),t.treeWidget._refreshElements(null)};this.treeWidget._triggerEvent("tree.move",{move_info:{moved_node:n,target_node:i,position:S(r),previous_parent:o,do_move:s,original_event:e.originalEvent}}).isDefaultPrevented()||s()}}},{key:"getTreeDimensions",value:function(){var e=this.treeWidget.element.offset();if(e){var t=this.treeWidget.element,n=t.width()||0,i=t.height()||0,r=e.left+this.treeWidget._getScrollLeft();return{left:r,top:e.top,right:r+n,bottom:e.top+i+16}}return{left:0,top:0,right:0,bottom:0}}}]),e}(),I=function(e){l(n,e);var t=c(n);function n(e,i,o){var s;return r(this,n),a(h(s=t.call(this,e)),"currentNode",void 0),a(h(s),"treeBottom",void 0),a(h(s),"positions",void 0),a(h(s),"lastTop",void 0),s.currentNode=i,s.treeBottom=o,s}return s(n,[{key:"generate",value:function(){return this.positions=[],this.lastTop=0,this.iterate(),this.generateHitAreas(this.positions)}},{key:"generateHitAreas",value:function(e){var t,n=-1,i=[],r=[],o=m(e);try{for(o.s();!(t=o.n()).done;){var s=t.value;s.top!==n&&i.length&&(i.length&&this.generateHitAreasForGroup(r,i,n,s.top),n=s.top,i=[]),i.push(s)}}catch(e){o.e(e)}finally{o.f()}return this.generateHitAreasForGroup(r,i,n,this.treeBottom),r}},{key:"handleOpenFolder",value:function(e,t){return e!==this.currentNode&&(e.children[0]!==this.currentNode&&this.addPosition(e,k.Inside,this.getTop(t)),!0)}},{key:"handleClosedFolder",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):(this.addPosition(e,k.Inside,i),t!==this.currentNode&&this.addPosition(e,k.After,i))}},{key:"handleFirstNode",value:function(e){e!==this.currentNode&&this.addPosition(e,k.Before,this.getTop(jQuery(e.element)))}},{key:"handleAfterOpenFolder",value:function(e,t){e===this.currentNode||t===this.currentNode?this.addPosition(e,k.None,this.lastTop):this.addPosition(e,k.After,this.lastTop)}},{key:"handleNode",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.Inside,i),t===this.currentNode||e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.After,i)}},{key:"getTop",value:function(e){var t=e.offset();return t?t.top:0}},{key:"addPosition",value:function(e,t,n){var i={top:n,bottom:0,node:e,position:t};this.positions.push(i),this.lastTop=n}},{key:"generateHitAreasForGroup",value:function(e,t,n,i){for(var r=Math.min(t.length,4),o=Math.round((i-n)/r),s=n,a=0;a").addClass("jqtree-title jqtree-dragging"),s?this.$element.text(t):this.$element.html(t),this.$element.css("position","absolute"),o.append(this.$element)}return s(e,[{key:"move",value:function(e,t){this.$element.offset({left:e-this.offsetX,top:t-this.offsetY})}},{key:"remove",value:function(){this.$element.remove()}}]),e}(),E=function(e){return e?"true":"false"},C=function(){function e(t){r(this,e),a(this,"openedIconElement",void 0),a(this,"closedIconElement",void 0),a(this,"treeWidget",void 0),this.treeWidget=t,this.openedIconElement=this.createButtonElement(t.options.openedIcon||"+"),this.closedIconElement=this.createButtonElement(t.options.closedIcon||"-")}return s(e,[{key:"render",value:function(e){e&&e.parent?this.renderFromNode(e):this.renderFromRoot()}},{key:"renderFromRoot",value:function(){var e=this.treeWidget.element;e.empty(),e[0]&&this.createDomElements(e[0],this.treeWidget.tree.children,!0,1)}},{key:"renderFromNode",value:function(e){var t=jQuery(e.element),n=this.createLi(e,e.getLevel());this.attachNodeData(e,n),t.after(n),t.remove(),e.children&&this.createDomElements(n,e.children,!1,e.getLevel()+1)}},{key:"createDomElements",value:function(e,t,n,i){var r=this.createUl(n);e.appendChild(r);var o,s=m(t);try{for(s.s();!(o=s.n()).done;){var a=o.value,l=this.createLi(a,i);r.appendChild(l),this.attachNodeData(a,l),a.hasChildren()&&this.createDomElements(l,a.children,!1,i+1)}}catch(e){s.e(e)}finally{s.f()}}},{key:"attachNodeData",value:function(e,t){e.element=t,jQuery(t).data("node",e)}},{key:"createUl",value:function(e){var t,n;e?(t="jqtree-tree",n="tree",this.treeWidget.options.rtl&&(t+=" jqtree-rtl")):(t="",n="group"),this.treeWidget.options.dragAndDrop&&(t+=" jqtree-dnd");var i=document.createElement("ul");return i.className="jqtree_common ".concat(t),i.setAttribute("role",n),i}},{key:"createLi",value:function(e,t){var n=Boolean(this.treeWidget.selectNodeHandler.isNodeSelected(e)),i=e.isFolder()||e.isEmptyFolder&&this.treeWidget.options.showEmptyFolder?this.createFolderLi(e,t,n):this.createNodeLi(e,t,n);return this.treeWidget.options.onCreateLi&&this.treeWidget.options.onCreateLi(e,jQuery(i),n),i}},{key:"setTreeItemAriaAttributes",value:function(e,t,n,i){e.setAttribute("aria-label",t),e.setAttribute("aria-level","".concat(n)),e.setAttribute("aria-selected",E(i)),e.setAttribute("role","treeitem")}},{key:"createFolderLi",value:function(e,t,n){var i=this.getButtonClasses(e),r=this.getFolderClasses(e,n),o=e.is_open?this.openedIconElement:this.closedIconElement,s=document.createElement("li");s.className="jqtree_common ".concat(r),s.setAttribute("role","none");var a=document.createElement("div");a.className="jqtree-element jqtree_common",a.setAttribute("role","none"),s.appendChild(a);var l=document.createElement("a");l.className=i,o&&l.appendChild(o.cloneNode(!0)),this.treeWidget.options.buttonLeft&&a.appendChild(l);var d=this.createTitleSpan(e.name,n,!0,t);return d.setAttribute("aria-expanded",E(e.is_open)),a.appendChild(d),this.treeWidget.options.buttonLeft||a.appendChild(l),s}},{key:"createNodeLi",value:function(e,t,n){var i=["jqtree_common"];n&&i.push("jqtree-selected");var r=i.join(" "),o=document.createElement("li");o.className=r,o.setAttribute("role","none");var s=document.createElement("div");s.className="jqtree-element jqtree_common",s.setAttribute("role","none"),o.appendChild(s);var a=this.createTitleSpan(e.name,n,!1,t);return s.appendChild(a),o}},{key:"createTitleSpan",value:function(e,t,n,i){var r=document.createElement("span"),o="jqtree-title jqtree_common";if(n&&(o+=" jqtree-title-folder"),o+=" jqtree-title-button-".concat(this.treeWidget.options.buttonLeft?"left":"right"),r.className=o,t){var s=this.treeWidget.options.tabIndex;void 0!==s&&r.setAttribute("tabindex","".concat(s))}return this.setTreeItemAriaAttributes(r,e,i,t),this.treeWidget.options.autoEscape?r.textContent=e:r.innerHTML=e,r}},{key:"getButtonClasses",value:function(e){var t=["jqtree-toggler","jqtree_common"];return e.is_open||t.push("jqtree-closed"),this.treeWidget.options.buttonLeft?t.push("jqtree-toggler-left"):t.push("jqtree-toggler-right"),t.join(" ")}},{key:"getFolderClasses",value:function(e,t){var n=["jqtree-folder"];return e.is_open||n.push("jqtree-closed"),t&&n.push("jqtree-selected"),e.is_loading&&n.push("jqtree-loading"),n.join(" ")}},{key:"createButtonElement",value:function(e){if("string"==typeof e){var t=document.createElement("div");return t.innerHTML=e,document.createTextNode(t.innerHTML)}return jQuery(e)[0]}}]),e}(),w=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),this.treeWidget=t}return s(e,[{key:"loadFromUrl",value:function(e,t,n){var i=this;if(e){var r=this.getDomElement(t);this.addLoadingClass(r),this.notifyLoading(!0,t,r);var o=function(){i.removeLoadingClass(r),i.notifyLoading(!1,t,r)};this.submitRequest(e,(function(e){o(),i.treeWidget.loadData(i.parseData(e),t),n&&"function"==typeof n&&n()}),(function(e){o(),i.treeWidget.options.onLoadFailed&&i.treeWidget.options.onLoadFailed(e)}))}}},{key:"addLoadingClass",value:function(e){e&&e.addClass("jqtree-loading")}},{key:"removeLoadingClass",value:function(e){e&&e.removeClass("jqtree-loading")}},{key:"getDomElement",value:function(e){return e?jQuery(e.element):this.treeWidget.element}},{key:"notifyLoading",value:function(e,t,n){this.treeWidget.options.onLoading&&this.treeWidget.options.onLoading(e,t,n),this.treeWidget._triggerEvent("tree.loading_data",{isLoading:e,node:t,$el:n})}},{key:"submitRequest",value:function(e,t,i){var r,o=n({method:"GET",cache:!1,dataType:"json",success:t,error:i},"string"==typeof e?{url:e}:e);o.method=(null===(r=o.method)||void 0===r?void 0:r.toUpperCase())||"GET",jQuery.ajax(o)}},{key:"parseData",value:function(e){var t=this.treeWidget.options.dataFilter,n="string"==typeof e?JSON.parse(e):e;return t?t(n):n}}]),e}(),F=function(){function e(t){var n=this;r(this,e),a(this,"treeWidget",void 0),a(this,"handleKeyDown",(function(t){if(!n.canHandleKeyboard())return!0;var i=n.treeWidget.getSelectedNode();if(!i)return!0;switch(t.which){case e.DOWN:return n.moveDown(i);case e.UP:return n.moveUp(i);case e.RIGHT:return n.moveRight(i);case e.LEFT:return n.moveLeft(i);default:return!0}})),this.treeWidget=t,t.options.keyboardSupport&&jQuery(document).on("keydown.jqtree",this.handleKeyDown)}return s(e,[{key:"deinit",value:function(){jQuery(document).off("keydown.jqtree")}},{key:"moveDown",value:function(e){return this.selectNode(e.getNextVisibleNode())}},{key:"moveUp",value:function(e){return this.selectNode(e.getPreviousVisibleNode())}},{key:"moveRight",value:function(e){return!e.isFolder()||(e.is_open?this.selectNode(e.getNextVisibleNode()):(this.treeWidget.openNode(e),!1))}},{key:"moveLeft",value:function(e){return e.isFolder()&&e.is_open?(this.treeWidget.closeNode(e),!1):this.selectNode(e.getParent())}},{key:"selectNode",value:function(e){return!e||(this.treeWidget.selectNode(e),this.treeWidget.scrollHandler.isScrolledIntoView(jQuery(e.element).find(".jqtree-element"))||this.treeWidget.scrollToNode(e),!1)}},{key:"canHandleKeyboard",value:function(){return!!this.treeWidget.options.keyboardSupport&&this.treeWidget.selectNodeHandler.isFocusOnTree()}}]),e}();a(F,"LEFT",37),a(F,"UP",38),a(F,"RIGHT",39),a(F,"DOWN",40);var W=function(e,t){var n=function(){return"simple_widget_".concat(t)},r=function(e,t){var n=jQuery.data(e,t);return n&&n instanceof T?n:null},o=function(t,i){var o,s=n(),a=m(t.get());try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!r(l,s)){var d=new e(l,i);jQuery.data(l,s)||jQuery.data(l,s,d),d.init()}}}catch(e){a.e(e)}finally{a.f()}return t};jQuery.fn[t]=function(t){if(!t)return o(this,null);if("object"===i(t))return o(this,t);if("string"==typeof t&&"_"!==t[0]){var s=t;if("destroy"===s)return function(e){var t,i=n(),o=m(e.get());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=r(s,i);a&&a.destroy(),jQuery.removeData(s,i)}}catch(e){o.e(e)}finally{o.f()}}(this);if("get_widget_class"===s)return e;for(var a=arguments.length,l=new Array(a>1?a-1:0),d=1;d1)){var n=t.changedTouches[0];n&&e.handleMouseDown(A(n,t))}})),a(h(e),"touchMove",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseMove(t,A(n,t))}})),a(h(e),"touchEnd",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseUp(A(n,t))}})),e}return s(n,[{key:"init",value:function(){var e=this.$el.get(0);e&&(e.addEventListener("mousedown",this.mouseDown,{passive:!1}),e.addEventListener("touchstart",this.touchStart,{passive:!1})),this.isMouseStarted=!1,this.mouseDelayTimer=null,this.isMouseDelayMet=!1,this.mouseDownInfo=null}},{key:"deinit",value:function(){var e=this.$el.get(0);e&&(e.removeEventListener("mousedown",this.mouseDown,{passive:!1}),e.removeEventListener("touchstart",this.touchStart,{passive:!1})),this.removeMouseMoveEventListeners()}},{key:"handleMouseDown",value:function(e){return this.isMouseStarted&&this.handleMouseUp(e),this.mouseDownInfo=e,!!this.mouseCapture(e)&&(this.handleStartMouse(),!0)}},{key:"handleStartMouse",value:function(){document.addEventListener("mousemove",this.mouseMove,{passive:!1}),document.addEventListener("touchmove",this.touchMove,{passive:!1}),document.addEventListener("mouseup",this.mouseUp,{passive:!1}),document.addEventListener("touchend",this.touchEnd,{passive:!1});var e=this.getMouseDelay();e?this.startMouseDelayTimer(e):this.isMouseDelayMet=!0}},{key:"startMouseDelayTimer",value:function(e){var t=this;this.mouseDelayTimer&&clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=window.setTimeout((function(){t.mouseDownInfo&&(t.isMouseDelayMet=!0)}),e),this.isMouseDelayMet=!1}},{key:"handleMouseMove",value:function(e,t){if(this.isMouseStarted)return this.mouseDrag(t),void(e.cancelable&&e.preventDefault());this.isMouseDelayMet&&(this.mouseDownInfo&&(this.isMouseStarted=!1!==this.mouseStart(this.mouseDownInfo)),this.isMouseStarted?(this.mouseDrag(t),e.cancelable&&e.preventDefault()):this.handleMouseUp(t))}},{key:"handleMouseUp",value:function(e){this.removeMouseMoveEventListeners(),this.isMouseDelayMet=!1,this.mouseDownInfo=null,this.isMouseStarted&&(this.isMouseStarted=!1,this.mouseStop(e))}},{key:"removeMouseMoveEventListeners",value:function(){document.removeEventListener("mousemove",this.mouseMove,{passive:!1}),document.removeEventListener("touchmove",this.touchMove,{passive:!1}),document.removeEventListener("mouseup",this.mouseUp,{passive:!1}),document.removeEventListener("touchend",this.touchEnd,{passive:!1})}}]),n}(T),O=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"_supportsLocalStorage",void 0),this.treeWidget=t}return s(e,[{key:"saveState",value:function(){var e=JSON.stringify(this.getState());this.treeWidget.options.onSetStateFromStorage?this.treeWidget.options.onSetStateFromStorage(e):this.supportsLocalStorage()&&localStorage.setItem(this.getKeyName(),e)}},{key:"getStateFromStorage",value:function(){var e=this.loadFromStorage();return e?this.parseState(e):null}},{key:"getState",value:function(){var e,t,n=this;return{open_nodes:(t=[],n.treeWidget.tree.iterate((function(e){return e.is_open&&e.id&&e.hasChildren()&&t.push(e.id),!0})),t),selected_node:(e=[],n.treeWidget.getSelectedNodes().forEach((function(t){null!=t.id&&e.push(t.id)})),e)}}},{key:"setInitialState",value:function(e){if(e){var t=!1;return e.open_nodes&&(t=this.openInitialNodes(e.open_nodes)),e.selected_node&&(this.resetSelection(),this.selectInitialNodes(e.selected_node)),t}return!1}},{key:"setInitialStateOnDemand",value:function(e,t){e?this.doSetInitialStateOnDemand(e.open_nodes,e.selected_node,t):t()}},{key:"getNodeIdToBeSelected",value:function(){var e=this.getStateFromStorage();return e&&e.selected_node&&e.selected_node[0]||null}},{key:"parseState",value:function(e){var t,n=JSON.parse(e);return n&&n.selected_node&&("number"==typeof(t=n.selected_node)&&t%1==0)&&(n.selected_node=[n.selected_node]),n}},{key:"loadFromStorage",value:function(){return this.treeWidget.options.onGetStateFromStorage?this.treeWidget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getKeyName()):null}},{key:"openInitialNodes",value:function(e){var t,n=!1,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(o.load_on_demand?n=!0:o.is_open=!0)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"selectInitialNodes",value:function(e){var t,n=0,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(n+=1,this.treeWidget.selectNodeHandler.addToSelection(o))}}catch(e){i.e(e)}finally{i.f()}return 0!==n}},{key:"resetSelection",value:function(){var e=this.treeWidget.selectNodeHandler;e.getSelectedNodes().forEach((function(t){e.removeFromSelection(t)}))}},{key:"doSetInitialStateOnDemand",value:function(e,t,n){var i=this,r=0,o=e,s=function(){var e,s=[],l=m(o);try{for(l.s();!(e=l.n()).done;){var d=e.value,u=i.treeWidget.getNodeById(d);u?u.is_loading||(u.load_on_demand?a(u):i.treeWidget._openNode(u,!1,null)):s.push(d)}}catch(e){l.e(e)}finally{l.f()}o=s,i.selectInitialNodes(t)&&i.treeWidget._refreshElements(null),0===r&&n()},a=function(e){r+=1,i.treeWidget._openNode(e,!1,(function(){r-=1,s()}))};s()}},{key:"getKeyName",value:function(){return"string"==typeof this.treeWidget.options.saveState?this.treeWidget.options.saveState:"tree"}},{key:"supportsLocalStorage",value:function(){return null==this._supportsLocalStorage&&(this._supportsLocalStorage=function(){if(null==localStorage)return!1;try{var e="_storage_test";sessionStorage.setItem(e,"value"),sessionStorage.removeItem(e)}catch(e){return!1}return!0}()),this._supportsLocalStorage}}]),e}(),H=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"previousTop",void 0),a(this,"isInitialized",void 0),a(this,"$scrollParent",void 0),a(this,"scrollParentTop",void 0),this.treeWidget=t,this.previousTop=-1,this.isInitialized=!1}return s(e,[{key:"checkScrolling",value:function(){this.ensureInit(),this.checkVerticalScrolling(),this.checkHorizontalScrolling()}},{key:"scrollToY",value:function(e){if(this.ensureInit(),this.$scrollParent&&this.$scrollParent[0])this.$scrollParent[0].scrollTop=e;else{var t=this.treeWidget.$el.offset(),n=t?t.top:0;jQuery(document).scrollTop(e+n)}}},{key:"isScrolledIntoView",value:function(e){var t,n,i,r;this.ensureInit();var o=e.height()||0;if(this.$scrollParent){r=0,n=this.$scrollParent.height()||0;var s=e.offset();t=(i=(s?s.top:0)-this.scrollParentTop)+o}else{n=(r=jQuery(window).scrollTop()||0)+(jQuery(window).height()||0);var a=e.offset();t=(i=a?a.top:0)+o}return t<=n&&i>=r}},{key:"getScrollLeft",value:function(){return this.$scrollParent&&this.$scrollParent.scrollLeft()||0}},{key:"initScrollParent",value:function(){var e,t=this,n=function(){t.scrollParentTop=0,t.$scrollParent=null};"fixed"===this.treeWidget.$el.css("position")&&n();var i=function(){var e=["overflow","overflow-y"],n=function(t){for(var n=0,i=e;n0,s=n.left+i.clientWidth,a=n.left,l=e.pageX>s-20,d=e.pageX0,o=e.pageX>i-20,s=e.pageX-n<20;o?t.scrollLeft(n+20):s&&r&&t.scrollLeft(Math.max(n-20,0))}}}]),e}(),M=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"selectedNodes",void 0),a(this,"selectedSingleNode",void 0),this.treeWidget=t,this.selectedNodes=new Set,this.clear()}return s(e,[{key:"getSelectedNode",value:function(){var e=this.getSelectedNodes();return e.length&&e[0]||!1}},{key:"getSelectedNodes",value:function(){var e=this;if(this.selectedSingleNode)return[this.selectedSingleNode];var t=[];return this.selectedNodes.forEach((function(n){var i=e.treeWidget.getNodeById(n);i&&t.push(i)})),t}},{key:"getSelectedNodesUnder",value:function(e){if(this.selectedSingleNode)return e.isParentOf(this.selectedSingleNode)?[this.selectedSingleNode]:[];var t=[];for(var n in this.selectedNodes)if(Object.prototype.hasOwnProperty.call(this.selectedNodes,n)){var i=this.treeWidget.getNodeById(n);i&&e.isParentOf(i)&&t.push(i)}return t}},{key:"isNodeSelected",value:function(e){return null!=e.id?this.selectedNodes.has(e.id):!!this.selectedSingleNode&&this.selectedSingleNode.element===e.element}},{key:"clear",value:function(){this.selectedNodes.clear(),this.selectedSingleNode=null}},{key:"removeFromSelection",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null==e.id?this.selectedSingleNode&&e.element===this.selectedSingleNode.element&&(this.selectedSingleNode=null):(this.selectedNodes.delete(e.id),n&&e.iterate((function(){return null!=e.id&&t.selectedNodes.delete(e.id),!0})))}},{key:"addToSelection",value:function(e){null!=e.id?this.selectedNodes.add(e.id):this.selectedSingleNode=e}},{key:"isFocusOnTree",value:function(){var e=document.activeElement;return Boolean(e&&"SPAN"===e.tagName&&this.treeWidget._containsElement(e))}}]),e}(),x=function(){function e(t,n){r(this,e),a(this,"node",void 0),a(this,"$element",void 0),a(this,"treeWidget",void 0),this.init(t,n)}return s(e,[{key:"init",value:function(e,t){if(this.node=e,this.treeWidget=t,!e.element){var n=this.treeWidget.element.get(0);n&&(e.element=n)}e.element&&(this.$element=jQuery(e.element))}},{key:"addDropHint",value:function(e){return this.mustShowBorderDropHint(e)?new q(this.$element,this.treeWidget._getScrollLeft()):new B(this.node,this.$element,e)}},{key:"select",value:function(e){var t;this.getLi().addClass("jqtree-selected");var n=this.getSpan();n.attr("tabindex",null!==(t=this.treeWidget.options.tabIndex)&&void 0!==t?t:null),n.attr("aria-selected","true"),e&&n.trigger("focus")}},{key:"deselect",value:function(){this.getLi().removeClass("jqtree-selected");var e=this.getSpan();e.removeAttr("tabindex"),e.attr("aria-selected","false"),e.trigger("blur")}},{key:"getUl",value:function(){return this.$element.children("ul:first")}},{key:"getSpan",value:function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")}},{key:"getLi",value:function(){return this.$element}},{key:"mustShowBorderDropHint",value:function(e){return e===k.Inside}}]),e}(),$=function(e){l(n,e);var t=c(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"open",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fast";if(!this.node.is_open){this.node.is_open=!0;var r=this.getButton();r.removeClass("jqtree-closed"),r.html("");var o=r.get(0);if(o){var s=this.treeWidget.renderer.openedIconElement;if(s){var a=s.cloneNode(!0);o.appendChild(a)}}var l=function(){t.getLi().removeClass("jqtree-closed"),t.getSpan().attr("aria-expanded","true"),e&&e(t.node),t.treeWidget._triggerEvent("tree.open",{node:t.node})};n?this.getUl().slideDown(i,l):(this.getUl().show(),l())}}},{key:"close",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fast";if(this.node.is_open){this.node.is_open=!1;var i=this.getButton();i.addClass("jqtree-closed"),i.html("");var r=i.get(0);if(r){var o=this.treeWidget.renderer.closedIconElement;if(o){var s=o.cloneNode(!0);r.appendChild(s)}}var a=function(){e.getLi().addClass("jqtree-closed"),e.getSpan().attr("aria-expanded","false"),e.treeWidget._triggerEvent("tree.close",{node:e.node})};t?this.getUl().slideUp(n,a):(this.getUl().hide(),a())}}},{key:"mustShowBorderDropHint",value:function(e){return!this.node.is_open&&e===k.Inside}},{key:"getButton",value:function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")}}]),n}(x),q=function(){function e(t,n){r(this,e),a(this,"$hint",void 0);var i=t.children(".jqtree-element"),o=t.width()||0,s=Math.max(o+n-4,0),l=i.outerHeight()||0,d=Math.max(l-4,0);this.$hint=jQuery(''),i.append(this.$hint),this.$hint.css({width:s,height:d})}return s(e,[{key:"remove",value:function(){this.$hint.remove()}}]),e}(),B=function(){function e(t,n,i){r(this,e),a(this,"$element",void 0),a(this,"node",void 0),a(this,"$ghost",void 0),this.$element=n,this.node=t,this.$ghost=jQuery('
  • \n
  • '),i===k.After?this.moveAfter():i===k.Before?this.moveBefore():i===k.Inside&&(t.isFolder()&&t.is_open?this.moveInsideOpenFolder():this.moveInside())}return s(e,[{key:"remove",value:function(){this.$ghost.remove()}},{key:"moveAfter",value:function(){this.$element.after(this.$ghost)}},{key:"moveBefore",value:function(){this.$element.before(this.$ghost)}},{key:"moveInsideOpenFolder",value:function(){var e,t=null===(e=this.node.children[0])||void 0===e?void 0:e.element;t&&jQuery(t).before(this.$ghost)}},{key:"moveInside",value:function(){this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")}}]),e}(),Q="Node parameter is empty",U="Parameter is empty: ",R=function(e){l(o,e);var t=c(o);function o(){var e;r(this,o);for(var n=arguments.length,i=new Array(n),s=0;s1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return e.is_open?this.closeNode(e,n):this.openNode(e,n),this.element}},{key:"getTree",value:function(){return this.tree}},{key:"selectNode",value:function(e,t){return this.doSelectNode(e,t),this.element}},{key:"getSelectedNode",value:function(){return this.selectNodeHandler.getSelectedNode()}},{key:"toJson",value:function(){return JSON.stringify(this.tree.getData())}},{key:"loadData",value:function(e,t){return this.doLoadData(e,t),this.element}},{key:"loadDataFromUrl",value:function(e,t,n){return"string"==typeof e?this.doLoadDataFromUrl(e,t,null!=n?n:null):this.doLoadDataFromUrl(null,e,t),this.element}},{key:"reload",value:function(e){return this.doLoadDataFromUrl(null,null,e),this.element}},{key:"refresh",value:function(){return this._refreshElements(null),this.element}},{key:"getNodeById",value:function(e){return this.tree.getNodeById(e)}},{key:"getNodeByName",value:function(e){return this.tree.getNodeByName(e)}},{key:"getNodeByNameMustExist",value:function(e){return this.tree.getNodeByNameMustExist(e)}},{key:"getNodesByProperty",value:function(e,t){return this.tree.getNodesByProperty(e,t)}},{key:"getNodeByHtmlElement",value:function(e){return this.getNode(jQuery(e))}},{key:"getNodeByCallback",value:function(e){return this.tree.getNodeByCallback(e)}},{key:"openNode",value:function(e,t,n){var i=this;if(!e)throw Error(Q);var r=function(){var e,r,o;("function"==typeof t?(e=t,r=null):(r=t,e=n),null==r)&&(r=null!==(o=i.options.slide)&&void 0!==o&&o);return[r,e]}(),o=f(r,2),s=o[0],a=o[1];return this._openNode(e,s,a),this.element}},{key:"closeNode",value:function(e,t){if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return(e.isFolder()||e.isEmptyFolder)&&(new $(e,this).close(n,this.options.animationSpeed),this.saveState()),this.element}},{key:"isDragging",value:function(){return this.dndHandler.isDragging}},{key:"refreshHitAreas",value:function(){return this.dndHandler.refresh(),this.element}},{key:"addNodeAfter",value:function(e,t){var n=t.addAfter(e);return n&&this._refreshElements(t.parent),n}},{key:"addNodeBefore",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addBefore(e);return n&&this._refreshElements(t.parent),n}},{key:"addParentNode",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addParent(e);return n&&this._refreshElements(n.parent),n}},{key:"removeNode",value:function(e){if(!e)throw Error(Q);if(!e.parent)throw Error("Node has no parent");this.selectNodeHandler.removeFromSelection(e,!0);var t=e.parent;return e.remove(),this._refreshElements(t),this.element}},{key:"appendNode",value:function(e,t){var n=t||this.tree,i=n.append(e);return this._refreshElements(n),i}},{key:"prependNode",value:function(e,t){var n=null!=t?t:this.tree,i=n.prepend(e);return this._refreshElements(n),i}},{key:"updateNode",value:function(e,t){if(!e)throw Error(Q);var n="object"===i(t)&&t.id&&t.id!==e.id;return n&&this.tree.removeNodeFromIndex(e),e.setData(t),n&&this.tree.addNodeToIndex(e),"object"===i(t)&&t.children&&t.children instanceof Array&&(e.removeChildren(),t.children.length&&e.loadFromData(t.children)),this._refreshElements(e),this.element}},{key:"isSelectedNodeInSubtree",value:function(e){var t=this.getSelectedNode();return!!t&&(e===t||e.isParentOf(t))}},{key:"moveNode",value:function(e,t,n){if(!e)throw Error(Q);if(!t)throw Error(U+"targetNode");var i=N[n];return void 0!==i&&(this.tree.moveNode(e,t,i),this._refreshElements(null)),this.element}},{key:"getStateFromStorage",value:function(){return this.saveStateHandler.getStateFromStorage()}},{key:"addToSelection",value:function(e,t){if(!e)throw Error(Q);return this.selectNodeHandler.addToSelection(e),this._getNodeElementForNode(e).select(void 0===t||t),this.saveState(),this.element}},{key:"getSelectedNodes",value:function(){return this.selectNodeHandler.getSelectedNodes()}},{key:"isNodeSelected",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.isNodeSelected(e)}},{key:"removeFromSelection",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this.saveState(),this.element}},{key:"scrollToNode",value:function(e){if(!e)throw Error(Q);var t=jQuery(e.element).offset(),n=t?t.top:0,i=this.$el.offset(),r=n-(i?i.top:0);return this.scrollHandler.scrollToY(r),this.element}},{key:"getState",value:function(){return this.saveStateHandler.getState()}},{key:"setState",value:function(e){return this.saveStateHandler.setInitialState(e),this._refreshElements(null),this.element}},{key:"setOption",value:function(e,t){return this.options[e]=t,this.element}},{key:"moveDown",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveDown(e),this.element}},{key:"moveUp",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveUp(e),this.element}},{key:"getVersion",value:function(){return"1.7.1"}},{key:"_triggerEvent",value:function(e,t){var n=jQuery.Event(e,t);return this.element.trigger(n),n}},{key:"_openNode",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=function(e,n,i){new $(e,t).open(i,n,t.options.animationSpeed)};if(e.isFolder()||e.isEmptyFolder)if(e.load_on_demand)this.loadFolderOnDemand(e,n,i);else{for(var o=e.parent;o;)o.parent&&r(o,!1,null),o=o.parent;r(e,n,i),this.saveState()}}},{key:"_refreshElements",value:function(e){var t=this.selectNodeHandler.isFocusOnTree(),n=!!e&&this.isSelectedNodeInSubtree(e);this.renderer.render(e),n&&this.selectCurrentNode(t),this._triggerEvent("tree.refresh")}},{key:"_getNodeElementForNode",value:function(e){return e.isFolder()?new $(e,this):new x(e,this)}},{key:"_getNodeElement",value:function(e){var t=this.getNode(e);return t?this._getNodeElementForNode(t):null}},{key:"_containsElement",value:function(e){var t=this.getNode(jQuery(e));return null!=t&&t.tree===this.tree}},{key:"_getScrollLeft",value:function(){return this.scrollHandler.getScrollLeft()}},{key:"init",value:function(){v(d(o.prototype),"init",this).call(this),this.element=this.$el,this.isInitialized=!1,this.options.rtl=this.getRtlOption(),null==this.options.closedIcon&&(this.options.closedIcon=this.getDefaultClosedIcon()),this.renderer=new C(this),this.dataLoader=new w(this),this.saveStateHandler=new O(this),this.selectNodeHandler=new M(this),this.dndHandler=new D(this),this.scrollHandler=new H(this),this.keyHandler=new F(this),this.initData(),this.element.on("click",this.handleClick),this.element.on("dblclick",this.handleDblclick),this.options.useContextMenu&&this.element.on("contextmenu",this.handleContextmenu)}},{key:"deinit",value:function(){this.element.empty(),this.element.off(),this.keyHandler.deinit(),this.tree=new _({},!0),v(d(o.prototype),"deinit",this).call(this)}},{key:"mouseCapture",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseCapture(e)}},{key:"mouseStart",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStart(e)}},{key:"mouseDrag",value:function(e){if(this.options.dragAndDrop){var t=this.dndHandler.mouseDrag(e);return this.scrollHandler.checkScrolling(),t}return!1}},{key:"mouseStop",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStop(e)}},{key:"getMouseDelay",value:function(){var e;return null!==(e=this.options.startDndDelay)&&void 0!==e?e:0}},{key:"initData",value:function(){this.options.data?this.doLoadData(this.options.data,null):this.getDataUrlInfo(null)?this.doLoadDataFromUrl(null,null,null):this.doLoadData([],null)}},{key:"getDataUrlInfo",value:function(e){var t,n=this,r=this.options.dataUrl||this.element.data("url"),o=function(t){if(null!=e&&e.id){var i={node:e.id};t.data=i}else{var r=n.getNodeIdToBeSelected();if(r){var o={selected_node:r};t.data=o}}};return"function"==typeof r?r(e):"string"==typeof r?(o(t={url:r}),t):r&&"object"===i(r)?(o(r),r):null}},{key:"getNodeIdToBeSelected",value:function(){return this.options.saveState?this.saveStateHandler.getNodeIdToBeSelected():null}},{key:"initTree",value:function(e){var t=this,n=function(){t.isInitialized||(t.isInitialized=!0,t._triggerEvent("tree.init"))};if(this.options.nodeClass){this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.selectNodeHandler.clear(),this.tree.loadFromData(e);var i=this.setInitialState();this._refreshElements(null),i?this.setInitialStateOnDemand(n):n()}}},{key:"setInitialState",value:function(){var e=this,t=f(function(){if(e.options.saveState){var t=e.saveStateHandler.getStateFromStorage();return t?[!0,e.saveStateHandler.setInitialState(t)]:[!1,!1]}return[!1,!1]}(),2),n=t[0],i=t[1];return n||(i=function(){if(!1===e.options.autoOpen)return!1;var t=e.getAutoOpenMaxLevel(),n=!1;return e.tree.iterate((function(e,i){return e.load_on_demand?(n=!0,!1):!!e.hasChildren()&&(e.is_open=!0,i!==t)})),n}()),i}},{key:"setInitialStateOnDemand",value:function(e){var t,n,i,r,o=this;(function(){if(o.options.saveState){var t=o.saveStateHandler.getStateFromStorage();return!!t&&(o.saveStateHandler.setInitialStateOnDemand(t,e),!0)}return!1})()||(t=o.getAutoOpenMaxLevel(),n=0,i=function(e){n+=1,o._openNode(e,!1,(function(){n-=1,r()}))},(r=function(){o.tree.iterate((function(e,n){return e.load_on_demand?(e.is_loading||i(e),!1):(o._openNode(e,!1,null),n!==t)})),0===n&&e()})())}},{key:"getAutoOpenMaxLevel",value:function(){return!0===this.options.autoOpen?-1:"number"==typeof this.options.autoOpen?this.options.autoOpen:"string"==typeof this.options.autoOpen?parseInt(this.options.autoOpen,10):0}},{key:"getClickTarget",value:function(e){var t=jQuery(e),n=t.closest(".jqtree-toggler");if(n.length){var i=this.getNode(n);if(i)return{type:"button",node:i}}else{var r=t.closest(".jqtree-element");if(r.length){var o=this.getNode(r);if(o)return{type:"label",node:o}}}return null}},{key:"getNode",value:function(e){var t=e.closest("li.jqtree_common");return 0===t.length?null:t.data("node")}},{key:"saveState",value:function(){this.options.saveState&&this.saveStateHandler.saveState()}},{key:"selectCurrentNode",value:function(e){var t=this.getSelectedNode();if(t){var n=this._getNodeElementForNode(t);n&&n.select(e)}}},{key:"deselectCurrentNode",value:function(){var e=this.getSelectedNode();e&&this.removeFromSelection(e)}},{key:"getDefaultClosedIcon",value:function(){return this.options.rtl?"◀":"►"}},{key:"getRtlOption",value:function(){if(null!=this.options.rtl)return this.options.rtl;var e=this.element.data("rtl");return null!==e&&!1!==e&&void 0!==e}},{key:"doSelectNode",value:function(e,t){var i=this,r=function(){i.options.saveState&&i.saveStateHandler.saveState()};if(!e)return this.deselectCurrentNode(),void r();var o=n(n({},{mustSetFocus:!0,mustToggle:!0}),t||{});if(i.options.onCanSelectNode?!0===i.options.selectable&&i.options.onCanSelectNode(e):!0===i.options.selectable){if(this.selectNodeHandler.isNodeSelected(e))o.mustToggle&&(this.deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e}));else{var s=this.getSelectedNode()||null;this.deselectCurrentNode(),this.addToSelection(e,o.mustSetFocus),this._triggerEvent("tree.select",{node:e,deselected_node:s}),(a=e.parent)&&a.parent&&!a.is_open&&i.openNode(a,!1)}var a;r()}}},{key:"doLoadData",value:function(e,t){e&&(t?(this.deselectNodes(t),this.loadSubtree(e,t)):this.initTree(e),this.isDragging()&&this.dndHandler.refresh()),this._triggerEvent("tree.load_data",{tree_data:e,parent_node:t})}},{key:"deselectNodes",value:function(e){var t,n=m(this.selectNodeHandler.getSelectedNodesUnder(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.selectNodeHandler.removeFromSelection(i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"loadSubtree",value:function(e,t){t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,this._refreshElements(t)}},{key:"doLoadDataFromUrl",value:function(e,t,n){var i=e||this.getDataUrlInfo(t);this.dataLoader.loadFromUrl(i,t,n)}},{key:"loadFolderOnDemand",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;e.is_loading=!0,this.doLoadDataFromUrl(null,e,(function(){t._openNode(e,n,i)}))}}]),o}(L);return a(R,"defaults",{animationSpeed:"fast",autoEscape:!0,autoOpen:!1,buttonLeft:!0,closedIcon:void 0,data:void 0,dataFilter:void 0,dataUrl:void 0,dragAndDrop:!1,keyboardSupport:!0,nodeClass:_,onCanMove:void 0,onCanMoveTo:void 0,onCanSelectNode:void 0,onCreateLi:void 0,onDragMove:void 0,onDragStop:void 0,onGetStateFromStorage:void 0,onIsMoveHandle:void 0,onLoadFailed:void 0,onLoading:void 0,onSetStateFromStorage:void 0,openedIcon:"▼",openFolderDelay:500,rtl:void 0,saveState:!1,selectable:!0,showEmptyFolder:!1,slide:!0,startDndDelay:300,tabIndex:0,useContextMenu:!0}),T.register(R,"tree"),e.JqTreeWidget=R,e}({}); +var jqtree=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var k=function(e){return e[e.Before=1]="Before",e[e.After=2]="After",e[e.Inside=3]="Inside",e[e.None=4]="None",e}({}),N={before:k.Before,after:k.After,inside:k.Inside,none:k.None},S=function(e){for(var t in N)if(Object.prototype.hasOwnProperty.call(N,t)&&N[t]===e)return t;return""},b=function(e){return"object"===i(e)&&"children"in e&&e.children instanceof Array},_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;r(this,e),a(this,"id",void 0),a(this,"name",void 0),a(this,"children",void 0),a(this,"parent",void 0),a(this,"idMapping",void 0),a(this,"tree",void 0),a(this,"nodeClass",void 0),a(this,"load_on_demand",void 0),a(this,"is_open",void 0),a(this,"element",void 0),a(this,"is_loading",void 0),a(this,"isEmptyFolder",void 0),this.name="",this.isEmptyFolder=!1,this.load_on_demand=!1,this.setData(t),this.children=[],this.parent=null,n&&(this.idMapping=new Map,this.tree=this,this.nodeClass=i)}return s(e,[{key:"setData",value:function(e){if(e)if("string"==typeof e)this.name=e;else if("object"===i(e))for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];"label"===t||"name"===t?"string"==typeof n&&(this.name=n):"children"!==t&&"parent"!==t&&(this[t]=n)}}},{key:"loadFromData",value:function(e){this.removeChildren();var t,n=m(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,r=this.createNode(i);this.addChild(r),b(i)&&(0===i.children.length?r.isEmptyFolder=!0:r.loadFromData(i.children))}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addChild",value:function(e){this.children.push(e),e.setParent(this)}},{key:"addChildAtPosition",value:function(e,t){this.children.splice(t,0,e),e.setParent(this)}},{key:"removeChild",value:function(e){e.removeChildren(),this.doRemoveChild(e)}},{key:"getChildIndex",value:function(e){return this.children.indexOf(e)}},{key:"hasChildren",value:function(){return 0!==this.children.length}},{key:"isFolder",value:function(){return this.hasChildren()||this.load_on_demand}},{key:"iterate",value:function(e){!function t(n,i){if(n.children){var r,o=m(n.children);try{for(o.s();!(r=o.n()).done;){var s=r.value;e(s,i)&&s.hasChildren()&&t(s,i+1)}}catch(e){o.e(e)}finally{o.f()}}}(this,0)}},{key:"moveNode",value:function(e,t,n){if(!e.parent||e.isParentOf(t))return!1;switch(e.parent.doRemoveChild(e),n){case k.After:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1),!0);case k.Before:return!!t.parent&&(t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)),!0);case k.Inside:return t.addChildAtPosition(e,0),!0;default:return!1}}},{key:"getData",value:function(){var e=function e(t){return t.map((function(t){var n={};for(var i in t)if(-1===["parent","children","element","idMapping","load_on_demand","nodeClass","tree","isEmptyFolder"].indexOf(i)&&Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];n[i]=r}return t.hasChildren()&&(n.children=e(t.children)),n}))};return e(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[this]:this.children)}},{key:"getNodeByName",value:function(e){return this.getNodeByCallback((function(t){return t.name===e}))}},{key:"getNodeByNameMustExist",value:function(e){var t=this.getNodeByCallback((function(t){return t.name===e}));if(!t)throw"Node with name ".concat(e," not found");return t}},{key:"getNodeByCallback",value:function(e){var t=null;return this.iterate((function(n){return!t&&(!e(n)||(t=n,!1))})),t}},{key:"addAfter",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n+1),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addBefore",value:function(e){if(this.parent){var t=this.createNode(e),n=this.parent.getChildIndex(this);return this.parent.addChildAtPosition(t,n),b(e)&&e.children.length&&t.loadFromData(e.children),t}return null}},{key:"addParent",value:function(e){if(this.parent){var t=this.createNode(e);this.tree&&t.setParent(this.tree);var n,i=this.parent,r=m(i.children);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.addChild(o)}}catch(e){r.e(e)}finally{r.f()}return i.children=[],i.addChild(t),t}return null}},{key:"remove",value:function(){this.parent&&(this.parent.removeChild(this),this.parent=null)}},{key:"append",value:function(e){var t=this.createNode(e);return this.addChild(t),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"prepend",value:function(e){var t=this.createNode(e);return this.addChildAtPosition(t,0),b(e)&&e.children.length&&t.loadFromData(e.children),t}},{key:"isParentOf",value:function(e){for(var t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1}},{key:"getLevel",value:function(){for(var e=0,t=this;t.parent;)e+=1,t=t.parent;return e}},{key:"getNodeById",value:function(e){return this.idMapping.get(e)||null}},{key:"addNodeToIndex",value:function(e){null!=e.id&&this.idMapping.set(e.id,e)}},{key:"removeNodeFromIndex",value:function(e){null!=e.id&&this.idMapping.delete(e.id)}},{key:"removeChildren",value:function(){var e=this;this.iterate((function(t){var n;return null===(n=e.tree)||void 0===n||n.removeNodeFromIndex(t),!0})),this.children=[]}},{key:"getPreviousSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)-1;return e>=0&&this.parent.children[e]||null}return null}},{key:"getNextSibling",value:function(){if(this.parent){var e=this.parent.getChildIndex(this)+1;return e0&&void 0!==arguments[0])||arguments[0])&&this.hasChildren())return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getNextVisibleNode",value:function(){if(this.hasChildren()&&this.is_open)return this.children[0]||null;if(this.parent){var e=this.getNextSibling();return e||this.parent.getNextNode(!1)}return null}},{key:"getPreviousNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()?e.getLastChild():e:this.getParent()}return null}},{key:"getPreviousVisibleNode",value:function(){if(this.parent){var e=this.getPreviousSibling();return e?e.hasChildren()&&e.is_open?e.getLastChild():e:this.getParent()}return null}},{key:"getParent",value:function(){return this.parent&&this.parent.parent?this.parent:null}},{key:"getLastChild",value:function(){if(this.hasChildren()){var e=this.children[this.children.length-1];return e?e.hasChildren()&&e.is_open?null==e?void 0:e.getLastChild():e:null}return null}},{key:"initFromData",value:function(e){var t,n=this,i=function(e){var t,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=n.createNode();o.initFromData(r),n.addChild(o)}}catch(e){i.e(e)}finally{i.f()}};t=e,n.setData(t),b(t)&&t.children.length&&i(t.children)}},{key:"setParent",value:function(e){var t;this.parent=e,this.tree=e.tree,null===(t=this.tree)||void 0===t||t.addNodeToIndex(this)}},{key:"doRemoveChild",value:function(e){var t;this.children.splice(this.getChildIndex(e),1),null===(t=this.tree)||void 0===t||t.removeNodeFromIndex(e)}},{key:"getNodeClass",value:function(){var t;return this.nodeClass||(null==this||null===(t=this.tree)||void 0===t?void 0:t.nodeClass)||e}},{key:"createNode",value:function(e){return new(this.getNodeClass())(e)}}]),e}(),D=function(){function e(t){r(this,e),a(this,"hitAreas",void 0),a(this,"isDragging",void 0),a(this,"currentItem",void 0),a(this,"hoveredArea",void 0),a(this,"positionInfo",void 0),a(this,"treeWidget",void 0),a(this,"dragElement",void 0),a(this,"previousGhost",void 0),a(this,"openFolderTimer",void 0),this.treeWidget=t,this.hoveredArea=null,this.hitAreas=[],this.isDragging=!1,this.currentItem=null,this.positionInfo=null}return s(e,[{key:"mouseCapture",value:function(e){var t=jQuery(e.target);if(!this.mustCaptureElement(t))return null;if(this.treeWidget.options.onIsMoveHandle&&!this.treeWidget.options.onIsMoveHandle(t))return null;var n=this.treeWidget._getNodeElement(t);return n&&this.treeWidget.options.onCanMove&&(this.treeWidget.options.onCanMove(n.node)||(n=null)),this.currentItem=n,null!=this.currentItem}},{key:"mouseStart",value:function(e){var t;if(!this.currentItem||void 0===e.pageX||void 0===e.pageY)return!1;this.refresh();var n=jQuery(e.target).offset(),i=n?n.left:0,r=n?n.top:0,o=this.currentItem.node;return this.dragElement=new j(o.name,e.pageX-i,e.pageY-r,this.treeWidget.element,null===(t=this.treeWidget.options.autoEscape)||void 0===t||t),this.isDragging=!0,this.positionInfo=e,this.currentItem.$element.addClass("jqtree-moving"),!0}},{key:"mouseDrag",value:function(e){if(!this.currentItem||!this.dragElement||void 0===e.pageX||void 0===e.pageY)return!1;this.dragElement.move(e.pageX,e.pageY),this.positionInfo=e;var t=this.findHoveredArea(e.pageX,e.pageY);return t&&this.canMoveToArea(t)?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hoveredArea!==t&&(this.hoveredArea=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeDropHint(),this.stopOpenFolderTimer(),this.hoveredArea=t),t||this.treeWidget.options.onDragMove&&this.treeWidget.options.onDragMove(this.currentItem.node,e.originalEvent),!0}},{key:"mouseStop",value:function(e){this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas();var t=this.currentItem;return this.currentItem&&(this.currentItem.$element.removeClass("jqtree-moving"),this.currentItem=null),this.isDragging=!1,this.positionInfo=null,!this.hoveredArea&&t&&this.treeWidget.options.onDragStop&&this.treeWidget.options.onDragStop(t.node,e.originalEvent),!1}},{key:"refresh",value:function(){this.removeHitAreas(),this.currentItem&&(this.generateHitAreas(),this.currentItem=this.treeWidget._getNodeElementForNode(this.currentItem.node),this.isDragging&&this.currentItem.$element.addClass("jqtree-moving"))}},{key:"generateHitAreas",value:function(){if(this.currentItem){var e=new I(this.treeWidget.tree,this.currentItem.node,this.getTreeDimensions().bottom);this.hitAreas=e.generate()}else this.hitAreas=[]}},{key:"mustCaptureElement",value:function(e){return!e.is("input,select,textarea")}},{key:"canMoveToArea",value:function(e){if(!this.treeWidget.options.onCanMoveTo)return!0;if(!this.currentItem)return!1;var t=S(e.position);return this.treeWidget.options.onCanMoveTo(this.currentItem.node,e.node,t)}},{key:"removeHitAreas",value:function(){this.hitAreas=[]}},{key:"clear",value:function(){this.dragElement&&(this.dragElement.remove(),this.dragElement=null)}},{key:"removeDropHint",value:function(){this.previousGhost&&this.previousGhost.remove()}},{key:"removeHover",value:function(){this.hoveredArea=null}},{key:"findHoveredArea",value:function(e,t){var n=this.getTreeDimensions();if(en.right||t>n.bottom)return null;for(var i=0,r=this.hitAreas.length;i>1,s=this.hitAreas[o];if(!s)return null;if(ts.bottom))return s;i=o+1}}return null}},{key:"mustOpenFolderTimer",value:function(e){var t=e.node;return t.isFolder()&&!t.is_open&&e.position===k.Inside}},{key:"updateDropHint",value:function(){if(this.hoveredArea){this.removeDropHint();var e=this.treeWidget._getNodeElementForNode(this.hoveredArea.node);this.previousGhost=e.addDropHint(this.hoveredArea.position)}}},{key:"startOpenFolderTimer",value:function(e){var t=this;this.stopOpenFolderTimer();var n=this.treeWidget.options.openFolderDelay;!1!==n&&(this.openFolderTimer=window.setTimeout((function(){t.treeWidget._openNode(e,t.treeWidget.options.slide,(function(){t.refresh(),t.updateDropHint()}))}),n))}},{key:"stopOpenFolderTimer",value:function(){this.openFolderTimer&&(clearTimeout(this.openFolderTimer),this.openFolderTimer=null)}},{key:"moveItem",value:function(e){var t=this;if(this.currentItem&&this.hoveredArea&&this.hoveredArea.position!==k.None&&this.canMoveToArea(this.hoveredArea)){var n=this.currentItem.node,i=this.hoveredArea.node,r=this.hoveredArea.position,o=n.parent;r===k.Inside&&(this.hoveredArea.node.is_open=!0);var s=function(){t.treeWidget.tree.moveNode(n,i,r),t.treeWidget.element.empty(),t.treeWidget._refreshElements(null)};this.treeWidget._triggerEvent("tree.move",{move_info:{moved_node:n,target_node:i,position:S(r),previous_parent:o,do_move:s,original_event:e.originalEvent}}).isDefaultPrevented()||s()}}},{key:"getTreeDimensions",value:function(){var e=this.treeWidget.element.offset();if(e){var t=this.treeWidget.element,n=t.width()||0,i=t.height()||0,r=e.left+this.treeWidget._getScrollLeft();return{left:r,top:e.top,right:r+n,bottom:e.top+i+16}}return{left:0,top:0,right:0,bottom:0}}}]),e}(),I=function(e){l(n,e);var t=c(n);function n(e,i,o){var s;return r(this,n),a(h(s=t.call(this,e)),"currentNode",void 0),a(h(s),"treeBottom",void 0),a(h(s),"positions",void 0),a(h(s),"lastTop",void 0),s.currentNode=i,s.treeBottom=o,s}return s(n,[{key:"generate",value:function(){return this.positions=[],this.lastTop=0,this.iterate(),this.generateHitAreas(this.positions)}},{key:"generateHitAreas",value:function(e){var t,n=-1,i=[],r=[],o=m(e);try{for(o.s();!(t=o.n()).done;){var s=t.value;s.top!==n&&i.length&&(i.length&&this.generateHitAreasForGroup(r,i,n,s.top),n=s.top,i=[]),i.push(s)}}catch(e){o.e(e)}finally{o.f()}return this.generateHitAreasForGroup(r,i,n,this.treeBottom),r}},{key:"handleOpenFolder",value:function(e,t){return e!==this.currentNode&&(e.children[0]!==this.currentNode&&this.addPosition(e,k.Inside,this.getTop(t)),!0)}},{key:"handleClosedFolder",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):(this.addPosition(e,k.Inside,i),t!==this.currentNode&&this.addPosition(e,k.After,i))}},{key:"handleFirstNode",value:function(e){e!==this.currentNode&&this.addPosition(e,k.Before,this.getTop(jQuery(e.element)))}},{key:"handleAfterOpenFolder",value:function(e,t){e===this.currentNode||t===this.currentNode?this.addPosition(e,k.None,this.lastTop):this.addPosition(e,k.After,this.lastTop)}},{key:"handleNode",value:function(e,t,n){var i=this.getTop(n);e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.Inside,i),t===this.currentNode||e===this.currentNode?this.addPosition(e,k.None,i):this.addPosition(e,k.After,i)}},{key:"getTop",value:function(e){var t=e.offset();return t?t.top:0}},{key:"addPosition",value:function(e,t,n){var i={top:n,bottom:0,node:e,position:t};this.positions.push(i),this.lastTop=n}},{key:"generateHitAreasForGroup",value:function(e,t,n,i){for(var r=Math.min(t.length,4),o=Math.round((i-n)/r),s=n,a=0;a").addClass("jqtree-title jqtree-dragging"),s?this.$element.text(t):this.$element.html(t),this.$element.css("position","absolute"),o.append(this.$element)}return s(e,[{key:"move",value:function(e,t){this.$element.offset({left:e-this.offsetX,top:t-this.offsetY})}},{key:"remove",value:function(){this.$element.remove()}}]),e}(),E=function(e){return e?"true":"false"},C=function(){function e(t){r(this,e),a(this,"openedIconElement",void 0),a(this,"closedIconElement",void 0),a(this,"treeWidget",void 0),this.treeWidget=t,this.openedIconElement=this.createButtonElement(t.options.openedIcon||"+"),this.closedIconElement=this.createButtonElement(t.options.closedIcon||"-")}return s(e,[{key:"render",value:function(e){e&&e.parent?this.renderFromNode(e):this.renderFromRoot()}},{key:"renderFromRoot",value:function(){var e=this.treeWidget.element;e.empty(),e[0]&&this.createDomElements(e[0],this.treeWidget.tree.children,!0,1)}},{key:"renderFromNode",value:function(e){var t=jQuery(e.element),n=this.createLi(e,e.getLevel());this.attachNodeData(e,n),t.after(n),t.remove(),e.children&&this.createDomElements(n,e.children,!1,e.getLevel()+1)}},{key:"createDomElements",value:function(e,t,n,i){var r=this.createUl(n);e.appendChild(r);var o,s=m(t);try{for(s.s();!(o=s.n()).done;){var a=o.value,l=this.createLi(a,i);r.appendChild(l),this.attachNodeData(a,l),a.hasChildren()&&this.createDomElements(l,a.children,!1,i+1)}}catch(e){s.e(e)}finally{s.f()}}},{key:"attachNodeData",value:function(e,t){e.element=t,jQuery(t).data("node",e)}},{key:"createUl",value:function(e){var t,n;e?(t="jqtree-tree",n="tree",this.treeWidget.options.rtl&&(t+=" jqtree-rtl")):(t="",n="group"),this.treeWidget.options.dragAndDrop&&(t+=" jqtree-dnd");var i=document.createElement("ul");return i.className="jqtree_common ".concat(t),i.setAttribute("role",n),i}},{key:"createLi",value:function(e,t){var n=Boolean(this.treeWidget.selectNodeHandler.isNodeSelected(e)),i=e.isFolder()||e.isEmptyFolder&&this.treeWidget.options.showEmptyFolder?this.createFolderLi(e,t,n):this.createNodeLi(e,t,n);return this.treeWidget.options.onCreateLi&&this.treeWidget.options.onCreateLi(e,jQuery(i),n),i}},{key:"setTreeItemAriaAttributes",value:function(e,t,n,i){e.setAttribute("aria-label",t),e.setAttribute("aria-level","".concat(n)),e.setAttribute("aria-selected",E(i)),e.setAttribute("role","treeitem")}},{key:"createFolderLi",value:function(e,t,n){var i=this.getButtonClasses(e),r=this.getFolderClasses(e,n),o=e.is_open?this.openedIconElement:this.closedIconElement,s=document.createElement("li");s.className="jqtree_common ".concat(r),s.setAttribute("role","none");var a=document.createElement("div");a.className="jqtree-element jqtree_common",a.setAttribute("role","none"),s.appendChild(a);var l=document.createElement("a");l.className=i,o&&l.appendChild(o.cloneNode(!0)),this.treeWidget.options.buttonLeft&&a.appendChild(l);var d=this.createTitleSpan(e.name,n,!0,t);return d.setAttribute("aria-expanded",E(e.is_open)),a.appendChild(d),this.treeWidget.options.buttonLeft||a.appendChild(l),s}},{key:"createNodeLi",value:function(e,t,n){var i=["jqtree_common"];n&&i.push("jqtree-selected");var r=i.join(" "),o=document.createElement("li");o.className=r,o.setAttribute("role","none");var s=document.createElement("div");s.className="jqtree-element jqtree_common",s.setAttribute("role","none"),o.appendChild(s);var a=this.createTitleSpan(e.name,n,!1,t);return s.appendChild(a),o}},{key:"createTitleSpan",value:function(e,t,n,i){var r=document.createElement("span"),o="jqtree-title jqtree_common";if(n&&(o+=" jqtree-title-folder"),o+=" jqtree-title-button-".concat(this.treeWidget.options.buttonLeft?"left":"right"),r.className=o,t){var s=this.treeWidget.options.tabIndex;void 0!==s&&r.setAttribute("tabindex","".concat(s))}return this.setTreeItemAriaAttributes(r,e,i,t),this.treeWidget.options.autoEscape?r.textContent=e:r.innerHTML=e,r}},{key:"getButtonClasses",value:function(e){var t=["jqtree-toggler","jqtree_common"];return e.is_open||t.push("jqtree-closed"),this.treeWidget.options.buttonLeft?t.push("jqtree-toggler-left"):t.push("jqtree-toggler-right"),t.join(" ")}},{key:"getFolderClasses",value:function(e,t){var n=["jqtree-folder"];return e.is_open||n.push("jqtree-closed"),t&&n.push("jqtree-selected"),e.is_loading&&n.push("jqtree-loading"),n.join(" ")}},{key:"createButtonElement",value:function(e){if("string"==typeof e){var t=document.createElement("div");return t.innerHTML=e,document.createTextNode(t.innerHTML)}return jQuery(e)[0]}}]),e}(),w=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),this.treeWidget=t}return s(e,[{key:"loadFromUrl",value:function(e,t,n){var i=this;if(e){var r=this.getDomElement(t);this.addLoadingClass(r),this.notifyLoading(!0,t,r);var o=function(){i.removeLoadingClass(r),i.notifyLoading(!1,t,r)};this.submitRequest(e,(function(e){o(),i.treeWidget.loadData(i.parseData(e),t),n&&"function"==typeof n&&n()}),(function(e){o(),i.treeWidget.options.onLoadFailed&&i.treeWidget.options.onLoadFailed(e)}))}}},{key:"addLoadingClass",value:function(e){e&&e.addClass("jqtree-loading")}},{key:"removeLoadingClass",value:function(e){e&&e.removeClass("jqtree-loading")}},{key:"getDomElement",value:function(e){return e?jQuery(e.element):this.treeWidget.element}},{key:"notifyLoading",value:function(e,t,n){this.treeWidget.options.onLoading&&this.treeWidget.options.onLoading(e,t,n),this.treeWidget._triggerEvent("tree.loading_data",{isLoading:e,node:t,$el:n})}},{key:"submitRequest",value:function(e,t,i){var r,o=n({method:"GET",cache:!1,dataType:"json",success:t,error:i},"string"==typeof e?{url:e}:e);o.method=(null===(r=o.method)||void 0===r?void 0:r.toUpperCase())||"GET",jQuery.ajax(o)}},{key:"parseData",value:function(e){var t=this.treeWidget.options.dataFilter,n="string"==typeof e?JSON.parse(e):e;return t?t(n):n}}]),e}(),F=function(){function e(t){var n=this;r(this,e),a(this,"treeWidget",void 0),a(this,"handleKeyDown",(function(t){if(!n.canHandleKeyboard())return!0;var i=n.treeWidget.getSelectedNode();if(!i)return!0;switch(t.which){case e.DOWN:return n.moveDown(i);case e.UP:return n.moveUp(i);case e.RIGHT:return n.moveRight(i);case e.LEFT:return n.moveLeft(i);default:return!0}})),this.treeWidget=t,t.options.keyboardSupport&&jQuery(document).on("keydown.jqtree",this.handleKeyDown)}return s(e,[{key:"deinit",value:function(){jQuery(document).off("keydown.jqtree")}},{key:"moveDown",value:function(e){return this.selectNode(e.getNextVisibleNode())}},{key:"moveUp",value:function(e){return this.selectNode(e.getPreviousVisibleNode())}},{key:"moveRight",value:function(e){return!e.isFolder()||(e.is_open?this.selectNode(e.getNextVisibleNode()):(this.treeWidget.openNode(e),!1))}},{key:"moveLeft",value:function(e){return e.isFolder()&&e.is_open?(this.treeWidget.closeNode(e),!1):this.selectNode(e.getParent())}},{key:"selectNode",value:function(e){return!e||(this.treeWidget.selectNode(e),this.treeWidget.scrollHandler.isScrolledIntoView(jQuery(e.element).find(".jqtree-element"))||this.treeWidget.scrollToNode(e),!1)}},{key:"canHandleKeyboard",value:function(){return!!this.treeWidget.options.keyboardSupport&&this.treeWidget.selectNodeHandler.isFocusOnTree()}}]),e}();a(F,"LEFT",37),a(F,"UP",38),a(F,"RIGHT",39),a(F,"DOWN",40);var W=function(e,t){var n=function(){return"simple_widget_".concat(t)},r=function(e,t){var n=jQuery.data(e,t);return n&&n instanceof T?n:null},o=function(t,i){var o,s=n(),a=m(t.get());try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!r(l,s)){var d=new e(l,i);jQuery.data(l,s)||jQuery.data(l,s,d),d.init()}}}catch(e){a.e(e)}finally{a.f()}return t};jQuery.fn[t]=function(t){if(!t)return o(this,null);if("object"===i(t))return o(this,t);if("string"==typeof t&&"_"!==t[0]){var s=t;if("destroy"===s)return function(e){var t,i=n(),o=m(e.get());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=r(s,i);a&&a.destroy(),jQuery.removeData(s,i)}}catch(e){o.e(e)}finally{o.f()}}(this);if("get_widget_class"===s)return e;for(var a=arguments.length,l=new Array(a>1?a-1:0),d=1;d1)){var n=t.changedTouches[0];n&&e.handleMouseDown(A(n,t))}})),a(h(e),"touchMove",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseMove(t,A(n,t))}})),a(h(e),"touchEnd",(function(t){if(t&&!(t.touches.length>1)){var n=t.changedTouches[0];n&&e.handleMouseUp(A(n,t))}})),e}return s(n,[{key:"init",value:function(){var e=this.$el.get(0);e&&(e.addEventListener("mousedown",this.mouseDown,{passive:!1}),e.addEventListener("touchstart",this.touchStart,{passive:!1})),this.isMouseStarted=!1,this.mouseDelayTimer=null,this.isMouseDelayMet=!1,this.mouseDownInfo=null}},{key:"deinit",value:function(){var e=this.$el.get(0);e&&(e.removeEventListener("mousedown",this.mouseDown,{passive:!1}),e.removeEventListener("touchstart",this.touchStart,{passive:!1})),this.removeMouseMoveEventListeners()}},{key:"handleMouseDown",value:function(e){return this.isMouseStarted&&this.handleMouseUp(e),this.mouseDownInfo=e,!!this.mouseCapture(e)&&(this.handleStartMouse(),!0)}},{key:"handleStartMouse",value:function(){document.addEventListener("mousemove",this.mouseMove,{passive:!1}),document.addEventListener("touchmove",this.touchMove,{passive:!1}),document.addEventListener("mouseup",this.mouseUp,{passive:!1}),document.addEventListener("touchend",this.touchEnd,{passive:!1});var e=this.getMouseDelay();e?this.startMouseDelayTimer(e):this.isMouseDelayMet=!0}},{key:"startMouseDelayTimer",value:function(e){var t=this;this.mouseDelayTimer&&clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=window.setTimeout((function(){t.mouseDownInfo&&(t.isMouseDelayMet=!0)}),e),this.isMouseDelayMet=!1}},{key:"handleMouseMove",value:function(e,t){if(this.isMouseStarted)return this.mouseDrag(t),void(e.cancelable&&e.preventDefault());this.isMouseDelayMet&&(this.mouseDownInfo&&(this.isMouseStarted=!1!==this.mouseStart(this.mouseDownInfo)),this.isMouseStarted?(this.mouseDrag(t),e.cancelable&&e.preventDefault()):this.handleMouseUp(t))}},{key:"handleMouseUp",value:function(e){this.removeMouseMoveEventListeners(),this.isMouseDelayMet=!1,this.mouseDownInfo=null,this.isMouseStarted&&(this.isMouseStarted=!1,this.mouseStop(e))}},{key:"removeMouseMoveEventListeners",value:function(){document.removeEventListener("mousemove",this.mouseMove,{passive:!1}),document.removeEventListener("touchmove",this.touchMove,{passive:!1}),document.removeEventListener("mouseup",this.mouseUp,{passive:!1}),document.removeEventListener("touchend",this.touchEnd,{passive:!1})}}]),n}(T),O=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"_supportsLocalStorage",void 0),this.treeWidget=t}return s(e,[{key:"saveState",value:function(){var e=JSON.stringify(this.getState());this.treeWidget.options.onSetStateFromStorage?this.treeWidget.options.onSetStateFromStorage(e):this.supportsLocalStorage()&&localStorage.setItem(this.getKeyName(),e)}},{key:"getStateFromStorage",value:function(){var e=this.loadFromStorage();return e?this.parseState(e):null}},{key:"getState",value:function(){var e,t,n=this;return{open_nodes:(t=[],n.treeWidget.tree.iterate((function(e){return e.is_open&&e.id&&e.hasChildren()&&t.push(e.id),!0})),t),selected_node:(e=[],n.treeWidget.getSelectedNodes().forEach((function(t){null!=t.id&&e.push(t.id)})),e)}}},{key:"setInitialState",value:function(e){if(e){var t=!1;return e.open_nodes&&(t=this.openInitialNodes(e.open_nodes)),e.selected_node&&(this.resetSelection(),this.selectInitialNodes(e.selected_node)),t}return!1}},{key:"setInitialStateOnDemand",value:function(e,t){e?this.doSetInitialStateOnDemand(e.open_nodes,e.selected_node,t):t()}},{key:"getNodeIdToBeSelected",value:function(){var e=this.getStateFromStorage();return e&&e.selected_node&&e.selected_node[0]||null}},{key:"parseState",value:function(e){var t,n=JSON.parse(e);return n&&n.selected_node&&("number"==typeof(t=n.selected_node)&&t%1==0)&&(n.selected_node=[n.selected_node]),n}},{key:"loadFromStorage",value:function(){return this.treeWidget.options.onGetStateFromStorage?this.treeWidget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getKeyName()):null}},{key:"openInitialNodes",value:function(e){var t,n=!1,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(o.load_on_demand?n=!0:o.is_open=!0)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"selectInitialNodes",value:function(e){var t,n=0,i=m(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=this.treeWidget.getNodeById(r);o&&(n+=1,this.treeWidget.selectNodeHandler.addToSelection(o))}}catch(e){i.e(e)}finally{i.f()}return 0!==n}},{key:"resetSelection",value:function(){var e=this.treeWidget.selectNodeHandler;e.getSelectedNodes().forEach((function(t){e.removeFromSelection(t)}))}},{key:"doSetInitialStateOnDemand",value:function(e,t,n){var i=this,r=0,o=e,s=function(){var e,s=[],l=m(o);try{for(l.s();!(e=l.n()).done;){var d=e.value,u=i.treeWidget.getNodeById(d);u?u.is_loading||(u.load_on_demand?a(u):i.treeWidget._openNode(u,!1,null)):s.push(d)}}catch(e){l.e(e)}finally{l.f()}o=s,i.selectInitialNodes(t)&&i.treeWidget._refreshElements(null),0===r&&n()},a=function(e){r+=1,i.treeWidget._openNode(e,!1,(function(){r-=1,s()}))};s()}},{key:"getKeyName",value:function(){return"string"==typeof this.treeWidget.options.saveState?this.treeWidget.options.saveState:"tree"}},{key:"supportsLocalStorage",value:function(){return null==this._supportsLocalStorage&&(this._supportsLocalStorage=function(){if(null==localStorage)return!1;try{var e="_storage_test";sessionStorage.setItem(e,"value"),sessionStorage.removeItem(e)}catch(e){return!1}return!0}()),this._supportsLocalStorage}}]),e}(),H=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"previousTop",void 0),a(this,"isInitialized",void 0),a(this,"$scrollParent",void 0),a(this,"scrollParentTop",void 0),this.treeWidget=t,this.previousTop=-1,this.isInitialized=!1}return s(e,[{key:"checkScrolling",value:function(){this.ensureInit(),this.checkVerticalScrolling(),this.checkHorizontalScrolling()}},{key:"scrollToY",value:function(e){if(this.ensureInit(),this.$scrollParent&&this.$scrollParent[0])this.$scrollParent[0].scrollTop=e;else{var t=this.treeWidget.$el.offset(),n=t?t.top:0;jQuery(document).scrollTop(e+n)}}},{key:"isScrolledIntoView",value:function(e){var t,n,i,r;this.ensureInit();var o=e.height()||0;if(this.$scrollParent){r=0,n=this.$scrollParent.height()||0;var s=e.offset();t=(i=(s?s.top:0)-this.scrollParentTop)+o}else{n=(r=jQuery(window).scrollTop()||0)+(jQuery(window).height()||0);var a=e.offset();t=(i=a?a.top:0)+o}return t<=n&&i>=r}},{key:"getScrollLeft",value:function(){return this.$scrollParent&&this.$scrollParent.scrollLeft()||0}},{key:"initScrollParent",value:function(){var e,t=this,n=function(){t.scrollParentTop=0,t.$scrollParent=null};"fixed"===this.treeWidget.$el.css("position")&&n();var i=function(){var e=["overflow","overflow-y"],n=function(t){for(var n=0,i=e;n0,s=n.left+i.clientWidth,a=n.left,l=e.pageX>s-20,d=e.pageX0,o=e.pageX>i-20,s=e.pageX-n<20;o?t.scrollLeft(n+20):s&&r&&t.scrollLeft(Math.max(n-20,0))}}}]),e}(),M=function(){function e(t){r(this,e),a(this,"treeWidget",void 0),a(this,"selectedNodes",void 0),a(this,"selectedSingleNode",void 0),this.treeWidget=t,this.selectedNodes=new Set,this.clear()}return s(e,[{key:"getSelectedNode",value:function(){var e=this.getSelectedNodes();return e.length&&e[0]||!1}},{key:"getSelectedNodes",value:function(){var e=this;if(this.selectedSingleNode)return[this.selectedSingleNode];var t=[];return this.selectedNodes.forEach((function(n){var i=e.treeWidget.getNodeById(n);i&&t.push(i)})),t}},{key:"getSelectedNodesUnder",value:function(e){if(this.selectedSingleNode)return e.isParentOf(this.selectedSingleNode)?[this.selectedSingleNode]:[];var t=[];for(var n in this.selectedNodes)if(Object.prototype.hasOwnProperty.call(this.selectedNodes,n)){var i=this.treeWidget.getNodeById(n);i&&e.isParentOf(i)&&t.push(i)}return t}},{key:"isNodeSelected",value:function(e){return null!=e.id?this.selectedNodes.has(e.id):!!this.selectedSingleNode&&this.selectedSingleNode.element===e.element}},{key:"clear",value:function(){this.selectedNodes.clear(),this.selectedSingleNode=null}},{key:"removeFromSelection",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null==e.id?this.selectedSingleNode&&e.element===this.selectedSingleNode.element&&(this.selectedSingleNode=null):(this.selectedNodes.delete(e.id),n&&e.iterate((function(){return null!=e.id&&t.selectedNodes.delete(e.id),!0})))}},{key:"addToSelection",value:function(e){null!=e.id?this.selectedNodes.add(e.id):this.selectedSingleNode=e}},{key:"isFocusOnTree",value:function(){var e=document.activeElement;return Boolean(e&&"SPAN"===e.tagName&&this.treeWidget._containsElement(e))}}]),e}(),x=function(){function e(t,n){r(this,e),a(this,"node",void 0),a(this,"$element",void 0),a(this,"treeWidget",void 0),this.init(t,n)}return s(e,[{key:"init",value:function(e,t){if(this.node=e,this.treeWidget=t,!e.element){var n=this.treeWidget.element.get(0);n&&(e.element=n)}e.element&&(this.$element=jQuery(e.element))}},{key:"addDropHint",value:function(e){return this.mustShowBorderDropHint(e)?new q(this.$element,this.treeWidget._getScrollLeft()):new B(this.node,this.$element,e)}},{key:"select",value:function(e){var t;this.getLi().addClass("jqtree-selected");var n=this.getSpan();n.attr("tabindex",null!==(t=this.treeWidget.options.tabIndex)&&void 0!==t?t:null),n.attr("aria-selected","true"),e&&n.trigger("focus")}},{key:"deselect",value:function(){this.getLi().removeClass("jqtree-selected");var e=this.getSpan();e.removeAttr("tabindex"),e.attr("aria-selected","false"),e.trigger("blur")}},{key:"getUl",value:function(){return this.$element.children("ul:first")}},{key:"getSpan",value:function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")}},{key:"getLi",value:function(){return this.$element}},{key:"mustShowBorderDropHint",value:function(e){return e===k.Inside}}]),e}(),$=function(e){l(n,e);var t=c(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"open",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fast";if(!this.node.is_open){this.node.is_open=!0;var r=this.getButton();r.removeClass("jqtree-closed"),r.html("");var o=r.get(0);if(o){var s=this.treeWidget.renderer.openedIconElement;if(s){var a=s.cloneNode(!0);o.appendChild(a)}}var l=function(){t.getLi().removeClass("jqtree-closed"),t.getSpan().attr("aria-expanded","true"),e&&e(t.node),t.treeWidget._triggerEvent("tree.open",{node:t.node})};n?this.getUl().slideDown(i,l):(this.getUl().show(),l())}}},{key:"close",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fast";if(this.node.is_open){this.node.is_open=!1;var i=this.getButton();i.addClass("jqtree-closed"),i.html("");var r=i.get(0);if(r){var o=this.treeWidget.renderer.closedIconElement;if(o){var s=o.cloneNode(!0);r.appendChild(s)}}var a=function(){e.getLi().addClass("jqtree-closed"),e.getSpan().attr("aria-expanded","false"),e.treeWidget._triggerEvent("tree.close",{node:e.node})};t?this.getUl().slideUp(n,a):(this.getUl().hide(),a())}}},{key:"mustShowBorderDropHint",value:function(e){return!this.node.is_open&&e===k.Inside}},{key:"getButton",value:function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")}}]),n}(x),q=function(){function e(t,n){r(this,e),a(this,"$hint",void 0);var i=t.children(".jqtree-element"),o=t.width()||0,s=Math.max(o+n-4,0),l=i.outerHeight()||0,d=Math.max(l-4,0);this.$hint=jQuery(''),i.append(this.$hint),this.$hint.css({width:s,height:d})}return s(e,[{key:"remove",value:function(){this.$hint.remove()}}]),e}(),B=function(){function e(t,n,i){r(this,e),a(this,"$element",void 0),a(this,"node",void 0),a(this,"$ghost",void 0),this.$element=n,this.node=t,this.$ghost=jQuery('
  • \n
  • '),i===k.After?this.moveAfter():i===k.Before?this.moveBefore():i===k.Inside&&(t.isFolder()&&t.is_open?this.moveInsideOpenFolder():this.moveInside())}return s(e,[{key:"remove",value:function(){this.$ghost.remove()}},{key:"moveAfter",value:function(){this.$element.after(this.$ghost)}},{key:"moveBefore",value:function(){this.$element.before(this.$ghost)}},{key:"moveInsideOpenFolder",value:function(){var e,t=null===(e=this.node.children[0])||void 0===e?void 0:e.element;t&&jQuery(t).before(this.$ghost)}},{key:"moveInside",value:function(){this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")}}]),e}(),Q="Node parameter is empty",U="Parameter is empty: ",R=function(e){l(o,e);var t=c(o);function o(){var e;r(this,o);for(var n=arguments.length,i=new Array(n),s=0;s1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return e.is_open?this.closeNode(e,n):this.openNode(e,n),this.element}},{key:"getTree",value:function(){return this.tree}},{key:"selectNode",value:function(e,t){return this.doSelectNode(e,t),this.element}},{key:"getSelectedNode",value:function(){return this.selectNodeHandler.getSelectedNode()}},{key:"toJson",value:function(){return JSON.stringify(this.tree.getData())}},{key:"loadData",value:function(e,t){return this.doLoadData(e,t),this.element}},{key:"loadDataFromUrl",value:function(e,t,n){return"string"==typeof e?this.doLoadDataFromUrl(e,t,null!=n?n:null):this.doLoadDataFromUrl(null,e,t),this.element}},{key:"reload",value:function(e){return this.doLoadDataFromUrl(null,null,e),this.element}},{key:"refresh",value:function(){return this._refreshElements(null),this.element}},{key:"getNodeById",value:function(e){return this.tree.getNodeById(e)}},{key:"getNodeByName",value:function(e){return this.tree.getNodeByName(e)}},{key:"getNodeByNameMustExist",value:function(e){return this.tree.getNodeByNameMustExist(e)}},{key:"getNodesByProperty",value:function(e,t){return this.tree.getNodesByProperty(e,t)}},{key:"getNodeByHtmlElement",value:function(e){return this.getNode(jQuery(e))}},{key:"getNodeByCallback",value:function(e){return this.tree.getNodeByCallback(e)}},{key:"openNode",value:function(e,t,n){var i=this;if(!e)throw Error(Q);var r=function(){var e,r,o;("function"==typeof t?(e=t,r=null):(r=t,e=n),null==r)&&(r=null!==(o=i.options.slide)&&void 0!==o&&o);return[r,e]}(),o=f(r,2),s=o[0],a=o[1];return this._openNode(e,s,a),this.element}},{key:"closeNode",value:function(e,t){if(!e)throw Error(Q);var n=null!=t?t:this.options.slide;return(e.isFolder()||e.isEmptyFolder)&&(new $(e,this).close(n,this.options.animationSpeed),this.saveState()),this.element}},{key:"isDragging",value:function(){return this.dndHandler.isDragging}},{key:"refreshHitAreas",value:function(){return this.dndHandler.refresh(),this.element}},{key:"addNodeAfter",value:function(e,t){var n=t.addAfter(e);return n&&this._refreshElements(t.parent),n}},{key:"addNodeBefore",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addBefore(e);return n&&this._refreshElements(t.parent),n}},{key:"addParentNode",value:function(e,t){if(!t)throw Error(U+"existingNode");var n=t.addParent(e);return n&&this._refreshElements(n.parent),n}},{key:"removeNode",value:function(e){if(!e)throw Error(Q);if(!e.parent)throw Error("Node has no parent");this.selectNodeHandler.removeFromSelection(e,!0);var t=e.parent;return e.remove(),this._refreshElements(t),this.element}},{key:"appendNode",value:function(e,t){var n=t||this.tree,i=n.append(e);return this._refreshElements(n),i}},{key:"prependNode",value:function(e,t){var n=null!=t?t:this.tree,i=n.prepend(e);return this._refreshElements(n),i}},{key:"updateNode",value:function(e,t){if(!e)throw Error(Q);var n="object"===i(t)&&t.id&&t.id!==e.id;return n&&this.tree.removeNodeFromIndex(e),e.setData(t),n&&this.tree.addNodeToIndex(e),"object"===i(t)&&t.children&&t.children instanceof Array&&(e.removeChildren(),t.children.length&&e.loadFromData(t.children)),this._refreshElements(e),this.element}},{key:"isSelectedNodeInSubtree",value:function(e){var t=this.getSelectedNode();return!!t&&(e===t||e.isParentOf(t))}},{key:"moveNode",value:function(e,t,n){if(!e)throw Error(Q);if(!t)throw Error(U+"targetNode");var i=N[n];return void 0!==i&&(this.tree.moveNode(e,t,i),this._refreshElements(null)),this.element}},{key:"getStateFromStorage",value:function(){return this.saveStateHandler.getStateFromStorage()}},{key:"addToSelection",value:function(e,t){if(!e)throw Error(Q);return this.selectNodeHandler.addToSelection(e),this._getNodeElementForNode(e).select(void 0===t||t),this.saveState(),this.element}},{key:"getSelectedNodes",value:function(){return this.selectNodeHandler.getSelectedNodes()}},{key:"isNodeSelected",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.isNodeSelected(e)}},{key:"removeFromSelection",value:function(e){if(!e)throw Error(Q);return this.selectNodeHandler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this.saveState(),this.element}},{key:"scrollToNode",value:function(e){if(!e)throw Error(Q);var t=jQuery(e.element).offset(),n=t?t.top:0,i=this.$el.offset(),r=n-(i?i.top:0);return this.scrollHandler.scrollToY(r),this.element}},{key:"getState",value:function(){return this.saveStateHandler.getState()}},{key:"setState",value:function(e){return this.saveStateHandler.setInitialState(e),this._refreshElements(null),this.element}},{key:"setOption",value:function(e,t){return this.options[e]=t,this.element}},{key:"moveDown",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveDown(e),this.element}},{key:"moveUp",value:function(){var e=this.getSelectedNode();return e&&this.keyHandler.moveUp(e),this.element}},{key:"getVersion",value:function(){return"1.7.2"}},{key:"_triggerEvent",value:function(e,t){var n=jQuery.Event(e,t);return this.element.trigger(n),n}},{key:"_openNode",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=function(e,n,i){new $(e,t).open(i,n,t.options.animationSpeed)};if(e.isFolder()||e.isEmptyFolder)if(e.load_on_demand)this.loadFolderOnDemand(e,n,i);else{for(var o=e.parent;o;)o.parent&&r(o,!1,null),o=o.parent;r(e,n,i),this.saveState()}}},{key:"_refreshElements",value:function(e){var t=this.selectNodeHandler.isFocusOnTree(),n=!!e&&this.isSelectedNodeInSubtree(e);this.renderer.render(e),n&&this.selectCurrentNode(t),this._triggerEvent("tree.refresh")}},{key:"_getNodeElementForNode",value:function(e){return e.isFolder()?new $(e,this):new x(e,this)}},{key:"_getNodeElement",value:function(e){var t=this.getNode(e);return t?this._getNodeElementForNode(t):null}},{key:"_containsElement",value:function(e){var t=this.getNode(jQuery(e));return null!=t&&t.tree===this.tree}},{key:"_getScrollLeft",value:function(){return this.scrollHandler.getScrollLeft()}},{key:"init",value:function(){v(d(o.prototype),"init",this).call(this),this.element=this.$el,this.isInitialized=!1,this.options.rtl=this.getRtlOption(),null==this.options.closedIcon&&(this.options.closedIcon=this.getDefaultClosedIcon()),this.renderer=new C(this),this.dataLoader=new w(this),this.saveStateHandler=new O(this),this.selectNodeHandler=new M(this),this.dndHandler=new D(this),this.scrollHandler=new H(this),this.keyHandler=new F(this),this.initData(),this.element.on("click",this.handleClick),this.element.on("dblclick",this.handleDblclick),this.options.useContextMenu&&this.element.on("contextmenu",this.handleContextmenu)}},{key:"deinit",value:function(){this.element.empty(),this.element.off(),this.keyHandler.deinit(),this.tree=new _({},!0),v(d(o.prototype),"deinit",this).call(this)}},{key:"mouseCapture",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseCapture(e)}},{key:"mouseStart",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStart(e)}},{key:"mouseDrag",value:function(e){if(this.options.dragAndDrop){var t=this.dndHandler.mouseDrag(e);return this.scrollHandler.checkScrolling(),t}return!1}},{key:"mouseStop",value:function(e){return!!this.options.dragAndDrop&&this.dndHandler.mouseStop(e)}},{key:"getMouseDelay",value:function(){var e;return null!==(e=this.options.startDndDelay)&&void 0!==e?e:0}},{key:"initData",value:function(){this.options.data?this.doLoadData(this.options.data,null):this.getDataUrlInfo(null)?this.doLoadDataFromUrl(null,null,null):this.doLoadData([],null)}},{key:"getDataUrlInfo",value:function(e){var t,n=this,r=this.options.dataUrl||this.element.data("url"),o=function(t){if(null!=e&&e.id){var i={node:e.id};t.data=i}else{var r=n.getNodeIdToBeSelected();if(r){var o={selected_node:r};t.data=o}}};return"function"==typeof r?r(e):"string"==typeof r?(o(t={url:r}),t):r&&"object"===i(r)?(o(r),r):null}},{key:"getNodeIdToBeSelected",value:function(){return this.options.saveState?this.saveStateHandler.getNodeIdToBeSelected():null}},{key:"initTree",value:function(e){var t=this,n=function(){t.isInitialized||(t.isInitialized=!0,t._triggerEvent("tree.init"))};if(this.options.nodeClass){this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.selectNodeHandler.clear(),this.tree.loadFromData(e);var i=this.setInitialState();this._refreshElements(null),i?this.setInitialStateOnDemand(n):n()}}},{key:"setInitialState",value:function(){var e=this,t=f(function(){if(e.options.saveState){var t=e.saveStateHandler.getStateFromStorage();return t?[!0,e.saveStateHandler.setInitialState(t)]:[!1,!1]}return[!1,!1]}(),2),n=t[0],i=t[1];return n||(i=function(){if(!1===e.options.autoOpen)return!1;var t=e.getAutoOpenMaxLevel(),n=!1;return e.tree.iterate((function(e,i){return e.load_on_demand?(n=!0,!1):!!e.hasChildren()&&(e.is_open=!0,i!==t)})),n}()),i}},{key:"setInitialStateOnDemand",value:function(e){var t,n,i,r,o=this;(function(){if(o.options.saveState){var t=o.saveStateHandler.getStateFromStorage();return!!t&&(o.saveStateHandler.setInitialStateOnDemand(t,e),!0)}return!1})()||(t=o.getAutoOpenMaxLevel(),n=0,i=function(e){n+=1,o._openNode(e,!1,(function(){n-=1,r()}))},(r=function(){o.tree.iterate((function(e,n){return e.load_on_demand?(e.is_loading||i(e),!1):(o._openNode(e,!1,null),n!==t)})),0===n&&e()})())}},{key:"getAutoOpenMaxLevel",value:function(){return!0===this.options.autoOpen?-1:"number"==typeof this.options.autoOpen?this.options.autoOpen:"string"==typeof this.options.autoOpen?parseInt(this.options.autoOpen,10):0}},{key:"getClickTarget",value:function(e){var t=jQuery(e),n=t.closest(".jqtree-toggler");if(n.length){var i=this.getNode(n);if(i)return{type:"button",node:i}}else{var r=t.closest(".jqtree-element");if(r.length){var o=this.getNode(r);if(o)return{type:"label",node:o}}}return null}},{key:"getNode",value:function(e){var t=e.closest("li.jqtree_common");return 0===t.length?null:t.data("node")}},{key:"saveState",value:function(){this.options.saveState&&this.saveStateHandler.saveState()}},{key:"selectCurrentNode",value:function(e){var t=this.getSelectedNode();if(t){var n=this._getNodeElementForNode(t);n&&n.select(e)}}},{key:"deselectCurrentNode",value:function(){var e=this.getSelectedNode();e&&this.removeFromSelection(e)}},{key:"getDefaultClosedIcon",value:function(){return this.options.rtl?"◀":"►"}},{key:"getRtlOption",value:function(){if(null!=this.options.rtl)return this.options.rtl;var e=this.element.data("rtl");return null!==e&&!1!==e&&void 0!==e}},{key:"doSelectNode",value:function(e,t){var i=this,r=function(){i.options.saveState&&i.saveStateHandler.saveState()};if(!e)return this.deselectCurrentNode(),void r();var o=n(n({},{mustSetFocus:!0,mustToggle:!0}),t||{});if(i.options.onCanSelectNode?!0===i.options.selectable&&i.options.onCanSelectNode(e):!0===i.options.selectable){if(this.selectNodeHandler.isNodeSelected(e))o.mustToggle&&(this.deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e}));else{var s=this.getSelectedNode()||null;this.deselectCurrentNode(),this.addToSelection(e,o.mustSetFocus),this._triggerEvent("tree.select",{node:e,deselected_node:s}),(a=e.parent)&&a.parent&&!a.is_open&&i.openNode(a,!1)}var a;r()}}},{key:"doLoadData",value:function(e,t){e&&(t?(this.deselectNodes(t),this.loadSubtree(e,t)):this.initTree(e),this.isDragging()&&this.dndHandler.refresh()),this._triggerEvent("tree.load_data",{tree_data:e,parent_node:t})}},{key:"deselectNodes",value:function(e){var t,n=m(this.selectNodeHandler.getSelectedNodesUnder(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.selectNodeHandler.removeFromSelection(i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"loadSubtree",value:function(e,t){t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,this._refreshElements(t)}},{key:"doLoadDataFromUrl",value:function(e,t,n){var i=e||this.getDataUrlInfo(t);this.dataLoader.loadFromUrl(i,t,n)}},{key:"loadFolderOnDemand",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;e.is_loading=!0,this.doLoadDataFromUrl(null,e,(function(){t._openNode(e,n,i)}))}}]),o}(L);return a(R,"defaults",{animationSpeed:"fast",autoEscape:!0,autoOpen:!1,buttonLeft:!0,closedIcon:void 0,data:void 0,dataFilter:void 0,dataUrl:void 0,dragAndDrop:!1,keyboardSupport:!0,nodeClass:_,onCanMove:void 0,onCanMoveTo:void 0,onCanSelectNode:void 0,onCreateLi:void 0,onDragMove:void 0,onDragStop:void 0,onGetStateFromStorage:void 0,onIsMoveHandle:void 0,onLoadFailed:void 0,onLoading:void 0,onSetStateFromStorage:void 0,openedIcon:"▼",openFolderDelay:500,rtl:void 0,saveState:!1,selectable:!0,showEmptyFolder:!1,slide:!0,startDndDelay:300,tabIndex:0,useContextMenu:!0}),T.register(R,"tree"),e.JqTreeWidget=R,e}({}); //# sourceMappingURL=tree.jquery.js.map diff --git a/tree.jquery.js.map b/tree.jquery.js.map index 94a074a3..7615b1e7 100644 --- a/tree.jquery.js.map +++ b/tree.jquery.js.map @@ -1 +1 @@ -{"version":3,"file":"tree.jquery.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.1\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","this","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","removeChildren","_step","_iterator","_createForOfIteratorHelper","s","n","done","node","createNode","addChild","loadFromData","err","e","f","push","setParent","index","splice","doRemoveChild","indexOf","hasChildren","callback","_iterate","level","_step2","_iterator2","child","movedNode","targetNode","isParentOf","addChildAtPosition","getChildIndex","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByCallback","concat","result","iterate","nodeInfo","childIndex","newParent","_step3","originalParent","_iterator3","removeChild","nodeId","get","id","set","_this","_this$tree","removeNodeFromIndex","previousIndex","nextIndex","filter","nextSibling","getNextSibling","getNextNode","is_open","previousSibling","getPreviousSibling","getLastChild","getParent","lastChild","nodeData","_this2","addChildren","childrenData","_step4","_iterator4","initFromData","_this$tree2","addNodeToIndex","_this$tree3","_this$tree4","getNodeClass","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","move","area","findHoveredArea","canMoveToArea","isFolder","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","remove","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolderDelay","openFolderTimer","window","setTimeout","_openNode","slide","clearTimeout","previousParent","doMove","moveNode","empty","_refreshElements","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","nextNode","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","i","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","mustIterateInside","handleFirstNode","handleOpenFolder","handleClosedFolder","handleNode","childrenLength","forEach","_","nextChild","handleAfterOpenFolder","nodeName","offsetX","offsetY","$tree","text","html","css","append","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","getLevel","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","setTreeItemAriaAttributes","textContent","innerHTML","is_loading","createTextNode","DataLoader","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","submitRequest","loadData","parseData","jqXHR","onLoadFailed","isLoading","onLoading","urlInfoInput","handleSuccess","handleError","_ajaxSettings$method","ajaxSettings","_objectSpread","method","cache","dataType","success","error","url","toUpperCase","ajax","dataFilter","parsedData","JSON","parse","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","off","selectNode","getNextVisibleNode","getPreviousVisibleNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","init","fn","argument1","functionName","destroy","removeData","destroyWidget","_len","args","_key","widgetFunction","apply","callFunction","defaults","constructor","deinit","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","mouseCapture","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","mouseDrag","mouseStart","mouseStop","SaveStateHandler","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","jsonData","loadFromStorage","parseState","selectedNodeIds","openNodes","open_nodes","selected_node","getSelectedNodes","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","cbFinished","doSetInitialStateOnDemand","getStateFromStorage","onGetStateFromStorage","getItem","nodeIds","getNodeById","selectCount","addToSelection","removeFromSelection","nodeIdsParam","selectedNodes","loadingCount","newNodesIds","loadAndOpenNode","saveState","_supportsLocalStorage","sessionStorage","removeItem","testSupport","ScrollHandler","isInitialized","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","scrollParentTop","scrollLeft","_$scrollParent$","setDocumentAsScrollParent","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","getParentWithOverflow","tagName","initScrollParent","scrollParent","offsetHeight","refreshHitAreas","dndHandler","handleVerticalScrollingWithScrollParent","handleVerticalScrollingWithDocument","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","has","includeChildren","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","mustSetFocus","getLi","$span","getSpan","trigger","removeAttr","FolderElement","_NodeElement","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","getUl","slideDown","show","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","optionsParam","getData","doLoadData","param1","param2","param3","doLoadDataFromUrl","getNodeByName","getNodeByNameMustExist","getNodesByProperty","_parseParams","_this2$options$slide","parseParams","_parseParams2","_slicedToArray","close","newNodeInfo","existingNode","newNode","addAfter","addBefore","addParent","parentNodeParam","prepend","idIsChanged","subtree","positionIndex","saveStateHandler","select","deselect","nodeOffset","nodeTop","treeOffset","scrollToY","setInitialState","option","keyHandler","eventName","values","event","Event","doOpenNode","_node","_slide","_onFinished","open","loadFolderOnDemand","mustSelect","isSelectedNodeInSubtree","render","selectCurrentNode","getScrollLeft","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","checkScrolling","_this$options$startDn","startDndDelay","getDataUrlInfo","dataUrl","setUrlInfoData","selectedNodeId","getNodeIdToBeSelected","_this5","doInit","setInitialStateOnDemand","_this6","_restoreState2","restoreState","isRestored","autoOpen","maxLevel","getAutoOpenMaxLevel","autoOpenNodes","_this7","parseInt","$target","$li","dataRtl","_this8","deselectCurrentNode","selectOptions","mustToggle","onCanSelectNode","selectable","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","initTree","tree_data","parent_node","getSelectedNodesUnder","urlInfoParam","loadFromUrl","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;q1JAAA,ICIYA,WAAAA,GAAQ,OAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,MAAA,GAAA,QAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,KAAA,GAAA,OAARA,CAAQ,EAAA,CAAA,GAOdC,EAA0C,CAC5CC,OAAQF,EAASG,OACjBC,MAAOJ,EAASK,MAChBC,OAAQN,EAASO,OACjBC,KAAMR,EAASS,MAKNC,EAAkB,SAACC,GAC5B,IAAK,IAAMC,KAAQX,EACf,GAAIY,OAAOC,UAAUC,eAAeC,KAAKf,EAAeW,IAChDX,EAAcW,KAAUD,EACxB,OAAOC,EAKnB,MAAO,EACX,EAKMK,EAA2B,SAC7BC,GAAc,MAEE,WAAhBC,EAAOD,IACP,aAAcA,GACdA,EAAe,oBAAaE,KAAK,EAExBC,EAAI,WAgBb,SAAAA,IAAyE,IAA7DC,EAAkBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAAMG,EAAMH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAAUI,EAASJ,UAAAC,OAAA,QAAAC,IAAAF,UAAA,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,YAAa,EAExB3R,KAAK0K,iBAAiBqH,EAC1B,GAAC,CAAArR,IAAA,oBAAAC,MAED,SACIooB,EACAhX,EACAC,GAEA,IAAMF,EAAUiX,GAAgB/oB,KAAK2mB,eAAe5U,GAEpD/R,KAAKkmB,WAAW8C,YAAYlX,EAASC,EAAYC,EACrD,GAAC,CAAAtR,IAAA,qBAAAC,MAED,SACIQ,GAGI,IAAA8nB,EAAAjpB,KAFJoK,IAAK3K,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GACLuS,EAAmCvS,UAAAC,OAAAD,EAAAA,kBAAAE,EAEnCwB,EAAKwQ,YAAa,EAElB3R,KAAKgjB,kBAAkB,KAAM7hB,GAAM,WAC/B8nB,EAAK9e,UAAUhJ,EAAMiJ,EAAO4H,EAChC,GACJ,KAAC6P,CAAA,EA3nC6BtK,UA4nCjCxX,EA5nCY8hB,EACkC,WAAA,CACvC1B,eAAgB,OAChB7Y,YAAY,EACZigB,UAAU,EACVtW,YAAY,EAGZtC,gBAAYhP,EACZP,UAAMO,EACNiU,gBAAYjU,EACZinB,aAASjnB,EACTiQ,aAAa,EACbiF,iBAAiB,EACjBhV,UAAWN,EACXoH,eAAWhH,EACXuJ,iBAAavJ,EACbyoB,qBAAiBzoB,EACjB6Q,gBAAY7Q,EACZuI,gBAAYvI,EACZ8I,gBAAY9I,EACZob,2BAAuBpb,EACvB6G,oBAAgB7G,EAChBgT,kBAAchT,EACdkT,eAAWlT,EACXga,2BAAuBha,EACvB8O,WAAY,WACZ1E,gBAAiB,IAGjB4F,SAAKhQ,EACLgc,WAAW,EACX0M,YAAY,EACZhY,iBAAiB,EACjBjG,OAAO,EACPsc,cAAe,IACfnV,SAAU,EACV+U,gBAAgB,IAylCxBpQ,EAAaP,SAASkM,EAAc"} \ No newline at end of file +{"version":3,"file":"tree.jquery.js","sources":["src/version.ts","src/node.ts","src/dragAndDropHandler.ts","src/util.ts","src/elementsRenderer.ts","src/dataLoader.ts","src/keyHandler.ts","src/simple.widget.ts","src/mouse.widget.ts","src/saveStateHandler.ts","src/scrollHandler.ts","src/selectNodeHandler.ts","src/nodeElement.ts","src/tree.jquery.ts"],"sourcesContent":["const version = \"1.7.2\";\n\nexport default version;\n","interface NodeRecordWithChildren extends NodeRecord {\n children: NodeData[];\n}\n\nexport enum Position {\n Before = 1,\n After,\n Inside,\n None,\n}\n\nconst positionNames: Record = {\n before: Position.Before,\n after: Position.After,\n inside: Position.Inside,\n none: Position.None,\n};\n\ntype IterateCallback = (node: Node, level: number) => boolean;\n\nexport const getPositionName = (position: Position): string => {\n for (const name in positionNames) {\n if (Object.prototype.hasOwnProperty.call(positionNames, name)) {\n if (positionNames[name] === position) {\n return name;\n }\n }\n }\n\n return \"\";\n};\n\nexport const getPosition = (name: string): Position | undefined =>\n positionNames[name];\n\nconst isNodeRecordWithChildren = (\n data: NodeData\n): data is NodeRecordWithChildren =>\n typeof data === \"object\" &&\n \"children\" in data &&\n data[\"children\"] instanceof Array;\n\nexport class Node implements INode {\n public id?: NodeId;\n public name: string;\n public children: Node[];\n public parent: Node | null;\n public idMapping: Map;\n public tree?: Node;\n public nodeClass?: typeof Node;\n public load_on_demand: boolean;\n public is_open: boolean;\n public element: HTMLElement;\n public is_loading: boolean;\n public isEmptyFolder: boolean;\n\n [key: string]: unknown;\n\n constructor(o: NodeData | null = null, isRoot = false, nodeClass = Node) {\n this.name = \"\";\n this.isEmptyFolder = false;\n this.load_on_demand = false;\n\n this.setData(o);\n\n this.children = [];\n this.parent = null;\n\n if (isRoot) {\n this.idMapping = new Map();\n this.tree = this;\n this.nodeClass = nodeClass;\n }\n }\n\n /*\n Set the data of this node.\n\n setData(string): set the name of the node\n setdata(object): set attributes of the node\n\n Examples:\n setdata('node1')\n\n setData({ name: 'node1', id: 1});\n\n setData({ name: 'node2', id: 2, color: 'green'});\n\n * This is an internal function; it is not in the docs\n * Does not remove existing node values\n */\n public setData(o: NodeData | null): void {\n if (!o) {\n return;\n } else if (typeof o === \"string\") {\n this.name = o;\n } else if (typeof o === \"object\") {\n for (const key in o) {\n if (Object.prototype.hasOwnProperty.call(o, key)) {\n const value = o[key];\n\n if (key === \"label\" || key === \"name\") {\n // You can use the 'label' key instead of 'name'; this is a legacy feature\n if (typeof value === \"string\") {\n this.name = value;\n }\n } else if (key !== \"children\" && key !== \"parent\") {\n // You can't update the children or the parent using this function\n this[key] = value;\n }\n }\n }\n }\n }\n\n /*\n Create tree from data.\n\n Structure of data is:\n [\n {\n name: 'node1',\n children: [\n { name: 'child1' },\n { name: 'child2' }\n ]\n },\n {\n name: 'node2'\n }\n ]\n */\n public loadFromData(data: NodeData[]): Node {\n this.removeChildren();\n\n for (const o of data) {\n const node = this.createNode(o);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(o)) {\n if (o.children.length === 0) {\n node.isEmptyFolder = true;\n } else {\n node.loadFromData(o.children);\n }\n }\n }\n\n return this;\n }\n\n /*\n Add child.\n\n tree.addChild(\n new Node('child1')\n );\n */\n public addChild(node: Node): void {\n this.children.push(node);\n node.setParent(this);\n }\n\n /*\n Add child at position. Index starts at 0.\n\n tree.addChildAtPosition(\n new Node('abc'),\n 1\n );\n */\n public addChildAtPosition(node: Node, index: number): void {\n this.children.splice(index, 0, node);\n node.setParent(this);\n }\n\n /*\n Remove child. This also removes the children of the node.\n\n tree.removeChild(tree.children[0]);\n */\n public removeChild(node: Node): void {\n // remove children from the index\n node.removeChildren();\n\n this.doRemoveChild(node);\n }\n\n /*\n Get child index.\n\n var index = getChildIndex(node);\n */\n public getChildIndex(node: Node): number {\n return this.children.indexOf(node);\n }\n\n /*\n Does the tree have children?\n\n if (tree.hasChildren()) {\n //\n }\n */\n public hasChildren(): boolean {\n return this.children.length !== 0;\n }\n\n public isFolder(): boolean {\n return this.hasChildren() || this.load_on_demand;\n }\n\n /*\n Iterate over all the nodes in the tree.\n\n Calls callback with (node, level).\n\n The callback must return true to continue the iteration on current node.\n\n tree.iterate(\n function(node, level) {\n console.log(node.name);\n\n // stop iteration after level 2\n return (level <= 2);\n }\n );\n\n */\n public iterate(callback: IterateCallback): void {\n const _iterate = (node: Node, level: number): void => {\n if (node.children) {\n for (const child of node.children) {\n const result = callback(child, level);\n\n if (result && child.hasChildren()) {\n _iterate(child, level + 1);\n }\n }\n }\n };\n\n _iterate(this, 0);\n }\n\n /*\n Move node relative to another node.\n\n Argument position: Position.BEFORE, Position.AFTER or Position.Inside\n\n // move node1 after node2\n tree.moveNode(node1, node2, Position.AFTER);\n */\n public moveNode(\n movedNode: Node,\n targetNode: Node,\n position: Position\n ): boolean {\n if (!movedNode.parent || movedNode.isParentOf(targetNode)) {\n // - Node is parent of target node\n // - Or, parent is empty\n return false;\n } else {\n movedNode.parent.doRemoveChild(movedNode);\n\n switch (position) {\n case Position.After: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode) + 1\n );\n return true;\n }\n return false;\n }\n\n case Position.Before: {\n if (targetNode.parent) {\n targetNode.parent.addChildAtPosition(\n movedNode,\n targetNode.parent.getChildIndex(targetNode)\n );\n return true;\n }\n return false;\n }\n\n case Position.Inside: {\n // move inside as first child\n targetNode.addChildAtPosition(movedNode, 0);\n return true;\n }\n\n default:\n return false;\n }\n }\n }\n\n /*\n Get the tree as data.\n */\n public getData(includeParent = false): NodeRecord[] {\n const getDataFromNodes = (nodes: Node[]): Record[] => {\n return nodes.map((node) => {\n const tmpNode: Record = {};\n\n for (const k in node) {\n if (\n [\n \"parent\",\n \"children\",\n \"element\",\n \"idMapping\",\n \"load_on_demand\",\n \"nodeClass\",\n \"tree\",\n \"isEmptyFolder\",\n ].indexOf(k) === -1 &&\n Object.prototype.hasOwnProperty.call(node, k)\n ) {\n const v = node[k];\n tmpNode[k] = v;\n }\n }\n\n if (node.hasChildren()) {\n tmpNode[\"children\"] = getDataFromNodes(node.children);\n }\n\n return tmpNode;\n });\n };\n\n if (includeParent) {\n return getDataFromNodes([this]);\n } else {\n return getDataFromNodes(this.children);\n }\n }\n\n public getNodeByName(name: string): Node | null {\n return this.getNodeByCallback((node: Node) => node.name === name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n const node = this.getNodeByCallback((n: Node) => n.name === name);\n\n if (!node) {\n throw `Node with name ${name} not found`;\n }\n\n return node;\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n let result: Node | null = null;\n\n this.iterate((node: Node) => {\n if (result) {\n return false;\n } else if (callback(node)) {\n result = node;\n return false;\n } else {\n return true;\n }\n });\n\n return result;\n }\n\n public addAfter(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex + 1);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addBefore(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const node = this.createNode(nodeInfo);\n\n const childIndex = this.parent.getChildIndex(this);\n this.parent.addChildAtPosition(node, childIndex);\n\n if (\n isNodeRecordWithChildren(nodeInfo) &&\n nodeInfo.children.length\n ) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n }\n\n public addParent(nodeInfo: NodeData): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const newParent = this.createNode(nodeInfo);\n\n if (this.tree) {\n newParent.setParent(this.tree);\n }\n const originalParent = this.parent;\n\n for (const child of originalParent.children) {\n newParent.addChild(child);\n }\n\n originalParent.children = [];\n originalParent.addChild(newParent);\n return newParent;\n }\n }\n\n public remove(): void {\n if (this.parent) {\n this.parent.removeChild(this);\n this.parent = null;\n }\n }\n\n public append(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChild(node);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public prepend(nodeInfo: NodeData): Node {\n const node = this.createNode(nodeInfo);\n this.addChildAtPosition(node, 0);\n\n if (isNodeRecordWithChildren(nodeInfo) && nodeInfo.children.length) {\n node.loadFromData(nodeInfo.children);\n }\n\n return node;\n }\n\n public isParentOf(node: Node): boolean {\n let parent = node.parent;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n\n public getLevel(): number {\n let level = 0;\n let node: Node = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n while (node.parent) {\n level += 1;\n node = node.parent;\n }\n\n return level;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.idMapping.get(nodeId) || null;\n }\n\n public addNodeToIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.set(node.id, node);\n }\n }\n\n public removeNodeFromIndex(node: Node): void {\n if (node.id != null) {\n this.idMapping.delete(node.id);\n }\n }\n\n public removeChildren(): void {\n this.iterate((child: Node) => {\n this.tree?.removeNodeFromIndex(child);\n return true;\n });\n\n this.children = [];\n }\n\n public getPreviousSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousIndex = this.parent.getChildIndex(this) - 1;\n if (previousIndex >= 0) {\n return this.parent.children[previousIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNextSibling(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const nextIndex = this.parent.getChildIndex(this) + 1;\n if (nextIndex < this.parent.children.length) {\n return this.parent.children[nextIndex] || null;\n } else {\n return null;\n }\n }\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.filter((node: Node) => node[key] === value);\n }\n\n public filter(f: (node: Node) => boolean): Node[] {\n const result: Node[] = [];\n\n this.iterate((node: Node) => {\n if (f(node)) {\n result.push(node);\n }\n\n return true;\n });\n\n return result;\n }\n\n public getNextNode(includeChildren = true): Node | null {\n if (includeChildren && this.hasChildren()) {\n return this.children[0] || null;\n } else if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n\n if (nextSibling) {\n return nextSibling;\n } else {\n return this.parent.getNextNode(false);\n }\n }\n }\n\n public getNextVisibleNode(): Node | null {\n if (this.hasChildren() && this.is_open) {\n // First child\n return this.children[0] || null;\n } else {\n if (!this.parent) {\n return null;\n } else {\n const nextSibling = this.getNextSibling();\n if (nextSibling) {\n // Next sibling\n return nextSibling;\n } else {\n // Next node of parent\n return this.parent.getNextNode(false);\n }\n }\n }\n }\n\n public getPreviousNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (previousSibling.hasChildren()) {\n return previousSibling.getLastChild();\n } else {\n return previousSibling;\n }\n }\n }\n\n public getPreviousVisibleNode(): Node | null {\n if (!this.parent) {\n return null;\n } else {\n const previousSibling = this.getPreviousSibling();\n\n if (!previousSibling) {\n return this.getParent();\n } else if (\n !previousSibling.hasChildren() ||\n !previousSibling.is_open\n ) {\n // Previous sibling\n return previousSibling;\n } else {\n // Last child of previous sibling\n return previousSibling.getLastChild();\n }\n }\n }\n\n public getParent(): Node | null {\n // Return parent except if it is the root node\n if (!this.parent) {\n return null;\n } else if (!this.parent.parent) {\n // Root node -> null\n return null;\n } else {\n return this.parent;\n }\n }\n\n public getLastChild(): Node | null {\n if (!this.hasChildren()) {\n return null;\n } else {\n const lastChild = this.children[this.children.length - 1];\n\n if (!lastChild) {\n return null;\n }\n\n if (!(lastChild.hasChildren() && lastChild.is_open)) {\n return lastChild;\n } else {\n return lastChild?.getLastChild();\n }\n }\n }\n\n // Init Node from data without making it the root of the tree\n public initFromData(data: NodeData): void {\n const addNode = (nodeData: NodeData): void => {\n this.setData(nodeData);\n\n if (\n isNodeRecordWithChildren(nodeData) &&\n nodeData.children.length\n ) {\n addChildren(nodeData.children);\n }\n };\n\n const addChildren = (childrenData: NodeData[]): void => {\n for (const child of childrenData) {\n const node = this.createNode();\n node.initFromData(child);\n this.addChild(node);\n }\n };\n\n addNode(data);\n }\n\n private setParent(parent: Node): void {\n this.parent = parent;\n this.tree = parent.tree;\n this.tree?.addNodeToIndex(this);\n }\n\n private doRemoveChild(node: Node): void {\n this.children.splice(this.getChildIndex(node), 1);\n this.tree?.removeNodeFromIndex(node);\n }\n\n private getNodeClass(): typeof Node {\n return this.nodeClass || this?.tree?.nodeClass || Node;\n }\n\n private createNode(nodeData?: NodeData): Node {\n const nodeClass = this.getNodeClass();\n return new nodeClass(nodeData);\n }\n}\n","import { getPositionName, Node, Position } from \"./node\";\nimport { DropHint, HitArea, PositionInfo } from \"./types\";\nimport { NodeElement } from \"./nodeElement\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ninterface Dimensions {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport class DragAndDropHandler {\n public hitAreas: HitArea[];\n public isDragging: boolean;\n public currentItem: NodeElement | null;\n public hoveredArea: HitArea | null;\n public positionInfo: PositionInfo | null;\n\n private treeWidget: JqTreeWidget;\n private dragElement: DragElement | null;\n private previousGhost: DropHint | null;\n private openFolderTimer: number | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.hoveredArea = null;\n this.hitAreas = [];\n this.isDragging = false;\n this.currentItem = null;\n this.positionInfo = null;\n }\n\n public mouseCapture(positionInfo: PositionInfo): boolean | null {\n const $element = jQuery(positionInfo.target);\n\n if (!this.mustCaptureElement($element)) {\n return null;\n }\n\n if (\n this.treeWidget.options.onIsMoveHandle &&\n !this.treeWidget.options.onIsMoveHandle($element)\n ) {\n return null;\n }\n\n let nodeElement = this.treeWidget._getNodeElement($element);\n\n if (nodeElement && this.treeWidget.options.onCanMove) {\n if (!this.treeWidget.options.onCanMove(nodeElement.node)) {\n nodeElement = null;\n }\n }\n\n this.currentItem = nodeElement;\n return this.currentItem != null;\n }\n\n public mouseStart(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.refresh();\n\n const offset = jQuery(positionInfo.target).offset();\n const left = offset ? offset.left : 0;\n const top = offset ? offset.top : 0;\n\n const node = this.currentItem.node;\n\n this.dragElement = new DragElement(\n node.name,\n positionInfo.pageX - left,\n positionInfo.pageY - top,\n this.treeWidget.element,\n this.treeWidget.options.autoEscape ?? true\n );\n\n this.isDragging = true;\n this.positionInfo = positionInfo;\n this.currentItem.$element.addClass(\"jqtree-moving\");\n return true;\n }\n\n public mouseDrag(positionInfo: PositionInfo): boolean {\n if (\n !this.currentItem ||\n !this.dragElement ||\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return false;\n }\n\n this.dragElement.move(positionInfo.pageX, positionInfo.pageY);\n this.positionInfo = positionInfo;\n\n const area = this.findHoveredArea(\n positionInfo.pageX,\n positionInfo.pageY\n );\n\n if (area && this.canMoveToArea(area)) {\n if (!area.node.isFolder()) {\n this.stopOpenFolderTimer();\n }\n\n if (this.hoveredArea !== area) {\n this.hoveredArea = area;\n\n // If this is a closed folder, start timer to open it\n if (this.mustOpenFolderTimer(area)) {\n this.startOpenFolderTimer(area.node);\n } else {\n this.stopOpenFolderTimer();\n }\n\n this.updateDropHint();\n }\n } else {\n this.removeDropHint();\n this.stopOpenFolderTimer();\n this.hoveredArea = area;\n }\n\n if (!area) {\n if (this.treeWidget.options.onDragMove) {\n this.treeWidget.options.onDragMove(\n this.currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return true;\n }\n\n public mouseStop(positionInfo: PositionInfo): boolean {\n this.moveItem(positionInfo);\n this.clear();\n this.removeHover();\n this.removeDropHint();\n this.removeHitAreas();\n\n const currentItem = this.currentItem;\n\n if (this.currentItem) {\n this.currentItem.$element.removeClass(\"jqtree-moving\");\n this.currentItem = null;\n }\n\n this.isDragging = false;\n this.positionInfo = null;\n\n if (!this.hoveredArea && currentItem) {\n if (this.treeWidget.options.onDragStop) {\n this.treeWidget.options.onDragStop(\n currentItem.node,\n positionInfo.originalEvent\n );\n }\n }\n\n return false;\n }\n\n public refresh(): void {\n this.removeHitAreas();\n\n if (this.currentItem) {\n this.generateHitAreas();\n\n this.currentItem = this.treeWidget._getNodeElementForNode(\n this.currentItem.node\n );\n\n if (this.isDragging) {\n this.currentItem.$element.addClass(\"jqtree-moving\");\n }\n }\n }\n\n private generateHitAreas(): void {\n if (!this.currentItem) {\n this.hitAreas = [];\n } else {\n const hitAreasGenerator = new HitAreasGenerator(\n this.treeWidget.tree,\n this.currentItem.node,\n this.getTreeDimensions().bottom\n );\n this.hitAreas = hitAreasGenerator.generate();\n }\n }\n\n private mustCaptureElement($element: JQuery): boolean {\n return !$element.is(\"input,select,textarea\");\n }\n\n private canMoveToArea(area: HitArea): boolean {\n if (!this.treeWidget.options.onCanMoveTo) {\n return true;\n }\n\n if (!this.currentItem) {\n return false;\n }\n\n const positionName = getPositionName(area.position);\n\n return this.treeWidget.options.onCanMoveTo(\n this.currentItem.node,\n area.node,\n positionName\n );\n }\n\n private removeHitAreas(): void {\n this.hitAreas = [];\n }\n\n private clear(): void {\n if (this.dragElement) {\n this.dragElement.remove();\n this.dragElement = null;\n }\n }\n\n private removeDropHint(): void {\n if (this.previousGhost) {\n this.previousGhost.remove();\n }\n }\n\n private removeHover(): void {\n this.hoveredArea = null;\n }\n\n private findHoveredArea(x: number, y: number): HitArea | null {\n const dimensions = this.getTreeDimensions();\n\n if (\n x < dimensions.left ||\n y < dimensions.top ||\n x > dimensions.right ||\n y > dimensions.bottom\n ) {\n return null;\n }\n\n let low = 0;\n let high = this.hitAreas.length;\n while (low < high) {\n const mid = (low + high) >> 1;\n const area = this.hitAreas[mid];\n\n if (!area) {\n return null;\n }\n\n if (y < area.top) {\n high = mid;\n } else if (y > area.bottom) {\n low = mid + 1;\n } else {\n return area;\n }\n }\n\n return null;\n }\n\n private mustOpenFolderTimer(area: HitArea): boolean {\n const node = area.node;\n\n return (\n node.isFolder() &&\n !node.is_open &&\n area.position === Position.Inside\n );\n }\n\n private updateDropHint(): void {\n if (!this.hoveredArea) {\n return;\n }\n\n // remove previous drop hint\n this.removeDropHint();\n\n // add new drop hint\n const nodeElement = this.treeWidget._getNodeElementForNode(\n this.hoveredArea.node\n );\n this.previousGhost = nodeElement.addDropHint(this.hoveredArea.position);\n }\n\n private startOpenFolderTimer(folder: Node): void {\n const openFolder = (): void => {\n this.treeWidget._openNode(\n folder,\n this.treeWidget.options.slide,\n () => {\n this.refresh();\n this.updateDropHint();\n }\n );\n };\n\n this.stopOpenFolderTimer();\n\n const openFolderDelay = this.treeWidget.options.openFolderDelay;\n\n if (openFolderDelay !== false) {\n this.openFolderTimer = window.setTimeout(\n openFolder,\n openFolderDelay\n );\n }\n }\n\n private stopOpenFolderTimer(): void {\n if (this.openFolderTimer) {\n clearTimeout(this.openFolderTimer);\n this.openFolderTimer = null;\n }\n }\n\n private moveItem(positionInfo: PositionInfo): void {\n if (\n this.currentItem &&\n this.hoveredArea &&\n this.hoveredArea.position !== Position.None &&\n this.canMoveToArea(this.hoveredArea)\n ) {\n const movedNode = this.currentItem.node;\n const targetNode = this.hoveredArea.node;\n const position = this.hoveredArea.position;\n const previousParent = movedNode.parent;\n\n if (position === Position.Inside) {\n this.hoveredArea.node.is_open = true;\n }\n\n const doMove = (): void => {\n this.treeWidget.tree.moveNode(movedNode, targetNode, position);\n this.treeWidget.element.empty();\n this.treeWidget._refreshElements(null);\n };\n\n const event = this.treeWidget._triggerEvent(\"tree.move\", {\n move_info: {\n moved_node: movedNode,\n target_node: targetNode,\n position: getPositionName(position),\n previous_parent: previousParent,\n do_move: doMove,\n original_event: positionInfo.originalEvent,\n },\n });\n\n if (!event.isDefaultPrevented()) {\n doMove();\n }\n }\n }\n\n private getTreeDimensions(): Dimensions {\n // Return the dimensions of the tree. Add a margin to the bottom to allow\n // to drag-and-drop after the last element.\n const offset = this.treeWidget.element.offset();\n\n if (!offset) {\n return { left: 0, top: 0, right: 0, bottom: 0 };\n } else {\n const el = this.treeWidget.element;\n const width = el.width() || 0;\n const height = el.height() || 0;\n const left = offset.left + this.treeWidget._getScrollLeft();\n\n return {\n left,\n top: offset.top,\n right: left + width,\n bottom: offset.top + height + 16,\n };\n }\n }\n}\n\nabstract class VisibleNodeIterator {\n private tree: Node;\n\n constructor(tree: Node) {\n this.tree = tree;\n }\n\n protected iterate(): void {\n let isFirstNode = true;\n\n const _iterateNode = (node: Node, nextNode: Node | null): void => {\n let mustIterateInside =\n (node.is_open || !node.element) && node.hasChildren();\n\n let $element: JQuery | null = null;\n\n if (node.element) {\n $element = jQuery(node.element);\n\n if (!$element.is(\":visible\")) {\n return;\n }\n\n if (isFirstNode) {\n this.handleFirstNode(node);\n isFirstNode = false;\n }\n\n if (!node.hasChildren()) {\n this.handleNode(node, nextNode, $element);\n } else if (node.is_open) {\n if (!this.handleOpenFolder(node, $element)) {\n mustIterateInside = false;\n }\n } else {\n this.handleClosedFolder(node, nextNode, $element);\n }\n }\n\n if (mustIterateInside) {\n const childrenLength = node.children.length;\n node.children.forEach((_, i) => {\n const child = node.children[i];\n\n if (child) {\n if (i === childrenLength - 1) {\n _iterateNode(child, null);\n } else {\n const nextChild = node.children[i + 1];\n\n if (nextChild) {\n _iterateNode(child, nextChild);\n }\n }\n }\n });\n\n if (node.is_open && $element) {\n this.handleAfterOpenFolder(node, nextNode);\n }\n }\n };\n\n _iterateNode(this.tree, null);\n }\n\n protected abstract handleNode(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n /*\n override\n return\n - true: continue iterating\n - false: stop iterating\n */\n protected abstract handleOpenFolder(node: Node, $element: JQuery): boolean;\n\n protected abstract handleClosedFolder(\n node: Node,\n nextNode: Node | null,\n $element: JQuery\n ): void;\n\n protected abstract handleAfterOpenFolder(\n node: Node,\n nextNode: Node | null\n ): void;\n\n protected abstract handleFirstNode(node: Node): void;\n}\n\nexport class HitAreasGenerator extends VisibleNodeIterator {\n private currentNode: Node;\n private treeBottom: number;\n private positions: HitArea[];\n private lastTop: number;\n\n constructor(tree: Node, currentNode: Node, treeBottom: number) {\n super(tree);\n\n this.currentNode = currentNode;\n this.treeBottom = treeBottom;\n }\n\n public generate(): HitArea[] {\n this.positions = [];\n this.lastTop = 0;\n\n this.iterate();\n\n return this.generateHitAreas(this.positions);\n }\n\n protected generateHitAreas(positions: HitArea[]): HitArea[] {\n let previousTop = -1;\n let group = [];\n const hitAreas: HitArea[] = [];\n\n for (const position of positions) {\n if (position.top !== previousTop && group.length) {\n if (group.length) {\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n position.top\n );\n }\n\n previousTop = position.top;\n group = [];\n }\n\n group.push(position);\n }\n\n this.generateHitAreasForGroup(\n hitAreas,\n group,\n previousTop,\n this.treeBottom\n );\n\n return hitAreas;\n }\n\n protected handleOpenFolder(node: Node, $element: JQuery): boolean {\n if (node === this.currentNode) {\n // Cannot move inside current item\n // Stop iterating\n return false;\n }\n\n // Cannot move before current item\n if (node.children[0] !== this.currentNode) {\n this.addPosition(node, Position.Inside, this.getTop($element));\n }\n\n // Continue iterating\n return true;\n }\n\n protected handleClosedFolder(\n node: Node,\n nextNode: Node,\n $element: JQuery\n ): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n\n // Cannot move before current item\n if (nextNode !== this.currentNode) {\n this.addPosition(node, Position.After, top);\n }\n }\n }\n\n protected handleFirstNode(node: Node): void {\n if (node !== this.currentNode) {\n this.addPosition(\n node,\n Position.Before,\n this.getTop(jQuery(node.element))\n );\n }\n }\n\n protected handleAfterOpenFolder(node: Node, nextNode: Node): void {\n if (node === this.currentNode || nextNode === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, this.lastTop);\n } else {\n this.addPosition(node, Position.After, this.lastTop);\n }\n }\n\n protected handleNode(node: Node, nextNode: Node, $element: JQuery): void {\n const top = this.getTop($element);\n\n if (node === this.currentNode) {\n // Cannot move inside current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.Inside, top);\n }\n\n if (nextNode === this.currentNode || node === this.currentNode) {\n // Cannot move before or after current item\n this.addPosition(node, Position.None, top);\n } else {\n this.addPosition(node, Position.After, top);\n }\n }\n\n private getTop($element: JQuery): number {\n const offset = $element.offset();\n\n return offset ? offset.top : 0;\n }\n\n private addPosition(node: Node, position: number, top: number): void {\n const area = {\n top,\n bottom: 0,\n node,\n position,\n };\n\n this.positions.push(area);\n this.lastTop = top;\n }\n\n private generateHitAreasForGroup(\n hitAreas: HitArea[],\n positionsInGroup: HitArea[],\n top: number,\n bottom: number\n ): void {\n // limit positions in group\n const positionCount = Math.min(positionsInGroup.length, 4);\n\n const areaHeight = Math.round((bottom - top) / positionCount);\n let areaTop = top;\n\n let i = 0;\n while (i < positionCount) {\n const position = positionsInGroup[i];\n\n if (position) {\n hitAreas.push({\n top: areaTop,\n bottom: areaTop + areaHeight,\n node: position.node,\n position: position.position,\n });\n }\n\n areaTop += areaHeight;\n i += 1;\n }\n }\n}\n\nclass DragElement {\n private offsetX: number;\n private offsetY: number;\n private $element: JQuery;\n\n constructor(\n nodeName: string,\n offsetX: number,\n offsetY: number,\n $tree: JQuery,\n autoEscape: boolean\n ) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n this.$element = jQuery(\"\").addClass(\n \"jqtree-title jqtree-dragging\"\n );\n\n if (autoEscape) {\n this.$element.text(nodeName);\n } else {\n this.$element.html(nodeName);\n }\n\n this.$element.css(\"position\", \"absolute\");\n $tree.append(this.$element);\n }\n\n public move(pageX: number, pageY: number): void {\n this.$element.offset({\n left: pageX - this.offsetX,\n top: pageY - this.offsetY,\n });\n }\n\n public remove(): void {\n this.$element.remove();\n }\n}\n","export const isInt = (n: unknown): boolean =>\n typeof n === \"number\" && n % 1 === 0;\n\nexport const isFunction = (v: unknown): boolean => typeof v === \"function\";\n\nexport const getBoolString = (value: unknown): string =>\n value ? \"true\" : \"false\";\n","import { getBoolString } from \"./util\";\nimport { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\ntype IconElement = string | HTMLElement | JQuery;\n\nexport default class ElementsRenderer {\n public openedIconElement?: HTMLElement | Text;\n public closedIconElement?: HTMLElement | Text;\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n this.openedIconElement = this.createButtonElement(\n treeWidget.options.openedIcon || \"+\",\n );\n this.closedIconElement = this.createButtonElement(\n treeWidget.options.closedIcon || \"-\",\n );\n }\n\n public render(fromNode: Node | null): void {\n if (fromNode && fromNode.parent) {\n this.renderFromNode(fromNode);\n } else {\n this.renderFromRoot();\n }\n }\n\n public renderFromRoot(): void {\n const $element = this.treeWidget.element;\n $element.empty();\n\n if ($element[0]) {\n this.createDomElements(\n $element[0],\n this.treeWidget.tree.children,\n true,\n 1,\n );\n }\n }\n\n public renderFromNode(node: Node): void {\n // remember current li\n const $previousLi = jQuery(node.element);\n\n // create element\n const li = this.createLi(node, node.getLevel());\n this.attachNodeData(node, li);\n\n // add element to dom\n $previousLi.after(li);\n\n // remove previous li\n $previousLi.remove();\n\n // create children\n if (node.children) {\n this.createDomElements(\n li,\n node.children,\n false,\n node.getLevel() + 1,\n );\n }\n }\n\n private createDomElements(\n element: Element,\n children: Node[],\n isRootNode: boolean,\n level: number,\n ): void {\n const ul = this.createUl(isRootNode);\n element.appendChild(ul);\n\n for (const child of children) {\n const li = this.createLi(child, level);\n ul.appendChild(li);\n\n this.attachNodeData(child, li);\n\n if (child.hasChildren()) {\n this.createDomElements(li, child.children, false, level + 1);\n }\n }\n }\n\n private attachNodeData(node: Node, li: HTMLElement): void {\n node.element = li;\n jQuery(li).data(\"node\", node);\n }\n\n private createUl(isRootNode: boolean): HTMLUListElement {\n let classString;\n let role;\n\n if (!isRootNode) {\n classString = \"\";\n role = \"group\";\n } else {\n classString = \"jqtree-tree\";\n role = \"tree\";\n\n if (this.treeWidget.options.rtl) {\n classString += \" jqtree-rtl\";\n }\n }\n\n if (this.treeWidget.options.dragAndDrop) {\n classString += \" jqtree-dnd\";\n }\n\n const ul = document.createElement(\"ul\");\n ul.className = `jqtree_common ${classString}`;\n\n ul.setAttribute(\"role\", role);\n\n return ul;\n }\n\n private createLi(node: Node, level: number): HTMLLIElement {\n const isSelected = Boolean(\n this.treeWidget.selectNodeHandler.isNodeSelected(node),\n );\n\n const mustShowFolder =\n node.isFolder() ||\n (node.isEmptyFolder && this.treeWidget.options.showEmptyFolder);\n\n const li = mustShowFolder\n ? this.createFolderLi(node, level, isSelected)\n : this.createNodeLi(node, level, isSelected);\n\n if (this.treeWidget.options.onCreateLi) {\n this.treeWidget.options.onCreateLi(node, jQuery(li), isSelected);\n }\n\n return li;\n }\n\n private setTreeItemAriaAttributes(\n element: HTMLElement,\n name: string,\n level: number,\n isSelected: boolean,\n ) {\n element.setAttribute(\"aria-label\", name);\n element.setAttribute(\"aria-level\", `${level}`);\n element.setAttribute(\"aria-selected\", getBoolString(isSelected));\n element.setAttribute(\"role\", \"treeitem\");\n }\n\n private createFolderLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const buttonClasses = this.getButtonClasses(node);\n const folderClasses = this.getFolderClasses(node, isSelected);\n\n const iconElement = node.is_open\n ? this.openedIconElement\n : this.closedIconElement;\n\n // li\n const li = document.createElement(\"li\");\n li.className = `jqtree_common ${folderClasses}`;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // button link\n const buttonLink = document.createElement(\"a\");\n buttonLink.className = buttonClasses;\n\n if (iconElement) {\n buttonLink.appendChild(iconElement.cloneNode(true));\n }\n\n if (this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n true,\n level,\n );\n titleSpan.setAttribute(\"aria-expanded\", getBoolString(node.is_open));\n div.appendChild(titleSpan);\n\n if (!this.treeWidget.options.buttonLeft) {\n div.appendChild(buttonLink);\n }\n\n return li;\n }\n\n private createNodeLi(\n node: Node,\n level: number,\n isSelected: boolean,\n ): HTMLLIElement {\n const liClasses = [\"jqtree_common\"];\n\n if (isSelected) {\n liClasses.push(\"jqtree-selected\");\n }\n\n const classString = liClasses.join(\" \");\n\n // li\n const li = document.createElement(\"li\");\n li.className = classString;\n li.setAttribute(\"role\", \"none\");\n\n // div\n const div = document.createElement(\"div\");\n div.className = \"jqtree-element jqtree_common\";\n div.setAttribute(\"role\", \"none\");\n\n li.appendChild(div);\n\n // title span\n const titleSpan = this.createTitleSpan(\n node.name,\n isSelected,\n false,\n level,\n );\n div.appendChild(titleSpan);\n\n return li;\n }\n\n private createTitleSpan(\n nodeName: string,\n isSelected: boolean,\n isFolder: boolean,\n level: number,\n ): HTMLSpanElement {\n const titleSpan = document.createElement(\"span\");\n\n let classes = \"jqtree-title jqtree_common\";\n\n if (isFolder) {\n classes += \" jqtree-title-folder\";\n }\n\n classes += ` jqtree-title-button-${\n this.treeWidget.options.buttonLeft ? \"left\" : \"right\"\n }`;\n\n titleSpan.className = classes;\n\n if (isSelected) {\n const tabIndex = this.treeWidget.options.tabIndex;\n\n if (tabIndex !== undefined) {\n titleSpan.setAttribute(\"tabindex\", `${tabIndex}`);\n }\n }\n\n this.setTreeItemAriaAttributes(titleSpan, nodeName, level, isSelected);\n\n if (this.treeWidget.options.autoEscape) {\n titleSpan.textContent = nodeName;\n } else {\n titleSpan.innerHTML = nodeName;\n }\n\n return titleSpan;\n }\n\n private getButtonClasses(node: Node): string {\n const classes = [\"jqtree-toggler\", \"jqtree_common\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (this.treeWidget.options.buttonLeft) {\n classes.push(\"jqtree-toggler-left\");\n } else {\n classes.push(\"jqtree-toggler-right\");\n }\n\n return classes.join(\" \");\n }\n\n private getFolderClasses(node: Node, isSelected: boolean): string {\n const classes = [\"jqtree-folder\"];\n\n if (!node.is_open) {\n classes.push(\"jqtree-closed\");\n }\n\n if (isSelected) {\n classes.push(\"jqtree-selected\");\n }\n\n if (node.is_loading) {\n classes.push(\"jqtree-loading\");\n }\n\n return classes.join(\" \");\n }\n\n private createButtonElement(\n value: IconElement,\n ): HTMLElement | Text | undefined {\n if (typeof value === \"string\") {\n // convert value to html\n const div = document.createElement(\"div\");\n div.innerHTML = value;\n\n return document.createTextNode(div.innerHTML);\n } else {\n return jQuery(value)[0];\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport type HandleFinishedLoading = () => void;\n\nexport default class DataLoader {\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public loadFromUrl(\n urlInfo: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n if (!urlInfo) {\n return;\n }\n\n const $el = this.getDomElement(parentNode);\n this.addLoadingClass($el);\n this.notifyLoading(true, parentNode, $el);\n\n const stopLoading = (): void => {\n this.removeLoadingClass($el);\n this.notifyLoading(false, parentNode, $el);\n };\n\n const handleSuccess = (data: string | NodeData[]): void => {\n stopLoading();\n this.treeWidget.loadData(this.parseData(data), parentNode);\n\n if (onFinished && typeof onFinished === \"function\") {\n onFinished();\n }\n };\n\n const handleError = (jqXHR: JQuery.jqXHR): void => {\n stopLoading();\n\n if (this.treeWidget.options.onLoadFailed) {\n this.treeWidget.options.onLoadFailed(jqXHR);\n }\n };\n\n this.submitRequest(urlInfo, handleSuccess, handleError);\n }\n\n private addLoadingClass($el: JQuery): void {\n if ($el) {\n $el.addClass(\"jqtree-loading\");\n }\n }\n\n private removeLoadingClass($el: JQuery): void {\n if ($el) {\n $el.removeClass(\"jqtree-loading\");\n }\n }\n\n private getDomElement(parentNode: Node | null): JQuery {\n if (parentNode) {\n return jQuery(parentNode.element);\n } else {\n return this.treeWidget.element;\n }\n }\n\n private notifyLoading(\n isLoading: boolean,\n node: Node | null,\n $el: JQuery\n ): void {\n if (this.treeWidget.options.onLoading) {\n this.treeWidget.options.onLoading(isLoading, node, $el);\n }\n\n this.treeWidget._triggerEvent(\"tree.loading_data\", {\n isLoading,\n node,\n $el,\n });\n }\n\n private submitRequest(\n urlInfoInput: string | JQuery.AjaxSettings,\n handleSuccess: JQuery.Ajax.SuccessCallback,\n handleError: JQuery.Ajax.ErrorCallback\n ): void {\n const urlInfo =\n typeof urlInfoInput === \"string\"\n ? { url: urlInfoInput }\n : urlInfoInput;\n\n const ajaxSettings: JQuery.AjaxSettings = {\n method: \"GET\",\n cache: false,\n dataType: \"json\",\n success: handleSuccess,\n error: handleError,\n ...urlInfo,\n };\n\n ajaxSettings.method = ajaxSettings.method?.toUpperCase() || \"GET\";\n\n void jQuery.ajax(ajaxSettings);\n }\n\n private parseData(data: string | NodeData[]): NodeData[] {\n const { dataFilter } = this.treeWidget.options;\n\n const getParsedData = () => {\n if (typeof data === \"string\") {\n return JSON.parse(data) as NodeData[];\n } else {\n return data;\n }\n };\n\n const parsedData = getParsedData();\n\n if (dataFilter) {\n return dataFilter(parsedData);\n } else {\n return parsedData;\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class KeyHandler {\n private static LEFT = 37;\n private static UP = 38;\n private static RIGHT = 39;\n private static DOWN = 40;\n\n private treeWidget: JqTreeWidget;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n\n if (treeWidget.options.keyboardSupport) {\n jQuery(document).on(\"keydown.jqtree\", this.handleKeyDown);\n }\n }\n\n public deinit(): void {\n jQuery(document).off(\"keydown.jqtree\");\n }\n\n public moveDown(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getNextVisibleNode());\n }\n\n public moveUp(selectedNode: Node): boolean {\n return this.selectNode(selectedNode.getPreviousVisibleNode());\n }\n\n public moveRight(selectedNode: Node): boolean {\n if (!selectedNode.isFolder()) {\n return true;\n } else {\n // folder node\n if (selectedNode.is_open) {\n // Right moves to the first child of an open node\n return this.selectNode(selectedNode.getNextVisibleNode());\n } else {\n // Right expands a closed node\n this.treeWidget.openNode(selectedNode);\n return false;\n }\n }\n }\n\n public moveLeft(selectedNode: Node): boolean {\n if (selectedNode.isFolder() && selectedNode.is_open) {\n // Left on an open node closes the node\n this.treeWidget.closeNode(selectedNode);\n return false;\n } else {\n // Left on a closed or end node moves focus to the node's parent\n return this.selectNode(selectedNode.getParent());\n }\n }\n\n public selectNode(node: Node | null): boolean {\n if (!node) {\n return true;\n } else {\n this.treeWidget.selectNode(node);\n\n if (\n !this.treeWidget.scrollHandler.isScrolledIntoView(\n jQuery(node.element).find(\".jqtree-element\")\n )\n ) {\n this.treeWidget.scrollToNode(node);\n }\n\n return false;\n }\n }\n\n private handleKeyDown = (e: JQuery.Event): boolean => {\n if (!this.canHandleKeyboard()) {\n return true;\n }\n\n const selectedNode = this.treeWidget.getSelectedNode();\n if (!selectedNode) {\n return true;\n }\n\n const key = e.which;\n\n switch (key) {\n case KeyHandler.DOWN:\n return this.moveDown(selectedNode);\n\n case KeyHandler.UP:\n return this.moveUp(selectedNode);\n\n case KeyHandler.RIGHT:\n return this.moveRight(selectedNode);\n\n case KeyHandler.LEFT:\n return this.moveLeft(selectedNode);\n\n default:\n return true;\n }\n };\n\n private canHandleKeyboard(): boolean {\n return (\n (this.treeWidget.options.keyboardSupport || false) &&\n this.treeWidget.selectNodeHandler.isFocusOnTree()\n );\n }\n}\n","const register = (widgetClass: unknown, widgetName: string): void => {\n const getDataKey = (): string => `simple_widget_${widgetName}`;\n\n const getWidgetData = (\n el: HTMLElement,\n dataKey: string\n ): SimpleWidget | null => {\n const widget = jQuery.data(el, dataKey) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n return widget;\n } else {\n return null;\n }\n };\n\n const createWidget = ($el: JQuery, options: unknown): JQuery => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const existingWidget = getWidgetData(el, dataKey);\n\n if (!existingWidget) {\n const simpleWidgetClass = widgetClass as typeof SimpleWidget;\n const widget = new simpleWidgetClass(el, options);\n\n if (!jQuery.data(el, dataKey)) {\n jQuery.data(el, dataKey, widget);\n }\n\n // Call init after setting data, so we can call methods\n widget.init();\n }\n }\n\n return $el;\n };\n\n const destroyWidget = ($el: JQuery): void => {\n const dataKey = getDataKey();\n\n for (const el of $el.get()) {\n const widget = getWidgetData(el, dataKey);\n\n if (widget) {\n widget.destroy();\n }\n\n jQuery.removeData(el, dataKey);\n }\n };\n\n const callFunction = (\n $el: JQuery,\n functionName: string,\n args: unknown[]\n ): unknown => {\n let result = null;\n\n for (const el of $el.get()) {\n const widget = jQuery.data(el, getDataKey()) as unknown;\n\n if (widget && widget instanceof SimpleWidget) {\n const simpleWidget = widget as SimpleWidget;\n const widgetFunction = simpleWidget[functionName];\n\n if (widgetFunction && typeof widgetFunction === \"function\") {\n result = widgetFunction.apply(widget, args) as unknown;\n }\n }\n }\n\n return result;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (jQuery.fn as any)[widgetName] = function (\n this: JQuery,\n argument1: unknown,\n ...args: unknown[]\n ) {\n if (!argument1) {\n return createWidget(this, null);\n } else if (typeof argument1 === \"object\") {\n const options = argument1 as unknown;\n return createWidget(this, options);\n } else if (typeof argument1 === \"string\" && argument1[0] !== \"_\") {\n const functionName = argument1;\n\n if (functionName === \"destroy\") {\n return destroyWidget(this);\n } else if (functionName === \"get_widget_class\") {\n return widgetClass;\n } else {\n return callFunction(this, functionName, args);\n }\n } else {\n return undefined;\n }\n };\n};\n\nexport default class SimpleWidget {\n public static register(widgetClass: unknown, widgetName: string): void {\n register(widgetClass, widgetName);\n }\n\n [key: string]: unknown;\n\n protected static defaults: unknown = {};\n\n public options: WidgetOptions;\n\n public $el: JQuery;\n\n constructor(el: HTMLElement, options: WidgetOptions) {\n this.$el = jQuery(el);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const defaults = (this.constructor as any)[\"defaults\"] as WidgetOptions;\n this.options = { ...defaults, ...options };\n }\n\n public destroy(): void {\n this.deinit();\n }\n\n public init(): void {\n //\n }\n\n public deinit(): void {\n //\n }\n}\n","/*\nThis widget does the same a the mouse widget in jqueryui.\n*/\nimport SimpleWidget from \"./simple.widget\";\nimport { PositionInfo } from \"./types\";\n\nconst getPositionInfoFromMouseEvent = (e: MouseEvent): PositionInfo => ({\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.target as HTMLElement,\n originalEvent: e,\n});\n\nconst getPositionInfoFromTouch = (\n touch: Touch,\n e: TouchEvent\n): PositionInfo => ({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target as HTMLElement,\n originalEvent: e,\n});\n\nabstract class MouseWidget extends SimpleWidget {\n protected isMouseStarted: boolean;\n protected mouseDownInfo: PositionInfo | null;\n private mouseDelayTimer: number | null;\n private isMouseDelayMet: boolean;\n\n public init(): void {\n const element = this.$el.get(0);\n\n if (element) {\n element.addEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n element.addEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.isMouseStarted = false;\n this.mouseDelayTimer = null;\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n }\n\n public deinit(): void {\n const el = this.$el.get(0);\n\n if (el) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"mousedown\", this.mouseDown, {\n passive: false,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (el as any).removeEventListener(\"touchstart\", this.touchStart, {\n passive: false,\n });\n }\n\n this.removeMouseMoveEventListeners();\n }\n\n protected abstract mouseCapture(positionInfo: PositionInfo): boolean | null;\n\n protected abstract mouseStart(positionInfo: PositionInfo): boolean;\n\n protected abstract mouseDrag(positionInfo: PositionInfo): void;\n\n protected abstract mouseStop(positionInfo: PositionInfo): void;\n\n protected abstract getMouseDelay(): number;\n\n private mouseDown = (e: MouseEvent): void => {\n // Left mouse button?\n if (e.button !== 0) {\n return;\n }\n\n const result = this.handleMouseDown(getPositionInfoFromMouseEvent(e));\n\n if (result && e.cancelable) {\n e.preventDefault();\n }\n };\n\n private handleMouseDown(positionInfo: PositionInfo): boolean {\n // We may have missed mouseup (out of window)\n if (this.isMouseStarted) {\n this.handleMouseUp(positionInfo);\n }\n\n this.mouseDownInfo = positionInfo;\n\n if (!this.mouseCapture(positionInfo)) {\n return false;\n }\n\n this.handleStartMouse();\n\n return true;\n }\n\n private handleStartMouse(): void {\n document.addEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n document.addEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: false });\n document.addEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n\n const mouseDelay = this.getMouseDelay();\n\n if (mouseDelay) {\n this.startMouseDelayTimer(mouseDelay);\n } else {\n this.isMouseDelayMet = true;\n }\n }\n\n private startMouseDelayTimer(mouseDelay: number): void {\n if (this.mouseDelayTimer) {\n clearTimeout(this.mouseDelayTimer);\n }\n\n this.mouseDelayTimer = window.setTimeout(() => {\n if (this.mouseDownInfo) {\n this.isMouseDelayMet = true;\n }\n }, mouseDelay);\n\n this.isMouseDelayMet = false;\n }\n\n private mouseMove = (e: MouseEvent): void => {\n this.handleMouseMove(e, getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseMove(\n e: MouseEvent | TouchEvent,\n positionInfo: PositionInfo\n ): void {\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n\n if (!this.isMouseDelayMet) {\n return;\n }\n\n if (this.mouseDownInfo) {\n this.isMouseStarted = this.mouseStart(this.mouseDownInfo) !== false;\n }\n\n if (this.isMouseStarted) {\n this.mouseDrag(positionInfo);\n\n if (e.cancelable) {\n e.preventDefault();\n }\n } else {\n this.handleMouseUp(positionInfo);\n }\n }\n\n private mouseUp = (e: MouseEvent): void => {\n this.handleMouseUp(getPositionInfoFromMouseEvent(e));\n };\n\n private handleMouseUp(positionInfo: PositionInfo): void {\n this.removeMouseMoveEventListeners();\n this.isMouseDelayMet = false;\n this.mouseDownInfo = null;\n\n if (this.isMouseStarted) {\n this.isMouseStarted = false;\n this.mouseStop(positionInfo);\n }\n }\n\n private removeMouseMoveEventListeners() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mousemove\", this.mouseMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchmove\", this.touchMove, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"mouseup\", this.mouseUp, {\n passive: false,\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (document as any).removeEventListener(\"touchend\", this.touchEnd, {\n passive: false,\n });\n }\n\n private touchStart = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseDown(getPositionInfoFromTouch(touch, e));\n };\n\n private touchMove = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseMove(e, getPositionInfoFromTouch(touch, e));\n };\n\n private touchEnd = (e: TouchEvent): void => {\n if (!e) {\n return;\n }\n\n if (e.touches.length > 1) {\n return;\n }\n\n const touch = e.changedTouches[0];\n\n if (!touch) {\n return;\n }\n\n this.handleMouseUp(getPositionInfoFromTouch(touch, e));\n };\n}\n\nexport default MouseWidget;\n","import { isInt } from \"./util\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { Node } from \"./node\";\n\nexport interface SavedState {\n open_nodes: NodeId[];\n selected_node: NodeId[];\n}\n\nexport default class SaveStateHandler {\n private treeWidget: JqTreeWidget;\n private _supportsLocalStorage: boolean | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n }\n\n public saveState(): void {\n const state = JSON.stringify(this.getState());\n\n if (this.treeWidget.options.onSetStateFromStorage) {\n this.treeWidget.options.onSetStateFromStorage(state);\n } else if (this.supportsLocalStorage()) {\n localStorage.setItem(this.getKeyName(), state);\n }\n }\n\n public getStateFromStorage(): SavedState | null {\n const jsonData = this.loadFromStorage();\n\n if (jsonData) {\n return this.parseState(jsonData) as unknown as SavedState;\n } else {\n return null;\n }\n }\n\n public getState(): SavedState {\n const getOpenNodeIds = (): NodeId[] => {\n const openNodes: NodeId[] = [];\n\n this.treeWidget.tree.iterate((node: Node) => {\n if (node.is_open && node.id && node.hasChildren()) {\n openNodes.push(node.id);\n }\n return true;\n });\n\n return openNodes;\n };\n\n const getSelectedNodeIds = (): NodeId[] => {\n const selectedNodeIds: NodeId[] = [];\n\n this.treeWidget.getSelectedNodes().forEach((node) => {\n if (node.id != null) {\n selectedNodeIds.push(node.id);\n }\n });\n\n return selectedNodeIds;\n };\n\n return {\n open_nodes: getOpenNodeIds(),\n selected_node: getSelectedNodeIds(),\n };\n }\n\n /*\n Set initial state\n Don't handle nodes that are loaded on demand\n\n result: must load on demand\n */\n public setInitialState(state: SavedState): boolean {\n if (!state) {\n return false;\n } else {\n let mustLoadOnDemand = false;\n\n if (state.open_nodes) {\n mustLoadOnDemand = this.openInitialNodes(state.open_nodes);\n }\n\n if (state.selected_node) {\n this.resetSelection();\n this.selectInitialNodes(state.selected_node);\n }\n\n return mustLoadOnDemand;\n }\n }\n\n public setInitialStateOnDemand(\n state: SavedState,\n cbFinished: () => void\n ): void {\n if (state) {\n this.doSetInitialStateOnDemand(\n state.open_nodes,\n state.selected_node,\n cbFinished\n );\n } else {\n cbFinished();\n }\n }\n\n public getNodeIdToBeSelected(): NodeId | null {\n const state = this.getStateFromStorage();\n\n if (state && state.selected_node) {\n return state.selected_node[0] || null;\n } else {\n return null;\n }\n }\n\n private parseState(jsonData: string): SavedState {\n const state = JSON.parse(jsonData) as Record;\n\n // Check if selected_node is an int (instead of an array)\n if (state && state.selected_node && isInt(state.selected_node)) {\n // Convert to array\n state.selected_node = [state.selected_node];\n }\n\n return state as unknown as SavedState;\n }\n\n private loadFromStorage(): string | null {\n if (this.treeWidget.options.onGetStateFromStorage) {\n return this.treeWidget.options.onGetStateFromStorage();\n } else if (this.supportsLocalStorage()) {\n return localStorage.getItem(this.getKeyName());\n } else {\n return null;\n }\n }\n\n private openInitialNodes(nodeIds: NodeId[]): boolean {\n let mustLoadOnDemand = false;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n if (!node.load_on_demand) {\n node.is_open = true;\n } else {\n mustLoadOnDemand = true;\n }\n }\n }\n\n return mustLoadOnDemand;\n }\n\n private selectInitialNodes(nodeIds: NodeId[]): boolean {\n let selectCount = 0;\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (node) {\n selectCount += 1;\n\n this.treeWidget.selectNodeHandler.addToSelection(node);\n }\n }\n\n return selectCount !== 0;\n }\n\n private resetSelection(): void {\n const selectNodeHandler = this.treeWidget.selectNodeHandler;\n\n const selectedNodes = selectNodeHandler.getSelectedNodes();\n\n selectedNodes.forEach((node) => {\n selectNodeHandler.removeFromSelection(node);\n });\n }\n\n private doSetInitialStateOnDemand(\n nodeIdsParam: NodeId[],\n selectedNodes: NodeId[],\n cbFinished: () => void\n ): void {\n let loadingCount = 0;\n let nodeIds = nodeIdsParam;\n\n const openNodes = (): void => {\n const newNodesIds = [];\n\n for (const nodeId of nodeIds) {\n const node = this.treeWidget.getNodeById(nodeId);\n\n if (!node) {\n newNodesIds.push(nodeId);\n } else {\n if (!node.is_loading) {\n if (node.load_on_demand) {\n loadAndOpenNode(node);\n } else {\n this.treeWidget._openNode(node, false, null);\n }\n }\n }\n }\n\n nodeIds = newNodesIds;\n\n if (this.selectInitialNodes(selectedNodes)) {\n this.treeWidget._refreshElements(null);\n }\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this.treeWidget._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n openNodes();\n }\n\n private getKeyName(): string {\n if (typeof this.treeWidget.options.saveState === \"string\") {\n return this.treeWidget.options.saveState;\n } else {\n return \"tree\";\n }\n }\n\n private supportsLocalStorage(): boolean {\n const testSupport = (): boolean => {\n // Is local storage supported?\n if (localStorage == null) {\n return false;\n } else {\n // Check if it's possible to store an item. Safari does not allow this in private browsing mode.\n try {\n const key = \"_storage_test\";\n sessionStorage.setItem(key, \"value\");\n sessionStorage.removeItem(key);\n } catch (error) {\n return false;\n }\n\n return true;\n }\n };\n\n if (this._supportsLocalStorage == null) {\n this._supportsLocalStorage = testSupport();\n }\n\n return this._supportsLocalStorage;\n }\n}\n","import { JqTreeWidget } from \"./tree.jquery\";\nimport { HitArea, PositionInfo } from \"./types\";\n\nexport default class ScrollHandler {\n private treeWidget: JqTreeWidget;\n private previousTop: number;\n private isInitialized: boolean;\n private $scrollParent: JQuery | null;\n private scrollParentTop: number;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.previousTop = -1;\n this.isInitialized = false;\n }\n\n public checkScrolling(): void {\n this.ensureInit();\n this.checkVerticalScrolling();\n this.checkHorizontalScrolling();\n }\n\n public scrollToY(top: number): void {\n this.ensureInit();\n\n if (this.$scrollParent && this.$scrollParent[0]) {\n this.$scrollParent[0].scrollTop = top;\n } else {\n const offset = this.treeWidget.$el.offset();\n const treeTop = offset ? offset.top : 0;\n\n jQuery(document).scrollTop(top + treeTop);\n }\n }\n\n public isScrolledIntoView($element: JQuery): boolean {\n this.ensureInit();\n\n let elementBottom: number;\n let viewBottom: number;\n let elementTop: number;\n let viewTop: number;\n\n const elHeight = $element.height() || 0;\n\n if (this.$scrollParent) {\n viewTop = 0;\n viewBottom = this.$scrollParent.height() || 0;\n\n const offset = $element.offset();\n const originalTop = offset ? offset.top : 0;\n\n elementTop = originalTop - this.scrollParentTop;\n elementBottom = elementTop + elHeight;\n } else {\n viewTop = jQuery(window).scrollTop() || 0;\n\n const windowHeight = jQuery(window).height() || 0;\n viewBottom = viewTop + windowHeight;\n\n const offset = $element.offset();\n\n elementTop = offset ? offset.top : 0;\n elementBottom = elementTop + elHeight;\n }\n\n return elementBottom <= viewBottom && elementTop >= viewTop;\n }\n\n public getScrollLeft(): number {\n if (!this.$scrollParent) {\n return 0;\n } else {\n return this.$scrollParent.scrollLeft() || 0;\n }\n }\n\n private initScrollParent(): void {\n const getParentWithOverflow = (): JQuery | null => {\n const cssAttributes = [\"overflow\", \"overflow-y\"];\n\n const hasOverFlow = ($el: JQuery): boolean => {\n for (const attr of cssAttributes) {\n const overflowValue = $el.css(attr);\n if (\n overflowValue === \"auto\" ||\n overflowValue === \"scroll\"\n ) {\n return true;\n }\n }\n\n return false;\n };\n\n if (hasOverFlow(this.treeWidget.$el)) {\n return this.treeWidget.$el;\n }\n\n for (const el of this.treeWidget.$el.parents().get()) {\n const $el = jQuery(el);\n if (hasOverFlow($el)) {\n return $el;\n }\n }\n\n return null;\n };\n\n const setDocumentAsScrollParent = (): void => {\n this.scrollParentTop = 0;\n this.$scrollParent = null;\n };\n\n if (this.treeWidget.$el.css(\"position\") === \"fixed\") {\n setDocumentAsScrollParent();\n }\n\n const $scrollParent = getParentWithOverflow();\n\n if (\n $scrollParent &&\n $scrollParent.length &&\n $scrollParent[0]?.tagName !== \"HTML\"\n ) {\n this.$scrollParent = $scrollParent;\n\n const offset = this.$scrollParent.offset();\n this.scrollParentTop = offset ? offset.top : 0;\n } else {\n setDocumentAsScrollParent();\n }\n\n this.isInitialized = true;\n }\n\n private ensureInit(): void {\n if (!this.isInitialized) {\n this.initScrollParent();\n }\n }\n\n private handleVerticalScrollingWithScrollParent(area: HitArea): void {\n const scrollParent = this.$scrollParent && this.$scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const distanceBottom =\n this.scrollParentTop + scrollParent.offsetHeight - area.bottom;\n\n if (distanceBottom < 20) {\n scrollParent.scrollTop += 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n } else if (area.top - this.scrollParentTop < 20) {\n scrollParent.scrollTop -= 20;\n this.treeWidget.refreshHitAreas();\n this.previousTop = -1;\n }\n }\n\n private handleVerticalScrollingWithDocument(area: HitArea): void {\n const scrollTop = jQuery(document).scrollTop() || 0;\n const distanceTop = area.top - scrollTop;\n\n if (distanceTop < 20) {\n jQuery(document).scrollTop(scrollTop - 20);\n } else {\n const windowHeight = jQuery(window).height() || 0;\n\n if (windowHeight - (area.bottom - scrollTop) < 20) {\n jQuery(document).scrollTop(scrollTop + 20);\n }\n }\n }\n\n private checkVerticalScrolling(): void {\n const hoveredArea = this.treeWidget.dndHandler.hoveredArea;\n\n if (hoveredArea && hoveredArea.top !== this.previousTop) {\n this.previousTop = hoveredArea.top;\n\n if (this.$scrollParent) {\n this.handleVerticalScrollingWithScrollParent(hoveredArea);\n } else {\n this.handleVerticalScrollingWithDocument(hoveredArea);\n }\n }\n }\n\n private checkHorizontalScrolling(): void {\n const positionInfo = this.treeWidget.dndHandler.positionInfo;\n\n if (!positionInfo) {\n return;\n }\n\n if (this.$scrollParent) {\n this.handleHorizontalScrollingWithParent(positionInfo);\n } else {\n this.handleHorizontalScrollingWithDocument(positionInfo);\n }\n }\n\n private handleHorizontalScrollingWithParent(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $scrollParent = this.$scrollParent;\n const scrollParentOffset = $scrollParent && $scrollParent.offset();\n\n if (!($scrollParent && scrollParentOffset)) {\n return;\n }\n\n const scrollParent = $scrollParent[0];\n\n if (!scrollParent) {\n return;\n }\n\n const canScrollRight =\n scrollParent.scrollLeft + scrollParent.clientWidth <\n scrollParent.scrollWidth;\n const canScrollLeft = scrollParent.scrollLeft > 0;\n\n const rightEdge = scrollParentOffset.left + scrollParent.clientWidth;\n const leftEdge = scrollParentOffset.left;\n const isNearRightEdge = positionInfo.pageX > rightEdge - 20;\n const isNearLeftEdge = positionInfo.pageX < leftEdge + 20;\n\n if (isNearRightEdge && canScrollRight) {\n scrollParent.scrollLeft = Math.min(\n scrollParent.scrollLeft + 20,\n scrollParent.scrollWidth\n );\n } else if (isNearLeftEdge && canScrollLeft) {\n scrollParent.scrollLeft = Math.max(scrollParent.scrollLeft - 20, 0);\n }\n }\n\n private handleHorizontalScrollingWithDocument(\n positionInfo: PositionInfo\n ): void {\n if (\n positionInfo.pageX === undefined ||\n positionInfo.pageY === undefined\n ) {\n return;\n }\n\n const $document = jQuery(document);\n\n const scrollLeft = $document.scrollLeft() || 0;\n const windowWidth = jQuery(window).width() || 0;\n\n const canScrollLeft = scrollLeft > 0;\n\n const isNearRightEdge = positionInfo.pageX > windowWidth - 20;\n const isNearLeftEdge = positionInfo.pageX - scrollLeft < 20;\n\n if (isNearRightEdge) {\n $document.scrollLeft(scrollLeft + 20);\n } else if (isNearLeftEdge && canScrollLeft) {\n $document.scrollLeft(Math.max(scrollLeft - 20, 0));\n }\n }\n}\n","import { Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\n\nexport default class SelectNodeHandler {\n private treeWidget: JqTreeWidget;\n private selectedNodes: Set;\n private selectedSingleNode: Node | null;\n\n constructor(treeWidget: JqTreeWidget) {\n this.treeWidget = treeWidget;\n this.selectedNodes = new Set();\n this.clear();\n }\n\n public getSelectedNode(): Node | false {\n const selectedNodes = this.getSelectedNodes();\n\n if (selectedNodes.length) {\n return selectedNodes[0] || false;\n } else {\n return false;\n }\n }\n\n public getSelectedNodes(): Node[] {\n if (this.selectedSingleNode) {\n return [this.selectedSingleNode];\n } else {\n const selectedNodes: Node[] = [];\n\n this.selectedNodes.forEach((id) => {\n const node = this.treeWidget.getNodeById(id);\n if (node) {\n selectedNodes.push(node);\n }\n });\n\n return selectedNodes;\n }\n }\n\n public getSelectedNodesUnder(parent: Node): Node[] {\n if (this.selectedSingleNode) {\n if (parent.isParentOf(this.selectedSingleNode)) {\n return [this.selectedSingleNode];\n } else {\n return [];\n }\n } else {\n const selectedNodes = [];\n\n for (const id in this.selectedNodes) {\n if (\n Object.prototype.hasOwnProperty.call(this.selectedNodes, id)\n ) {\n const node = this.treeWidget.getNodeById(id);\n if (node && parent.isParentOf(node)) {\n selectedNodes.push(node);\n }\n }\n }\n\n return selectedNodes;\n }\n }\n\n public isNodeSelected(node: Node): boolean {\n if (node.id != null) {\n return this.selectedNodes.has(node.id);\n } else if (this.selectedSingleNode) {\n return this.selectedSingleNode.element === node.element;\n } else {\n return false;\n }\n }\n\n public clear(): void {\n this.selectedNodes.clear();\n this.selectedSingleNode = null;\n }\n\n public removeFromSelection(node: Node, includeChildren = false): void {\n if (node.id == null) {\n if (\n this.selectedSingleNode &&\n node.element === this.selectedSingleNode.element\n ) {\n this.selectedSingleNode = null;\n }\n } else {\n this.selectedNodes.delete(node.id);\n\n if (includeChildren) {\n node.iterate(() => {\n if (node.id != null) {\n this.selectedNodes.delete(node.id);\n }\n return true;\n });\n }\n }\n }\n\n public addToSelection(node: Node): void {\n if (node.id != null) {\n this.selectedNodes.add(node.id);\n } else {\n this.selectedSingleNode = node;\n }\n }\n\n public isFocusOnTree(): boolean {\n const activeElement = document.activeElement;\n\n return Boolean(\n activeElement &&\n activeElement.tagName === \"SPAN\" &&\n this.treeWidget._containsElement(activeElement as HTMLElement)\n );\n }\n}\n","import { Position, Node } from \"./node\";\nimport { JqTreeWidget } from \"./tree.jquery\";\nimport { DropHint } from \"./types\";\n\nexport type OnFinishOpenNode = (node: Node) => void;\n\nexport class NodeElement {\n public node: Node;\n public $element: JQuery;\n protected treeWidget: JqTreeWidget;\n\n constructor(node: Node, treeWidget: JqTreeWidget) {\n this.init(node, treeWidget);\n }\n\n public init(node: Node, treeWidget: JqTreeWidget): void {\n this.node = node;\n this.treeWidget = treeWidget;\n\n if (!node.element) {\n const element = this.treeWidget.element.get(0);\n\n if (element) {\n node.element = element;\n }\n }\n\n if (node.element) {\n this.$element = jQuery(node.element);\n }\n }\n\n public addDropHint(position: number): DropHint {\n if (this.mustShowBorderDropHint(position)) {\n return new BorderDropHint(\n this.$element,\n this.treeWidget._getScrollLeft(),\n );\n } else {\n return new GhostDropHint(this.node, this.$element, position);\n }\n }\n\n public select(mustSetFocus: boolean): void {\n const $li = this.getLi();\n\n $li.addClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.attr(\"tabindex\", this.treeWidget.options.tabIndex ?? null);\n $span.attr(\"aria-selected\", \"true\");\n\n if (mustSetFocus) {\n $span.trigger(\"focus\");\n }\n }\n\n public deselect(): void {\n const $li = this.getLi();\n\n $li.removeClass(\"jqtree-selected\");\n\n const $span = this.getSpan();\n $span.removeAttr(\"tabindex\");\n $span.attr(\"aria-selected\", \"false\");\n\n $span.trigger(\"blur\");\n }\n\n protected getUl(): JQuery {\n return this.$element.children(\"ul:first\");\n }\n\n protected getSpan(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"span.jqtree-title\");\n }\n\n protected getLi(): JQuery {\n return this.$element;\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return position === Position.Inside;\n }\n}\n\nexport class FolderElement extends NodeElement {\n public open(\n onFinished: OnFinishOpenNode | null,\n slide = true,\n animationSpeed: JQuery.Duration = \"fast\",\n ): void {\n if (this.node.is_open) {\n return;\n }\n\n this.node.is_open = true;\n\n const $button = this.getButton();\n $button.removeClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const openedIconElement =\n this.treeWidget.renderer.openedIconElement;\n\n if (openedIconElement) {\n const icon = openedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doOpen = (): void => {\n const $li = this.getLi();\n $li.removeClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"true\");\n\n if (onFinished) {\n onFinished(this.node);\n }\n\n this.treeWidget._triggerEvent(\"tree.open\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideDown(animationSpeed, doOpen);\n } else {\n this.getUl().show();\n doOpen();\n }\n }\n\n public close(\n slide = true,\n animationSpeed: JQuery.Duration | undefined = \"fast\",\n ): void {\n if (!this.node.is_open) {\n return;\n }\n\n this.node.is_open = false;\n\n const $button = this.getButton();\n $button.addClass(\"jqtree-closed\");\n $button.html(\"\");\n\n const buttonEl = $button.get(0);\n\n if (buttonEl) {\n const closedIconElement =\n this.treeWidget.renderer.closedIconElement;\n\n if (closedIconElement) {\n const icon = closedIconElement.cloneNode(true);\n buttonEl.appendChild(icon);\n }\n }\n\n const doClose = (): void => {\n const $li = this.getLi();\n $li.addClass(\"jqtree-closed\");\n\n const $titleSpan = this.getSpan();\n $titleSpan.attr(\"aria-expanded\", \"false\");\n\n this.treeWidget._triggerEvent(\"tree.close\", {\n node: this.node,\n });\n };\n\n if (slide) {\n this.getUl().slideUp(animationSpeed, doClose);\n } else {\n this.getUl().hide();\n doClose();\n }\n }\n\n protected mustShowBorderDropHint(position: Position): boolean {\n return !this.node.is_open && position === Position.Inside;\n }\n\n private getButton(): JQuery {\n return this.$element\n .children(\".jqtree-element\")\n .find(\"a.jqtree-toggler\");\n }\n}\n\nexport class BorderDropHint implements DropHint {\n private $hint: JQuery;\n\n constructor($element: JQuery, scrollLeft: number) {\n const $div = $element.children(\".jqtree-element\");\n\n const elWidth = $element.width() || 0;\n const width = Math.max(elWidth + scrollLeft - 4, 0);\n\n const elHeight = $div.outerHeight() || 0;\n const height = Math.max(elHeight - 4, 0);\n\n this.$hint = jQuery('');\n $div.append(this.$hint);\n\n this.$hint.css({ width, height });\n }\n\n public remove(): void {\n this.$hint.remove();\n }\n}\n\nclass GhostDropHint implements DropHint {\n private $element: JQuery;\n private node: Node;\n private $ghost: JQuery;\n\n constructor(node: Node, $element: JQuery, position: Position) {\n this.$element = $element;\n\n this.node = node;\n this.$ghost = jQuery(\n `
  • \n
  • `,\n );\n\n if (position === Position.After) {\n this.moveAfter();\n } else if (position === Position.Before) {\n this.moveBefore();\n } else if (position === Position.Inside) {\n if (node.isFolder() && node.is_open) {\n this.moveInsideOpenFolder();\n } else {\n this.moveInside();\n }\n }\n }\n\n public remove(): void {\n this.$ghost.remove();\n }\n\n public moveAfter(): void {\n this.$element.after(this.$ghost);\n }\n\n public moveBefore(): void {\n this.$element.before(this.$ghost);\n }\n\n public moveInsideOpenFolder(): void {\n const childElement = this.node.children[0]?.element;\n\n if (childElement) {\n jQuery(childElement).before(this.$ghost);\n }\n }\n\n public moveInside(): void {\n this.$element.after(this.$ghost);\n this.$ghost.addClass(\"jqtree-inside\");\n }\n}\n","import __version__ from \"./version\";\nimport { DragAndDropHandler } from \"./dragAndDropHandler\";\nimport ElementsRenderer from \"./elementsRenderer\";\nimport DataLoader, { HandleFinishedLoading } from \"./dataLoader\";\nimport KeyHandler from \"./keyHandler\";\nimport MouseWidget from \"./mouse.widget\";\nimport { PositionInfo } from \"./types\";\nimport SaveStateHandler, { SavedState } from \"./saveStateHandler\";\nimport ScrollHandler from \"./scrollHandler\";\nimport SelectNodeHandler from \"./selectNodeHandler\";\nimport SimpleWidget from \"./simple.widget\";\nimport { Node, getPosition } from \"./node\";\nimport { isFunction } from \"./util\";\nimport { FolderElement, NodeElement, OnFinishOpenNode } from \"./nodeElement\";\nimport { JQTreeOptions } from \"./jqtreeOptions\";\n\ninterface ClickTarget {\n node: Node;\n type: \"button\" | \"label\";\n}\n\ninterface SelectNodeOptions {\n mustToggle?: boolean;\n mustSetFocus?: boolean;\n}\n\nconst NODE_PARAM_IS_EMPTY = \"Node parameter is empty\";\nconst PARAM_IS_EMPTY = \"Parameter is empty: \";\n\nexport class JqTreeWidget extends MouseWidget {\n protected static defaults: JQTreeOptions = {\n animationSpeed: \"fast\",\n autoEscape: true,\n autoOpen: false, // true / false / int (open n levels starting at 0)\n buttonLeft: true,\n // The symbol to use for a closed node - â–º BLACK RIGHT-POINTING POINTER\n // http://www.fileformat.info/info/unicode/char/25ba/index.htm\n closedIcon: undefined,\n data: undefined,\n dataFilter: undefined,\n dataUrl: undefined,\n dragAndDrop: false,\n keyboardSupport: true,\n nodeClass: Node,\n onCanMove: undefined, // Can this node be moved?\n onCanMoveTo: undefined, // Can this node be moved to this position? function(moved_node, target_node, position)\n onCanSelectNode: undefined,\n onCreateLi: undefined,\n onDragMove: undefined,\n onDragStop: undefined,\n onGetStateFromStorage: undefined,\n onIsMoveHandle: undefined,\n onLoadFailed: undefined,\n onLoading: undefined,\n onSetStateFromStorage: undefined,\n openedIcon: \"▼\",\n openFolderDelay: 500, // The delay for opening a folder during drag and drop; the value is in milliseconds\n // The symbol to use for an open node - â–¼ BLACK DOWN-POINTING TRIANGLE\n // http://www.fileformat.info/info/unicode/char/25bc/index.htm\n rtl: undefined, // right-to-left support; true / false (default)\n saveState: false, // true / false / string (cookie name)\n selectable: true,\n showEmptyFolder: false,\n slide: true, // must display slide animation?\n startDndDelay: 300, // The delay for starting dnd (in milliseconds)\n tabIndex: 0,\n useContextMenu: true,\n };\n\n public element: JQuery;\n public tree: Node;\n public dndHandler: DragAndDropHandler;\n public renderer: ElementsRenderer;\n public dataLoader: DataLoader;\n public scrollHandler: ScrollHandler;\n public selectNodeHandler: SelectNodeHandler;\n\n private isInitialized: boolean;\n private saveStateHandler: SaveStateHandler;\n private keyHandler: KeyHandler;\n\n public toggle(node: Node, slideParam: null | boolean = null): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.is_open) {\n this.closeNode(node, slide);\n } else {\n this.openNode(node, slide);\n }\n\n return this.element;\n }\n\n public getTree(): Node {\n return this.tree;\n }\n\n public selectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): JQuery {\n this.doSelectNode(node, optionsParam);\n return this.element;\n }\n\n public getSelectedNode(): Node | false {\n return this.selectNodeHandler.getSelectedNode();\n }\n\n public toJson(): string {\n return JSON.stringify(this.tree.getData());\n }\n\n public loadData(data: NodeData[], parentNode: Node | null): JQuery {\n this.doLoadData(data, parentNode);\n return this.element;\n }\n\n /*\n signatures:\n - loadDataFromUrl(url, parent_node=null, on_finished=null)\n loadDataFromUrl('/my_data');\n loadDataFromUrl('/my_data', node1);\n loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });\n loadDataFromUrl('/my_data', null, function() { console.log('finished'); });\n\n - loadDataFromUrl(parent_node=null, on_finished=null)\n loadDataFromUrl();\n loadDataFromUrl(node1);\n loadDataFromUrl(null, function() { console.log('finished'); });\n loadDataFromUrl(node1, function() { console.log('finished'); });\n */\n public loadDataFromUrl(\n param1: string | null | Node,\n param2?: Node | null | HandleFinishedLoading,\n param3?: HandleFinishedLoading\n ): JQuery {\n if (typeof param1 === \"string\") {\n // first parameter is url\n this.doLoadDataFromUrl(\n param1,\n param2 as Node | null,\n param3 ?? null\n );\n } else {\n // first parameter is not url\n this.doLoadDataFromUrl(\n null,\n param1,\n param2 as HandleFinishedLoading | null\n );\n }\n\n return this.element;\n }\n\n public reload(onFinished: HandleFinishedLoading | null): JQuery {\n this.doLoadDataFromUrl(null, null, onFinished);\n return this.element;\n }\n\n public refresh(): JQuery {\n this._refreshElements(null);\n return this.element;\n }\n\n public getNodeById(nodeId: NodeId): Node | null {\n return this.tree.getNodeById(nodeId);\n }\n\n public getNodeByName(name: string): Node | null {\n return this.tree.getNodeByName(name);\n }\n\n public getNodeByNameMustExist(name: string): Node {\n return this.tree.getNodeByNameMustExist(name);\n }\n\n public getNodesByProperty(key: string, value: unknown): Node[] {\n return this.tree.getNodesByProperty(key, value);\n }\n\n public getNodeByHtmlElement(\n element: HTMLElement | JQuery\n ): Node | null {\n return this.getNode(jQuery(element));\n }\n\n public getNodeByCallback(callback: (node: Node) => boolean): Node | null {\n return this.tree.getNodeByCallback(callback);\n }\n\n public openNode(\n node: Node,\n param1?: boolean | OnFinishOpenNode,\n param2?: OnFinishOpenNode\n ): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const parseParams = (): [boolean, OnFinishOpenNode | null] => {\n let onFinished: OnFinishOpenNode | null;\n let slide: boolean | null;\n\n if (isFunction(param1)) {\n onFinished = param1 as OnFinishOpenNode | null;\n slide = null;\n } else {\n slide = param1 as boolean;\n onFinished = param2 as OnFinishOpenNode;\n }\n\n if (slide == null) {\n slide = this.options.slide ?? false;\n }\n\n return [slide, onFinished];\n };\n\n const [slide, onFinished] = parseParams();\n\n this._openNode(node, slide, onFinished);\n return this.element;\n }\n\n public closeNode(node: Node, slideParam?: null | boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const slide = slideParam ?? this.options.slide;\n\n if (node.isFolder() || node.isEmptyFolder) {\n new FolderElement(node, this).close(\n slide,\n this.options.animationSpeed\n );\n\n this.saveState();\n }\n\n return this.element;\n }\n\n public isDragging(): boolean {\n return this.dndHandler.isDragging;\n }\n\n public refreshHitAreas(): JQuery {\n this.dndHandler.refresh();\n return this.element;\n }\n\n public addNodeAfter(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n const newNode = existingNode.addAfter(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addNodeBefore(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addBefore(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(existingNode.parent);\n }\n\n return newNode;\n }\n\n public addParentNode(\n newNodeInfo: NodeData,\n existingNode: Node\n ): Node | null {\n if (!existingNode) {\n throw Error(PARAM_IS_EMPTY + \"existingNode\");\n }\n\n const newNode = existingNode.addParent(newNodeInfo);\n\n if (newNode) {\n this._refreshElements(newNode.parent);\n }\n\n return newNode;\n }\n\n public removeNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!node.parent) {\n throw Error(\"Node has no parent\");\n }\n\n this.selectNodeHandler.removeFromSelection(node, true); // including children\n\n const parent = node.parent;\n node.remove();\n this._refreshElements(parent);\n\n return this.element;\n }\n\n public appendNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam || this.tree;\n\n const node = parentNode.append(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public prependNode(newNodeInfo: NodeData, parentNodeParam?: Node): Node {\n const parentNode = parentNodeParam ?? this.tree;\n\n const node = parentNode.prepend(newNodeInfo);\n\n this._refreshElements(parentNode);\n\n return node;\n }\n\n public updateNode(node: Node, data: NodeData): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const idIsChanged =\n typeof data === \"object\" && data.id && data.id !== node.id;\n\n if (idIsChanged) {\n this.tree.removeNodeFromIndex(node);\n }\n\n node.setData(data);\n\n if (idIsChanged) {\n this.tree.addNodeToIndex(node);\n }\n\n if (\n typeof data === \"object\" &&\n data[\"children\"] &&\n data[\"children\"] instanceof Array\n ) {\n node.removeChildren();\n\n if (data.children.length) {\n node.loadFromData(data.children as Node[]);\n }\n }\n\n this._refreshElements(node);\n\n return this.element;\n }\n\n private isSelectedNodeInSubtree(subtree: Node): boolean {\n const selectedNode = this.getSelectedNode();\n\n if (!selectedNode) {\n return false;\n } else {\n return subtree === selectedNode || subtree.isParentOf(selectedNode);\n }\n }\n\n public moveNode(node: Node, targetNode: Node, position: string): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n if (!targetNode) {\n throw Error(PARAM_IS_EMPTY + \"targetNode\");\n }\n\n const positionIndex = getPosition(position);\n\n if (positionIndex !== undefined) {\n this.tree.moveNode(node, targetNode, positionIndex);\n this._refreshElements(null);\n }\n\n return this.element;\n }\n\n public getStateFromStorage(): SavedState | null {\n return this.saveStateHandler.getStateFromStorage();\n }\n\n public addToSelection(node: Node, mustSetFocus?: boolean): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.addToSelection(node);\n\n this._getNodeElementForNode(node).select(\n mustSetFocus === undefined ? true : mustSetFocus\n );\n\n this.saveState();\n\n return this.element;\n }\n\n public getSelectedNodes(): Node[] {\n return this.selectNodeHandler.getSelectedNodes();\n }\n\n public isNodeSelected(node: Node): boolean {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n return this.selectNodeHandler.isNodeSelected(node);\n }\n\n public removeFromSelection(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n this.selectNodeHandler.removeFromSelection(node);\n\n this._getNodeElementForNode(node).deselect();\n this.saveState();\n\n return this.element;\n }\n\n public scrollToNode(node: Node): JQuery {\n if (!node) {\n throw Error(NODE_PARAM_IS_EMPTY);\n }\n\n const nodeOffset = jQuery(node.element).offset();\n const nodeTop = nodeOffset ? nodeOffset.top : 0;\n\n const treeOffset = this.$el.offset();\n const treeTop = treeOffset ? treeOffset.top : 0;\n\n const top = nodeTop - treeTop;\n\n this.scrollHandler.scrollToY(top);\n\n return this.element;\n }\n\n public getState(): SavedState | null {\n return this.saveStateHandler.getState();\n }\n\n public setState(state: SavedState): JQuery {\n this.saveStateHandler.setInitialState(state);\n this._refreshElements(null);\n\n return this.element;\n }\n\n public setOption(option: string, value: unknown): JQuery {\n (this.options as unknown as Record)[option] = value;\n return this.element;\n }\n\n public moveDown(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveDown(selectedNode);\n }\n\n return this.element;\n }\n\n public moveUp(): JQuery {\n const selectedNode = this.getSelectedNode();\n if (selectedNode) {\n this.keyHandler.moveUp(selectedNode);\n }\n\n return this.element;\n }\n\n public getVersion(): string {\n return __version__;\n }\n\n public _triggerEvent(\n eventName: string,\n values?: Record\n ): JQuery.Event {\n const event = jQuery.Event(eventName, values);\n this.element.trigger(event);\n return event;\n }\n\n public _openNode(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n const doOpenNode = (\n _node: Node,\n _slide: boolean,\n _onFinished: OnFinishOpenNode | null\n ): void => {\n const folderElement = new FolderElement(_node, this);\n folderElement.open(\n _onFinished,\n _slide,\n this.options.animationSpeed\n );\n };\n\n if (node.isFolder() || node.isEmptyFolder) {\n if (node.load_on_demand) {\n this.loadFolderOnDemand(node, slide, onFinished);\n } else {\n let parent = node.parent;\n\n while (parent) {\n // nb: do not open root element\n if (parent.parent) {\n doOpenNode(parent, false, null);\n }\n parent = parent.parent;\n }\n\n doOpenNode(node, slide, onFinished);\n this.saveState();\n }\n }\n }\n\n /*\n Redraw the tree or part of the tree.\n from_node: redraw this subtree\n */\n public _refreshElements(fromNode: Node | null): void {\n const mustSetFocus = this.selectNodeHandler.isFocusOnTree();\n const mustSelect = fromNode\n ? this.isSelectedNodeInSubtree(fromNode)\n : false;\n\n this.renderer.render(fromNode);\n\n if (mustSelect) {\n this.selectCurrentNode(mustSetFocus);\n }\n\n this._triggerEvent(\"tree.refresh\");\n }\n\n public _getNodeElementForNode(node: Node): NodeElement {\n if (node.isFolder()) {\n return new FolderElement(node, this);\n } else {\n return new NodeElement(node, this);\n }\n }\n\n public _getNodeElement($element: JQuery): NodeElement | null {\n const node = this.getNode($element);\n if (node) {\n return this._getNodeElementForNode(node);\n } else {\n return null;\n }\n }\n\n public _containsElement(element: HTMLElement): boolean {\n const node = this.getNode(jQuery(element));\n\n return node != null && node.tree === this.tree;\n }\n\n public _getScrollLeft(): number {\n return this.scrollHandler.getScrollLeft();\n }\n\n public init(): void {\n super.init();\n\n this.element = this.$el;\n this.isInitialized = false;\n\n this.options.rtl = this.getRtlOption();\n\n if (this.options.closedIcon == null) {\n this.options.closedIcon = this.getDefaultClosedIcon();\n }\n\n this.renderer = new ElementsRenderer(this);\n this.dataLoader = new DataLoader(this);\n this.saveStateHandler = new SaveStateHandler(this);\n this.selectNodeHandler = new SelectNodeHandler(this);\n this.dndHandler = new DragAndDropHandler(this);\n this.scrollHandler = new ScrollHandler(this);\n this.keyHandler = new KeyHandler(this);\n\n this.initData();\n\n this.element.on(\"click\", this.handleClick);\n this.element.on(\"dblclick\", this.handleDblclick);\n\n if (this.options.useContextMenu) {\n this.element.on(\"contextmenu\", this.handleContextmenu);\n }\n }\n\n public deinit(): void {\n this.element.empty();\n this.element.off();\n\n this.keyHandler.deinit();\n\n this.tree = new Node({}, true);\n\n super.deinit();\n }\n\n protected mouseCapture(positionInfo: PositionInfo): boolean | null {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseCapture(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseStart(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStart(positionInfo);\n } else {\n return false;\n }\n }\n\n protected mouseDrag(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n const result = this.dndHandler.mouseDrag(positionInfo);\n\n this.scrollHandler.checkScrolling();\n return result;\n } else {\n return false;\n }\n }\n\n protected mouseStop(positionInfo: PositionInfo): boolean {\n if (this.options.dragAndDrop) {\n return this.dndHandler.mouseStop(positionInfo);\n } else {\n return false;\n }\n }\n\n protected getMouseDelay(): number {\n return this.options.startDndDelay ?? 0;\n }\n\n private initData(): void {\n if (this.options.data) {\n this.doLoadData(this.options.data, null);\n } else {\n const dataUrl = this.getDataUrlInfo(null);\n\n if (dataUrl) {\n this.doLoadDataFromUrl(null, null, null);\n } else {\n this.doLoadData([], null);\n }\n }\n }\n\n private getDataUrlInfo(node: Node | null): JQuery.AjaxSettings | null {\n const dataUrl =\n this.options.dataUrl || (this.element.data(\"url\") as string | null);\n\n const getUrlFromString = (url: string): JQuery.AjaxSettings => {\n const urlInfo: JQuery.AjaxSettings = { url };\n\n setUrlInfoData(urlInfo);\n\n return urlInfo;\n };\n\n const setUrlInfoData = (urlInfo: JQuery.AjaxSettings): void => {\n if (node?.id) {\n // Load on demand of a subtree; add node parameter\n const data = { node: node.id };\n urlInfo[\"data\"] = data;\n } else {\n // Add selected_node parameter\n const selectedNodeId = this.getNodeIdToBeSelected();\n if (selectedNodeId) {\n const data = { selected_node: selectedNodeId };\n urlInfo[\"data\"] = data;\n }\n }\n };\n\n if (typeof dataUrl === \"function\") {\n return dataUrl(node);\n } else if (typeof dataUrl === \"string\") {\n return getUrlFromString(dataUrl);\n } else if (dataUrl && typeof dataUrl === \"object\") {\n setUrlInfoData(dataUrl);\n return dataUrl;\n } else {\n return null;\n }\n }\n\n private getNodeIdToBeSelected(): NodeId | null {\n if (this.options.saveState) {\n return this.saveStateHandler.getNodeIdToBeSelected();\n } else {\n return null;\n }\n }\n\n private initTree(data: NodeData[]): void {\n const doInit = (): void => {\n if (!this.isInitialized) {\n this.isInitialized = true;\n this._triggerEvent(\"tree.init\");\n }\n };\n\n if (!this.options.nodeClass) {\n return;\n }\n\n this.tree = new this.options.nodeClass(\n null,\n true,\n this.options.nodeClass\n );\n\n this.selectNodeHandler.clear();\n\n this.tree.loadFromData(data);\n\n const mustLoadOnDemand = this.setInitialState();\n\n this._refreshElements(null);\n\n if (!mustLoadOnDemand) {\n doInit();\n } else {\n // Load data on demand and then init the tree\n this.setInitialStateOnDemand(doInit);\n }\n }\n\n // Set initial state, either by restoring the state or auto-opening nodes\n // result: must load nodes on demand?\n private setInitialState(): boolean {\n const restoreState = (): [boolean, boolean] => {\n // result: is state restored, must load on demand?\n if (!this.options.saveState) {\n return [false, false];\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return [false, false];\n } else {\n const mustLoadOnDemand =\n this.saveStateHandler.setInitialState(state);\n\n // return true: the state is restored\n return [true, mustLoadOnDemand];\n }\n }\n };\n\n const autoOpenNodes = (): boolean => {\n // result: must load on demand?\n if (this.options.autoOpen === false) {\n return false;\n }\n\n const maxLevel = this.getAutoOpenMaxLevel();\n let mustLoadOnDemand = false;\n\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n mustLoadOnDemand = true;\n return false;\n } else if (!node.hasChildren()) {\n return false;\n } else {\n node.is_open = true;\n return level !== maxLevel;\n }\n });\n\n return mustLoadOnDemand;\n };\n\n let [isRestored, mustLoadOnDemand] = restoreState(); // eslint-disable-line prefer-const\n\n if (!isRestored) {\n mustLoadOnDemand = autoOpenNodes();\n }\n\n return mustLoadOnDemand;\n }\n\n // Set the initial state for nodes that are loaded on demand\n // Call cb_finished when done\n private setInitialStateOnDemand(cbFinished: () => void): void {\n const restoreState = (): boolean => {\n if (!this.options.saveState) {\n return false;\n } else {\n const state = this.saveStateHandler.getStateFromStorage();\n\n if (!state) {\n return false;\n } else {\n this.saveStateHandler.setInitialStateOnDemand(\n state,\n cbFinished\n );\n\n return true;\n }\n }\n };\n\n const autoOpenNodes = (): void => {\n const maxLevel = this.getAutoOpenMaxLevel();\n let loadingCount = 0;\n\n const loadAndOpenNode = (node: Node): void => {\n loadingCount += 1;\n this._openNode(node, false, () => {\n loadingCount -= 1;\n openNodes();\n });\n };\n\n const openNodes = (): void => {\n this.tree.iterate((node: Node, level: number) => {\n if (node.load_on_demand) {\n if (!node.is_loading) {\n loadAndOpenNode(node);\n }\n\n return false;\n } else {\n this._openNode(node, false, null);\n\n return level !== maxLevel;\n }\n });\n\n if (loadingCount === 0) {\n cbFinished();\n }\n };\n\n openNodes();\n };\n\n if (!restoreState()) {\n autoOpenNodes();\n }\n }\n\n private getAutoOpenMaxLevel(): number {\n if (this.options.autoOpen === true) {\n return -1;\n } else if (typeof this.options.autoOpen === \"number\") {\n return this.options.autoOpen;\n } else if (typeof this.options.autoOpen === \"string\") {\n return parseInt(this.options.autoOpen, 10);\n } else {\n return 0;\n }\n }\n\n private handleClick = (\n e: JQuery.ClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget) {\n if (clickTarget.type === \"button\") {\n this.toggle(clickTarget.node, this.options.slide);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (clickTarget.type === \"label\") {\n const node = clickTarget.node;\n const event = this._triggerEvent(\"tree.click\", {\n node,\n click_event: e,\n });\n\n if (!event.isDefaultPrevented()) {\n this.doSelectNode(node);\n }\n }\n }\n };\n\n private handleDblclick = (\n e: JQuery.DoubleClickEvent\n ): void => {\n const clickTarget = this.getClickTarget(e.target);\n\n if (clickTarget?.type === \"label\") {\n this._triggerEvent(\"tree.dblclick\", {\n node: clickTarget.node,\n click_event: e,\n });\n }\n };\n\n private getClickTarget(element: EventTarget): ClickTarget | null {\n const $target = jQuery(element);\n\n const $button = $target.closest(\".jqtree-toggler\");\n\n if ($button.length) {\n const node = this.getNode($button as JQuery);\n\n if (node) {\n return {\n type: \"button\",\n node,\n };\n }\n } else {\n const $el = $target.closest(\".jqtree-element\");\n if ($el.length) {\n const node = this.getNode($el as JQuery);\n if (node) {\n return {\n type: \"label\",\n node,\n };\n }\n }\n }\n\n return null;\n }\n\n private getNode($element: JQuery): null | Node {\n const $li = $element.closest(\"li.jqtree_common\");\n if ($li.length === 0) {\n return null;\n } else {\n return $li.data(\"node\") as Node;\n }\n }\n\n private handleContextmenu = (\n e: JQuery.ContextMenuEvent\n ) => {\n const $div = jQuery(e.target).closest(\"ul.jqtree-tree .jqtree-element\");\n if ($div.length) {\n const node = this.getNode($div);\n if (node) {\n e.preventDefault();\n e.stopPropagation();\n\n this._triggerEvent(\"tree.contextmenu\", {\n node,\n click_event: e,\n });\n return false;\n }\n }\n\n return null;\n };\n\n private saveState(): void {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n }\n\n private selectCurrentNode(mustSetFocus: boolean): void {\n const node = this.getSelectedNode();\n if (node) {\n const nodeElement = this._getNodeElementForNode(node);\n if (nodeElement) {\n nodeElement.select(mustSetFocus);\n }\n }\n }\n\n private deselectCurrentNode(): void {\n const node = this.getSelectedNode();\n if (node) {\n this.removeFromSelection(node);\n }\n }\n\n private getDefaultClosedIcon(): string {\n if (this.options.rtl) {\n // triangle to the left\n return \"◀\";\n } else {\n // triangle to the right\n return \"►\";\n }\n }\n\n private getRtlOption(): boolean {\n if (this.options.rtl != null) {\n return this.options.rtl;\n } else {\n const dataRtl = this.element.data(\"rtl\") as unknown;\n\n if (\n dataRtl !== null &&\n dataRtl !== false &&\n dataRtl !== undefined\n ) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n private doSelectNode(\n node: Node | null,\n optionsParam?: SelectNodeOptions\n ): void {\n const saveState = (): void => {\n if (this.options.saveState) {\n this.saveStateHandler.saveState();\n }\n };\n\n if (!node) {\n // Called with empty node -> deselect current node\n this.deselectCurrentNode();\n saveState();\n return;\n }\n const defaultOptions = { mustSetFocus: true, mustToggle: true };\n const selectOptions = { ...defaultOptions, ...(optionsParam || {}) };\n\n const canSelect = (): boolean => {\n if (this.options.onCanSelectNode) {\n return (\n this.options.selectable === true &&\n this.options.onCanSelectNode(node)\n );\n } else {\n return this.options.selectable === true;\n }\n };\n\n const openParents = (): void => {\n const parent = node.parent;\n\n if (parent && parent.parent && !parent.is_open) {\n this.openNode(parent, false);\n }\n };\n\n if (!canSelect()) {\n return;\n }\n\n if (this.selectNodeHandler.isNodeSelected(node)) {\n if (selectOptions.mustToggle) {\n this.deselectCurrentNode();\n this._triggerEvent(\"tree.select\", {\n node: null,\n previous_node: node,\n });\n }\n } else {\n const deselectedNode = this.getSelectedNode() || null;\n this.deselectCurrentNode();\n this.addToSelection(node, selectOptions.mustSetFocus);\n\n this._triggerEvent(\"tree.select\", {\n node,\n deselected_node: deselectedNode,\n });\n openParents();\n }\n\n saveState();\n }\n\n private doLoadData(data: NodeData[] | null, parentNode: Node | null): void {\n if (data) {\n if (parentNode) {\n this.deselectNodes(parentNode);\n this.loadSubtree(data, parentNode);\n } else {\n this.initTree(data);\n }\n\n if (this.isDragging()) {\n this.dndHandler.refresh();\n }\n }\n\n this._triggerEvent(\"tree.load_data\", {\n tree_data: data,\n parent_node: parentNode,\n });\n }\n\n private deselectNodes(parentNode: Node): void {\n const selectedNodesUnderParent =\n this.selectNodeHandler.getSelectedNodesUnder(parentNode);\n for (const n of selectedNodesUnderParent) {\n this.selectNodeHandler.removeFromSelection(n);\n }\n }\n\n private loadSubtree(data: NodeData[], parentNode: Node): void {\n parentNode.loadFromData(data);\n\n parentNode.load_on_demand = false;\n parentNode.is_loading = false;\n\n this._refreshElements(parentNode);\n }\n\n private doLoadDataFromUrl(\n urlInfoParam: string | JQuery.AjaxSettings | null,\n parentNode: Node | null,\n onFinished: HandleFinishedLoading | null\n ): void {\n const urlInfo = urlInfoParam || this.getDataUrlInfo(parentNode);\n\n this.dataLoader.loadFromUrl(urlInfo, parentNode, onFinished);\n }\n\n private loadFolderOnDemand(\n node: Node,\n slide = true,\n onFinished: OnFinishOpenNode | null\n ): void {\n node.is_loading = true;\n\n this.doLoadDataFromUrl(null, node, () => {\n this._openNode(node, slide, onFinished);\n });\n }\n}\n\nSimpleWidget.register(JqTreeWidget, \"tree\");\n"],"names":["Position","positionNames","before","Before","after","After","inside","Inside","none","None","getPositionName","position","name","Object","prototype","hasOwnProperty","call","isNodeRecordWithChildren","data","_typeof","Array","Node","o","arguments","length","undefined","isRoot","nodeClass","_classCallCheck","_defineProperty","this","isEmptyFolder","load_on_demand","setData","children","parent","idMapping","Map","tree","_createClass","key","value","removeChildren","_step","_iterator","_createForOfIteratorHelper","s","n","done","node","createNode","addChild","loadFromData","err","e","f","push","setParent","index","splice","doRemoveChild","indexOf","hasChildren","callback","_iterate","level","_step2","_iterator2","child","movedNode","targetNode","isParentOf","addChildAtPosition","getChildIndex","getDataFromNodes","nodes","map","tmpNode","k","v","getNodeByCallback","concat","result","iterate","nodeInfo","childIndex","newParent","_step3","originalParent","_iterator3","removeChild","nodeId","get","id","set","_this","_this$tree","removeNodeFromIndex","previousIndex","nextIndex","filter","nextSibling","getNextSibling","getNextNode","is_open","previousSibling","getPreviousSibling","getLastChild","getParent","lastChild","nodeData","_this2","addChildren","childrenData","_step4","_iterator4","initFromData","_this$tree2","addNodeToIndex","_this$tree3","_this$tree4","getNodeClass","DragAndDropHandler","treeWidget","hoveredArea","hitAreas","isDragging","currentItem","positionInfo","$element","jQuery","target","mustCaptureElement","options","onIsMoveHandle","nodeElement","_getNodeElement","onCanMove","_this$treeWidget$opti","pageX","pageY","refresh","offset","left","top","dragElement","DragElement","element","autoEscape","addClass","move","area","findHoveredArea","canMoveToArea","isFolder","stopOpenFolderTimer","mustOpenFolderTimer","startOpenFolderTimer","updateDropHint","removeDropHint","onDragMove","originalEvent","moveItem","clear","removeHover","removeHitAreas","removeClass","onDragStop","generateHitAreas","_getNodeElementForNode","hitAreasGenerator","HitAreasGenerator","getTreeDimensions","bottom","generate","is","onCanMoveTo","positionName","remove","previousGhost","x","y","dimensions","right","low","high","mid","addDropHint","folder","openFolderDelay","openFolderTimer","window","setTimeout","_openNode","slide","clearTimeout","previousParent","doMove","moveNode","empty","_refreshElements","_triggerEvent","move_info","moved_node","target_node","previous_parent","do_move","original_event","isDefaultPrevented","el","width","height","_getScrollLeft","_VisibleNodeIterator","_inherits","_super","_createSuper","currentNode","treeBottom","_this4","_assertThisInitialized","positions","lastTop","previousTop","group","generateHitAreasForGroup","addPosition","getTop","nextNode","positionsInGroup","positionCount","Math","min","areaHeight","round","areaTop","i","VisibleNodeIterator","_this3","isFirstNode","_iterateNode","mustIterateInside","handleFirstNode","handleOpenFolder","handleClosedFolder","handleNode","childrenLength","forEach","_","nextChild","handleAfterOpenFolder","nodeName","offsetX","offsetY","$tree","text","html","css","append","getBoolString","ElementsRenderer","openedIconElement","createButtonElement","openedIcon","closedIconElement","closedIcon","fromNode","renderFromNode","renderFromRoot","createDomElements","$previousLi","li","createLi","getLevel","attachNodeData","isRootNode","ul","createUl","appendChild","classString","role","rtl","dragAndDrop","document","createElement","className","setAttribute","isSelected","Boolean","selectNodeHandler","isNodeSelected","showEmptyFolder","createFolderLi","createNodeLi","onCreateLi","buttonClasses","getButtonClasses","folderClasses","getFolderClasses","iconElement","div","buttonLink","cloneNode","buttonLeft","titleSpan","createTitleSpan","liClasses","join","classes","tabIndex","setTreeItemAriaAttributes","textContent","innerHTML","is_loading","createTextNode","DataLoader","urlInfo","parentNode","onFinished","$el","getDomElement","addLoadingClass","notifyLoading","stopLoading","removeLoadingClass","submitRequest","loadData","parseData","jqXHR","onLoadFailed","isLoading","onLoading","urlInfoInput","handleSuccess","handleError","_ajaxSettings$method","ajaxSettings","_objectSpread","method","cache","dataType","success","error","url","toUpperCase","ajax","dataFilter","parsedData","JSON","parse","KeyHandler","canHandleKeyboard","selectedNode","getSelectedNode","which","DOWN","moveDown","UP","moveUp","RIGHT","moveRight","LEFT","moveLeft","keyboardSupport","on","handleKeyDown","off","selectNode","getNextVisibleNode","getPreviousVisibleNode","openNode","closeNode","scrollHandler","isScrolledIntoView","find","scrollToNode","isFocusOnTree","register","widgetClass","widgetName","getDataKey","getWidgetData","dataKey","widget","SimpleWidget","createWidget","init","fn","argument1","functionName","destroy","removeData","destroyWidget","_len","args","_key","widgetFunction","apply","callFunction","defaults","constructor","deinit","getPositionInfoFromMouseEvent","getPositionInfoFromTouch","touch","MouseWidget","_SimpleWidget","button","handleMouseDown","cancelable","preventDefault","handleMouseMove","handleMouseUp","touches","changedTouches","addEventListener","mouseDown","passive","touchStart","isMouseStarted","mouseDelayTimer","isMouseDelayMet","mouseDownInfo","removeEventListener","removeMouseMoveEventListeners","mouseCapture","handleStartMouse","mouseMove","touchMove","mouseUp","touchEnd","mouseDelay","getMouseDelay","startMouseDelayTimer","mouseDrag","mouseStart","mouseStop","SaveStateHandler","state","stringify","getState","onSetStateFromStorage","supportsLocalStorage","localStorage","setItem","getKeyName","jsonData","loadFromStorage","parseState","selectedNodeIds","openNodes","open_nodes","selected_node","getSelectedNodes","mustLoadOnDemand","openInitialNodes","resetSelection","selectInitialNodes","cbFinished","doSetInitialStateOnDemand","getStateFromStorage","onGetStateFromStorage","getItem","nodeIds","getNodeById","selectCount","addToSelection","removeFromSelection","nodeIdsParam","selectedNodes","loadingCount","newNodesIds","loadAndOpenNode","saveState","_supportsLocalStorage","sessionStorage","removeItem","testSupport","ScrollHandler","isInitialized","ensureInit","checkVerticalScrolling","checkHorizontalScrolling","$scrollParent","scrollTop","treeTop","elementBottom","viewBottom","elementTop","viewTop","elHeight","scrollParentTop","scrollLeft","_$scrollParent$","setDocumentAsScrollParent","cssAttributes","hasOverFlow","_i","_cssAttributes","attr","overflowValue","parents","getParentWithOverflow","tagName","initScrollParent","scrollParent","offsetHeight","refreshHitAreas","dndHandler","handleVerticalScrollingWithScrollParent","handleVerticalScrollingWithDocument","handleHorizontalScrollingWithParent","handleHorizontalScrollingWithDocument","scrollParentOffset","canScrollRight","clientWidth","scrollWidth","canScrollLeft","rightEdge","leftEdge","isNearRightEdge","isNearLeftEdge","max","$document","windowWidth","SelectNodeHandler","Set","selectedSingleNode","has","includeChildren","add","activeElement","_containsElement","NodeElement","mustShowBorderDropHint","BorderDropHint","GhostDropHint","mustSetFocus","getLi","$span","getSpan","trigger","removeAttr","FolderElement","_NodeElement","animationSpeed","$button","getButton","buttonEl","renderer","icon","doOpen","getUl","slideDown","show","doClose","slideUp","hide","$div","elWidth","outerHeight","$hint","$ghost","moveAfter","moveBefore","moveInsideOpenFolder","moveInside","_this$node$children$","childElement","NODE_PARAM_IS_EMPTY","PARAM_IS_EMPTY","JqTreeWidget","_MouseWidget","clickTarget","getClickTarget","type","toggle","stopPropagation","click_event","doSelectNode","closest","getNode","slideParam","Error","optionsParam","getData","doLoadData","param1","param2","param3","doLoadDataFromUrl","getNodeByName","getNodeByNameMustExist","getNodesByProperty","_parseParams","_this2$options$slide","parseParams","_parseParams2","_slicedToArray","close","newNodeInfo","existingNode","newNode","addAfter","addBefore","addParent","parentNodeParam","prepend","idIsChanged","subtree","positionIndex","saveStateHandler","select","deselect","nodeOffset","nodeTop","treeOffset","scrollToY","setInitialState","option","keyHandler","eventName","values","event","Event","doOpenNode","_node","_slide","_onFinished","open","loadFolderOnDemand","mustSelect","isSelectedNodeInSubtree","render","selectCurrentNode","getScrollLeft","_get","_getPrototypeOf","getRtlOption","getDefaultClosedIcon","dataLoader","initData","handleClick","handleDblclick","useContextMenu","handleContextmenu","checkScrolling","_this$options$startDn","startDndDelay","getDataUrlInfo","dataUrl","setUrlInfoData","selectedNodeId","getNodeIdToBeSelected","_this5","doInit","setInitialStateOnDemand","_this6","_restoreState2","restoreState","isRestored","autoOpen","maxLevel","getAutoOpenMaxLevel","autoOpenNodes","_this7","parseInt","$target","$li","dataRtl","_this8","deselectCurrentNode","selectOptions","mustToggle","onCanSelectNode","selectable","previous_node","deselectedNode","deselected_node","deselectNodes","loadSubtree","initTree","tree_data","parent_node","getSelectedNodesUnder","urlInfoParam","loadFromUrl","_this9"],"mappings":";;;;;;;;;;;;;;;;;;;q1JAAA,ICIYA,WAAAA,GAAQ,OAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,MAAA,GAAA,QAARA,EAAAA,EAAQ,OAAA,GAAA,SAARA,EAAAA,EAAQ,KAAA,GAAA,OAARA,CAAQ,EAAA,CAAA,GAOdC,EAA0C,CAC5CC,OAAQF,EAASG,OACjBC,MAAOJ,EAASK,MAChBC,OAAQN,EAASO,OACjBC,KAAMR,EAASS,MAKNC,EAAkB,SAACC,GAC5B,IAAK,IAAMC,KAAQX,EACf,GAAIY,OAAOC,UAAUC,eAAeC,KAAKf,EAAeW,IAChDX,EAAcW,KAAUD,EACxB,OAAOC,EAKnB,MAAO,EACX,EAKMK,EAA2B,SAC7BC,GAAc,MAEE,WAAhBC,EAAOD,IACP,aAAcA,GACdA,EAAe,oBAAaE,KAAK,EAExBC,EAAI,WAgBb,SA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