ng-dap
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8.
9 lines • 28.5 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/common"],t):"object"==typeof exports?exports["ng-dap.umd.min"]=t(require("@angular/core"),require("@angular/common")):e["ng-dap.umd.min"]=t(e["@angular/core"],e["@angular/common"])}(window,function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(1),i=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(){function e(){var e=this;this.beforeClick=new o.EventEmitter,this.beforeCheck=new o.EventEmitter,this.beforeRemove=new o.EventEmitter,this.beforeRename=new o.EventEmitter,this.onClick=new o.EventEmitter,this.onCheck=new o.EventEmitter,this.onRemove=new o.EventEmitter,this.onRename=new o.EventEmitter,this.onHoverDomClick=new o.EventEmitter,this.hoverDomFunction=function(t,n){if(!($("#diyBtn_"+n.tId).length>0)){var o=$("#"+n.tId+"_a"),r='<span class="dropdown button" id="diyBtn_'+n.tId+'" title="操作"></span>';o.append(r);for(var i=$("#diyBtn_"+n.tId),a='<ul class="copy-movelist">',s=0;s<e.addHoverDom.length;s++)a+='<li id="'+e.addHoverDom[s].key+'">'+e.addHoverDom[s].value+"</li>";a+="</ul>",i&&i.on("click",function(){return i.html(a),$("body").off("click").on("click",function(e){$(e.target).hasClass("dropdown")||$(e.target).parents(".dropdown").length>0||i.empty()}),i.find("ul").on("click",function(t){e.onHoverDomClick.emit(t)}),!1})}},this.removeHoverDomFunction=function(e,t){$("#diyBtn_"+t.tId).unbind().remove()}}return Object.defineProperty(e.prototype,"treeNodes",{get:function(){return this._treeNodes},set:function(e){this._treeNodes=e,this.initTree()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t={};void 0!==this.checkAble&&(t.check={enable:this.checkAble,chkStyle:this.checkStyle?this.checkStyle:"checkbox"}),this.simpleData&&(t.data={simpleData:this.simpleData}),void 0!==this.selectedMulti&&(t.view={selectedMulti:this.selectedMulti}),void 0!==this.showIcon&&(t.view=t.view?t.view:{},t.view.showIcon=this.showIcon),void 0!==this.showLine&&(t.view=t.view?t.view:{},t.view.showLine=this.showLine),void 0!==this.dblClickExpand&&(t.view=t.view?t.view:{},t.view.dblClickExpand=this.dblClickExpand),this.addDiyDom&&this.addDiyDom.length>1&&(t.view=t.view?t.view:{}),this.addHoverDom&&(t.view=t.view?t.view:{},t.view.addHoverDom=this.hoverDomFunction,t.view.removeHoverDom=this.removeHoverDomFunction),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.beforeClick||(t.callback=t.callback?t.callback:{},t.callback.beforeClick=function(t,n){return e.beforeClick.emit(n),!0}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.beforeCheck||(t.callback=t.callback?t.callback:{},t.callback.beforeCheck=function(t,n){return e.beforeCheck.emit(n),!0}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.beforeRemove||(t.callback=t.callback?t.callback:{},t.callback.beforeRemove=function(t,n){return e.beforeRemove.emit(n),!0}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.beforeRename||(t.callback=t.callback?t.callback:{},t.callback.beforeRename=function(t,n){return e.beforeRename.emit(n),!0}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.onClick||(t.callback=t.callback?t.callback:{},t.callback.onClick=function(t,n,o){e.onClick.emit(o)}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.onCheck||(t.callback=t.callback?t.callback:{},t.callback.onCheck=function(t,n,o){e.onCheck.emit(o)}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.onRemove||(t.callback=t.callback?t.callback:{},t.callback.onRemove=function(t,n,o){e.onRemove.emit(o)}),this.treeSetting&&this.treeSetting.callback&&this.treeSetting.callback.onRename||(t.callback=t.callback?t.callback:{},t.callback.onRename=function(t,n,o){e.onRename.emit(o)}),this.treeSetting=Object.assign({},this.treeSetting,t)},e.prototype.ngAfterViewInit=function(){this.treeObject=$.fn.zTree.init($("#"+this.id),this.treeSetting,this._treeNodes)},e.prototype.ngOnDestroy=function(){this.treeObject.destroy()},e.prototype.getTreeObj=function(){return this.treeObject},e.prototype.initTree=function(){this.treeObject&&this.treeObject.destroy(),this.treeObject=$.fn.zTree.init($("#"+this.id),this.treeSetting,this._treeNodes)},i([Object(o.Input)()],e.prototype,"id",void 0),i([Object(o.Input)()],e.prototype,"treeNodes",null),i([Object(o.Input)()],e.prototype,"treeSetting",void 0),i([Object(o.Input)()],e.prototype,"checkAble",void 0),i([Object(o.Input)()],e.prototype,"checkStyle",void 0),i([Object(o.Input)()],e.prototype,"simpleData",void 0),i([Object(o.Input)()],e.prototype,"selectedMulti",void 0),i([Object(o.Input)()],e.prototype,"showIcon",void 0),i([Object(o.Input)()],e.prototype,"showLine",void 0),i([Object(o.Input)()],e.prototype,"addDiyDom",void 0),i([Object(o.Input)()],e.prototype,"addHoverDom",void 0),i([Object(o.Input)()],e.prototype,"dblClickExpand",void 0),i([Object(o.Output)()],e.prototype,"beforeClick",void 0),i([Object(o.Output)()],e.prototype,"beforeCheck",void 0),i([Object(o.Output)()],e.prototype,"beforeRemove",void 0),i([Object(o.Output)()],e.prototype,"beforeRename",void 0),i([Object(o.Output)()],e.prototype,"onClick",void 0),i([Object(o.Output)()],e.prototype,"onCheck",void 0),i([Object(o.Output)()],e.prototype,"onRemove",void 0),i([Object(o.Output)()],e.prototype,"onRename",void 0),i([Object(o.Output)()],e.prototype,"onHoverDomClick",void 0),e=i([Object(o.Component)({selector:"ng-tree",template:'<div [id]="id" class="ztree" [class.hoverBar]="!!addHoverDom"></div> ',styles:[".ztree * { padding: 0; margin: 0; font-size: 12px; font-family: inherit; } .ztree { margin: 0; padding: 0; color: #333; font-size: 12px; } :host ::ng-deep .ztree li { padding: 0; margin: 0; list-style: none; line-height: 14px; text-align: left; white-space: nowrap; outline: 0; } :host ::ng-deep .ztree li ul { margin: 0; padding: 0 0 0 18px; } :host ::ng-deep .ztree li a { padding: 0; margin: 0; cursor: pointer; width: 100%; height: 30px; color: #333; background-color: transparent; text-decoration: none; vertical-align: top; display: inline-block; line-height: 30px; } :host ::ng-deep .ztree li a:hover { color: #000; } :host ::ng-deep .ztree li a.curSelectedNode span { color: #4c7daa; } :host ::ng-deep .ztree.hoverBar li a:hover:before { width: 100%; height: 30px; left: 0; position: absolute; content: ''; z-index: -1; background: #e4e4e4; } :host ::ng-deep .ztree.hoverBar li a.curSelectedNode:before { width: 100%; height: 30px; left: 0; position: absolute; content: ''; z-index: -1; background: #e4e4e4; } :host ::ng-deep .ztree.hoverBar li a.curSelectedNode span { color: #000; } :host ::ng-deep .ztree.hoverBar li a .dropdown { position: absolute; right: 0; width: 14px; height: 14px; margin-top: 8px; margin-right: 2px; background: url(assets/ng-tree/img/dropdown-hover.svg) no-repeat; } :host ::ng-deep .ztree.hoverBar li a .copy-movelist { position: absolute; z-index: 99999; right: 0; top: 18px; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 0 5px rgba(165, 165, 165, 0.1); padding: 0; } :host ::ng-deep .ztree.hoverBar li a .copy-movelist li { display: block; padding: 0 12px; font-weight: 400; cursor: pointer; height: 30px; line-height: 30px; text-align: center; } :host ::ng-deep .ztree.hoverBar li a .copy-movelist li:hover { background: #f5f5f5; } :host ::ng-deep .ztree .switch + a { width: calc(100% - 30px); } :host ::ng-deep .ztree .switch.chk + a { width: calc(100% - 60px); } :host ::ng-deep .ztree li a.curSelectedNode_Edit { padding-top: 0; background-color: #ffe6b0; color: black; height: 14px; border: 1px #ffb951 solid; opacity: 0.8; } :host ::ng-deep .ztree li a.tmpTargetNode_inner { padding-top: 0px; background-color: #316ac5; color: white; height: 14px; border: 1px #316ac5 solid; opacity: 0.8; filter: alpha(opacity=80); } :host ::ng-deep .ztree li a input.rename { height: 14px; width: 80px; padding: 0; margin: 0; font-size: 12px; border: 1px #7ec4cc solid; *border: 0px; } :host ::ng-deep .ztree li span { line-height: 14px; margin-right: 2px; } :host ::ng-deep .ztree li span.button { line-height: 0; margin: 0; width: 14px; height: 14px; display: inline-block; vertical-align: middle; border: 0 none; cursor: pointer; outline: none; background-color: transparent; background-repeat: no-repeat; background-attachment: scroll; } :host ::ng-deep .ztree li span.button.chk { width: 14px; height: 14px; margin: 8px 12px 0 0; cursor: auto; } :host ::ng-deep .ztree li span.button.chk.checkbox_false_full { background: url(assets/ng-tree/img/check-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_false_full_focus { background: url(assets/ng-tree/img/check-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_false_part { background: url(assets/ng-tree/img/check-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_false_part_focus { background: url(assets/ng-tree/img/check-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_false_disable { background: url(assets/ng-tree/img/check-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_true_full { background: url(assets/ng-tree/img/check-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_true_full_focus { background: url(assets/ng-tree/img/check-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_true_part { background: url(assets/ng-tree/img/check-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_true_part_focus { background: url(assets/ng-tree/img/check-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.checkbox_true_disable { background: url(assets/ng-tree/img/check-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_false_full { background: url(assets/ng-tree/img/radio-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_false_full_focus { background: url(assets/ng-tree/img/radio-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_false_part { background: url(assets/ng-tree/img/radio-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_false_part_focus { background: url(assets/ng-tree/img/radio-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_false_disable { background: url(assets/ng-tree/img/radio-normal.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_true_full { background: url(assets/ng-tree/img/radio-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_true_full_focus { background: url(assets/ng-tree/img/radio-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_true_part { background: url(assets/ng-tree/img/radio-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_true_part_focus { background: url(assets/ng-tree/img/radio-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.chk.radio_true_disable { background: url(assets/ng-tree/img/radio-active.svg) no-repeat; } :host ::ng-deep .ztree li span.button.switch { width: 14px; height: 14px; margin-top: 8px; margin-right: 4px; } :host ::ng-deep .ztree li span.button.root_open { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.root_close { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.roots_open { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.roots_close { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.center_open { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.center_close { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.bottom_open { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.bottom_close { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.noline_open { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.noline_close { background: url(assets/ng-tree/img/treeRight-icon.svg) no-repeat center left; } :host ::ng-deep .ztree li span.button.root_docu { background: none; } :host ::ng-deep .ztree li span.button.roots_docu { background: url(assets/ng-tree/img/table.svg) no-repeat; } :host ::ng-deep .ztree li span.button.center_docu { background: none; } :host ::ng-deep .ztree li span.button.bottom_docu { background: none; } :host ::ng-deep .ztree li span.button.noline_docu { background: none; } :host ::ng-deep .ztree li span.button.ico_open { margin-top: 8px; margin-right: 12px; background: url(assets/ng-tree/img/08-14-14.svg) no-repeat; vertical-align: top; *vertical-align: middle; } :host ::ng-deep .ztree li span.button.ico_close { margin-top: 8px; margin-right: 12px; background: url(assets/ng-tree/img/08-14-14.svg) no-repeat; vertical-align: top; *vertical-align: middle; } :host ::ng-deep .ztree li span.button.ico_docu { margin-top: 8px; margin-right: 12px; background: url(assets/ng-tree/img/table.svg) no-repeat; vertical-align: top; *vertical-align: middle; } :host ::ng-deep .ztree li span.button.edit { margin-right: 2px; background-position: -110px -48px; vertical-align: top; *vertical-align: middle; } :host ::ng-deep .ztree li span.button.remove { margin-right: 2px; background-position: -110px -64px; vertical-align: top; *vertical-align: middle; } :host ::ng-deep .ztree li span.button.ico_loading { margin-right: 2px; /*background: url(./img/loading.gif) no-repeat scroll 0 0 transparent;*/ vertical-align: top; *vertical-align: middle; } :host ::ng-deep ul.tmpTargetzTree { background-color: #ffe6b0; opacity: 0.8; filter: alpha(opacity=80); } :host ::ng-deep span.tmpzTreeMove_arrow { width: 14px; height: 14px; display: inline-block; padding: 0; margin: 2px 0 0 1px; border: 0 none; position: absolute; background-color: transparent; background-repeat: no-repeat; background-attachment: scroll; background-position: -110px -80px; /*background-image: url(\"./img/zTreeStandard.png\");*/ /**background-image: url(\"./img/zTreeStandard.gif\")*/ } :host ::ng-deep ul.ztree.zTreeDragUL { margin: 0; padding: 0; position: absolute; width: auto; height: auto; overflow: hidden; background-color: #cfcfcf; border: 1px #00b83f dotted; opacity: 0.8; filter: alpha(opacity=80); } :host ::ng-deep .zTreeMask { z-index: 10000; background-color: #cfcfcf; opacity: 0.0; filter: alpha(opacity=0); position: absolute; } "]})],e)}(),s=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},c=function(){function e(){}return e=s([Object(o.NgModule)({imports:[r.CommonModule],declarations:[a],exports:[a]})],e)}();function l(e){return function(e,t){var n=" __"+t+"Value";Object.defineProperty(e,t,{get:function(){return this[n]},set:function(e){var o=this[n];this[n]=e,o!==e&&this[t+"Change"]&&this[t+"Change"].emit(e)}})}}var p,u=function(){function e(){this.length=0,this.asArray=[]}return e.prototype.get=function(e){if(!(0===this.length||e<0||e>=this.length)){for(var t=this.head,n=0;n<e;n++)t=t.next;return t.value}},e.prototype.add=function(e,t){if(void 0===t&&(t=this.length),t<0||t>this.length)throw new Error("Position is out of the list");var n={value:e,next:void 0,previous:void 0};if(0===this.length)this.head=n,this.tail=n,this.current=n;else if(0===t)n.next=this.head,this.head.previous=n,this.head=n;else if(t===this.length)this.tail.next=n,n.previous=this.tail,this.tail=n;else{var o=this.getNode(t-1),r=o.next;o.next=n,r.previous=n,n.previous=o,n.next=r}this.length++,this.createInternalArrayRepresentation()},e.prototype.remove=function(e){if(void 0===e&&(e=0),0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");if(0===e)this.head=this.head.next,this.head?this.head.previous=void 0:this.tail=void 0;else if(e===this.length-1)this.tail=this.tail.previous,this.tail.next=void 0;else{var t=this.getNode(e);t.next.previous=t.previous,t.previous.next=t.next}this.length--,this.createInternalArrayRepresentation()},e.prototype.set=function(e,t){if(0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");this.getNode(e).value=t,this.createInternalArrayRepresentation()},e.prototype.toArray=function(){return this.asArray},e.prototype.findAll=function(e){for(var t=this.head,n=[],o=0;o<this.length;o++)e(t.value,o)&&n.push({index:o,value:t.value}),t=t.next;return n},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){e.add(t)}),this.length},e.prototype.pop=function(){if(0!==this.length){var e=this.tail;return this.remove(this.length-1),e.value}},e.prototype.unshift=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reverse(),t.forEach(function(t){e.add(t,0)}),this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.value;return this.remove(),e}},e.prototype.forEach=function(e){for(var t=this.head,n=0;n<this.length;n++)e(t.value,n),t=t.next},e.prototype.indexOf=function(e){for(var t=this.head,n=0,o=0;o<this.length;o++){if(t.value===e){n=o;break}t=t.next}return n},e.prototype.some=function(e){for(var t=this.head,n=!1;t&&!n;){if(e(t.value)){n=!0;break}t=t.next}return n},e.prototype.every=function(e){for(var t=this.head,n=!0;t&&n;)e(t.value)||(n=!1),t=t.next;return n},e.prototype.toString=function(){return"[Linked List]"},e.prototype.find=function(e){for(var t,n=this.head,o=0;o<this.length;o++){if(e(n.value,o)){t=n.value;break}n=n.next}return t},e.prototype.findIndex=function(e){for(var t,n=this.head,o=0;o<this.length;o++){if(e(n.value,o)){t=o;break}n=n.next}return t},e.prototype.getNode=function(e){if(0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");for(var t=this.head,n=0;n<e;n++)t=t.next;return t},e.prototype.createInternalArrayRepresentation=function(){for(var e=[],t=this.head;t;)e.push(t.value),t=t.next;this.asArray=e},e}(),d="undefined"!=typeof window&&window||{};
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/d.document,d.location,d.gc,d.performance&&d.performance,d.Event,d.MouseEvent,d.KeyboardEvent,d.EventTarget,d.History,d.Location,d.EventListener;function h(){return void 0===d||(void 0===d.__theme?p?"bs3"===p:"bs3"===(p=function(){if("undefined"==typeof document)return null;var e=document.createElement("span");e.innerText="test bs version",document.body.appendChild(e),e.classList.add("d-none");var t=e.getBoundingClientRect();return document.body.removeChild(e),t&&0===t.top?"bs4":"bs3"}()):"bs4"!==d.__theme)}var g=function(){function e(e,t){this.open=e,this.close=t||e}return e.prototype.isManual=function(){return"manual"===this.open||"manual"===this.close},e}(),b=function(){function e(){}return e.reflow=function(e){e.offsetHeight},e.getStyles=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=d),t.getComputedStyle(e)},e}(),f=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},v=function(){function e(e){this.viewRef=e}return Object.defineProperty(e.prototype,"ngTransclude",{get:function(){return this._ngTransclude},set:function(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)},enumerable:!0,configurable:!0}),f([Object(o.Input)()],e.prototype,"ngTransclude",null),e=f([Object(o.Directive)({selector:"[ngTransclude]"})],e)}(),m=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},k=function(){function e(e,t,n){this.elementRef=t,this.renderer=n,this.select=new o.EventEmitter,this.deselect=new o.EventEmitter,this.removed=new o.EventEmitter,this.addClass=!0,this.tabset=e,this.tabset.addTab(this)}return Object.defineProperty(e.prototype,"customClass",{get:function(){return this._customClass},set:function(e){var t=this;this.customClass&&this.customClass.split(" ").forEach(function(e){t.renderer.removeClass(t.elementRef.nativeElement,e)}),this._customClass=e?e.trim():null,this.customClass&&this.customClass.split(" ").forEach(function(e){t.renderer.addClass(t.elementRef.nativeElement,e)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},set:function(e){var t=this;this._active!==e&&(this.disabled&&e||!e?this._active&&!e&&(this.deselect.emit(this),this._active=e):(this._active=e,this.select.emit(this),this.tabset.tabs.forEach(function(e){e!==t&&(e.active=!1)})))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.removable=this.removable},e.prototype.ngOnDestroy=function(){this.tabset.removeTab(this,{reselect:!1,emit:!1})},m([Object(o.Input)()],e.prototype,"heading",void 0),m([Object(o.HostBinding)("attr.id"),Object(o.Input)()],e.prototype,"id",void 0),m([Object(o.Input)()],e.prototype,"disabled",void 0),m([Object(o.Input)()],e.prototype,"removable",void 0),m([Object(o.Input)()],e.prototype,"customClass",null),m([Object(o.HostBinding)("class.active"),Object(o.Input)()],e.prototype,"active",null),m([Object(o.Output)()],e.prototype,"select",void 0),m([Object(o.Output)()],e.prototype,"deselect",void 0),m([Object(o.Output)()],e.prototype,"removed",void 0),m([Object(o.HostBinding)("class.tab-pane")],e.prototype,"addClass",void 0),e=m([Object(o.Directive)({selector:"tab, [tab]"})],e)}(),y=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},x=function(){function e(e,t){t.headingRef=e}return e=y([Object(o.Directive)({selector:"[tabHeading]"})],e)}(),O=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_=function(){function e(e,t){this.renderer=t,this.clazz=!0,this.tabs=[],this.classMap={},Object.assign(this,e)}return Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(e){this._vertical=e,this.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"justified",{get:function(){return this._justified},set:function(e){this._justified=e,this.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e,this.setClassMap()},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.isDestroyed=!0},e.prototype.addTab=function(e){this.tabs.push(e),e.active=1===this.tabs.length&&void 0===e.active},e.prototype.removeTab=function(e,t){void 0===t&&(t={reselect:!0,emit:!0});var n=this.tabs.indexOf(e);if(-1!==n&&!this.isDestroyed){if(t.reselect&&e.active&&this.hasAvailableTabs(n)){var o=this.getClosestTabIndex(n);this.tabs[o].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(n,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}},e.prototype.getClosestTabIndex=function(e){var t=this.tabs.length;if(!t)return-1;for(var n=1;n<=t;n+=1){var o=e-n,r=e+n;if(this.tabs[o]&&!this.tabs[o].disabled)return o;if(this.tabs[r]&&!this.tabs[r].disabled)return r}return-1},e.prototype.hasAvailableTabs=function(e){var t=this.tabs.length;if(!t)return!1;for(var n=0;n<t;n+=1)if(!this.tabs[n].disabled&&n!==e)return!0;return!1},e.prototype.setClassMap=function(){var e;this.classMap=((e={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified})["nav-"+this.type]=!0,e)},O([Object(o.Input)()],e.prototype,"vertical",null),O([Object(o.Input)()],e.prototype,"justified",null),O([Object(o.Input)()],e.prototype,"type",null),O([Object(o.HostBinding)("class.tab-container")],e.prototype,"clazz",void 0),e=O([Object(o.Component)({selector:"tabset",template:'<ul class="nav" [ngClass]="classMap" (click)="$event.preventDefault()"> <li *ngFor="let tabz of tabs" [ngClass]="[\'nav-item\', tabz.customClass || \'\']" [class.active]="tabz.active" [class.disabled]="tabz.disabled"> <a href="javascript:void(0);" class="nav-link" [attr.id]="tabz.id ? tabz.id + \'-link\' : \'\'" [class.active]="tabz.active" [class.disabled]="tabz.disabled" (click)="tabz.active = true"> <span [ngTransclude]="tabz.headingRef">{{ tabz.heading }}</span> <span *ngIf="tabz.removable" (click)="$event.preventDefault(); removeTab(tabz);" class="bs-remove-tab"> ❌</span> </a> </li> </ul> <div class="tab-content"> <ng-content></ng-content> </div> '})],e)}(),j=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},w=function(){function e(){this.type="tabs"}return e=j([Object(o.Injectable)()],e)}(),z=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},R=function(){function e(){}return t=e,e.forRoot=function(){return{ngModule:t,providers:[w]}},e=t=z([Object(o.NgModule)({imports:[r.CommonModule],declarations:[v,k,_,x],exports:[k,_,x,v]})],e);var t}();n.d(t,"NgTreeModule",function(){return c}),n.d(t,"OnChange",function(){return l}),n.d(t,"LinkedList",function(){return u}),n.d(t,"isBs3",function(){return h}),n.d(t,"Trigger",function(){return g}),n.d(t,"Utils",function(){return b}),n.d(t,"NgTranscludeDirective",function(){return v}),n.d(t,"TabDirective",function(){return k}),n.d(t,"TabHeadingDirective",function(){return x}),n.d(t,"TabsetComponent",function(){return _}),n.d(t,"TabsetConfig",function(){return w}),n.d(t,"TabsModule",function(){return R})}])});
//# sourceMappingURL=ng-dap.umd.min.js.map