Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue2-org-tree

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-org-tree - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.js

@@ -1,2 +0,2 @@

!function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=1)}([function(e,t,r){"use strict";var o=r(10);t.a={name:"Vue2OrgTree",components:{OrgTreeNode:{render:o.a,functional:!0}},props:{data:{type:Object,required:!0},props:{type:Object,default:function(){return{label:"label",expand:"expand",children:"children"}}},horizontal:Boolean,collapsable:Boolean,renderContent:Function,labelWidth:[String,Number],labelClassName:[Function,String]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(2);t.default=o.a},function(e,t,r){"use strict";var o=r(3),n=function e(t){e.installed||(e.installed=!0,t.component(o.a.name,o.a))};"undefined"!=typeof window&&window.Vue&&window.Vue.use(o.a),t.a={install:n,name:"vue2-org-tree"}},function(e,t,r){"use strict";function o(e){r(4)}var n=r(0),a=r(11),i=r(9),l=o,d=i(n.a,a.a,!1,l,null,null);t.a=d.exports},function(e,t,r){var o=r(5);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);r(7)("12c5e4e1",o,!0,{})},function(e,t,r){t=e.exports=r(6)(!1),t.push([e.i,'.org-tree-container{display:inline-block;padding:15px;background-color:#fff}.org-tree{display:table;text-align:center}.org-tree:after,.org-tree:before{content:"";display:table}.org-tree:after{clear:both}.org-tree-node,.org-tree-node-children{position:relative;margin:0;padding:0;list-style-type:none}.org-tree-node-children:after,.org-tree-node-children:before,.org-tree-node:after,.org-tree-node:before{-webkit-transition:all .35s;transition:all .35s}.org-tree-node-label{position:relative;display:inline-block}.org-tree-node-label .org-tree-node-label-inner{padding:10px 15px;text-align:center;border-radius:3px;-webkit-box-shadow:0 1px 5px rgba(0,0,0,.15);box-shadow:0 1px 5px rgba(0,0,0,.15)}.org-tree-node-btn{position:absolute;top:100%;left:50%;width:20px;height:20px;z-index:10;margin-left:-11px;margin-top:9px;background-color:#fff;border:1px solid #ccc;border-radius:50%;-webkit-box-shadow:0 0 2px rgba(0,0,0,.15);box-shadow:0 0 2px rgba(0,0,0,.15);cursor:pointer;-webkit-transition:all .35s ease;transition:all .35s ease}.org-tree-node-btn:hover{background-color:#e7e8e9;-webkit-transform:scale(1.15);transform:scale(1.15)}.org-tree-node-btn:after,.org-tree-node-btn:before{content:"";position:absolute}.org-tree-node-btn:before{top:50%;left:4px;right:4px;height:0;border-top:1px solid #ccc}.org-tree-node-btn:after{top:4px;left:50%;bottom:4px;width:0;border-left:1px solid #ccc}.org-tree-node-btn.expanded:after{border:none}.org-tree-node{padding-top:20px}.org-tree-node:not(:only-child){float:left}.org-tree-node.collapsed,.org-tree-node.is-leaf{padding-left:10px;padding-right:10px}.org-tree-node:after,.org-tree-node:before{content:"";position:absolute;top:0;left:0;width:50%;height:19px}.org-tree-node:after{left:50%;border-left:1px solid #ddd}.org-tree-node:not(:first-child):before,.org-tree-node:not(:last-child):after{border-top:1px solid #ddd}.collapsable .org-tree-node.collapsed{padding-bottom:30px}.collapsable .org-tree-node.collapsed .org-tree-node-label:after{content:"";position:absolute;top:100%;left:0;width:50%;height:20px;border-right:1px solid #ddd}.org-tree>.org-tree-node{padding-top:0}.org-tree>.org-tree-node:after{border-left:0}.org-tree-node-children{padding-top:20px}.org-tree-node-children:before{content:"";position:absolute;top:0;left:50%;width:0;height:20px;border-left:1px solid #ddd}.org-tree-node-children:after{content:"";display:table;clear:both}.horizontal .org-tree-node{display:table-cell;float:none;padding-top:0;padding-left:20px}.horizontal .org-tree-node.collapsed,.horizontal .org-tree-node.is-leaf{padding-top:10px;padding-bottom:10px}.horizontal .org-tree-node:after,.horizontal .org-tree-node:before{width:19px;height:50%}.horizontal .org-tree-node:after{top:50%;left:0;border-left:0}.horizontal .org-tree-node:only-child:before{top:1px;border-bottom:1px solid #ddd}.horizontal .org-tree-node:not(:first-child):before,.horizontal .org-tree-node:not(:last-child):after{border-top:0;border-left:1px solid #ddd}.horizontal .org-tree-node:not(:only-child):after{border-top:1px solid #ddd}.horizontal .org-tree-node .org-tree-node-inner{display:table}.horizontal .org-tree-node-label{display:table-cell;vertical-align:middle}.horizontal.collapsable .org-tree-node.collapsed{padding-right:30px}.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after{top:0;left:100%;width:20px;height:50%;border-right:0;border-bottom:1px solid #ddd}.horizontal .org-tree-node-btn{top:50%;left:100%;margin-top:-11px;margin-left:9px}.horizontal>.org-tree-node:only-child:before{border-bottom:0}.horizontal .org-tree-node-children{display:table-cell;padding-top:0;padding-left:20px}.horizontal .org-tree-node-children:before{top:50%;left:0;width:20px;height:0;border-left:0;border-top:1px solid #ddd}.horizontal .org-tree-node-children:after{display:none}.horizontal .org-tree-node-children>.org-tree-node{display:block}',""])},function(e,t){function r(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=o(n);return[r].concat(n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"})).concat([a]).join("\n")}return[r].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=r(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(o[a]=!0)}for(n=0;n<e.length;n++){var i=e[n];"number"==typeof i[0]&&o[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),t.push(i))}},t}},function(e,t,r){function o(e){for(var t=0;t<e.length;t++){var r=e[t],o=p[r.id];if(o){o.refs++;for(var n=0;n<o.parts.length;n++)o.parts[n](r.parts[n]);for(;n<r.parts.length;n++)o.parts.push(a(r.parts[n]));o.parts.length>r.parts.length&&(o.parts.length=r.parts.length)}else{for(var i=[],n=0;n<r.parts.length;n++)i.push(a(r.parts[n]));p[r.id]={id:r.id,refs:1,parts:i}}}}function n(){var e=document.createElement("style");return e.type="text/css",c.appendChild(e),e}function a(e){var t,r,o=document.querySelector("style["+x+'~="'+e.id+'"]');if(o){if(g)return h;o.parentNode.removeChild(o)}if(v){var a=u++;o=f||(f=n()),t=i.bind(null,o,a,!1),r=i.bind(null,o,a,!0)}else o=n(),t=l.bind(null,o),r=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else r()}}function i(e,t,r,o){var n=r?"":o.css;if(e.styleSheet)e.styleSheet.cssText=m(t,n);else{var a=document.createTextNode(n),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function l(e,t){var r=t.css,o=t.media,n=t.sourceMap;if(o&&e.setAttribute("media",o),b.ssrId&&e.setAttribute(x,t.id),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!d)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s=r(8),p={},c=d&&(document.head||document.getElementsByTagName("head")[0]),f=null,u=0,g=!1,h=function(){},b=null,x="data-vue-ssr-id",v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,r,n){g=r,b=n||{};var a=s(e,t);return o(a),function(t){for(var r=[],n=0;n<a.length;n++){var i=a[n],l=p[i.id];l.refs--,r.push(l)}t?(a=s(e,t),o(a)):a=[];for(var n=0;n<r.length;n++){var l=r[n];if(0===l.refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete p[l.id]}}}};var m=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var r=[],o={},n=0;n<t.length;n++){var a=t[n],i=a[0],l=a[1],d=a[2],s=a[3],p={id:e+":"+n,css:l,media:d,sourceMap:s};o[i]?o[i].parts.push(p):r.push(o[i]={id:i,parts:[p]})}return r}},function(e,t){e.exports=function(e,t,r,o,n,a){var i,l=e=e||{},d=typeof e.default;"object"!==d&&"function"!==d||(i=e,l=e.default);var s="function"==typeof l?l.options:l;t&&(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0),r&&(s.functional=!0),n&&(s._scopeId=n);var p;if(a?(p=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},s._ssrRegister=p):o&&(p=o),p){var c=s.functional,f=c?s.render:s.beforeCreate;c?(s._injectStyles=p,s.render=function(e,t){return p.call(t),f(e,t)}):s.beforeCreate=f?[].concat(f,p):[p]}return{esModule:i,exports:l,options:s}}},function(e,t,r){"use strict";var o=function(e,t){return!(Array.isArray(e[t])&&e[t].length>0)},n=function(e,t,r){var n=r.props,a=["org-tree-node"],d=[],s=t[n.props.children];return o(t,n.props.children)?a.push("is-leaf"):n.collapsable&&!t[n.props.expand]&&a.push("collapsed"),d.push(i(e,t,r)),n.collapsable&&!t[n.props.expand]||d.push(l(e,s,r)),e("div",{domProps:{className:a.join(" ")}},d)},a=function(e,t,r){var o=r.props,n=r.listeners["on-expand"],a=["org-tree-node-btn"];return t[o.props.expand]&&a.push("expanded"),e("span",{domProps:{className:a.join(" ")},on:{click:function(e){e.stopPropagation(),n&&n(t)}}})},i=function(e,t,r){var n=r.props,i=t[n.props.label],l=n.renderContent,d=r.listeners["on-node-click"],s=[];if("function"==typeof l){var p=l(e,t);p&&s.push(p)}else s.push(i);n.collapsable&&!o(t,n.props.children)&&s.push(a(e,t,r));var c=["org-tree-node-label-inner"],f=n.labelWidth,u=n.labelClassName;return"number"==typeof f&&(f+="px"),"function"==typeof u&&(u=u(t)),u&&c.push(u),e("div",{domProps:{className:"org-tree-node-label"}},[e("div",{domProps:{className:c.join(" ")},style:{width:f},on:{click:function(e){return d&&d(e,t)}}},s)])},l=function(e,t,r){if(Array.isArray(t)&&t.length){var o=t.map(function(t){return n(e,t,r)});return e("div",{domProps:{className:"org-tree-node-children"}},o)}return""},d=function(e,t){var r=t.props;return n(e,r.data,t)};t.a=d},function(e,t,r){"use strict";var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"org-tree-container"},[r("div",{staticClass:"org-tree",class:{horizontal:e.horizontal,collapsable:e.collapsable}},[r("org-tree-node",{attrs:{data:e.data,props:e.props,horizontal:e.horizontal,"label-width":e.labelWidth,collapsable:e.collapsable,"render-content":e.renderContent,"label-class-name":e.labelClassName},on:{"on-expand":function(t){e.$emit("on-expand",t)},"on-node-click":function(t,r){e.$emit("on-node-click",t,r)}}})],1)])},n=[],a={render:o,staticRenderFns:n};t.a=a}]);
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue2-org-tree",[],t):"object"==typeof exports?exports["vue2-org-tree"]=t():e["vue2-org-tree"]=t()}(this,function(){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,r){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=0)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(1);t.default=r.a},function(e,t,o){"use strict";var r=o(2),n=function e(t){e.installed||(e.installed=!0,t.component(r.a.name,r.a))};"undefined"!=typeof window&&window.Vue&&window.Vue.use(r.a),t.a={install:n,name:"vue2-org-tree"}},function(e,t,o){"use strict";function r(e){o(3)}var n=o(9),a=o(11),i=o(8),d=r,l=i(n.a,a.a,!1,d,null,null);t.a=l.exports},function(e,t,o){var r=o(4);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);o(6)("05ab880f",r,!0)},function(e,t,o){t=e.exports=o(5)(void 0),t.push([e.i,'.org-tree-container{display:inline-block;padding:15px;background-color:#fff}.org-tree{display:table;text-align:center}.org-tree:after,.org-tree:before{content:"";display:table}.org-tree:after{clear:both}.org-tree-node,.org-tree-node-children{position:relative;margin:0;padding:0;list-style-type:none}.org-tree-node-children:after,.org-tree-node-children:before,.org-tree-node:after,.org-tree-node:before{-webkit-transition:all .35s;transition:all .35s}.org-tree-node-label{position:relative;display:inline-block}.org-tree-node-label .org-tree-node-label-inner{padding:10px 15px;text-align:center;border-radius:3px;-webkit-box-shadow:0 1px 5px rgba(0,0,0,.15);box-shadow:0 1px 5px rgba(0,0,0,.15)}.org-tree-node-btn{position:absolute;top:100%;left:50%;width:20px;height:20px;z-index:10;margin-left:-11px;margin-top:9px;background-color:#fff;border:1px solid #ccc;border-radius:50%;-webkit-box-shadow:0 0 2px rgba(0,0,0,.15);box-shadow:0 0 2px rgba(0,0,0,.15);cursor:pointer;-webkit-transition:all .35s ease;transition:all .35s ease}.org-tree-node-btn:hover{background-color:#e7e8e9;-webkit-transform:scale(1.15);transform:scale(1.15)}.org-tree-node-btn:after,.org-tree-node-btn:before{content:"";position:absolute}.org-tree-node-btn:before{top:50%;left:4px;right:4px;height:0;border-top:1px solid #ccc}.org-tree-node-btn:after{top:4px;left:50%;bottom:4px;width:0;border-left:1px solid #ccc}.org-tree-node-btn.expanded:after{border:none}.org-tree-node{padding-top:20px}.org-tree-node:not(:only-child){float:left}.org-tree-node.collapsed,.org-tree-node.is-leaf{padding-left:10px;padding-right:10px}.org-tree-node:after,.org-tree-node:before{content:"";position:absolute;top:0;left:0;width:50%;height:19px}.org-tree-node:after{left:50%;border-left:1px solid #ddd}.org-tree-node:not(:first-child):before,.org-tree-node:not(:last-child):after{border-top:1px solid #ddd}.collapsable .org-tree-node.collapsed{padding-bottom:30px}.collapsable .org-tree-node.collapsed .org-tree-node-label:after{content:"";position:absolute;top:100%;left:0;width:50%;height:20px;border-right:1px solid #ddd}.org-tree>.org-tree-node{padding-top:0}.org-tree>.org-tree-node:after{border-left:0}.org-tree-node-children{padding-top:20px}.org-tree-node-children:before{content:"";position:absolute;top:0;left:50%;width:0;height:20px;border-left:1px solid #ddd}.org-tree-node-children:after{content:"";display:table;clear:both}.horizontal .org-tree-node{display:table-cell;float:none;padding-top:0;padding-left:20px}.horizontal .org-tree-node.collapsed,.horizontal .org-tree-node.is-leaf{padding-top:10px;padding-bottom:10px}.horizontal .org-tree-node:after,.horizontal .org-tree-node:before{width:19px;height:50%}.horizontal .org-tree-node:after{top:50%;left:0;border-left:0}.horizontal .org-tree-node:only-child:before{top:1px;border-bottom:1px solid #ddd}.horizontal .org-tree-node:not(:first-child):before,.horizontal .org-tree-node:not(:last-child):after{border-top:0;border-left:1px solid #ddd}.horizontal .org-tree-node:not(:only-child):after{border-top:1px solid #ddd}.horizontal .org-tree-node .org-tree-node-inner{display:table}.horizontal .org-tree-node-label{display:table-cell;vertical-align:middle}.horizontal.collapsable .org-tree-node.collapsed{padding-right:30px}.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after{top:0;left:100%;width:20px;height:50%;border-right:0;border-bottom:1px solid #ddd}.horizontal .org-tree-node-btn{top:50%;left:100%;margin-top:-11px;margin-left:9px}.horizontal>.org-tree-node:only-child:before{border-bottom:0}.horizontal .org-tree-node-children{display:table-cell;padding-top:0;padding-left:20px}.horizontal .org-tree-node-children:before{top:50%;left:0;width:20px;height:0;border-left:0;border-top:1px solid #ddd}.horizontal .org-tree-node-children:after{display:none}.horizontal .org-tree-node-children>.org-tree-node{display:block}',""])},function(e,t){function o(e,t){var o=e[1]||"",n=e[3];if(!n)return o;if(t&&"function"==typeof btoa){var a=r(n);return[o].concat(n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"})).concat([a]).join("\n")}return[o].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=o(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(r[a]=!0)}for(n=0;n<e.length;n++){var i=e[n];"number"==typeof i[0]&&r[i[0]]||(o&&!i[2]?i[2]=o:o&&(i[2]="("+i[2]+") and ("+o+")"),t.push(i))}},t}},function(e,t,o){function r(e){for(var t=0;t<e.length;t++){var o=e[t],r=p[o.id];if(r){r.refs++;for(var n=0;n<r.parts.length;n++)r.parts[n](o.parts[n]);for(;n<o.parts.length;n++)r.parts.push(a(o.parts[n]));r.parts.length>o.parts.length&&(r.parts.length=o.parts.length)}else{for(var i=[],n=0;n<o.parts.length;n++)i.push(a(o.parts[n]));p[o.id]={id:o.id,refs:1,parts:i}}}}function n(){var e=document.createElement("style");return e.type="text/css",c.appendChild(e),e}function a(e){var t,o,r=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(r){if(g)return h;r.parentNode.removeChild(r)}if(b){var a=u++;r=f||(f=n()),t=i.bind(null,r,a,!1),o=i.bind(null,r,a,!0)}else r=n(),t=d.bind(null,r),o=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else o()}}function i(e,t,o,r){var n=o?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,n);else{var a=document.createTextNode(n),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function d(e,t){var o=t.css,r=t.media,n=t.sourceMap;if(r&&e.setAttribute("media",r),n&&(o+="\n/*# sourceURL="+n.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s=o(7),p={},c=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,u=0,g=!1,h=function(){},b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,o){g=o;var n=s(e,t);return r(n),function(t){for(var o=[],a=0;a<n.length;a++){var i=n[a],d=p[i.id];d.refs--,o.push(d)}t?(n=s(e,t),r(n)):n=[];for(var a=0;a<o.length;a++){var d=o[a];if(0===d.refs){for(var l=0;l<d.parts.length;l++)d.parts[l]();delete p[d.id]}}}};var x=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var o=[],r={},n=0;n<t.length;n++){var a=t[n],i=a[0],d=a[1],l=a[2],s=a[3],p={id:e+":"+n,css:d,media:l,sourceMap:s};r[i]?r[i].parts.push(p):o.push(r[i]={id:i,parts:[p]})}return o}},function(e,t){e.exports=function(e,t,o,r,n,a){var i,d=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(i=e,d=e.default);var s="function"==typeof d?d.options:d;t&&(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0),o&&(s.functional=!0),n&&(s._scopeId=n);var p;if(a?(p=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},s._ssrRegister=p):r&&(p=r),p){var c=s.functional,f=c?s.render:s.beforeCreate;c?(s._injectStyles=p,s.render=function(e,t){return p.call(t),f(e,t)}):s.beforeCreate=f?[].concat(f,p):[p]}return{esModule:i,exports:d,options:s}}},function(e,t,o){"use strict";var r=o(10);t.a={name:"Vue2OrgTree",components:{OrgTreeNode:{render:r.a,functional:!0}},props:{data:{type:Object,required:!0},props:{type:Object,default:function(){return{label:"label",expand:"expand",children:"children"}}},horizontal:Boolean,collapsable:Boolean,renderContent:Function,labelWidth:[String,Number],labelClassName:[Function,String]}}},function(e,t,o){"use strict";var r=function(e,t){return!(Array.isArray(e[t])&&e[t].length>0)},n=function(e,t,o){var n=o.props,a=["org-tree-node"],l=[],s=t[n.props.children];return r(t,n.props.children)?a.push("is-leaf"):n.collapsable&&!t[n.props.expand]&&a.push("collapsed"),l.push(i(e,t,o)),n.collapsable&&!t[n.props.expand]||l.push(d(e,s,o)),e("div",{domProps:{className:a.join(" ")}},l)},a=function(e,t,o){var r=o.props,n=o.listeners["on-expand"],a=["org-tree-node-btn"];return t[r.props.expand]&&a.push("expanded"),e("span",{domProps:{className:a.join(" ")},on:{click:function(e){e.stopPropagation(),n&&n(t)}}})},i=function(e,t,o){var n=o.props,i=t[n.props.label],d=n.renderContent,l=o.listeners["on-node-click"],s=[];if("function"==typeof d){var p=d(e,t);p&&s.push(p)}else s.push(i);n.collapsable&&!r(t,n.props.children)&&s.push(a(e,t,o));var c=["org-tree-node-label-inner"],f=n.labelWidth,u=n.labelClassName;return"number"==typeof f&&(f+="px"),"function"==typeof u&&(u=u(t)),u&&c.push(u),e("div",{domProps:{className:"org-tree-node-label"}},[e("div",{domProps:{className:c.join(" ")},style:{width:f},on:{click:function(e){return l&&l(e,t)}}},s)])},d=function(e,t,o){if(Array.isArray(t)&&t.length){var r=t.map(function(t){return n(e,t,o)});return e("div",{domProps:{className:"org-tree-node-children"}},r)}return""},l=function(e,t){var o=t.props;return n(e,o.data,t)};t.a=l},function(e,t,o){"use strict";var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"org-tree-container"},[o("div",{staticClass:"org-tree",class:{horizontal:e.horizontal,collapsable:e.collapsable}},[o("org-tree-node",{attrs:{data:e.data,props:e.props,horizontal:e.horizontal,"label-width":e.labelWidth,collapsable:e.collapsable,"render-content":e.renderContent,"label-class-name":e.labelClassName},on:{"on-expand":function(t){e.$emit("on-expand",t)},"on-node-click":function(t,o){e.$emit("on-node-click",t,o)}}})],1)])},n=[],a={render:r,staticRenderFns:n};t.a=a}])});
//# sourceMappingURL=index.js.map
{
"name": "vue2-org-tree",
"description": "A simple organization tree chart based on Vue2.x",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "author": "steven <986535362@qq.com>",

@@ -9,3 +9,6 @@ var path = require('path')

publicPath: '/dist/',
filename: 'index.js'
filename: 'index.js',
library: 'vue2-org-tree',
libraryTarget: 'umd',
umdNamedDefine: true
},

@@ -12,0 +15,0 @@ module: {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc