From af8998bf5514e0a7d9383d2113f5deb4486d2eac Mon Sep 17 00:00:00 2001 From: dabeng Date: Mon, 30 Jan 2023 10:25:31 +0800 Subject: [PATCH] WIP: replace testcafe with cypress --- .gitignore | 4 + bower.json | 9 +- cypress.config.js | 13 + dist/css/jquery.orgchart.css | 2 + dist/css/jquery.orgchart.min.css | 2 +- dist/js/jquery.orgchart.js | 2 +- dist/js/jquery.orgchart.min.js | 2 +- dist/js/jquery.orgchart.min.js.map | 2 +- gulpfile.js | 7 +- package-lock.json | 17648 ----------------- package.json | 10 +- src/css/jquery.orgchart.css | 2 + src/js/jquery.orgchart.js | 2 +- test/cypress/e2e/drag-drop.cy.js | 115 + test/cypress/e2e/edit-chart.cy.js | 80 + test/cypress/e2e/local-datasource.cy.js | 82 + test/cypress/e2e/ondemand-loading-data.cy.js | 33 + test/cypress/e2e/pan-zoom.cy.js | 41 + test/cypress/e2e/reload-data.cy.js | 26 + test/cypress/e2e/toggle-sibs-resp.cy.js | 33 + test/cypress/e2e/vertical-vevel.cy.js | 38 + test/cypress/fixtures/example.json | 5 + test/cypress/support/commands.js | 25 + test/cypress/support/e2e.js | 20 + 24 files changed, 537 insertions(+), 17666 deletions(-) create mode 100644 cypress.config.js delete mode 100644 package-lock.json create mode 100644 test/cypress/e2e/drag-drop.cy.js create mode 100644 test/cypress/e2e/edit-chart.cy.js create mode 100644 test/cypress/e2e/local-datasource.cy.js create mode 100644 test/cypress/e2e/ondemand-loading-data.cy.js create mode 100644 test/cypress/e2e/pan-zoom.cy.js create mode 100644 test/cypress/e2e/reload-data.cy.js create mode 100644 test/cypress/e2e/toggle-sibs-resp.cy.js create mode 100644 test/cypress/e2e/vertical-vevel.cy.js create mode 100644 test/cypress/fixtures/example.json create mode 100644 test/cypress/support/commands.js create mode 100644 test/cypress/support/e2e.js diff --git a/.gitignore b/.gitignore index c49c447a..76a15a35 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ node_modules/ # System Files .DS_Store + +# e2e testing files +test/cypress/screenshots +test/cypress/videos diff --git a/bower.json b/bower.json index 176f1d05..bd642860 100644 --- a/bower.json +++ b/bower.json @@ -29,10 +29,9 @@ "tests" ], "dependencies": { - "jquery": "~3.2.1", - "jquery-mockjax": "^2.2.0", - "jspdf": "^1.3.5", - "font-awesome": "^4.6.3", - "html2canvas": "^0.5.0-beta4" + "jquery": "^3.6.2", + "jquery-mockjax": "^2.6.0", + "jspdf": "^2.5.1", + "html2canvas": "^1.4.1" } } diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 00000000..87d710ea --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,13 @@ +const { defineConfig } = require("cypress"); + +module.exports = defineConfig({ + screenshotsFolder: "test/cypress/screenshots", + videosFolder: "test/cypress/videos", + e2e: { + supportFile: "test/cypress/support/e2e.{js,jsx,ts,tsx}", + specPattern: "test/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}", + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, +}); diff --git a/dist/css/jquery.orgchart.css b/dist/css/jquery.orgchart.css index a4989e40..98987656 100644 --- a/dist/css/jquery.orgchart.css +++ b/dist/css/jquery.orgchart.css @@ -402,6 +402,8 @@ position: absolute; left: 5px; bottom: -2px; + width: 1rem; + height: 1rem; } .orgchart .node .toggleBtn::before { diff --git a/dist/css/jquery.orgchart.min.css b/dist/css/jquery.orgchart.min.css index 40268d11..d2610398 100644 --- a/dist/css/jquery.orgchart.min.css +++ b/dist/css/jquery.orgchart.min.css @@ -1 +1 @@ -.orgchart{box-sizing:border-box;display:inline-block;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:linear-gradient(90deg,rgba(200,0,0,.15) 10%,rgba(0,0,0,0) 10%),linear-gradient(rgba(200,0,0,.15) 10%,rgba(0,0,0,0) 10%);background-size:10px 10px;border:1px dashed transparent;padding:20px 20px 0 20px}.orgchart .hidden,.orgchart~.hidden{display:none!important}.orgchart.b2t{transform:rotate(180deg)}.orgchart.l2r{position:absolute;transform:rotate(-90deg) rotateY(180deg);transform-origin:left top;text-align:center}.orgchart.r2l{position:absolute;transform:rotate(90deg);transform-origin:left top;text-align:center}.orgchart~.mask{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;text-align:center;background-color:rgba(0,0,0,.3)}.orgchart~.mask .spinner{position:absolute;top:calc(50% - 50px);left:calc(50% - 50px)}.orgchart>.spinner::before,.orgchart~.mask .spinner::before{width:100px;height:100px;border-width:10px;border-radius:50px;border-top-color:rgba(68,157,68,.8);border-bottom-color:rgba(68,157,68,.8);border-left-color:rgba(68,157,68,.8)}.orgchart .nodes{display:flex;list-style:none;padding-left:0;margin:0}.orgchart .hierarchy{position:relative}.orgchart .hierarchy::before{content:"";position:absolute;top:-11px;left:0;width:100%;border-top:2px solid rgba(217,83,79,.8);box-sizing:border-box}.orgchart .hierarchy.isSiblingsCollapsed.left-sibs::before,.orgchart .hierarchy:first-child::before{left:calc(50% - 1px);width:calc(50% + 1px)}.orgchart .hierarchy.isSiblingsCollapsed.right-sibs::before,.orgchart .hierarchy:last-child::before{width:calc(50% + 1px)}.orgchart .hierarchy:not(.hidden):only-child::before{width:2px}.orgchart .isAncestorsCollapsed:only-child::before,.orgchart .isAncestorsCollapsed>.node::before,.orgchart .isChildrenCollapsed>.node:not(:only-child)::after,.orgchart .isCollapsedDescendant::before,.orgchart .isCollapsedDescendant>.node::after,.orgchart .isCollapsedDescendant>.node::before,.orgchart .isCollapsedSibling .hierarchy::before,.orgchart .isCollapsedSibling::before,.orgchart .isSiblingsCollapsed.left-sibs.right-sibs::before,.orgchart .isSiblingsCollapsed.left-sibs:last-child:before,.orgchart .isSiblingsCollapsed.right-sibs:first-child:before,.orgchart .isSiblingsCollapsed:not(.left-sibs):not(.right-sibs)::before,.orgchart>.nodes>.hierarchy::before{content:none}.orgchart .node:not(:only-child)::after{content:"";position:absolute;bottom:-11px;left:calc(50% - 1px);width:2px;height:9px;background-color:rgba(217,83,79,.8)}.orgchart ul li .node.allowedDrop{border-color:rgba(68,157,68,.9)}.orgchart ul li .node.currentDropTarget{background-color:rgba(68,157,68,.9)}.orgchart ul li .node.selected{background-color:rgba(238,217,54,.5)}.orgchart ul li .node:hover{background-color:rgba(238,217,54,.5)}.orgchart>ul>li>ul li>.node::before{content:"";position:absolute;top:var(--top,-11px);left:calc(50% - 1px);width:2px;height:var(--height,9px);background-color:rgba(217,83,79,.8)}.orgchart>ul>li>ul li.isSiblingsCollapsed>.node::before{top:var(--top-cross-point,-13px);height:var(--height-cross-point,11px)}.orgchart .node{box-sizing:border-box;display:inline-block;position:relative;margin:0 0 20px 0;padding:3px;border:2px dashed transparent;text-align:center}.orgchart.l2r .node,.orgchart.r2l .node{width:50px;height:140px}.orgchart .node:hover{background-color:rgba(238,217,54,.5);transition:.5s;cursor:default;z-index:20}.orgchart .node.focused{background-color:rgba(238,217,54,.5)}.orgchart .ghost-node{position:fixed;left:-10000px;top:-10000px}.orgchart .ghost-node rect{fill:#fff;stroke:#bf0000}.orgchart .node.allowedDrop{border-color:rgba(68,157,68,.9)}.orgchart .node>.spinner{position:absolute;top:calc(50% - 1rem);left:calc(50% - 1rem)}.orgchart .node>.spinner::before{width:2rem;height:2rem;border-width:.2rem;border-radius:1rem;border-top-color:rgba(68,157,68,.8);border-bottom-color:rgba(68,157,68,.8);border-left-color:rgba(68,157,68,.8)}.orgchart .node .title{box-sizing:border-box;padding:2px;width:130px;text-align:center;font-size:.75rem;font-weight:700;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:rgba(217,83,79,.8);color:#fff;border-radius:4px 4px 0 0}.orgchart.b2t .node .title{transform:rotate(-180deg);transform-origin:center bottom}.orgchart.l2r .node .title{transform:rotate(-90deg) translate(-45px,-45px) rotateY(180deg);transform-origin:bottom center}.orgchart.r2l .node .title{transform:rotate(-90deg) translate(-45px,-45px);transform-origin:bottom center}.orgchart .node .title .symbol{float:left;margin-top:12px;margin-left:2px}.orgchart .node .title .symbol::before{background-color:#fff;border-color:rgba(217,83,79,.8)}.orgchart .node .title .symbol::after{background-color:#fff}.orgchart .node .content{box-sizing:border-box;padding:2px;height:20px;font-size:.625rem;border:1px solid rgba(217,83,79,.8);border-radius:0 0 4px 4px;text-align:center;background-color:#fff;color:#333;text-overflow:ellipsis;white-space:nowrap}.orgchart.b2t .node .content{transform:rotate(180deg);transform-origin:center top}.orgchart.l2r .node .content{transform:rotate(-90deg) translate(-45px,-45px) rotateY(180deg);transform-origin:top center;width:130px}.orgchart.r2l .node .content{transform:rotate(-90deg) translate(-45px,-45px);transform-origin:top center;width:130px}.orgchart .node .edge{position:absolute;cursor:default;transition:.2s}.orgchart .node .edge::before{border-color:rgba(68,157,68,.5)}.orgchart.noncollapsable .node .edge{display:none}.orgchart .node .edge:hover{cursor:pointer}.orgchart .edge:hover::before{border-color:#449d44}.orgchart .node .verticalEdge{width:calc(100% - 6px);width:-webkit-calc(100% - 6px);width:-moz-calc(100% - 6px);height:10px;left:3px}.orgchart .node .verticalEdge::before{position:absolute;left:calc(50% - .3125rem)}.orgchart .node .topEdge{top:-2px}.orgchart .node .topEdge.oci-chevron-up::before{top:2px}.orgchart .node .topEdge.oci-chevron-down::before{bottom:3px}.orgchart .node .bottomEdge{bottom:-2px}.orgchart .node .bottomEdge.oci-chevron-up::before{bottom:-3px}.orgchart .node .bottomEdge.oci-chevron-down::before{bottom:1px}.orgchart .node .horizontalEdge{width:10px;height:calc(100% - 6px);height:-webkit-calc(100% - 6px);height:-moz-calc(100% - 6px);top:3px}.orgchart .node .rightEdge{right:-2px}.orgchart .node .leftEdge{left:-2px}.orgchart .node .horizontalEdge::before{position:absolute;top:calc(50% - .3125rem)}.orgchart .node .rightEdge.oci-chevron-left::before{right:-3px}.orgchart .node .rightEdge.oci-chevron-right::before{right:1px}.orgchart .node .leftEdge.oci-chevron-right::before{left:-3px}.orgchart .node .leftEdge.oci-chevron-left::before{left:1px}.orgchart .node .toggleBtn{position:absolute;left:5px;bottom:-2px}.orgchart .node .toggleBtn::before{background-color:rgba(68,157,68,.6)}.orgchart .node .toggleBtn:hover::before{background-color:#449d44}.oc-export-btn{margin-left:.5rem;padding:.5rem 1rem}.orgchart .node{transition:transform .3s,opacity .3s}.orgchart .slide-down{opacity:0;transform:translateY(40px)}.orgchart.l2r .node.slide-down,.orgchart.r2l .node.slide-down{transform:translateY(130px)}.orgchart .slide-up{opacity:0;transform:translateY(-40px)}.orgchart.l2r .node.slide-up,.orgchart.r2l .node.slide-up{transform:translateY(-130px)}.orgchart .slide-right{opacity:0;transform:translateX(130px)}.orgchart.l2r .node.slide-right,.orgchart.r2l .node.slide-right{transform:translateX(40px)}.orgchart .slide-left{opacity:0;transform:translateX(-130px)}.orgchart.l2r .node.slide-left,.orgchart.r2l .node.slide-left{transform:translateX(-40px)}.orgchart .hierarchy.hybrid>.node{margin-bottom:0}.orgchart .hierarchy.hybrid>.node::after{content:none}.orgchart .nodes.vertical{display:block;margin:0;padding-left:18px}.orgchart .nodes.vertical .nodes{list-style:none;display:block;margin:0;padding-left:18px;text-align:left}.orgchart .nodes.vertical .node{margin-bottom:0}.orgchart .nodes.vertical .node::after,.orgchart .nodes.vertical .node::before{content:none}.orgchart .nodes.vertical::before{content:'';display:inline-block;position:relative;height:14px;width:2px;left:-9px;background-color:rgba(217,83,79,.8)}.orgchart .nodes.vertical>.hierarchy:first-child::before{box-sizing:border-box;top:-4px;height:30px;width:calc(50% - 2px);border-width:2px 0 0 2px}.orgchart .nodes.vertical .hierarchy{position:relative;text-align:left}.orgchart .nodes.vertical .hierarchy::after,.orgchart .nodes.vertical .hierarchy::before{box-sizing:border-box;content:'';position:absolute;left:-6px;border-color:rgba(217,83,79,.8);border-style:solid;border-width:0 0 2px 2px}.orgchart .nodes.vertical .hierarchy::before{top:-4px;height:30px;width:11px}.orgchart .nodes.vertical .hierarchy::after{top:1px;height:100%}.orgchart .nodes.vertical .hierarchy:first-child::after{box-sizing:border-box;top:24px;width:11px;border-width:2px 0 0 2px}.orgchart .nodes.vertical .hierarchy:last-child::after{box-sizing:border-box;border-width:2px 0 0}.oci{display:inline-block;position:relative;font-style:normal;font-family:Arial}.oci-chevron-up::before{content:"";display:inline-block;box-sizing:border-box;vertical-align:text-bottom;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(-135deg)}.oci-chevron-right::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(-45deg)}.oci-chevron-down::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(45deg)}.oci-chevron-left::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(135deg)}.oci-leader::before{position:absolute;content:"";display:inline-block;width:.4rem;height:.4rem;border-radius:.2rem;background:#000;top:-.75rem;left:.1rem}.oci-leader::after{position:absolute;content:"";display:inline-block;width:.875rem;height:.375rem;border-radius:.25rem .25rem 0 0;background:#000;top:-.3rem;left:-.125rem}.oci-plus-square::before{content:"+";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;background-color:#000;color:#fff}.oci-plus-circle::before{content:"+";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff}.oci-minus-square::before{content:"−";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;background-color:#000;color:#fff}.oci-minus-circle::before{content:"−";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff}.oci-arrow-circle-up::before{content:"▲";display:inline-block;text-align:center;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;font-size:.875rem}.oci-arrow-circle-down::before{content:"▼";text-align:center;display:inline-block;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;font-size:.875rem}.oci-info-circle::before{content:"i";display:inline-block;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;text-align:center;font-weight:700}.oci-spinner::before{content:"";vertical-align:text-bottom;display:inline-block;box-sizing:border-box;width:1rem;height:1rem;border:.1rem solid #000;border-right-color:transparent;border-radius:.625rem;animation:oci-infinite-spinning .75s linear infinite}@keyframes oci-infinite-spinning{from{transform:rotate(0)}to{transform:rotate(360deg)}} \ No newline at end of file +.orgchart{box-sizing:border-box;display:inline-block;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:linear-gradient(90deg,rgba(200,0,0,.15) 10%,rgba(0,0,0,0) 10%),linear-gradient(rgba(200,0,0,.15) 10%,rgba(0,0,0,0) 10%);background-size:10px 10px;border:1px dashed transparent;padding:20px 20px 0 20px}.orgchart .hidden,.orgchart~.hidden{display:none!important}.orgchart.b2t{transform:rotate(180deg)}.orgchart.l2r{position:absolute;transform:rotate(-90deg) rotateY(180deg);transform-origin:left top;text-align:center}.orgchart.r2l{position:absolute;transform:rotate(90deg);transform-origin:left top;text-align:center}.orgchart~.mask{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;text-align:center;background-color:rgba(0,0,0,.3)}.orgchart~.mask .spinner{position:absolute;top:calc(50% - 50px);left:calc(50% - 50px)}.orgchart>.spinner::before,.orgchart~.mask .spinner::before{width:100px;height:100px;border-width:10px;border-radius:50px;border-top-color:rgba(68,157,68,.8);border-bottom-color:rgba(68,157,68,.8);border-left-color:rgba(68,157,68,.8)}.orgchart .nodes{display:flex;list-style:none;padding-left:0;margin:0}.orgchart .hierarchy{position:relative}.orgchart .hierarchy::before{content:"";position:absolute;top:-11px;left:0;width:100%;border-top:2px solid rgba(217,83,79,.8);box-sizing:border-box}.orgchart .hierarchy.isSiblingsCollapsed.left-sibs::before,.orgchart .hierarchy:first-child::before{left:calc(50% - 1px);width:calc(50% + 1px)}.orgchart .hierarchy.isSiblingsCollapsed.right-sibs::before,.orgchart .hierarchy:last-child::before{width:calc(50% + 1px)}.orgchart .hierarchy:not(.hidden):only-child::before{width:2px}.orgchart .isAncestorsCollapsed:only-child::before,.orgchart .isAncestorsCollapsed>.node::before,.orgchart .isChildrenCollapsed>.node:not(:only-child)::after,.orgchart .isCollapsedDescendant::before,.orgchart .isCollapsedDescendant>.node::after,.orgchart .isCollapsedDescendant>.node::before,.orgchart .isCollapsedSibling .hierarchy::before,.orgchart .isCollapsedSibling::before,.orgchart .isSiblingsCollapsed.left-sibs.right-sibs::before,.orgchart .isSiblingsCollapsed.left-sibs:last-child:before,.orgchart .isSiblingsCollapsed.right-sibs:first-child:before,.orgchart .isSiblingsCollapsed:not(.left-sibs):not(.right-sibs)::before,.orgchart>.nodes>.hierarchy::before{content:none}.orgchart .node:not(:only-child)::after{content:"";position:absolute;bottom:-11px;left:calc(50% - 1px);width:2px;height:9px;background-color:rgba(217,83,79,.8)}.orgchart ul li .node.allowedDrop{border-color:rgba(68,157,68,.9)}.orgchart ul li .node.currentDropTarget{background-color:rgba(68,157,68,.9)}.orgchart ul li .node.selected{background-color:rgba(238,217,54,.5)}.orgchart ul li .node:hover{background-color:rgba(238,217,54,.5)}.orgchart>ul>li>ul li>.node::before{content:"";position:absolute;top:var(--top,-11px);left:calc(50% - 1px);width:2px;height:var(--height,9px);background-color:rgba(217,83,79,.8)}.orgchart>ul>li>ul li.isSiblingsCollapsed>.node::before{top:var(--top-cross-point,-13px);height:var(--height-cross-point,11px)}.orgchart .node{box-sizing:border-box;display:inline-block;position:relative;margin:0 0 20px 0;padding:3px;border:2px dashed transparent;text-align:center}.orgchart.l2r .node,.orgchart.r2l .node{width:50px;height:140px}.orgchart .node:hover{background-color:rgba(238,217,54,.5);transition:.5s;cursor:default;z-index:20}.orgchart .node.focused{background-color:rgba(238,217,54,.5)}.orgchart .ghost-node{position:fixed;left:-10000px;top:-10000px}.orgchart .ghost-node rect{fill:#fff;stroke:#bf0000}.orgchart .node.allowedDrop{border-color:rgba(68,157,68,.9)}.orgchart .node>.spinner{position:absolute;top:calc(50% - 1rem);left:calc(50% - 1rem)}.orgchart .node>.spinner::before{width:2rem;height:2rem;border-width:.2rem;border-radius:1rem;border-top-color:rgba(68,157,68,.8);border-bottom-color:rgba(68,157,68,.8);border-left-color:rgba(68,157,68,.8)}.orgchart .node .title{box-sizing:border-box;padding:2px;width:130px;text-align:center;font-size:.75rem;font-weight:700;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:rgba(217,83,79,.8);color:#fff;border-radius:4px 4px 0 0}.orgchart.b2t .node .title{transform:rotate(-180deg);transform-origin:center bottom}.orgchart.l2r .node .title{transform:rotate(-90deg) translate(-45px,-45px) rotateY(180deg);transform-origin:bottom center}.orgchart.r2l .node .title{transform:rotate(-90deg) translate(-45px,-45px);transform-origin:bottom center}.orgchart .node .title .symbol{float:left;margin-top:12px;margin-left:2px}.orgchart .node .title .symbol::before{background-color:#fff;border-color:rgba(217,83,79,.8)}.orgchart .node .title .symbol::after{background-color:#fff}.orgchart .node .content{box-sizing:border-box;padding:2px;height:20px;font-size:.625rem;border:1px solid rgba(217,83,79,.8);border-radius:0 0 4px 4px;text-align:center;background-color:#fff;color:#333;text-overflow:ellipsis;white-space:nowrap}.orgchart.b2t .node .content{transform:rotate(180deg);transform-origin:center top}.orgchart.l2r .node .content{transform:rotate(-90deg) translate(-45px,-45px) rotateY(180deg);transform-origin:top center;width:130px}.orgchart.r2l .node .content{transform:rotate(-90deg) translate(-45px,-45px);transform-origin:top center;width:130px}.orgchart .node .edge{position:absolute;cursor:default;transition:.2s}.orgchart .node .edge::before{border-color:rgba(68,157,68,.5)}.orgchart.noncollapsable .node .edge{display:none}.orgchart .node .edge:hover{cursor:pointer}.orgchart .edge:hover::before{border-color:#449d44}.orgchart .node .verticalEdge{width:calc(100% - 6px);width:-webkit-calc(100% - 6px);width:-moz-calc(100% - 6px);height:10px;left:3px}.orgchart .node .verticalEdge::before{position:absolute;left:calc(50% - .3125rem)}.orgchart .node .topEdge{top:-2px}.orgchart .node .topEdge.oci-chevron-up::before{top:2px}.orgchart .node .topEdge.oci-chevron-down::before{bottom:3px}.orgchart .node .bottomEdge{bottom:-2px}.orgchart .node .bottomEdge.oci-chevron-up::before{bottom:-3px}.orgchart .node .bottomEdge.oci-chevron-down::before{bottom:1px}.orgchart .node .horizontalEdge{width:10px;height:calc(100% - 6px);height:-webkit-calc(100% - 6px);height:-moz-calc(100% - 6px);top:3px}.orgchart .node .rightEdge{right:-2px}.orgchart .node .leftEdge{left:-2px}.orgchart .node .horizontalEdge::before{position:absolute;top:calc(50% - .3125rem)}.orgchart .node .rightEdge.oci-chevron-left::before{right:-3px}.orgchart .node .rightEdge.oci-chevron-right::before{right:1px}.orgchart .node .leftEdge.oci-chevron-right::before{left:-3px}.orgchart .node .leftEdge.oci-chevron-left::before{left:1px}.orgchart .node .toggleBtn{position:absolute;left:5px;bottom:-2px;width:1rem;height:1rem}.orgchart .node .toggleBtn::before{background-color:rgba(68,157,68,.6)}.orgchart .node .toggleBtn:hover::before{background-color:#449d44}.oc-export-btn{margin-left:.5rem;padding:.5rem 1rem}.orgchart .node{transition:transform .3s,opacity .3s}.orgchart .slide-down{opacity:0;transform:translateY(40px)}.orgchart.l2r .node.slide-down,.orgchart.r2l .node.slide-down{transform:translateY(130px)}.orgchart .slide-up{opacity:0;transform:translateY(-40px)}.orgchart.l2r .node.slide-up,.orgchart.r2l .node.slide-up{transform:translateY(-130px)}.orgchart .slide-right{opacity:0;transform:translateX(130px)}.orgchart.l2r .node.slide-right,.orgchart.r2l .node.slide-right{transform:translateX(40px)}.orgchart .slide-left{opacity:0;transform:translateX(-130px)}.orgchart.l2r .node.slide-left,.orgchart.r2l .node.slide-left{transform:translateX(-40px)}.orgchart .hierarchy.hybrid>.node{margin-bottom:0}.orgchart .hierarchy.hybrid>.node::after{content:none}.orgchart .nodes.vertical{display:block;margin:0;padding-left:18px}.orgchart .nodes.vertical .nodes{list-style:none;display:block;margin:0;padding-left:18px;text-align:left}.orgchart .nodes.vertical .node{margin-bottom:0}.orgchart .nodes.vertical .node::after,.orgchart .nodes.vertical .node::before{content:none}.orgchart .nodes.vertical::before{content:'';display:inline-block;position:relative;height:14px;width:2px;left:-9px;background-color:rgba(217,83,79,.8)}.orgchart .nodes.vertical>.hierarchy:first-child::before{box-sizing:border-box;top:-4px;height:30px;width:calc(50% - 2px);border-width:2px 0 0 2px}.orgchart .nodes.vertical .hierarchy{position:relative;text-align:left}.orgchart .nodes.vertical .hierarchy::after,.orgchart .nodes.vertical .hierarchy::before{box-sizing:border-box;content:'';position:absolute;left:-6px;border-color:rgba(217,83,79,.8);border-style:solid;border-width:0 0 2px 2px}.orgchart .nodes.vertical .hierarchy::before{top:-4px;height:30px;width:11px}.orgchart .nodes.vertical .hierarchy::after{top:1px;height:100%}.orgchart .nodes.vertical .hierarchy:first-child::after{box-sizing:border-box;top:24px;width:11px;border-width:2px 0 0 2px}.orgchart .nodes.vertical .hierarchy:last-child::after{box-sizing:border-box;border-width:2px 0 0}.oci{display:inline-block;position:relative;font-style:normal;font-family:Arial}.oci-chevron-up::before{content:"";display:inline-block;box-sizing:border-box;vertical-align:text-bottom;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(-135deg)}.oci-chevron-right::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(-45deg)}.oci-chevron-down::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(45deg)}.oci-chevron-left::before{content:"";display:inline-block;box-sizing:border-box;width:.625rem;height:.625rem;border-width:0 .2rem .2rem 0;border-style:solid;border-color:#000;background:0 0;transform:rotate(135deg)}.oci-leader::before{position:absolute;content:"";display:inline-block;width:.4rem;height:.4rem;border-radius:.2rem;background:#000;top:-.75rem;left:.1rem}.oci-leader::after{position:absolute;content:"";display:inline-block;width:.875rem;height:.375rem;border-radius:.25rem .25rem 0 0;background:#000;top:-.3rem;left:-.125rem}.oci-plus-square::before{content:"+";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;background-color:#000;color:#fff}.oci-plus-circle::before{content:"+";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff}.oci-minus-square::before{content:"−";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;background-color:#000;color:#fff}.oci-minus-circle::before{content:"−";display:inline-block;vertical-align:text-bottom;text-align:center;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff}.oci-arrow-circle-up::before{content:"▲";display:inline-block;text-align:center;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;font-size:.875rem}.oci-arrow-circle-down::before{content:"▼";text-align:center;display:inline-block;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;font-size:.875rem}.oci-info-circle::before{content:"i";display:inline-block;vertical-align:text-bottom;width:1rem;height:1rem;border-radius:.5rem;background-color:#000;color:#fff;text-align:center;font-weight:700}.oci-spinner::before{content:"";vertical-align:text-bottom;display:inline-block;box-sizing:border-box;width:1rem;height:1rem;border:.1rem solid #000;border-right-color:transparent;border-radius:.625rem;animation:oci-infinite-spinning .75s linear infinite}@keyframes oci-infinite-spinning{from{transform:rotate(0)}to{transform:rotate(360deg)}} \ No newline at end of file diff --git a/dist/js/jquery.orgchart.js b/dist/js/jquery.orgchart.js index 9354660a..f78010ca 100644 --- a/dist/js/jquery.orgchart.js +++ b/dist/js/jquery.orgchart.js @@ -958,7 +958,7 @@ $children.addClass('sliding').removeClass('slide-up').eq(0).one('transitionend', { 'vNodes': $children }, this.expandVNodesEnd); } else { $descendants.addClass('sliding slide-up').eq(0).one('transitionend', { 'vNodes': $descendants }, this.collapseVNodesEnd); - $descendants.find('.toggleBtn').removeClass('oci-minus-square').addClass('oci-plus-square'); + $descendants.find('.toggleBtn').removeClass('oci-minus-square oci-plus-square'); } }, // diff --git a/dist/js/jquery.orgchart.min.js b/dist/js/jquery.orgchart.min.js index dad70571..07caa0dd 100644 --- a/dist/js/jquery.orgchart.min.js +++ b/dist/js/jquery.orgchart.min.js @@ -1,2 +1,2 @@ -"use strict";!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):e(jQuery,window,document)}(function(p,u,f,d){function t(e,t){this.$chartContainer=p(e),this.opts=t,this.defaultOptions={nodeTitle:"name",nodeId:"id",toggleSiblingsResp:!1,visibleLevel:999,chartClass:"",exportButton:!1,exportButtonName:"Export",exportFilename:"OrgChart",exportFileextension:"png",parentNodeSymbol:"oci-leader",draggable:!1,direction:"t2b",pan:!1,zoom:!1,zoominLimit:7,zoomoutLimit:.5}}t.prototype={init:function(e){var n=this;this.options=p.extend({},this.defaultOptions,this.opts,e);var t=this.$chartContainer;this.$chart&&this.$chart.remove();var i=this.options.data,s=this.$chart=p("
",{data:{options:this.options},class:"orgchart"+(""!==this.options.chartClass?" "+this.options.chartClass:"")+("t2b"!==this.options.direction?" "+this.options.direction:""),click:function(e){p(e.target).closest(".node").length||s.find(".node.focused").removeClass("focused")}});"undefined"!=typeof MutationObserver&&this.triggerInitEvent();var o=s.append(p('')).find(".hierarchy");return"object"===p.type(i)?i instanceof p?this.buildHierarchy(o,this.buildJsonDS(i.children()),0,this.options):this.buildHierarchy(o,this.options.ajaxURL?i:this.attachRel(i,"00")):(s.append(''),p.ajax({url:i,dataType:"json"}).done(function(e,t,i){n.buildHierarchy(o,n.options.ajaxURL?e:n.attachRel(e,"00"),0,n.options)}).fail(function(e,t,i){console.log(i)}).always(function(){s.children(".spinner").remove()})),t.append(s),this.options.exportButton&&!p(".oc-export-btn").length&&this.attachExportButton(),this.options.pan&&this.bindPan(),this.options.zoom&&this.bindZoom(),this},triggerInitEvent:function(){var s=this,o=new MutationObserver(function(e){o.disconnect();e:for(var t=0;t",{class:"oc-export-btn",text:this.options.exportButtonName,click:function(e){e.preventDefault(),t.export()}});this.$chartContainer.after(e)},setOptions:function(e,t){return"string"==typeof e&&("pan"===e&&(t?this.bindPan():this.unbindPan()),"zoom"===e&&(t?this.bindZoom():this.unbindZoom())),"object"==typeof e&&(e.data?this.init(e):(void 0!==e.pan&&(e.pan?this.bindPan():this.unbindPan()),void 0!==e.zoom&&(e.zoom?this.bindZoom():this.unbindZoom()))),this},panStartHandler:function(e){var o=p(e.delegateTarget);if(p(e.target).closest(".node").length||e.touches&&1i.zoomoutLimit&&oi.zoomoutLimit&&o').children().not(".spinner").css("opacity",.2),t.data("inAjax",!0),p(".oc-export-btn").prop("disabled",!0),!0)},endLoading:function(e){var t=e.parent();e.removeClass("hidden"),t.find(".spinner").remove(),t.children().removeAttr("style"),this.$chart.data("inAjax",!1),p(".oc-export-btn").prop("disabled",!1)},isInAction:function(e){return-1').after('
    ').siblings(".nodes").append(i.find(".horizontalEdge").remove().end().closest(".hierarchy")),t.children(".title").length&&t.children(".title").prepend('');1===n.siblings(".nodes").children(".hierarchy").length?n.siblings(".nodes").children(".hierarchy").find(".node:first").find(".horizontalEdge").remove():0===n.siblings(".nodes").children(".hierarchy").length&&n.find(".bottomEdge, .symbol").remove().end().siblings(".nodes").remove()}}}else this.$chart.triggerHandler({type:"otherdropped.orgchart",draggedItem:i,dropZone:t})},touchstartHandler:function(e){this.touchHandled||e.touches&&1").addClass("node "+(i.className||"")+(e>n.visibleLevel?" slide-up":""));n.nodeTemplate?t.append(n.nodeTemplate(i)):t.append('
    '+i[n.nodeTitle]+"
    ").append(void 0!==n.nodeContent?'
    '+(i[n.nodeContent]||"")+"
    ":"");var s=p.extend({},i);delete s.children,t.data("nodeData",s);var o=i.relationship||"";return n.verticalLevel&&e>=n.verticalLevel?e+1>n.verticalLevel&&Number(o.substr(2,1))&&t.append('').children(".title").prepend(''):(Number(o.substr(0,1))&&t.append(''),Number(o.substr(1,1))&&t.append(''),Number(o.substr(2,1))&&t.append('').children(".title").prepend('')),t.on("mouseenter mouseleave",this.nodeEnterLeaveHandler.bind(this)),t.on("click",this.nodeClickHandler.bind(this)),t.on("click",".topEdge",this.topEdgeClickHandler.bind(this)),t.on("click",".bottomEdge",this.bottomEdgeClickHandler.bind(this)),t.on("click",".leftEdge, .rightEdge",this.hEdgeClickHandler.bind(this)),t.on("click",".toggleBtn",this.toggleVNodes.bind(this)),n.draggable&&(this.bindDragDrop(t),this.touchHandled=!1,this.touchMoved=!1,this.touchTargetNode=null),n.createNode&&n.createNode(t,i),t},buildHierarchy:function(e,t){var i=this,n=this.options,s=0;if(s=t.level?t.level:t.level=e.parentsUntil(".orgchart",".nodes").length,2n.visibleLevel||t.collapsed!==d&&t.collapsed;n.verticalLevel&&s+1>=n.verticalLevel?(a=p('
      '),r&&s+1>=n.verticalLevel&&a.addClass("hidden"),s+1===n.verticalLevel?e.addClass("hybrid").append(a.addClass("vertical")):e.append(a)):(a=p('
        '),2===Object.keys(t).length||r&&e.addClass("isChildrenCollapsed"),e.append(a)),p.each(t.children,function(){var e=p('
      • ');a.append(e),this.level=s+1,i.buildHierarchy(e,this)})}},buildChildNode:function(e,t){this.buildHierarchy(e,{children:t})},addChildren:function(e,t){this.buildChildNode(e.closest(".hierarchy"),t),e.find(".symbol").length||e.children(".title").prepend(''),e.closest(".nodes.vertical").length?e.children(".toggleBtn").length||e.append(''):e.children(".bottomEdge").length||e.append(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".bottomEdge"))},buildParentNode:function(e,t){t.relationship=t.relationship||"001";var i=p('
        ').find(".hierarchy").append(this.createNode(t)).end();this.$chart.prepend(i).find(".hierarchy:first").append(e.closest("ul").addClass("nodes"))},addParent:function(e,t){this.buildParentNode(e,t),e.children(".topEdge").length||e.children(".title").after(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".topEdge"))},buildSiblingNode:function(e,t){var i=p.isArray(t)?t.length:t.children.length,n=e.parent().is(".nodes")?e.siblings().length+1:1,s=n+i,o=1')).children(".hierarchy:first"),t),e.prevAll(".hierarchy").children(".nodes").children().eq(o).after(e)},addSiblings:function(e,t){this.buildSiblingNode(e.closest(".hierarchy"),t),e.closest(".nodes").data("siblingsLoaded",!0),e.children(".leftEdge").length||e.children(".topEdge").after(''),this.isInAction(e)&&(this.switchHorizontalArrow(e),e.children(".topEdge").removeClass("oci-chevron-up").addClass("oci-chevron-down"))},removeNodes:function(e){var t=e.closest(".hierarchy").parent();t.parent().is(".hierarchy")?this.getNodeState(e,"siblings").exist?(e.closest(".hierarchy").remove(),1===t.children().length&&t.find(".node:first .horizontalEdge").remove()):t.siblings(".node").find(".bottomEdge").remove().end().end().remove():t.closest(".orgchart").remove()},hideDropZones:function(){this.$chart.find(".allowedDrop").removeClass("allowedDrop")},showDropZones:function(e){this.$chart.find(".node").each(function(e,t){p(t).addClass("allowedDrop")}),this.$chart.data("dragged",p(e))},processExternalDrop:function(e,t){t&&this.$chart.data("dragged",p(t)),e.closest(".node").triggerHandler({type:"drop"})},exportPDF:function(e,t){var i={},n=Math.floor(e.width),s=Math.floor(e.height);u.jsPDF||(u.jsPDF=u.jspdf.jsPDF),(i=s'),o.find(a).attr("href",e.toDataURL())[0].click()}},export:function(t,i){var n=this;if(t=void 0!==t?t:this.options.exportFilename,i=void 0!==i?i:this.options.exportFileextension,p(this).children(".spinner").length)return!1;var s=this.$chartContainer,e=s.find(".mask");e.length?e.removeClass("hidden"):s.append('
        ');var o=s.addClass("canvasContainer").find('.orgchart:not(".hidden")').get(0),a="l2r"===n.options.direction||"r2l"===n.options.direction;html2canvas(o,{width:a?o.clientHeight:o.clientWidth,height:a?o.clientWidth:o.clientHeight,onclone:function(e){p(e).find(".canvasContainer").css("overflow","visible").find('.orgchart:not(".hidden"):first').css("transform","")}}).then(function(e){s.find(".mask").addClass("hidden"),"pdf"===i.toLowerCase()?n.exportPDF(e,t):n.exportPNG(e,t),s.removeClass("canvasContainer")},function(){s.removeClass("canvasContainer")})}},p.fn.orgchart=function(e){return new t(this,e).init()}}); +"use strict";!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):e(jQuery,window,document)}(function(l,h,c,r){function t(e,t){this.$chartContainer=l(e),this.opts=t,this.defaultOptions={nodeTitle:"name",nodeId:"id",toggleSiblingsResp:!1,visibleLevel:999,chartClass:"",exportButton:!1,exportButtonName:"Export",exportFilename:"OrgChart",exportFileextension:"png",parentNodeSymbol:"oci-leader",draggable:!1,direction:"t2b",pan:!1,zoom:!1,zoominLimit:7,zoomoutLimit:.5}}t.prototype={init:function(e){var n=this,e=(this.options=l.extend({},this.defaultOptions,this.opts,e),this.$chartContainer),t=(this.$chart&&this.$chart.remove(),this.options.data),i=this.$chart=l("
        ",{data:{options:this.options},class:"orgchart"+(""!==this.options.chartClass?" "+this.options.chartClass:"")+("t2b"!==this.options.direction?" "+this.options.direction:""),click:function(e){l(e.target).closest(".node").length||i.find(".node.focused").removeClass("focused")}}),s=("undefined"!=typeof MutationObserver&&this.triggerInitEvent(),i.append(l('
        ')).find(".hierarchy"));return"object"===l.type(t)?t instanceof l?this.buildHierarchy(s,this.buildJsonDS(t.children()),0,this.options):this.buildHierarchy(s,this.options.ajaxURL?t:this.attachRel(t,"00")):(i.append(''),l.ajax({url:t,dataType:"json"}).done(function(e,t,i){n.buildHierarchy(s,n.options.ajaxURL?e:n.attachRel(e,"00"),0,n.options)}).fail(function(e,t,i){console.log(i)}).always(function(){i.children(".spinner").remove()})),e.append(i),this.options.exportButton&&!l(".oc-export-btn").length&&this.attachExportButton(),this.options.pan&&this.bindPan(),this.options.zoom&&this.bindZoom(),this},triggerInitEvent:function(){var s=this,o=new MutationObserver(function(e){o.disconnect();e:for(var t=0;t",{class:"oc-export-btn",text:this.options.exportButtonName,click:function(e){e.preventDefault(),t.export()}});this.$chartContainer.after(e)},setOptions:function(e,t){return"string"==typeof e&&("pan"===e&&(t?this.bindPan():this.unbindPan()),"zoom"===e)&&(t?this.bindZoom():this.unbindZoom()),"object"==typeof e&&(e.data?this.init(e):(void 0!==e.pan&&(e.pan?this.bindPan():this.unbindPan()),void 0!==e.zoom&&(e.zoom?this.bindZoom():this.unbindZoom()))),this},panStartHandler:function(e){var s=l(e.delegateTarget);if(l(e.target).closest(".node").length||e.touches&&1n.zoomoutLimit&&on.zoomoutLimit&&o').children().not(".spinner").css("opacity",.2),t.data("inAjax",!0),l(".oc-export-btn").prop("disabled",!0),!0)},endLoading:function(e){var t=e.parent();e.removeClass("hidden"),t.find(".spinner").remove(),t.children().removeAttr("style"),this.$chart.data("inAjax",!1),l(".oc-export-btn").prop("disabled",!1)},isInAction:function(e){return-1',s.find(".horizontalEdge").length||s.append(i),e.siblings(".nodes").append(s.closest(".hierarchy")),1===(n=s.closest(".hierarchy").siblings().find(".node:first")).length&&n.append(i)):(e.append('').after('
          ').siblings(".nodes").append(s.find(".horizontalEdge").remove().end().closest(".hierarchy")),e.children(".title").length&&e.children(".title").prepend('')),1===t.siblings(".nodes").children(".hierarchy").length?t.siblings(".nodes").children(".hierarchy").find(".node:first").find(".horizontalEdge").remove():0===t.siblings(".nodes").children(".hierarchy").length&&t.find(".bottomEdge, .symbol").remove().end().siblings(".nodes").remove())):this.$chart.triggerHandler({type:"otherdropped.orgchart",draggedItem:s,dropZone:e})},touchstartHandler:function(e){this.touchHandled||e.touches&&1").addClass("node "+(i.className||"")+(e>n.visibleLevel?" slide-up":""))),s=(n.nodeTemplate?t.append(n.nodeTemplate(i)):t.append('
          '+i[n.nodeTitle]+"
          ").append(void 0!==n.nodeContent?'
          '+(i[n.nodeContent]||"")+"
          ":""),l.extend({},i)),s=(delete s.children,t.data("nodeData",s),i.relationship||"");return n.verticalLevel&&e>=n.verticalLevel?e+1>n.verticalLevel&&Number(s.substr(2,1))&&t.append('').children(".title").prepend(''):(Number(s.substr(0,1))&&t.append(''),Number(s.substr(1,1))&&t.append(''),Number(s.substr(2,1))&&t.append('').children(".title").prepend('')),t.on("mouseenter mouseleave",this.nodeEnterLeaveHandler.bind(this)),t.on("click",this.nodeClickHandler.bind(this)),t.on("click",".topEdge",this.topEdgeClickHandler.bind(this)),t.on("click",".bottomEdge",this.bottomEdgeClickHandler.bind(this)),t.on("click",".leftEdge, .rightEdge",this.hEdgeClickHandler.bind(this)),t.on("click",".toggleBtn",this.toggleVNodes.bind(this)),n.draggable&&(this.bindDragDrop(t),this.touchHandled=!1,this.touchMoved=!1,this.touchTargetNode=null),n.createNode&&n.createNode(t,i),t},buildHierarchy:function(e,t){var i,n,s=this,o=this.options,a=0,a=t.level||(t.level=e.parentsUntil(".orgchart",".nodes").length);2o.visibleLevel||t.collapsed!==r&&t.collapsed,o.verticalLevel&&a+1>=o.verticalLevel?(n=l('
            '),i&&a+1>=o.verticalLevel&&n.addClass("hidden"),a+1===o.verticalLevel?e.addClass("hybrid").append(n.addClass("vertical")):e.append(n)):(n=l('
              '),2!==Object.keys(t).length&&i&&e.addClass("isChildrenCollapsed"),e.append(n)),l.each(t.children,function(){var e=l('
            • ');n.append(e),this.level=a+1,s.buildHierarchy(e,this)}))},buildChildNode:function(e,t){this.buildHierarchy(e,{children:t})},addChildren:function(e,t){this.buildChildNode(e.closest(".hierarchy"),t),e.find(".symbol").length||e.children(".title").prepend(''),e.closest(".nodes.vertical").length?e.children(".toggleBtn").length||e.append(''):e.children(".bottomEdge").length||e.append(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".bottomEdge"))},buildParentNode:function(e,t){t.relationship=t.relationship||"001";t=l('
              ').find(".hierarchy").append(this.createNode(t)).end();this.$chart.prepend(t).find(".hierarchy:first").append(e.closest("ul").addClass("nodes"))},addParent:function(e,t){this.buildParentNode(e,t),e.children(".topEdge").length||e.children(".title").after(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".topEdge"))},buildSiblingNode:function(e,t){var i,n=(l.isArray(t)?t:t.children).length,s=e.parent().is(".nodes")?e.siblings().length+1:1,n=s+n,n=1')).children(".hierarchy:first"),t),e.prevAll(".hierarchy").children(".nodes").children().eq(n).after(e))},addSiblings:function(e,t){this.buildSiblingNode(e.closest(".hierarchy"),t),e.closest(".nodes").data("siblingsLoaded",!0),e.children(".leftEdge").length||e.children(".topEdge").after(''),this.isInAction(e)&&(this.switchHorizontalArrow(e),e.children(".topEdge").removeClass("oci-chevron-up").addClass("oci-chevron-down"))},removeNodes:function(e){var t=e.closest(".hierarchy").parent();t.parent().is(".hierarchy")?this.getNodeState(e,"siblings").exist?(e.closest(".hierarchy").remove(),1===t.children().length&&t.find(".node:first .horizontalEdge").remove()):t.siblings(".node").find(".bottomEdge").remove().end().end().remove():t.closest(".orgchart").remove()},hideDropZones:function(){this.$chart.find(".allowedDrop").removeClass("allowedDrop")},showDropZones:function(e){this.$chart.find(".node").each(function(e,t){l(t).addClass("allowedDrop")}),this.$chart.data("dragged",l(e))},processExternalDrop:function(e,t){t&&this.$chart.data("dragged",l(t)),e.closest(".node").triggerHandler({type:"drop"})},exportPDF:function(e,t){var i={},n=Math.floor(e.width),s=Math.floor(e.height);h.jsPDF||(h.jsPDF=h.jspdf.jsPDF),(i=s'),o.find(i).attr("href",e.toDataURL())[0].click())},export:function(t,i){var n=this;if(t=void 0!==t?t:this.options.exportFilename,i=void 0!==i?i:this.options.exportFileextension,l(this).children(".spinner").length)return!1;var s=this.$chartContainer,e=s.find(".mask"),e=(e.length?e.removeClass("hidden"):s.append('
              '),s.addClass("canvasContainer").find('.orgchart:not(".hidden")').get(0)),o="l2r"===n.options.direction||"r2l"===n.options.direction;html2canvas(e,{width:o?e.clientHeight:e.clientWidth,height:o?e.clientWidth:e.clientHeight,onclone:function(e){l(e).find(".canvasContainer").css("overflow","visible").find('.orgchart:not(".hidden"):first').css("transform","")}}).then(function(e){s.find(".mask").addClass("hidden"),"pdf"===i.toLowerCase()?n.exportPDF(e,t):n.exportPNG(e,t),s.removeClass("canvasContainer")},function(){s.removeClass("canvasContainer")})}},l.fn.orgchart=function(e){return new t(this,e).init()}}); //# sourceMappingURL=jquery.orgchart.min.js.map diff --git a/dist/js/jquery.orgchart.min.js.map b/dist/js/jquery.orgchart.min.js.map index 1e6bd305..f4f483eb 100644 --- a/dist/js/jquery.orgchart.min.js.map +++ b/dist/js/jquery.orgchart.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.orgchart.js"],"names":["factory","module","exports","require","window","document","jQuery","$","undefined","OrgChart","elem","opts","this","$chartContainer","defaultOptions","nodeTitle","nodeId","toggleSiblingsResp","visibleLevel","chartClass","exportButton","exportButtonName","exportFilename","exportFileextension","parentNodeSymbol","draggable","direction","pan","zoom","zoominLimit","zoomoutLimit","prototype","init","that","options","extend","$chart","remove","data","class","click","event","target","closest","length","find","removeClass","MutationObserver","triggerInitEvent","$root","append","type","buildHierarchy","buildJsonDS","children","ajaxURL","attachRel","ajax","url","dataType","done","textStatus","jqXHR","fail","errorThrown","console","log","always","attachExportButton","bindPan","bindZoom","mo","mutations","disconnect","initTime","i","j","addedNodes","classList","contains","initCompleted","initEvent","Event","trigger","observe","childList","triggerLoadEvent","$target","rel","triggerShowEvent","triggerHideEvent","$exportBtn","text","e","preventDefault","export","after","setOptions","val","unbindPan","unbindZoom","panStartHandler","delegateTarget","touches","css","lastX","lastY","lastTf","temp","split","indexOf","parseInt","startX","startY","targetTouches","pageX","pageY","on","newX","newY","matrix","join","panEndHandler","chart","off","zoomWheelHandler","oc","newScale","originalEvent","deltaY","setChartScale","zoomStartHandler","dist","getPinchDist","zoomingHandler","zoomEndHandler","diff","Math","sqrt","clientX","clientY","targetScale","abs","parseFloat","$li","subObj","name","contents","eq","trim","relationship","parent","is","siblings","each","key","value","push","flags","forEach","item","loopChart","includeNodeData","$node","id","getHierarchy","valid","getNodeState","relation","isVerticalNode","parents","exist","visible","getParent","getRelatedNodes","getChildren","getSiblings","hideParentEnd","addClass","hideParent","$parent","hideSiblings","one","showParentEnd","node","isInAction","switchVerticalArrow","showParent","repaint","bind","stopAjax","$nodeLevel","isVisibleNode","index","hideChildrenEnd","animatedNodes","hideChildren","$lowerLevel","$animatedNodes","filter","get","lowerLevel","showChildrenEnd","showChildren","$levels","isVerticalDesc","hideSiblingsEnd","$nodeContainer","nodeContainer","$siblings","prevAll","nextAll","end","switchHorizontalArrow","showSiblingsEnd","visibleNodes","showRelatedParentEnd","showSiblings","$upperLevel","$visibleNodes","startLoading","$edge","not","prop","endLoading","removeAttr","attr","$arrow","toggleClass","$prevSib","prev","$nextSib","next","$sibs","sibsVisible","style","offsetWidth","nodeEnterLeaveHandler","flag","$toggleBtn","$topEdge","$bottomEdge","$leftEdge","nodeClickHandler","loadNodes","isEmptyObject","addParent","addChildren","addSiblings","HideFirstParentEnd","topEdge","topEdgeClickHandler","stopPropagation","parentState","isFunction","bottomEdgeClickHandler","childrenState","hEdgeClickHandler","$hEdge","siblingsState","families","expandVNodesEnd","vNodes","collapseVNodesEnd","toggleVNodes","$descWrapper","$descendants","$children","createGhostNode","ghostNode","nodeCover","$nodeDiv","origEvent","isFirefox","test","navigator","userAgent","toLowerCase","querySelector","createElementNS","add","appendChild","transValues","isHorizontal","scale","slice","setAttribute","outerWidth","outerHeight","xOffset","offsetX","yOffset","offsetY","ghostNodeWrapper","createElement","src","XMLSerializer","serializeToString","dataTransfer","setDragImage","getUpperLevel","getLowerLevel","getLevelOrderNodes","queue","output","row","cur","shift","toArray","flat","filterAllowedDropNodes","$dragged","draggingNode","hasClass","$dragZone","$dragHier","dropCriteria","dragstartHandler","setData","dragoverHandler","dropEffect","dragendHandler","dropHandler","$dropZone","dropEvent","draggedNode","dragZone","dropZone","isDefaultPrevented","horizontalEdges","$dropSibs","prepend","triggerHandler","draggedItem","touchstartHandler","touchHandled","touchMoved","touchmoveHandler","currentTarget","touchDragImage","createDragImage","moveDragImage","$touchingNodes","elementFromPoint","touchingNodeElement","touchTargetNode","touchendHandler","destroyDragImage","fakeEventForDropHandler","firstTouch","changedTouches","fakeMouseClickEvent","createEvent","initMouseEvent","screenX","screenY","ctrlKey","altKey","shiftKey","metaKey","dispatchEvent","source","dragImage","cloneNode","copyStyle","top","left","sourceRectangle","getBoundingClientRect","sourcePoint","getTouchPoint","touchDragImageOffset","x","y","opacity","body","parentElement","removeChild","dst","att","removeAttribute","HTMLCanvasElement","cSrc","cDst","width","height","getContext","drawImage","cs","getComputedStyle","pointerEvents","image","orgChartMaster","requestAnimationFrame","pt","s","position","zIndex","round","bindDragDrop","createNode","level","child","parentId","className","nodeTemplate","nodeContent","nodeData","verticalLevel","Number","substr","$appendTo","parentsUntil","Object","keys","$nodesLayer","isHidden","collapsed","$nodeCell","buildChildNode","buildParentNode","$currentRoot","$newRootWrapper","buildSiblingNode","$nodeChart","newSiblingCount","isArray","existingSibligCount","siblingCount","insertPostion","floor","before","addBack","unwrap","removeNodes","$wrapper","hideDropZones","showDropZones","dragged","processExternalDrop","exportPDF","canvas","doc","docWidth","docHeight","jsPDF","jspdf","orientation","unit","format","addImage","toDataURL","save","exportPNG","isWebkit","documentElement","isFf","sidebar","isEdge","appName","appVersion","msSaveBlob","msToBlob","selector","$mask","sourceChart","html2canvas","clientHeight","clientWidth","onclone","cloneDoc","then","fn","orgchart"],"mappings":"AAUA,cAEC,SAAUA,GACa,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAC9CF,EAAQG,QAAQ,UAAWC,OAAQC,UAEnCL,EAAQM,OAAQF,OAAQC,UAJ5B,CAME,SAAUE,EAAGH,EAAQC,EAAUG,GAChB,SAAXC,EAAqBC,EAAMC,GAC7BC,KAAKC,gBAAkBN,EAAEG,GACzBE,KAAKD,KAAOA,EACZC,KAAKE,eAAiB,CACpBC,UAAa,OACbC,OAAU,KACVC,oBAAsB,EACtBC,aAAgB,IAChBC,WAAc,GACdC,cAAgB,EAChBC,iBAAoB,SACpBC,eAAkB,WAClBC,oBAAuB,MACvBC,iBAAoB,aACpBC,WAAa,EACbC,UAAa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jQuery OrgChart Plugin\n * https://github.com/dabeng/OrgChart\n *\n * Copyright 2016, dabeng\n * https://github.com/dabeng\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/MIT\n */\n'use strict';\n\n(function (factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n factory(require('jquery'), window, document);\n } else {\n factory(jQuery, window, document);\n }\n}(function ($, window, document, undefined) {\n var OrgChart = function (elem, opts) {\n this.$chartContainer = $(elem);\n this.opts = opts;\n this.defaultOptions = {\n 'nodeTitle': 'name',\n 'nodeId': 'id',\n 'toggleSiblingsResp': false,\n 'visibleLevel': 999,\n 'chartClass': '',\n 'exportButton': false,\n 'exportButtonName': 'Export',\n 'exportFilename': 'OrgChart',\n 'exportFileextension': 'png',\n 'parentNodeSymbol': 'oci-leader',\n 'draggable': false,\n 'direction': 't2b',\n 'pan': false,\n 'zoom': false,\n 'zoominLimit': 7,\n 'zoomoutLimit': 0.5\n };\n };\n //\n OrgChart.prototype = {\n //\n init: function (opts) {\n var that = this;\n this.options = $.extend({}, this.defaultOptions, this.opts, opts);\n // build the org-chart\n var $chartContainer = this.$chartContainer;\n if (this.$chart) {\n this.$chart.remove();\n }\n var data = this.options.data;\n var $chart = this.$chart = $('
              ', {\n 'data': { 'options': this.options },\n 'class': 'orgchart' + (this.options.chartClass !== '' ? ' ' + this.options.chartClass : '') + (this.options.direction !== 't2b' ? ' ' + this.options.direction : ''),\n 'click': function(event) {\n if (!$(event.target).closest('.node').length) {\n $chart.find('.node.focused').removeClass('focused');\n }\n }\n });\n if (typeof MutationObserver !== 'undefined') {\n this.triggerInitEvent();\n }\n var $root = $chart.append($('
              ')).find('.hierarchy');\n if ($.type(data) === 'object') {\n if (data instanceof $) { // ul datasource\n this.buildHierarchy($root, this.buildJsonDS(data.children()), 0, this.options);\n } else { // local json datasource\n this.buildHierarchy($root, this.options.ajaxURL ? data : this.attachRel(data, '00'));\n }\n } else {\n $chart.append('');\n $.ajax({\n 'url': data,\n 'dataType': 'json'\n })\n .done(function(data, textStatus, jqXHR) {\n that.buildHierarchy($root, that.options.ajaxURL ? data : that.attachRel(data, '00'), 0, that.options);\n })\n .fail(function(jqXHR, textStatus, errorThrown) {\n console.log(errorThrown);\n })\n .always(function() {\n $chart.children('.spinner').remove();\n });\n }\n $chartContainer.append($chart);\n\n // append the export button\n if (this.options.exportButton && !$('.oc-export-btn').length) {\n this.attachExportButton();\n }\n\n if (this.options.pan) {\n this.bindPan();\n }\n\n if (this.options.zoom) {\n this.bindZoom();\n }\n\n return this;\n },\n //\n triggerInitEvent: function () {\n var that = this;\n var mo = new MutationObserver(function (mutations) {\n mo.disconnect();\n initTime:\n for (var i = 0; i < mutations.length; i++) {\n for (var j = 0; j < mutations[i].addedNodes.length; j++) {\n if (mutations[i].addedNodes[j].classList.contains('orgchart')) {\n if (that.options.initCompleted && typeof that.options.initCompleted === 'function') {\n that.options.initCompleted(that.$chart);\n }\n var initEvent = $.Event('init.orgchart');\n that.$chart.trigger(initEvent);\n break initTime;\n }\n }\n }\n });\n mo.observe(this.$chartContainer[0], { childList: true });\n },\n triggerLoadEvent: function ($target, rel) {\n var initEvent = $.Event('load-' + rel +'.orgchart');\n $target.trigger(initEvent);\n },\n triggerShowEvent: function ($target, rel) {\n var initEvent = $.Event('show-' + rel + '.orgchart');\n $target.trigger(initEvent);\n },\n triggerHideEvent: function ($target, rel) {\n var initEvent = $.Event('hide-' + rel + '.orgchart');\n $target.trigger(initEvent);\n },\n // add export button for orgchart\n attachExportButton: function () {\n var that = this;\n var $exportBtn = $('