Comparing version 2.0.0 to 2.0.1
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common"],t):t(e["tree-ngx"]={},e.ng.core,e.ng.common)}(this,function(e,t,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function h(e){return"function"==typeof e}var i=!1,s={Promise:undefined,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;i=e},get useDeprecatedSynchronousErrorHandling(){return i}};function l(e){setTimeout(function(){throw e})}var a={closed:!0,next:function(e){},error:function(e){if(s.useDeprecatedSynchronousErrorHandling)throw e;l(e)},complete:function(){}},u=Array.isArray||function(e){return e&&"number"==typeof e.length};function d(e){return null!=e&&"object"==typeof e}var c,p={e:{}};function f(){try{return c.apply(this,arguments)}catch(e){return p.e=e,p}}function b(e){return c=e,f}function y(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}y.prototype=Object.create(Error.prototype);var m=y,S=function(){function r(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var e;return r.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){var n=this._parent,r=this._parents,i=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,c=r?r.length:0;n;)n.remove(this),n=++s<c&&r[s]||null;if(h(i))b(i).call(this)===p&&(t=!0,e=e||(p.e instanceof m?v(p.e.errors):[p.e]));if(u(o))for(s=-1,c=o.length;++s<c;){var l=o[s];if(d(l))if(b(l.unsubscribe).call(l)===p){t=!0,e=e||[];var a=p.e;a instanceof m?e=e.concat(v(a.errors)):e.push(a)}}if(t)throw new m(e)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if("function"!=typeof t._addParent){var n=t;(t=new r)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(t),t._addParent(this),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},r.prototype._addParent=function(e){var t=this._parent,n=this._parents;t&&t!==e?n?-1===n.indexOf(e)&&n.push(e):this._parents=[e]:this._parent=e},r.EMPTY=((e=new r).closed=!0,e),r}();function v(e){return e.reduce(function(e,t){return e.concat(t instanceof m?t.errors:t)},[])}var g="function"==typeof Symbol&&"function"==typeof Symbol["for"]?Symbol["for"]("rxSubscriber"):"@@rxSubscriber",_=function(s){function i(e,t,n){var r=s.call(this)||this;switch(r.syncErrorValue=null,r.syncErrorThrown=!1,r.syncErrorThrowable=!1,r.isStopped=!1,r._parentSubscription=null,arguments.length){case 0:r.destination=a;break;case 1:if(!e){r.destination=a;break}if("object"==typeof e){if(function o(e){return e instanceof _||"_addParentTeardownLogic"in e&&e[g]}(e)){var i=e[g]();r.syncErrorThrowable=i.syncErrorThrowable,(r.destination=i)._addParentTeardownLogic(r)}else r.syncErrorThrowable=!0,r.destination=new w(r,e);break}default:r.syncErrorThrowable=!0,r.destination=new w(r,e,t,n)}return r}return o(i,s),i.prototype[g]=function(){return this},i.create=function(e,t,n){var r=new i(e,t,n);return r.syncErrorThrowable=!1,r},i.prototype.next=function(e){this.isStopped||this._next(e)},i.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e),this._unsubscribeParentSubscription())},i.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete(),this._unsubscribeParentSubscription())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this))},i.prototype._next=function(e){this.destination.next(e)},i.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},i.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},i.prototype._addParentTeardownLogic=function(e){e!==this&&(this._parentSubscription=this.add(e))},i.prototype._unsubscribeParentSubscription=function(){null!==this._parentSubscription&&this._parentSubscription.unsubscribe()},i.prototype._unsubscribeAndRecycle=function(){var e=this._parent,t=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this._parentSubscription=null,this},i}(S),w=function(c){function e(e,t,n,r){var i,o=c.call(this)||this;o._parentSubscriber=e;var s=o;return h(t)?i=t:t&&(i=t.next,n=t.error,r=t.complete,t!==a&&(h((s=Object.create(t)).unsubscribe)&&o.add(s.unsubscribe.bind(s)),s.unsubscribe=o.unsubscribe.bind(o))),o._context=s,o._next=i,o._error=n,o._complete=r,o}return o(e,c),e.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},e.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):l(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;l(e)}}},e.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,n):this.__tryOrUnsub(n),this.unsubscribe()}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw n;l(n)}},e.prototype.__tryOrSetError=function(e,t,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return s.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0):(l(r),!0)}return!1},e.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},e}(_);var x="function"==typeof Symbol&&Symbol.observable||"@@observable";function I(){}var C=function(){function n(e){this._isScalar=!1,e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,n){var r=this.operator,i=function o(e,t,n){if(e){if(e instanceof _)return e;if(e[g])return e[g]()}return e||t||n?new _(e,t,n):new _(a)}(e,t,n);if(r?r.call(i,this.source):i._addParentTeardownLogic(this.source||s.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),e.error(t)}},n.prototype.forEach=function(i,e){var t=this;return new(e=k(e))(function(e,n){var r;r=t.subscribe(function(e){try{i(e)}catch(t){n(t),r&&r.unsubscribe()}},n,e)})},n.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},n.prototype[x]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:function n(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}:I}(e)(this)},n.prototype.toPromise=function(e){var r=this;return new(e=k(e))(function(e,t){var n;r.subscribe(function(e){return n=e},function(e){return t(e)},function(){return e(n)})})},n.create=function(e){return new n(e)},n}();function k(e){if(e||(e=s.Promise||Promise),!e)throw new Error("no Promise impl found");return e}function E(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}E.prototype=Object.create(Error.prototype);var T=E,O=function(r){function e(e,t){var n=r.call(this)||this;return n.subject=e,n.subscriber=t,n.closed=!1,n}return o(e,r),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},e}(S),N=function(n){function e(e){var t=n.call(this,e)||this;return t.destination=e,t}return o(e,n),e}(_),P=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[g]=function(){return new N(this)},e.prototype.lift=function(e){var t=new V(this,this);return t.operator=e,t},e.prototype.next=function(e){if(this.closed)throw new T;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},e.prototype.error=function(e){if(this.closed)throw new T;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new T;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new T;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(e){if(this.closed)throw new T;return this.hasError?(e.error(this.thrownError),S.EMPTY):this.isStopped?(e.complete(),S.EMPTY):(this.observers.push(e),new O(this,e))},e.prototype.asObservable=function(){var e=new C;return e.source=this,e},e.create=function(e,t){return new V(e,t)},e}(C),V=function(r){function e(e,t){var n=r.call(this)||this;return n.destination=e,n.source=t,n}return o(e,r),e.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},e.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},e.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},e.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):S.EMPTY},e}(P);var j=function(n){function e(e){var t=n.call(this)||this;return t._value=e,t}return o(e,n),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var t=n.prototype._subscribe.call(this,e);return t&&!t.closed&&e.next(this._value),t},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new T;return this._value},e.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},e}(P),D=function(r){function e(e,t){var n=r.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.pending=!1,n}return o(e,r),e.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},e.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},e.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},e.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(e,t){var n=!1,r=undefined;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},e}(function(n){function e(e,t){return n.call(this)||this}return o(e,n),e.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},e}(S)),B=function(){function n(e,t){void 0===t&&(t=n.now),this.SchedulerAction=e,this.now=t}return n.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},n.now=function(){return Date.now()},n}(),M=function(r){function i(e,t){void 0===t&&(t=B.now);var n=r.call(this,e,function(){return i.delegate&&i.delegate!==n?i.delegate.now():t()})||this;return n.actions=[],n.active=!1,n.scheduled=undefined,n}return o(i,r),i.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),i.delegate&&i.delegate!==this?i.delegate.schedule(e,t,n):r.prototype.schedule.call(this,e,t,n)},i.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},i}(B);var A=new M(D);Error.prototype;var H=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new F(e,this.dueTime,this.scheduler))},e}(),F=function(i){function e(e,t,n){var r=i.call(this,e)||this;return r.dueTime=t,r.scheduler=n,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return o(e,i),e.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(U,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},e.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},e}(_);function U(e){e.debouncedNext()}var L=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Y(e,this.compare,this.keySelector))},e}(),Y=function(i){function e(e,t,n){var r=i.call(this,e)||this;return r.keySelector=n,r.hasKey=!1,"function"==typeof t&&(r.compare=t),r}return o(e,i),e.prototype.compare=function(e,t){return e===t},e.prototype._next=function(e){var t=e;if(this.keySelector&&(t=b(this.keySelector)(e))===p)return this.destination.error(p.e);var n=!1;if(this.hasKey){if((n=b(this.compare)(this.key,t))===p)return this.destination.error(p.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=t,this.destination.next(e))},e}(_);var q={checked:0,unChecked:1,indeterminate:2};q[q.checked]="checked",q[q.unChecked]="unChecked",q[q.indeterminate]="indeterminate";var z={NoSelect:0,SingleSelect:1,MultiSelect:2};z[z.NoSelect]="NoSelect",z[z.SingleSelect]="SingleSelect",z[z.MultiSelect]="MultiSelect";var K=function(){function e(){var t=this;this.callbacks={},this.treeState=[],this.selectedItems=[],this.selectedStates=[],this.filterValue="",this.selectedItemsSubject=new j(this.selectedItems),this.filterChangeSubject=new j(this.filterValue),this.filterChangeSubject.pipe(function e(t,n){return void 0===n&&(n=A),function(e){return e.lift(new H(t,n))}}(300),function r(t,n){return function(e){return e.lift(new L(t,n))}}()).subscribe(function(e){t.filterTraverse(t.treeState,t.filterValue)})}return e.prototype.toggleSelected=function(e){this.toggleSelectedState(e),this.callbacks.toggle&&this.callbacks.toggle(e.nodeItem)},e.prototype.toggleSelectedState=function(e){this.options.mode!==z.NoSelect&&(e.selectedState===q.unChecked?(this.options.mode===z.SingleSelect&&this.clear(),this.setChecked(e,!0)):e.selectedState!==q.checked&&e.selectedState!==q.indeterminate||this.setUnchecked(e,!0),e.parent&&this.childStateChanged(e.parent))},e.prototype.setInitialState=function(){this.setInitialSelectedState(this.treeState)},e.prototype.childStateChanged=function(e){this.anyChildSelected(e)?this.allChildrenSelected(e)?this.setChecked(e,!1):this.setIndeterminate(e):this.setUnchecked(e,!1),e.parent&&this.childStateChanged(e.parent)},e.prototype.nameClick=function(e){this.callbacks.nameClick&&this.callbacks.nameClick(e.nodeItem),this.canToggleChildrenOnName(e)&&this.toggleSelected(e)},e.prototype.toggleExpanded=function(e){this.toggleExpandedTraverse(this.treeState,e)},e.prototype.clear=function(){for(var e=0,t=this.selectedStates;e<t.length;e++){var n=t[e];n.selected=!1,n.selectedState=q.unChecked}this.selectedItems.length=0,this.selectedStates.length=0},e.prototype.addNodeById=function(e,t){var n=this.getNodeItem(this.treeState,t,this.findById);n&&n.children&&((e.parent=n).children.push(e),n.nodeItem.children.push(e.nodeItem),this.childStateChanged(n),this.filterTraverse(this.treeState,this.filterValue))},e.prototype.deleteById=function(e){var t=this.getNodeItem(this.treeState,e,this.findById);t&&this.deleteByState(t)},e.prototype.deleteByState=function(e){this["delete"](e),this.childStateChanged(e),this.filterTraverse(this.treeState,this.filterValue)},e.prototype.filterChanged=function(e){this.filterValue=e,this.filterChangeSubject.next(e)},e.prototype.canToggleChildrenOnName=function(e){if(!1===this.options.checkboxes){if(this.options.mode===z.SingleSelect&&!e.nodeItem.children)return!0;if(this.options.mode===z.MultiSelect)return!0}return!1},e.prototype.setInitialSelectedState=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];!r.nodeItem.children&&r.nodeItem.selected&&this.toggleSelectedState(r),this.setInitialSelectedState(r.children)}},e.prototype["delete"]=function(e){for(;0<e.children.length;)this["delete"](e.children.pop());this.removeSelected(e.nodeItem.item),this.remove(e),e.parent||this.deleteRoot(e,this.treeState,this.nodeItems)},e.prototype.toggleExpandedTraverse=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];i.expanded=t,this.toggleExpandedTraverse(i.children,t)}},e.prototype.deleteRoot=function(e,t,n){var r=n.indexOf(e.nodeItem);-1!==r&&n.splice(r,1);var i=t.indexOf(e);-1!==i&&t.splice(i,1)},e.prototype.remove=function(e){if(e.parent){e.parent.hasFilteredChildren=!1;var t=e.parent.nodeItem.children.indexOf(e.nodeItem);-1!==t&&e.parent.nodeItem.children.splice(t,1);var n=e.parent.children.indexOf(e);-1!==n&&e.parent.children.splice(n,1);var r=e.parent.filteredChildren.indexOf(e);-1!==r&&e.parent.filteredChildren.splice(r,1)}},e.prototype.anyChildSelected=function(e){return null!=e.children.find(function(e){return e.selectedState===q.checked||e.selectedState===q.indeterminate})},e.prototype.allChildrenSelected=function(e){return e.children.every(function(e){return e.selectedState===q.checked})&&e.children.length===e.nodeItem.children.length},e.prototype.setUnchecked=function(e,t){if(e.selectedState=q.unChecked,e.selected=!1,e.nodeItem.children){if(!0===t)for(var n=0,r=e.children;n<r.length;n++){var i=r[n];this.setUnchecked(i,t)}}else this.removeSelected(e.nodeItem.item),!0===this.options.alwaysEmitSelected&&this.selectedItemsSubject.next(this.selectedItems),this.callbacks.unSelect&&this.callbacks.unSelect(e.nodeItem)},e.prototype.setIndeterminate=function(e){e.selectedState=q.indeterminate,e.selected=!0},e.prototype.setChecked=function(e,t){if(e.selectedState=q.checked,e.selected=!0,e.nodeItem.children){if(!0===t)for(var n=0,r=e.children;n<r.length;n++){var i=r[n];this.setChecked(i,t)}}else this.addSelected(e)},e.prototype.addSelected=function(e){this.selectedItems.push(e.nodeItem.item),this.selectedStates.push(e),!0===this.options.alwaysEmitSelected&&this.selectedItemsSubject.next(this.selectedItems),this.callbacks.select&&this.callbacks.select(e.nodeItem)},e.prototype.removeSelected=function(e){var t=this.selectedItems.indexOf(e);-1!==t&&this.selectedItems.splice(t,1)},e.prototype.findById=function(e,t){return e.nodeItem.id===t},e.prototype.removeItem=function(e){var t=this.selectedItems.indexOf(e);-1!==t&&this.selectedItems.splice(t,1)},e.prototype.getNodeItem=function(e,t,n){var r=e.find(function(e){return n(e,t)});if(r)return r;for(var i=0,o=e;i<o.length;i++){var s=o[i];if(r=this.getNodeItem(s.children,t,n))return r}return r},e.prototype.connect=function(){return this.selectedItemsSubject.asObservable()},e.prototype.applyFilter=function(e,t){return e.filteredChildren=this.filter(e.children,t),0<e.filteredChildren.length},e.prototype.filter=function(e,t){return e.filter(function(e){return e.hasFilteredChildren||""===t||-1!==e.nodeItem.name.toLowerCase().indexOf(t)})},e.prototype.filterTraverse=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];if(0<o.children.length)o.hasFilteredChildren=!1,o.hasFilteredChildren=this.filterTraverse(o.children,t),this.applyFilter(o,t)&&(o.hasFilteredChildren=!0),n.push(o.hasFilteredChildren)}return n.some(function(e){return!0===e})},e}();K.decorators=[{type:t.Injectable}],K.ctorParameters=function(){return[]};var R=function(){function e(e){this.treeService=e,this.defaultOptions={mode:z.SingleSelect,checkboxes:!1,alwaysEmitSelected:!1},this.options=this.defaultOptions,this.callbacks=this.treeService.callbacks,this.filter="",this.selectedItems=new t.EventEmitter}return e.prototype.ngOnInit=function(){var t=this;this.subscription=this.treeService.connect().subscribe(function(e){t.selectedItems.emit(e)})},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.ngOnChanges=function(e){e.filter&&this.treeService.filterChanged(this.filter.toLowerCase()),e.options&&this.setOptions(),e.callbacks&&(this.treeService.callbacks=this.callbacks),e.nodeItems&&this.initialize()},e.prototype.addNodeById=function(e,t){var n=this.initState(null,e,this.options);this.treeService.addNodeById(n,t)},e.prototype.deleteById=function(e){this.treeService.deleteById(e)},e.prototype.expandAll=function(){this.treeService.toggleExpanded(!0)},e.prototype.collapseAll=function(){this.treeService.toggleExpanded(!1)},e.prototype.initialize=function(){this.setOptions(),this.treeService.callbacks=this.callbacks,this.treeService.nodeItems=this.nodeItems,this.treeService.treeState=this.initTreeStructure(null,this.treeService.nodeItems,this.treeService.options),this.treeService.clear(),this.treeService.setInitialState()},e.prototype.initTreeStructure=function(e,t,n){for(var r=[],i=0,o=t;i<o.length;i++){var s=o[i],c=this.initState(e,s,n);s.children&&(c.children=this.initTreeStructure(c,s.children,n),c.filteredChildren=c.children),r.push(c)}return r},e.prototype.setOptions=function(){this.options.mode===z.NoSelect?this.treeService.options=Object.assign({},this.options,{checkboxes:!1}):this.treeService.options=Object.assign({},this.options)},e.prototype.initState=function(e,t,n){return{parent:e,children:[],filteredChildren:[],hasFilteredChildren:!1,nodeItem:t,expanded:!1!==t.expanded,markSelected:this.getMarkSelected(t,n),collapseVisible:this.getCollapseVisible(t),selectedState:q.unChecked,selected:!1,showCheckBox:this.getCheckBoxVisible(t,n)}},e.prototype.getMarkSelected=function(e,t){return!e.children&&!t.checkboxes},e.prototype.getCheckBoxVisible=function(e,t){return!(e.children&&this.treeService.options.mode===z.SingleSelect||!this.treeService.options.checkboxes)},e.prototype.getCollapseVisible=function(e){return!!e.children},e}();R.decorators=[{type:t.Component,args:[{selector:"tree-ngx",template:'\n <div class="tree-ngx">\n <node class="node-root" [state]="state" [selectedState]="state.selectedState" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"\n [nodeNameTemplate]="nodeNameTemplate" *ngFor="let state of treeService.treeState"></node>\n </div>\n ',providers:[K]}]}],R.ctorParameters=function(){return[{type:K}]},R.propDecorators={nodeNameTemplate:[{type:t.ContentChild,args:["nodeNameTemplate"]}],nodeCollapsibleTemplate:[{type:t.ContentChild,args:["nodeCollapsibleTemplate"]}],options:[{type:t.Input}],callbacks:[{type:t.Input}],nodeItems:[{type:t.Input}],filter:[{type:t.Input}],selectedItems:[{type:t.Output}]};var $=function(){function e(e){this.treeService=e,this._this=this}return e.prototype.ngOnChanges=function(e){e.selectedState&&this.selectedStateChanged()},e.prototype.selectedStateChanged=function(){this.nodeCheckbox&&(this.selectedState===q.indeterminate?this.nodeCheckbox.nativeElement.indeterminate=!0:this.nodeCheckbox.nativeElement.indeterminate=!1)},e.prototype.toggleSelected=function(){this.treeService.toggleSelected(this.state)},e}();$.decorators=[{type:t.Component,args:[{selector:"node",template:'\n <div class="node">\n <div class="node-container">\n <node-icon-wrapper [state]="state" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"></node-icon-wrapper>\n <input #nodeCheckbox class="node-checkbox" *ngIf="state.showCheckBox" (click)="toggleSelected()" [disabled]="state.nodeItem?.children?.length == 0"\n [checked]="state.selected" type="checkbox" />\n <node-name [state]="state" [nodeNameTemplate]="nodeNameTemplate"></node-name>\n </div>\n <div *ngIf="state.nodeItem.children" class="collapsible-wrapper" [class.collapsed]="!state.expanded && state.nodeItem.children.length > 0 && state.filteredChildren.length > 0">\n <div class="collapsible">\n <node class="node-offset" [state]="child" [selectedState]="child.selectedState" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"\n [nodeNameTemplate]="nodeNameTemplate" *ngFor="let child of state.filteredChildren"></node>\n </div>\n </div>\n </div>\n '}]}],$.ctorParameters=function(){return[{type:K}]},$.propDecorators={nodeCheckbox:[{type:t.ViewChild,args:["nodeCheckbox"]}],state:[{type:t.Input}],selectedState:[{type:t.Input}],nodeNameTemplate:[{type:t.Input}],nodeCollapsibleTemplate:[{type:t.Input}]};var G=function(){function e(e){this.treeService=e,(this._this=this).active=!1}return e.prototype.ngOnChanges=function(e){e.state&&(this.active=this.treeService.canToggleChildrenOnName(this.state))},e.prototype.nameClick=function(){this.treeService.nameClick(this.state)},e.prototype["delete"]=function(){this.treeService.deleteByState(this.state)},e.prototype.toggleExpand=function(){this.state.expanded=!this.state.expanded},e}();G.decorators=[{type:t.Component,args:[{selector:"node-name",template:'\n <div (click)="nameClick()" [class.markSelected]="state.markSelected && state.selected" class="node-name">\n <ng-container *ngIf="!nodeNameTemplate">\n <span [class.active]="active">{{state.nodeItem.name}}</span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet="nodeNameTemplate; context: { $implicit: state.nodeItem, node: state.nodeItem, context: _this }">\n </ng-container>\n </div>\n '}]}],G.ctorParameters=function(){return[{type:K}]},G.propDecorators={state:[{type:t.Input}],nodeNameTemplate:[{type:t.Input}]};var J=function(){function e(){this._this=this}return e.prototype.toggleExpand=function(){this.state.expanded=!this.state.expanded},e}();J.decorators=[{type:t.Component,args:[{selector:"node-icon-wrapper",template:'\n <div class="node-icon-wrapper" [class.disabled]="state.nodeItem?.children?.length == 0" [class.collapsable]="state.collapseVisible"\n [class.iconCheckbox]="state.showCheckBox" (click)="state.expanded = !state.expanded;">\n <ng-container *ngIf="!nodeCollapsibleTemplate">\n <ng-container *ngIf="state.collapseVisible && state.nodeItem?.children?.length > 0">\n <i *ngIf="!state.expanded" class="arrow-right"></i>\n <i *ngIf="state.expanded" class="arrow-down"></i>\n </ng-container>\n <ng-container *ngIf="state.nodeItem?.children?.length == 0">\n <i class="arrow-down collapse-empty"></i>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf="state.collapseVisible && state.nodeItem?.children?.length > 0">\n <ng-container *ngTemplateOutlet="nodeCollapsibleTemplate; context: { expanded: state.expanded, context: _this }">\n </ng-container>\n </ng-container>\n </div>\n '}]}],J.ctorParameters=function(){return[]},J.propDecorators={state:[{type:t.Input}],nodeCollapsibleTemplate:[{type:t.Input}]};var Q=function W(){};Q.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[R,$,G,J],providers:[K],exports:[R]}]}],Q.ctorParameters=function(){return[]},e.TreeNgxComponent=R,e.TreeMode=z,e.TreeNgxModule=Q,e.ɵd=J,e.ɵc=G,e.ɵb=$,e.ɵa=K,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=tree-ngx.umd.min.js.map | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("tree-ngx",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t(e["tree-ngx"]={},e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,n,r,i){"use strict";var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function h(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}var a={checked:0,unChecked:1,indeterminate:2};a[a.checked]="checked",a[a.unChecked]="unChecked",a[a.indeterminate]="indeterminate";var l={NoSelect:0,SingleSelect:1,MultiSelect:2};l[l.NoSelect]="NoSelect",l[l.SingleSelect]="SingleSelect",l[l.MultiSelect]="MultiSelect";var s=function(){function e(){var t=this;this.callbacks={},this.treeState=[],this.selectedItems=[],this.selectedStates=[],this.filterValue="",this.selectedItemsSubject=new n.BehaviorSubject(this.selectedItems),this.filterChangeSubject=new n.BehaviorSubject(this.filterValue),this.filterChangeSubject.pipe(r.debounceTime(300),r.distinctUntilChanged()).subscribe(function(e){t.filterTraverse(t.treeState,t.filterValue)})}return e.prototype.toggleSelected=function(e){this.toggleSelectedState(e),this.callbacks.toggle&&this.callbacks.toggle(e.nodeItem)},e.prototype.toggleSelectedState=function(e){this.options.mode!==l.NoSelect&&(e.selectedState===a.unChecked?(this.options.mode===l.SingleSelect&&this.clear(),this.setChecked(e,!0)):e.selectedState!==a.checked&&e.selectedState!==a.indeterminate||this.setUnchecked(e,!0),e.parent&&this.childStateChanged(e.parent))},e.prototype.setInitialState=function(){this.setInitialSelectedState(this.treeState)},e.prototype.childStateChanged=function(e){this.anyChildSelected(e)?this.allChildrenSelected(e)?this.setChecked(e,!1):this.setIndeterminate(e):this.setUnchecked(e,!1),e.parent&&this.childStateChanged(e.parent)},e.prototype.nameClick=function(e){this.callbacks.nameClick&&this.callbacks.nameClick(e.nodeItem),this.canToggleChildrenOnName(e)&&this.toggleSelected(e)},e.prototype.toggleExpanded=function(e){this.toggleExpandedTraverse(this.treeState,e)},e.prototype.clear=function(){var e,t;try{for(var n=h(this.selectedStates),r=n.next();!r.done;r=n.next()){var i=r.value;i.selected=!1,i.selectedState=a.unChecked}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n["return"])&&t.call(n)}finally{if(e)throw e.error}}this.selectedItems.length=0,this.selectedStates.length=0},e.prototype.addNodeById=function(e,t){var n=this.getNodeItem(this.treeState,t,this.findById);n&&n.children&&((e.parent=n).children.push(e),n.nodeItem.children.push(e.nodeItem),this.childStateChanged(n),this.filterTraverse(this.treeState,this.filterValue))},e.prototype.deleteById=function(e){var t=this.getNodeItem(this.treeState,e,this.findById);t&&this.deleteByState(t)},e.prototype.deleteByState=function(e){this["delete"](e),this.childStateChanged(e),this.filterTraverse(this.treeState,this.filterValue)},e.prototype.filterChanged=function(e){this.filterValue=e,this.filterChangeSubject.next(e)},e.prototype.canToggleChildrenOnName=function(e){if(!1===this.options.checkboxes){if(this.options.mode===l.SingleSelect&&!e.nodeItem.children)return!0;if(this.options.mode===l.MultiSelect)return!0}return!1},e.prototype.setInitialSelectedState=function(e){var t,n;try{for(var r=h(e),i=r.next();!i.done;i=r.next()){var o=i.value;!o.nodeItem.children&&o.nodeItem.selected&&this.toggleSelectedState(o),this.setInitialSelectedState(o.children)}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(t)throw t.error}}},e.prototype["delete"]=function(e){for(;0<e.children.length;)this["delete"](e.children.pop());this.removeSelected(e.nodeItem.item),this.remove(e),e.parent||this.deleteRoot(e,this.treeState,this.nodeItems)},e.prototype.toggleExpandedTraverse=function(e,t){var n,r;try{for(var i=h(e),o=i.next();!o.done;o=i.next()){var l=o.value;l.expanded=t,this.toggleExpandedTraverse(l.children,t)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.deleteRoot=function(e,t,n){var r=n.indexOf(e.nodeItem);-1!==r&&n.splice(r,1);var i=t.indexOf(e);-1!==i&&t.splice(i,1)},e.prototype.remove=function(e){if(e.parent){e.parent.hasFilteredChildren=!1;var t=e.parent.nodeItem.children.indexOf(e.nodeItem);-1!==t&&e.parent.nodeItem.children.splice(t,1);var n=e.parent.children.indexOf(e);-1!==n&&e.parent.children.splice(n,1);var r=e.parent.filteredChildren.indexOf(e);-1!==r&&e.parent.filteredChildren.splice(r,1)}},e.prototype.anyChildSelected=function(e){return null!=e.children.find(function(e){return e.selectedState===a.checked||e.selectedState===a.indeterminate})},e.prototype.allChildrenSelected=function(e){return e.children.every(function(e){return e.selectedState===a.checked})&&e.children.length===e.nodeItem.children.length},e.prototype.setUnchecked=function(e,t){var n,r;if(e.selectedState=a.unChecked,e.selected=!1,e.nodeItem.children){if(!0===t)try{for(var i=h(e.children),o=i.next();!o.done;o=i.next()){var l=o.value;this.setUnchecked(l,t)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}}else this.removeSelected(e.nodeItem.item),!0===this.options.alwaysEmitSelected&&this.selectedItemsSubject.next(this.selectedItems),this.callbacks.unSelect&&this.callbacks.unSelect(e.nodeItem)},e.prototype.setIndeterminate=function(e){e.selectedState=a.indeterminate,e.selected=!0},e.prototype.setChecked=function(e,t){var n,r;if(e.selectedState=a.checked,e.selected=!0,e.nodeItem.children){if(!0===t)try{for(var i=h(e.children),o=i.next();!o.done;o=i.next()){var l=o.value;this.setChecked(l,t)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}}else this.addSelected(e)},e.prototype.addSelected=function(e){this.selectedItems.push(e.nodeItem.item),this.selectedStates.push(e),!0===this.options.alwaysEmitSelected&&this.selectedItemsSubject.next(this.selectedItems),this.callbacks.select&&this.callbacks.select(e.nodeItem)},e.prototype.removeSelected=function(e){var t=this.selectedItems.indexOf(e);-1!==t&&this.selectedItems.splice(t,1)},e.prototype.findById=function(e,t){return e.nodeItem.id===t},e.prototype.removeItem=function(e){var t=this.selectedItems.indexOf(e);-1!==t&&this.selectedItems.splice(t,1)},e.prototype.getNodeItem=function(e,t,n){var r,i,o=e.find(function(e){return n(e,t)});if(o)return o;try{for(var l=h(e),s=l.next();!s.done;s=l.next()){var a=s.value;if(o=this.getNodeItem(a.children,t,n))return o}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=l["return"])&&i.call(l)}finally{if(r)throw r.error}}return o},e.prototype.connect=function(){return this.selectedItemsSubject.asObservable()},e.prototype.applyFilter=function(e,t){return e.filteredChildren=this.filter(e.children,t),0<e.filteredChildren.length},e.prototype.filter=function(e,t){return e.filter(function(e){return e.hasFilteredChildren||""===t||-1!==e.nodeItem.name.toLowerCase().indexOf(t)})},e.prototype.filterTraverse=function(e,t){var n,r,i=[];try{for(var o=h(e),l=o.next();!l.done;l=o.next()){var s=l.value;if(0<s.children.length)s.hasFilteredChildren=!1,s.hasFilteredChildren=this.filterTraverse(s.children,t),this.applyFilter(s,t)&&(s.hasFilteredChildren=!0),i.push(s.hasFilteredChildren)}}catch(a){n={error:a}}finally{try{l&&!l.done&&(r=o["return"])&&r.call(o)}finally{if(n)throw n.error}}return i.some(function(e){return!0===e})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),c=function(){function e(e){this.treeService=e,this.defaultOptions={mode:l.SingleSelect,checkboxes:!1,alwaysEmitSelected:!1},this.options=this.defaultOptions,this.callbacks=this.treeService.callbacks,this.filter="",this.selectedItems=new t.EventEmitter}return e.prototype.ngOnInit=function(){var t=this;this.subscription=this.treeService.connect().subscribe(function(e){t.selectedItems.emit(e)})},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.ngOnChanges=function(e){e.filter&&this.treeService.filterChanged(this.filter.toLowerCase()),e.options&&this.setOptions(),e.callbacks&&(this.treeService.callbacks=this.callbacks),e.nodeItems&&this.initialize()},e.prototype.addNodeById=function(e,t){var n=this.initState(null,e,this.options);this.treeService.addNodeById(n,t)},e.prototype.deleteById=function(e){this.treeService.deleteById(e)},e.prototype.expandAll=function(){this.treeService.toggleExpanded(!0)},e.prototype.collapseAll=function(){this.treeService.toggleExpanded(!1)},e.prototype.initialize=function(){this.setOptions(),this.treeService.callbacks=this.callbacks,this.treeService.nodeItems=this.nodeItems,this.treeService.treeState=this.initTreeStructure(null,this.treeService.nodeItems,this.treeService.options),this.treeService.clear(),this.treeService.setInitialState()},e.prototype.initTreeStructure=function(e,t,n){var r,i,o=[];try{for(var l=h(t),s=l.next();!s.done;s=l.next()){var a=s.value,c=this.initState(e,a,n);a.children&&(c.children=this.initTreeStructure(c,a.children,n),c.filteredChildren=c.children),o.push(c)}}catch(d){r={error:d}}finally{try{s&&!s.done&&(i=l["return"])&&i.call(l)}finally{if(r)throw r.error}}return o},e.prototype.setOptions=function(){this.options.mode===l.NoSelect?this.treeService.options=o({},this.options,{checkboxes:!1}):this.treeService.options=o({},this.options)},e.prototype.initState=function(e,t,n){return{parent:e,children:[],filteredChildren:[],hasFilteredChildren:!1,nodeItem:t,expanded:!1!==t.expanded,markSelected:this.getMarkSelected(t,n),collapseVisible:this.getCollapseVisible(t),selectedState:a.unChecked,selected:!1,showCheckBox:this.getCheckBoxVisible(t,n)}},e.prototype.getMarkSelected=function(e,t){return!e.children&&!t.checkboxes},e.prototype.getCheckBoxVisible=function(e,t){return!(e.children&&this.treeService.options.mode===l.SingleSelect||!this.treeService.options.checkboxes)},e.prototype.getCollapseVisible=function(e){return!!e.children},e.decorators=[{type:t.Component,args:[{selector:"tree-ngx",template:'<div class="tree-ngx">\r\n <node class="node-root" [state]="state" [selectedState]="state.selectedState" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"\r\n [nodeNameTemplate]="nodeNameTemplate" *ngFor="let state of treeService.treeState"></node>\r\n</div>\r\n',providers:[s]}]}],e.ctorParameters=function(){return[{type:s}]},e.propDecorators={nodeNameTemplate:[{type:t.ContentChild,args:["nodeNameTemplate"]}],nodeCollapsibleTemplate:[{type:t.ContentChild,args:["nodeCollapsibleTemplate"]}],options:[{type:t.Input}],callbacks:[{type:t.Input}],nodeItems:[{type:t.Input}],filter:[{type:t.Input}],selectedItems:[{type:t.Output}]},e}(),d=function(){function e(e){this.treeService=e,this._this=this}return e.prototype.ngOnChanges=function(e){e.selectedState&&this.selectedStateChanged()},e.prototype.selectedStateChanged=function(){this.nodeCheckbox&&(this.selectedState===a.indeterminate?this.nodeCheckbox.nativeElement.indeterminate=!0:this.nodeCheckbox.nativeElement.indeterminate=!1)},e.prototype.toggleSelected=function(){this.treeService.toggleSelected(this.state)},e.decorators=[{type:t.Component,args:[{selector:"node",template:'<div class="node">\r\n <div class="node-container">\r\n <node-icon-wrapper [state]="state" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"></node-icon-wrapper>\r\n <input #nodeCheckbox class="node-checkbox" *ngIf="state.showCheckBox" (click)="toggleSelected()" [disabled]="state.nodeItem?.children?.length == 0"\r\n [checked]="state.selected" type="checkbox" />\r\n <node-name [state]="state" [nodeNameTemplate]="nodeNameTemplate"></node-name>\r\n </div>\r\n <div *ngIf="state.nodeItem.children" class="collapsible-wrapper" [class.collapsed]="!state.expanded && state.nodeItem.children.length > 0 && state.filteredChildren.length > 0">\r\n <div class="collapsible">\r\n <node class="node-offset" [state]="child" [selectedState]="child.selectedState" [nodeCollapsibleTemplate]="nodeCollapsibleTemplate"\r\n [nodeNameTemplate]="nodeNameTemplate" *ngFor="let child of state.filteredChildren"></node>\r\n </div>\r\n </div>\r\n</div>\r\n'}]}],e.ctorParameters=function(){return[{type:s}]},e.propDecorators={nodeCheckbox:[{type:t.ViewChild,args:["nodeCheckbox"]}],state:[{type:t.Input}],selectedState:[{type:t.Input}],nodeNameTemplate:[{type:t.Input}],nodeCollapsibleTemplate:[{type:t.Input}]},e}(),p=function(){function e(e){this.treeService=e,(this._this=this).active=!1}return e.prototype.ngOnChanges=function(e){e.state&&(this.active=this.treeService.canToggleChildrenOnName(this.state))},e.prototype.nameClick=function(){this.treeService.nameClick(this.state)},e.prototype["delete"]=function(){this.treeService.deleteByState(this.state)},e.prototype.toggleExpand=function(){this.state.expanded=!this.state.expanded},e.decorators=[{type:t.Component,args:[{selector:"node-name",template:'<div (click)="nameClick()" [class.markSelected]="state.markSelected && state.selected" class="node-name">\r\n <ng-container *ngIf="!nodeNameTemplate">\r\n <span [class.active]="active">{{state.nodeItem.name}}</span>\r\n </ng-container>\r\n\r\n <ng-container *ngTemplateOutlet="nodeNameTemplate; context: { $implicit: state.nodeItem, node: state.nodeItem, context: _this }">\r\n </ng-container>\r\n</div>\r\n'}]}],e.ctorParameters=function(){return[{type:s}]},e.propDecorators={state:[{type:t.Input}],nodeNameTemplate:[{type:t.Input}]},e}(),u=function(){function e(){this._this=this}return e.prototype.toggleExpand=function(){this.state.expanded=!this.state.expanded},e.decorators=[{type:t.Component,args:[{selector:"node-icon-wrapper",template:'<div class="node-icon-wrapper" [class.disabled]="state.nodeItem?.children?.length == 0" [class.collapsable]="state.collapseVisible"\r\n [class.iconCheckbox]="state.showCheckBox" (click)="state.expanded = !state.expanded;">\r\n <ng-container *ngIf="!nodeCollapsibleTemplate">\r\n <ng-container *ngIf="state.collapseVisible && state.nodeItem?.children?.length > 0">\r\n <i *ngIf="!state.expanded" class="arrow-right"></i>\r\n <i *ngIf="state.expanded" class="arrow-down"></i>\r\n </ng-container>\r\n <ng-container *ngIf="state.nodeItem?.children?.length == 0">\r\n <i class="arrow-down collapse-empty"></i>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="state.collapseVisible && state.nodeItem?.children?.length > 0">\r\n <ng-container *ngTemplateOutlet="nodeCollapsibleTemplate; context: { expanded: state.expanded, context: _this }">\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n'}]}],e.ctorParameters=function(){return[]},e.propDecorators={state:[{type:t.Input}],nodeCollapsibleTemplate:[{type:t.Input}]},e}(),f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.CommonModule],declarations:[c,d,p,u],providers:[s],exports:[c]}]}],e}();e.TreeNgxComponent=c,e.TreeMode=l,e.TreeNgxModule=f,e.ɵd=u,e.ɵc=p,e.ɵb=d,e.ɵa=s,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=tree-ngx.umd.min.js.map |
@@ -1,1 +0,87 @@ | ||
{"name":"tree-ngx","description":"A highly customizable Angular Tree Component, usable with minimal implementation.","version":"2.0.0","repository":{"type":"git","url":"https://github.com/inspirsea/tree-ngx.git"},"license":"MIT","keywords":["ngx","tree component","ngx tree","tree-ngx","tree ngx","ng tree component","ng","angular","ng2","angular2","tree","treeview","angular2-tree","angular-tree","angular tree","angular2 tree","ng2-tree","ng2tree","ng2 tree","ngtree","ng-tree"],"scripts":{"ng":"ng","start":"ng serve","build":"ng build","test":"ng test","lint":"ng lint","e2e":"ng e2e","bundle":"ng-packagr -p ng-package.json && npm run bundle-styles && npm run bundle-assets","bundle-styles":"scss-bundle -c style.config.json","bundle-assets":"cp -r assets dist"},"private":false,"peerDependencies":{},"devDependencies":{"@angular-devkit/build-angular":"~0.7.0","@angular/common":"^6.1.6","@angular/compiler":"^6.1.6","@angular/core":"^6.1.6","@angular/forms":"^6.1.6","@angular/http":"^6.1.6","@angular/platform-browser":"^6.1.6","@angular/platform-browser-dynamic":"^6.1.6","@angular/router":"^6.1.6","@angular-devkit/schematics":"0.0.34","@angular/cli":"6.1.5","@angular/compiler-cli":"^6.1.6","@angular/language-service":"^6.1.6","core-js":"^2.4.1","rxjs":"^6.3.2","zone.js":"^0.8.14","@types/jasmine":"~2.5.53","@types/jasminewd2":"~2.0.2","@types/node":"~6.0.60","codelyzer":"~4.4.4","jasmine-core":"~2.6.2","jasmine-spec-reporter":"~4.1.0","karma":"~1.7.0","karma-chrome-launcher":"~2.1.1","karma-cli":"~1.0.1","karma-coverage-istanbul-reporter":"^1.2.1","karma-jasmine":"~1.1.0","karma-jasmine-html-reporter":"^0.2.2","ng-packagr":"^1.6.0","protractor":"~5.1.2","scss-bundle":"^2.1.2","ts-node":"~3.2.0","tslint":"~5.7.0","typescript":"~2.9.2"},"main":"bundles/tree-ngx.umd.js","module":"tree-ngx.es5.js","es2015":"tree-ngx.js","typings":"tree-ngx.d.ts","metadata":"tree-ngx.metadata.json"} | ||
{ | ||
"name": "tree-ngx", | ||
"description": "A highly customizable Angular Tree Component, usable with minimal implementation.", | ||
"version": "2.0.1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/inspirsea/tree-ngx.git" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"ngx", | ||
"tree component", | ||
"ngx tree", | ||
"tree-ngx", | ||
"tree ngx", | ||
"ng tree component", | ||
"ng", | ||
"angular", | ||
"ng2", | ||
"angular2", | ||
"tree", | ||
"treeview", | ||
"angular2-tree", | ||
"angular-tree", | ||
"angular tree", | ||
"angular2 tree", | ||
"ng2-tree", | ||
"ng2tree", | ||
"ng2 tree", | ||
"ngtree", | ||
"ng-tree" | ||
], | ||
"private": false, | ||
"peerDependencies": { | ||
"@angular/common": ">=6.0.0", | ||
"@angular/core": ">=6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "~0.7.0", | ||
"@angular/common": "^6.1.6", | ||
"@angular/compiler": "^6.1.6", | ||
"@angular/core": "^6.1.6", | ||
"@angular/forms": "^6.1.6", | ||
"@angular/http": "^6.1.6", | ||
"@angular/platform-browser": "^6.1.6", | ||
"@angular/platform-browser-dynamic": "^6.1.6", | ||
"@angular/router": "^6.1.6", | ||
"@angular-devkit/schematics": "0.0.34", | ||
"@angular/cli": "6.1.5", | ||
"@angular/compiler-cli": "^6.1.6", | ||
"@angular/language-service": "^6.1.6", | ||
"core-js": "^2.4.1", | ||
"rxjs": "^6.3.2", | ||
"zone.js": "^0.8.14", | ||
"@types/jasmine": "~2.5.53", | ||
"@types/jasminewd2": "~2.0.2", | ||
"@types/node": "~6.0.60", | ||
"codelyzer": "~4.4.4", | ||
"jasmine-core": "~2.6.2", | ||
"jasmine-spec-reporter": "~4.1.0", | ||
"karma": "~1.7.0", | ||
"karma-chrome-launcher": "~2.1.1", | ||
"karma-cli": "~1.0.1", | ||
"karma-coverage-istanbul-reporter": "^1.2.1", | ||
"karma-jasmine": "~1.1.0", | ||
"karma-jasmine-html-reporter": "^0.2.2", | ||
"ng-packagr": "^4.1.1", | ||
"protractor": "~5.1.2", | ||
"scss-bundle": "^2.1.2", | ||
"ts-node": "~3.2.0", | ||
"tslint": "~5.7.0", | ||
"typescript": "~2.9.2" | ||
}, | ||
"main": "bundles/tree-ngx.umd.js", | ||
"module": "fesm5/tree-ngx.js", | ||
"es2015": "fesm2015/tree-ngx.js", | ||
"esm5": "esm5/tree-ngx.js", | ||
"esm2015": "esm2015/tree-ngx.js", | ||
"fesm5": "fesm5/tree-ngx.js", | ||
"fesm2015": "fesm2015/tree-ngx.js", | ||
"typings": "tree-ngx.d.ts", | ||
"metadata": "tree-ngx.metadata.json", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"tslib": "^1.9.0" | ||
} | ||
} |
@@ -43,3 +43,3 @@ import { NodeItem } from '../model/node-item'; | ||
private getNodeItem; | ||
connect(): import("../../../../../../../../../node_modules/rxjs/internal/Observable").Observable<any[]>; | ||
connect(): import("../../../../../../node_modules/rxjs/internal/Observable").Observable<any[]>; | ||
applyFilter(state: NodeState, filter: string): boolean; | ||
@@ -46,0 +46,0 @@ private filter; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"TreeNgxModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"TreeNgxComponent"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","name":"ɵd"}],"providers":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"TreeNgxComponent"}]}]}],"members":{}},"TreeNgxComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"tree-ngx","template":"\n <div class=\"tree-ngx\">\n <node class=\"node-root\" [state]=\"state\" [selectedState]=\"state.selectedState\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"\n [nodeNameTemplate]=\"nodeNameTemplate\" *ngFor=\"let state of treeService.treeState\"></node>\n </div>\n ","providers":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":["nodeNameTemplate"]}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":["nodeCollapsibleTemplate"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"addNodeById":[{"__symbolic":"method"}],"deleteById":[{"__symbolic":"method"}],"expandAll":[{"__symbolic":"method"}],"collapseAll":[{"__symbolic":"method"}],"initialize":[{"__symbolic":"method"}],"initTreeStructure":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"getMarkSelected":[{"__symbolic":"method"}],"getCheckBoxVisible":[{"__symbolic":"method"}],"getCollapseVisible":[{"__symbolic":"method"}]}},"NodeItem":{"__symbolic":"interface"},"NodeState":{"__symbolic":"interface"},"TreeOptions":{"__symbolic":"interface"},"TreeCallbacks":{"__symbolic":"interface"},"TreeMode":{"NoSelect":0,"SingleSelect":1,"MultiSelect":2},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"toggleSelected":[{"__symbolic":"method"}],"toggleSelectedState":[{"__symbolic":"method"}],"setInitialState":[{"__symbolic":"method"}],"childStateChanged":[{"__symbolic":"method"}],"nameClick":[{"__symbolic":"method"}],"toggleExpanded":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"addNodeById":[{"__symbolic":"method"}],"deleteById":[{"__symbolic":"method"}],"deleteByState":[{"__symbolic":"method"}],"filterChanged":[{"__symbolic":"method"}],"canToggleChildrenOnName":[{"__symbolic":"method"}],"setInitialSelectedState":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"toggleExpandedTraverse":[{"__symbolic":"method"}],"deleteRoot":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}],"anyChildSelected":[{"__symbolic":"method"}],"allChildrenSelected":[{"__symbolic":"method"}],"setUnchecked":[{"__symbolic":"method"}],"setIndeterminate":[{"__symbolic":"method"}],"setChecked":[{"__symbolic":"method"}],"addSelected":[{"__symbolic":"method"}],"removeSelected":[{"__symbolic":"method"}],"findById":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"getNodeItem":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"applyFilter":[{"__symbolic":"method"}],"filter":[{"__symbolic":"method"}],"filterTraverse":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"node","template":"\n <div class=\"node\">\n <div class=\"node-container\">\n <node-icon-wrapper [state]=\"state\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"></node-icon-wrapper>\n <input #nodeCheckbox class=\"node-checkbox\" *ngIf=\"state.showCheckBox\" (click)=\"toggleSelected()\" [disabled]=\"state.nodeItem?.children?.length == 0\"\n [checked]=\"state.selected\" type=\"checkbox\" />\n <node-name [state]=\"state\" [nodeNameTemplate]=\"nodeNameTemplate\"></node-name>\n </div>\n <div *ngIf=\"state.nodeItem.children\" class=\"collapsible-wrapper\" [class.collapsed]=\"!state.expanded && state.nodeItem.children.length > 0 && state.filteredChildren.length > 0\">\n <div class=\"collapsible\">\n <node class=\"node-offset\" [state]=\"child\" [selectedState]=\"child.selectedState\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"\n [nodeNameTemplate]=\"nodeNameTemplate\" *ngFor=\"let child of state.filteredChildren\"></node>\n </div>\n </div>\n </div>\n "}]}],"members":{"nodeCheckbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["nodeCheckbox"]}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"selectedState":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnChanges":[{"__symbolic":"method"}],"selectedStateChanged":[{"__symbolic":"method"}],"toggleSelected":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"node-name","template":"\n <div (click)=\"nameClick()\" [class.markSelected]=\"state.markSelected && state.selected\" class=\"node-name\">\n <ng-container *ngIf=\"!nodeNameTemplate\">\n <span [class.active]=\"active\">{{state.nodeItem.name}}</span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"nodeNameTemplate; context: { $implicit: state.nodeItem, node: state.nodeItem, context: _this }\">\n </ng-container>\n </div>\n "}]}],"members":{"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnChanges":[{"__symbolic":"method"}],"nameClick":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"node-icon-wrapper","template":"\n <div class=\"node-icon-wrapper\" [class.disabled]=\"state.nodeItem?.children?.length == 0\" [class.collapsable]=\"state.collapseVisible\"\n [class.iconCheckbox]=\"state.showCheckBox\" (click)=\"state.expanded = !state.expanded;\">\n <ng-container *ngIf=\"!nodeCollapsibleTemplate\">\n <ng-container *ngIf=\"state.collapseVisible && state.nodeItem?.children?.length > 0\">\n <i *ngIf=\"!state.expanded\" class=\"arrow-right\"></i>\n <i *ngIf=\"state.expanded\" class=\"arrow-down\"></i>\n </ng-container>\n <ng-container *ngIf=\"state.nodeItem?.children?.length == 0\">\n <i class=\"arrow-down collapse-empty\"></i>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"state.collapseVisible && state.nodeItem?.children?.length > 0\">\n <ng-container *ngTemplateOutlet=\"nodeCollapsibleTemplate; context: { expanded: state.expanded, context: _this }\">\n </ng-container>\n </ng-container>\n </div>\n "}]}],"members":{"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor"}],"toggleExpand":[{"__symbolic":"method"}]}}},"origins":{"TreeNgxModule":"./tree-ngx.module","TreeNgxComponent":"./src/tree-ngx/tree-ngx.component","NodeItem":"./src/model/node-item","NodeState":"./src/model/node-state","TreeOptions":"./src/model/tree-options","TreeCallbacks":"./src/model/tree-callbacks","TreeMode":"./src/model/tree-mode","ɵa":"./src/service/tree-service","ɵb":"./src/node/node.component","ɵc":"./src/node-name/node-name.component","ɵd":"./src/node-icon-wrapper/node-icon-wrapper.component"},"importAs":"tree-ngx"} | ||
{"__symbolic":"module","version":4,"metadata":{"TreeNgxModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":10,"character":4}],"declarations":[{"__symbolic":"reference","name":"TreeNgxComponent"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","name":"ɵd"}],"providers":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"TreeNgxComponent"}]}]}],"members":{}},"TreeNgxComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"tree-ngx","providers":[{"__symbolic":"reference","name":"ɵa"}],"template":"<div class=\"tree-ngx\">\r\n <node class=\"node-root\" [state]=\"state\" [selectedState]=\"state.selectedState\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"\r\n [nodeNameTemplate]=\"nodeNameTemplate\" *ngFor=\"let state of treeService.treeState\"></node>\r\n</div>\r\n"}]}],"members":{"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":28,"character":3},"arguments":["nodeNameTemplate"]}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":29,"character":3},"arguments":["nodeCollapsibleTemplate"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"nodeItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"selectedItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":43,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"addNodeById":[{"__symbolic":"method"}],"deleteById":[{"__symbolic":"method"}],"expandAll":[{"__symbolic":"method"}],"collapseAll":[{"__symbolic":"method"}],"initialize":[{"__symbolic":"method"}],"initTreeStructure":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"getMarkSelected":[{"__symbolic":"method"}],"getCheckBoxVisible":[{"__symbolic":"method"}],"getCollapseVisible":[{"__symbolic":"method"}]}},"NodeItem":{"__symbolic":"interface"},"NodeState":{"__symbolic":"interface"},"TreeOptions":{"__symbolic":"interface"},"TreeCallbacks":{"__symbolic":"interface"},"TreeMode":{"NoSelect":0,"SingleSelect":1,"MultiSelect":2},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"toggleSelected":[{"__symbolic":"method"}],"toggleSelectedState":[{"__symbolic":"method"}],"setInitialState":[{"__symbolic":"method"}],"childStateChanged":[{"__symbolic":"method"}],"nameClick":[{"__symbolic":"method"}],"toggleExpanded":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"addNodeById":[{"__symbolic":"method"}],"deleteById":[{"__symbolic":"method"}],"deleteByState":[{"__symbolic":"method"}],"filterChanged":[{"__symbolic":"method"}],"canToggleChildrenOnName":[{"__symbolic":"method"}],"setInitialSelectedState":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"toggleExpandedTraverse":[{"__symbolic":"method"}],"deleteRoot":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}],"anyChildSelected":[{"__symbolic":"method"}],"allChildrenSelected":[{"__symbolic":"method"}],"setUnchecked":[{"__symbolic":"method"}],"setIndeterminate":[{"__symbolic":"method"}],"setChecked":[{"__symbolic":"method"}],"addSelected":[{"__symbolic":"method"}],"removeSelected":[{"__symbolic":"method"}],"findById":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"getNodeItem":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"applyFilter":[{"__symbolic":"method"}],"filter":[{"__symbolic":"method"}],"filterTraverse":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"node","template":"<div class=\"node\">\r\n <div class=\"node-container\">\r\n <node-icon-wrapper [state]=\"state\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"></node-icon-wrapper>\r\n <input #nodeCheckbox class=\"node-checkbox\" *ngIf=\"state.showCheckBox\" (click)=\"toggleSelected()\" [disabled]=\"state.nodeItem?.children?.length == 0\"\r\n [checked]=\"state.selected\" type=\"checkbox\" />\r\n <node-name [state]=\"state\" [nodeNameTemplate]=\"nodeNameTemplate\"></node-name>\r\n </div>\r\n <div *ngIf=\"state.nodeItem.children\" class=\"collapsible-wrapper\" [class.collapsed]=\"!state.expanded && state.nodeItem.children.length > 0 && state.filteredChildren.length > 0\">\r\n <div class=\"collapsible\">\r\n <node class=\"node-offset\" [state]=\"child\" [selectedState]=\"child.selectedState\" [nodeCollapsibleTemplate]=\"nodeCollapsibleTemplate\"\r\n [nodeNameTemplate]=\"nodeNameTemplate\" *ngFor=\"let child of state.filteredChildren\"></node>\r\n </div>\r\n </div>\r\n</div>\r\n"}]}],"members":{"nodeCheckbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":12,"character":3},"arguments":["nodeCheckbox"]}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"selectedState":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnChanges":[{"__symbolic":"method"}],"selectedStateChanged":[{"__symbolic":"method"}],"toggleSelected":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"node-name","template":"<div (click)=\"nameClick()\" [class.markSelected]=\"state.markSelected && state.selected\" class=\"node-name\">\r\n <ng-container *ngIf=\"!nodeNameTemplate\">\r\n <span [class.active]=\"active\">{{state.nodeItem.name}}</span>\r\n </ng-container>\r\n\r\n <ng-container *ngTemplateOutlet=\"nodeNameTemplate; context: { $implicit: state.nodeItem, node: state.nodeItem, context: _this }\">\r\n </ng-container>\r\n</div>\r\n"}]}],"members":{"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"nodeNameTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"ngOnChanges":[{"__symbolic":"method"}],"nameClick":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"toggleExpand":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"node-icon-wrapper","template":"<div class=\"node-icon-wrapper\" [class.disabled]=\"state.nodeItem?.children?.length == 0\" [class.collapsable]=\"state.collapseVisible\"\r\n [class.iconCheckbox]=\"state.showCheckBox\" (click)=\"state.expanded = !state.expanded;\">\r\n <ng-container *ngIf=\"!nodeCollapsibleTemplate\">\r\n <ng-container *ngIf=\"state.collapseVisible && state.nodeItem?.children?.length > 0\">\r\n <i *ngIf=\"!state.expanded\" class=\"arrow-right\"></i>\r\n <i *ngIf=\"state.expanded\" class=\"arrow-down\"></i>\r\n </ng-container>\r\n <ng-container *ngIf=\"state.nodeItem?.children?.length == 0\">\r\n <i class=\"arrow-down collapse-empty\"></i>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"state.collapseVisible && state.nodeItem?.children?.length > 0\">\r\n <ng-container *ngTemplateOutlet=\"nodeCollapsibleTemplate; context: { expanded: state.expanded, context: _this }\">\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n"}]}],"members":{"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"nodeCollapsibleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"toggleExpand":[{"__symbolic":"method"}]}}},"origins":{"TreeNgxModule":"./tree-ngx.module","TreeNgxComponent":"./src/tree-ngx/tree-ngx.component","NodeItem":"./src/model/node-item","NodeState":"./src/model/node-state","TreeOptions":"./src/model/tree-options","TreeCallbacks":"./src/model/tree-callbacks","TreeMode":"./src/model/tree-mode","ɵa":"./src/service/tree-service","ɵb":"./src/node/node.component","ɵc":"./src/node-name/node-name.component","ɵd":"./src/node-icon-wrapper/node-icon-wrapper.component"},"importAs":"tree-ngx"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
57
662744
3
5883
+ Addedtslib@^1.9.0
+ Added@angular/common@19.1.7(transitive)
+ Added@angular/core@19.1.7(transitive)
+ Addedrxjs@7.8.2(transitive)
+ Addedtslib@1.14.12.8.1(transitive)
+ Addedzone.js@0.15.0(transitive)