This repository has been archived by the owner on Aug 19, 2019. It is now read-only.
/
3.203c1958b0638c1d8a79.js
1 lines (1 loc) · 15.3 KB
/
3.203c1958b0638c1d8a79.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"8/fg":function(e,t,n){"use strict";t.styles=[".neg-table-column-resizer{position:absolute;right:0;height:100%;cursor:col-resize}"]},KbHv:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("CuRm").NegColumn.extendProperty("resize")},"QoD+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("LcNk"),r=n("YfSF"),o=(n("LoAr"),n("C7Lb"),n("IvSS"),n("WV+C")),l=(n("KKPh"),n("CuRm")),a=n("Xj2o");n("KbHv");var s=o.normalizePassiveListenerOptions({passive:!0}),u=o.normalizePassiveListenerOptions({passive:!1});t.NegTableDragResizeComponent=function(){function e(e,t,n,r,o,l){var a=this;this.element=e,this._ngZone=t,this._viewportRuler=n,this._dragDropRegistry=r,this._config=o,this._dir=l,this.grabAreaWidth=6,this._pointerMoveSubscription=i.Subscription.EMPTY,this._pointerUpSubscription=i.Subscription.EMPTY,this._rootElementInitSubscription=i.Subscription.EMPTY,this._pointerDown=function(e){a._initializeDragSequence(a._rootElement,e)},this._pointerMove=function(e){var t=a._getPointerPositionOnPage(e),n=t.x-a._pickupPositionOnPage.x,i=t.y-a._pickupPositionOnPage.y;if(a._hasStartedDragging){a._hasMoved=!0,e.preventDefault(),e.stopPropagation();var r=Math.max(0,a._initialWidth+n);if(r>a.column.maxWidth?r=a.column.maxWidth:n<0&&r<a.column.minWidth&&(r=a.column.minWidth),a._lastWidth!==r){a._lastWidth=r,a.column.width=r+"px",a.table.resetColumnsWidth();for(var o=0,l=a.cache;o<l.length;o++)a.column.columnDef.applyWidth(l[o])}}else Math.abs(n)+Math.abs(i)>=a._config.dragStartThreshold&&(a._hasStartedDragging=!0,a.column.sizeInfo.updateSize(),a._lastWidth=a._initialWidth=a.column.columnDef.netWidth,a.cache=a.column.columnDef.queryCellElements("table","header","footer"))},this._pointerUp=function(){a._isDragging()&&(a._removeSubscriptions(),a._dragDropRegistry.stopDragging(a),a._hasStartedDragging&&(a.table.columnApi.resizeColumn(a.column,a._lastWidth+"px"),a.cache=void 0))},r.registerDragItem(this)}return Object.defineProperty(e.prototype,"context",{set:function(e){if(e){var t=e.col,n=e.table;if(t&&t instanceof l.NegColumn)return this.column=t,void(this.table=n)}this.column=this.table=void 0},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;this._rootElementInitSubscription=this._ngZone.onStable.asObservable().pipe(r.take(1)).subscribe(function(){var t=e._rootElement=e._getRootElement();t.addEventListener("mousedown",e._pointerDown,u),t.addEventListener("touchstart",e._pointerDown,s),a.toggleNativeDragInteractions(t,!1)})},e.prototype.ngOnDestroy=function(){this._rootElement&&(this._rootElement.removeEventListener("mousedown",this._pointerDown,u),this._rootElement.removeEventListener("touchstart",this._pointerDown,s)),this._rootElementInitSubscription.unsubscribe(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions()},e.prototype.onDoubleClick=function(e){this.table.columnApi.autoSizeColumn(this.column)},e.prototype._initializeDragSequence=function(e,t){t.stopPropagation(),this._isDragging()||!this._isTouchEvent(t)&&0!==t.button||(this._hasStartedDragging=this._hasMoved=!1,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.pipe(r.auditTime(0,i.animationFrameScheduler)).subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._pickupPositionOnPage=this._getPointerPositionOnPage(t),this._dragDropRegistry.startDragging(this,t))},e.prototype._getPointerPositionOnPage=function(e){var t=this._isTouchEvent(e)?e.touches[0]:e;return{x:t.pageX-this._scrollPosition.left,y:t.pageY-this._scrollPosition.top}},e.prototype._isTouchEvent=function(e){return e.type.startsWith("touch")},e.prototype._isDragging=function(){return this._dragDropRegistry.isDragging(this)},e.prototype._getRootElement=function(){return this.element.nativeElement},e.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},e}()},WZJK:function(e,t,n){"use strict";var i=n("D57K").__extends;Object.defineProperty(t,"__esModule",{value:!0}),n("LoAr");var r=n("CuRm");t.NegTableCellResizerRefDirective=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.name="cellResizer",i.kind="dataHeaderExtensions",i}return i(t,e),t.prototype.shouldRender=function(e){return!!e.col.resize},t}(r.NegTableMultiTemplateRegistry)},Xj2o:function(e,t,n){"use strict";function i(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.extendStyles=i,t.toggleNativeDragInteractions=function(e,t){var n=t?"":"none";i(e.style,{touchAction:t?"":"none",webkitUserDrag:t?"":"none",webkitTapHighlightColor:t?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}},ayKP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DragPluginDefaultTemplatesComponent=function(){return function(){}}()},dpWu:function(e,t,n){"use strict";var i=n("D57K").__extends;Object.defineProperty(t,"__esModule",{value:!0});var r=n("YfSF"),o=(n("LoAr"),n("KKPh"));t.CdkLazyDropList=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._draggablesSet=new Set,t}return i(t,e),t.prototype.enter=function(t,n,i){if(e.prototype.enter.call(this,t,n,i),this.directContainerElement){var r=t.getPlaceholderElement();if(this.element.nativeElement.lastChild===r){var o=this.element.nativeElement.querySelector(this.directContainerElement);o&&o.appendChild(t.getPlaceholderElement())}}},t.prototype.addDrag=function(e){this._draggablesSet.add(e),this._draggables.reset(Array.from(this._draggablesSet.values()))},t.prototype.removeDrag=function(e){var t=this._draggablesSet.delete(e);return t&&this._draggables.reset(Array.from(this._draggablesSet.values())),t},t}(o.CdkDropList),t.CdkLazyDrag=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"cdkDropList",{get:function(){return this.dropContainer},set:function(e){this.cdkDropList&&this.cdkDropList.removeDrag(this),this.dropContainer=e,e&&e.addDrag(this)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this;this.started.subscribe(function(e){if(t.dropContainer){var n=t.getRootElement(),i=n.parentNode;n.nextSibling||i===t.dropContainer.element.nativeElement||t.ended.pipe(r.take(1)).subscribe(function(e){return i.appendChild(n)})}}),e.prototype.ngAfterViewInit.call(this)},t.prototype.ngOnDestroy=function(){this.cdkDropList&&this.cdkDropList.removeDrag(this),e.prototype.ngOnDestroy.call(this)},t}(o.CdkDrag),t.NegDragHandle=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.element=t,i}return i(t,e),t}(o.CdkDragHandle)},eXWz:function(e,t,n){"use strict";var i=n("D57K").__extends;Object.defineProperty(t,"__esModule",{value:!0}),n("LoAr");var r=n("CuRm");t.NegTableCellDraggerRefDirective=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.name="cellDragger",i.kind="dataHeaderExtensions",i}return i(t,e),t.prototype.shouldRender=function(e){return!!e.col.reorder},t}(r.NegTableMultiTemplateRegistry)},fRo7:function(e,t,n){"use strict";var i=n("8/fg"),r=n("LoAr"),o=n("QoD+"),l=n("IvSS"),a=n("KKPh"),s=n("C7Lb"),u=r.\u0275crt({encapsulation:2,styles:[i.styles],data:{}});function c(e){return r.\u0275vid(2,[r.\u0275ncd(null,0)],null,null)}function g(e){return r.\u0275vid(0,[(e()(),r.\u0275eld(0,0,null,null,1,"neg-table-drag-resize",[["class","neg-table-column-resizer"]],[[4,"width","px"]],[[null,"dblclick"]],function(e,t,n){var i=!0;return"dblclick"===t&&(i=!1!==r.\u0275nov(e,1).onDoubleClick(n)&&i),i},c,u)),r.\u0275did(1,4374528,null,0,o.NegTableDragResizeComponent,[r.ElementRef,r.NgZone,l.ViewportRuler,a.DragDropRegistry,a.CDK_DRAG_CONFIG,[2,s.Directionality]],null,null)],null,function(e,t){e(t,0,0,r.\u0275nov(t,1).grabAreaWidth)})}t.RenderType_NegTableDragResizeComponent=u,t.View_NegTableDragResizeComponent_0=c,t.View_NegTableDragResizeComponent_Host_0=g,t.NegTableDragResizeComponentNgFactory=r.\u0275ccf("neg-table-drag-resize",o.NegTableDragResizeComponent,g,{context:"context",grabAreaWidth:"grabAreaWidth"},{},["*"])},kGkv:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("CuRm");function r(e){for(var t=0,n=this.groups;t<n.length;t++){var i=this.groupStore.find(n[t]);if(i&&i.lockColumns&&!e.isInGroup(i))return!1}return!0}i.NegColumn.extendProperty("reorder"),i.NegColumn.extendProperty("wontBudge"),i.NegColumn.prototype.checkGroupLockConstraint=function(e){return r.call(this,e)&&r.call(e,this)},i.NegColumnGroup.extendProperty("lockColumns")},kMhk:function(e,t,n){"use strict";var i=n("LoAr"),r=n("fRo7"),o=n("QoD+"),l=n("IvSS"),a=n("KKPh"),s=n("C7Lb"),u=n("zxrL"),c=n("WT9V"),g=n("WZJK"),p=n("vyMr"),d=n("eXWz"),h=n("ayKP"),f=i.\u0275crt({encapsulation:2,styles:[],data:{}});function m(e){return i.\u0275vid(0,[(e()(),i.\u0275eld(0,0,null,null,1,"neg-table-drag-resize",[["class","neg-table-column-resizer"]],[[4,"width","px"]],[[null,"dblclick"]],function(e,t,n){var r=!0;return"dblclick"===t&&(r=!1!==i.\u0275nov(e,1).onDoubleClick(n)&&r),r},r.View_NegTableDragResizeComponent_0,r.RenderType_NegTableDragResizeComponent)),i.\u0275did(1,4374528,null,0,o.NegTableDragResizeComponent,[i.ElementRef,i.NgZone,l.ViewportRuler,a.DragDropRegistry,a.CDK_DRAG_CONFIG,[2,s.Directionality]],{context:[0,"context"]},null)],function(e,t){e(t,1,0,t.context.$implicit)},function(e,t){e(t,0,0,i.\u0275nov(t,1).grabAreaWidth)})}function _(e){return i.\u0275vid(0,[(e()(),i.\u0275eld(0,16777216,null,null,5,"span",[["class","cdk-drag"]],[[2,"cdk-drag-dragging",null]],null,null,null,null)),i.\u0275prd(6144,null,a.CdkDrag,null,[u.NegTableColumnDragDirective]),i.\u0275did(2,4341760,null,3,u.NegTableColumnDragDirective,[i.ElementRef,[3,a.CDK_DROP_LIST_CONTAINER],c.DOCUMENT,i.NgZone,i.ViewContainerRef,l.ViewportRuler,a.DragDropRegistry,a.CDK_DRAG_CONFIG,[2,s.Directionality]],{context:[0,"context"]},null),i.\u0275qud(603979776,1,{_handles:1}),i.\u0275qud(335544320,2,{_previewTemplate:0}),i.\u0275qud(335544320,3,{_placeholderTemplate:0}),(e()(),i.\u0275and(0,null,null,0))],function(e,t){e(t,2,0,t.context.$implicit)},function(e,t){e(t,0,0,i.\u0275nov(t,2)._hasStartedDragging&&i.\u0275nov(t,2)._isDragging())})}function b(e){return i.\u0275vid(2,[(e()(),i.\u0275and(0,null,null,1,null,m)),i.\u0275did(1,212992,null,0,g.NegTableCellResizerRefDirective,[i.TemplateRef,p.NegTableRegistryService],null,null),(e()(),i.\u0275and(0,null,null,1,null,_)),i.\u0275did(3,212992,null,0,d.NegTableCellDraggerRefDirective,[i.TemplateRef,p.NegTableRegistryService],null,null)],function(e,t){e(t,1,0),e(t,3,0)},null)}function v(e){return i.\u0275vid(0,[(e()(),i.\u0275eld(0,0,null,null,1,"neg-drag-plugin-default-templates",[],null,null,null,b,f)),i.\u0275did(1,49152,null,0,h.DragPluginDefaultTemplatesComponent,[],null,null)],null,null)}t.RenderType_DragPluginDefaultTemplatesComponent=f,t.View_DragPluginDefaultTemplatesComponent_0=b,t.View_DragPluginDefaultTemplatesComponent_Host_0=v,t.DragPluginDefaultTemplatesComponentNgFactory=i.\u0275ccf("neg-drag-plugin-default-templates",h.DragPluginDefaultTemplatesComponent,v,{},{},[])},p91i:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("LoAr");var i=n("CuRm"),r=n("ayKP");t.NegTableDragModule=function(){function e(){}return e.withDefaultTemplates=function(){return{ngModule:e,providers:i.provideCommon([{component:r.DragPluginDefaultTemplatesComponent}])}},e}()},twAi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NegTableTargetEventsModule=function(){return function(){}}()},zxrL:function(e,t,n){"use strict";var i=n("D57K").__extends,r=n("D57K").__decorate;Object.defineProperty(t,"__esModule",{value:!0});var o=n("LcNk"),l=(n("LoAr"),n("C7Lb"),n("HfXx")),a=(n("KKPh"),n("CuRm")),s=n("dpWu");n("kGkv");var u="columnReorder",c=0;t.NegTableColumnReorderPluginDirective=function(e){function t(t,n,i,r,l,a){var s=e.call(this,i,r,l,a)||this;return s.table=t,s.dir=a,s.id="neg-table-column-reorder-list-"+c++,s.orientation="horizontal",s.dragging=new o.BehaviorSubject(!1),s._columnReorder=!1,s._manualOverride=!1,s.negGetItemIndexFromPointerPosition=s._getItemIndexFromPointerPosition,s._removePlugin=n.setPlugin(u,s),s.dropped.subscribe(function(e){s.manualOverride||s.table.columnApi.moveColumn(e.item.column,e.currentIndex)}),s.dragging.subscribe(function(e){t._cdkTable&&(e?t._cdkTable.addClass("neg-table-column-list-dragging"):t._cdkTable.removeClass("neg-table-column-list-dragging"),s.lastSwap=void 0)}),s}return i(t,e),Object.defineProperty(t.prototype,"columnReorder",{get:function(){return this._columnReorder},set:function(e){e=l.coerceBooleanProperty(e),this._columnReorder=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"manualOverride",{get:function(){return this._manualOverride},set:function(e){this._manualOverride=l.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"negGetPositionCacheItems",{get:function(){return this._positionCache.items},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.dragging.next(!0),e.prototype.start.call(this)},t.prototype.drop=function(t,n,i){this._negReset(),e.prototype.drop.call(this,t,n,i)},t.prototype.exit=function(t){this._negReset(),e.prototype.exit.call(this,t)},t.prototype._sortItem=function(t,n,i,r){var o=this.negGetPositionCacheItems,l=o.slice(),a=this.negGetItemIndexFromPointerPosition(t,n,i,r);if(!(-1===a&&o.length>0)){var s="horizontal"===this.orientation,u=o[a];if(!u.drag.column.wontBudge){for(var c=this.lastSwap?this.lastSwap:t,g=o.findIndex(function(e){return e.drag===c}),p=Math.min(a,g),d=0,h=o.slice(p,Math.abs(a-g)+p);d<h.length;d++){var f=h[d];if(f.drag.column.wontBudge&&f.drag!==t)return}t.column.checkGroupLockConstraint(u.drag.column)&&(e.prototype._sortItem.call(this,t,n,i,r),this.lastSwap=u.drag,s&&o.forEach(function(e,t){if(l[t]!==e)for(var n=0,i=e.drag.getCells();n<i.length;n++)i[n].style.transform="translate3d("+e.offset+"px, 0, 0)"}))}}},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this._removePlugin(this.table)},t.prototype._negReset=function(){this.dragging.next(!1),this.negGetPositionCacheItems.forEach(function(e,t){for(var n=0,i=e.drag.getCells();n<i.length;n++)i[n].style.transform=""})},r([a.TablePlugin({id:u})],t)}(s.CdkLazyDropList),t.NegTableColumnDragDirective=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElementSelector="neg-table-header-cell",t}return i(t,e),Object.defineProperty(t.prototype,"context",{set:function(e){this._context=e,this.column=e&&e.col;var t=this.pluginCtrl=e&&a.NegTablePluginController.find(e.table),n=t&&t.getPlugin(u);this.cdkDropList=n||void 0},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this,n=this._pointerDown;this._pointerDown=function(e){t.cdkDropList&&t.cdkDropList.columnReorder&&t._context.col.reorder&&n(e)},e.prototype.ngAfterViewInit.call(this),this.started.subscribe(function(){return t._context.col.columnDef.isDragging=!0}),this.ended.subscribe(function(){return t._context.col.columnDef.isDragging=!1})},t.prototype.getCells=function(){return this.cache||(this.cache=this._context.col.columnDef.queryCellElements("table")),this.cache},t.prototype.reset=function(){if(e.prototype.reset.call(this),this.cache){for(var t=0,n=this.cache;t<n.length;t++)n[t].style.transform="";this.cache=void 0}},t}(s.CdkLazyDrag)}}]);