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

angular-resizable-element

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-resizable-element - npm Package Compare versions

Comparing version 3.3.5 to 3.4.0

2

angular-resizable-element.metadata.json

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

{"__symbolic":"module","version":4,"metadata":{"ResizableModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ResizableDirective"},{"__symbolic":"reference","name":"ResizeHandleDirective"}],"exports":[{"__symbolic":"reference","name":"ResizableDirective"},{"__symbolic":"reference","name":"ResizeHandleDirective"}]}]}],"members":{}},"BoundingRectangle":{"__symbolic":"interface"},"Edges":{"__symbolic":"interface"},"ResizeEvent":{"__symbolic":"interface"},"ResizableDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":286,"character":1},"arguments":[{"selector":"[mwlResizable]"}]}],"members":{"validateResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":293,"character":3}}]}],"resizeEdges":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":299,"character":3}}]}],"enableGhostResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":304,"character":3}}]}],"resizeSnapGrid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":311,"character":3}}]}],"resizeCursors":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":316,"character":3}}]}],"resizeCursorPrecision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":322,"character":3}}]}],"ghostElementPositioning":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":327,"character":3}}]}],"allowNegativeResizes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":332,"character":3}}]}],"mouseMoveThrottleMS":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":337,"character":3}}]}],"resizeStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":342,"character":3}}]}],"resizing":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":347,"character":3}}]}],"resizeEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":352,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":392,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":392,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":393,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":394,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":395,"character":18}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setElementClass":[{"__symbolic":"method"}]}},"ResizeHandleDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":26,"character":1},"arguments":[{"selector":"[mwlResizeHandle]"}]}],"members":{"resizeEdges":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":44,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":46,"character":18},{"__symbolic":"reference","name":"ResizableDirective"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onMousedown":[{"__symbolic":"method"}],"onMouseup":[{"__symbolic":"method"}],"onMousemove":[{"__symbolic":"method"}],"unsubscribeEventListeners":[{"__symbolic":"method"}],"listenOnTheHost":[{"__symbolic":"method"}]}}},"origins":{"ResizableModule":"./resizable.module","BoundingRectangle":"./interfaces/bounding-rectangle.interface","Edges":"./interfaces/edges.interface","ResizeEvent":"./interfaces/resize-event.interface","ResizableDirective":"./resizable.directive","ResizeHandleDirective":"./resize-handle.directive"},"importAs":"angular-resizable-element"}
{"__symbolic":"module","version":4,"metadata":{"ResizableModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ResizableDirective"},{"__symbolic":"reference","name":"ResizeHandleDirective"}],"exports":[{"__symbolic":"reference","name":"ResizableDirective"},{"__symbolic":"reference","name":"ResizeHandleDirective"}]}]}],"members":{}},"BoundingRectangle":{"__symbolic":"interface"},"Edges":{"__symbolic":"interface"},"ResizeEvent":{"__symbolic":"interface"},"ResizableDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":291,"character":1},"arguments":[{"selector":"[mwlResizable]","exportAs":"mwlResizable"}]}],"members":{"validateResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":299,"character":3}}]}],"resizeEdges":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":305,"character":3}}]}],"enableGhostResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":310,"character":3}}]}],"resizeSnapGrid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":317,"character":3}}]}],"resizeCursors":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":322,"character":3}}]}],"resizeCursorPrecision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":328,"character":3}}]}],"ghostElementPositioning":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":333,"character":3}}]}],"allowNegativeResizes":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":338,"character":3}}]}],"mouseMoveThrottleMS":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":343,"character":3}}]}],"resizeStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":348,"character":3}}]}],"resizing":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":353,"character":3}}]}],"resizeEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":358,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":398,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":398,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":399,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":400,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":401,"character":18}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setElementClass":[{"__symbolic":"method"}]}},"ResizeHandleDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":32,"character":1},"arguments":[{"selector":"[mwlResizeHandle]"}]}],"members":{"resizeEdges":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"resizableContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":57,"character":5}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":54,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":55,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":56,"character":18},{"__symbolic":"reference","name":"ResizableDirective"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onMousedown":[{"__symbolic":"method"}],"onMouseup":[{"__symbolic":"method"}],"onMousemove":[{"__symbolic":"method"}],"unsubscribeEventListeners":[{"__symbolic":"method"}],"listenOnTheHost":[{"__symbolic":"method"}]}}},"origins":{"ResizableModule":"./resizable.module","BoundingRectangle":"./interfaces/bounding-rectangle.interface","Edges":"./interfaces/edges.interface","ResizeEvent":"./interfaces/resize-event.interface","ResizableDirective":"./resizable.directive","ResizeHandleDirective":"./resize-handle.directive"},"importAs":"angular-resizable-element"}

@@ -305,2 +305,7 @@ (function (global, factory) {

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -399,3 +404,9 @@ var ResizableDirective = /** @class */ (function () {

if (currentResize) {
event.preventDefault();
try {
event.preventDefault();
}
catch (e) {
// just adding try-catch not to see errors in console if there is a passive listener for same event somewhere
// browser does nothing except of writing errors to console
}
}

@@ -718,3 +729,4 @@ }), operators.share());

{ type: core.Directive, args: [{
selector: '[mwlResizable]'
selector: '[mwlResizable]',
exportAs: 'mwlResizable'
},] }

@@ -886,9 +898,14 @@ ];

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/
var ResizeHandleDirective = /** @class */ (function () {
function ResizeHandleDirective(renderer, element, zone, resizable) {
function ResizeHandleDirective(renderer, element, zone, resizableDirective) {
this.renderer = renderer;
this.element = element;
this.zone = zone;
this.resizable = resizable;
this.resizableDirective = resizableDirective;
/**

@@ -995,2 +1012,16 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

};
Object.defineProperty(ResizeHandleDirective.prototype, "resizable", {
// directive might be passed from DI or as an input
get:
// directive might be passed from DI or as an input
/**
* @private
* @return {?}
*/
function () {
return this.resizableDirective || this.resizableContainer;
},
enumerable: true,
configurable: true
});
/**

@@ -1059,7 +1090,8 @@ * @private

{ type: core.NgZone },
{ type: ResizableDirective }
{ type: ResizableDirective, decorators: [{ type: core.Optional }] }
];
};
ResizeHandleDirective.propDecorators = {
resizeEdges: [{ type: core.Input }]
resizeEdges: [{ type: core.Input }],
resizableContainer: [{ type: core.Input }]
};

@@ -1066,0 +1098,0 @@ return ResizeHandleDirective;

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("angular-resizable-element",["exports","@angular/common","@angular/core","rxjs","rxjs/operators"],t):t(e["angular-resizable-element"]={},e.ng.common,e.ng.core,e.rxjs,e.rxjs.operators)}(this,function(e,t,r,u,a){"use strict";var l=function(){return(l=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)s.push(i.value)}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s}var s="undefined"!=typeof window&&("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints);function c(e,t,n){return void 0===n&&(n=3),Math.abs(e-t)<n}function p(e,t,n,i){var r={top:e.top,bottom:e.bottom,left:e.left,right:e.right};return t.top&&(r.top+=i),t.bottom&&(r.bottom+=i),t.left&&(r.left+=n),t.right&&(r.right+=n),r.height=r.bottom-r.top,r.width=r.right-r.left,r}function h(e){var t=e.clientY,n=e.rect;return t>=n.top&&t<=n.bottom}function m(e){var t=e.clientX,n=e.rect;return t>=n.left&&t<=n.right}function f(e){var t=e.clientX,n=e.clientY,i=e.elm,r=e.allowedEdges,o=e.cursorPrecision,s=i.nativeElement.getBoundingClientRect(),l={};return r.left&&c(t,s.left,o)&&h({clientY:n,rect:s})&&(l.left=!0),r.right&&c(t,s.right,o)&&h({clientY:n,rect:s})&&(l.right=!0),r.top&&c(n,s.top,o)&&m({clientX:t,rect:s})&&(l.top=!0),r.bottom&&c(n,s.bottom,o)&&m({clientX:t,rect:s})&&(l.bottom=!0),l}var g=Object.freeze({topLeft:"nw-resize",topRight:"ne-resize",bottomLeft:"sw-resize",bottomRight:"se-resize",leftOrRight:"col-resize",topOrBottom:"row-resize"});function v(e,t){return e.left&&e.top?t.topLeft:e.right&&e.top?t.topRight:e.left&&e.bottom?t.bottomLeft:e.right&&e.bottom?t.bottomRight:e.left||e.right?t.leftOrRight:e.top||e.bottom?t.topOrBottom:""}function y(e){var t=e.edges,n=e.initialRectangle,i=e.newRectangle,r={};return Object.keys(t).forEach(function(e){r[e]=(i[e]||0)-(n[e]||0)}),r}var b="resize-active",n=function(){function e(e,t,n,i){this.platformId=e,this.renderer=t,this.elm=n,this.zone=i,this.resizeEdges={},this.enableGhostResize=!1,this.resizeSnapGrid={},this.resizeCursors=g,this.resizeCursorPrecision=3,this.ghostElementPositioning="fixed",this.allowNegativeResizes=!1,this.mouseMoveThrottleMS=50,this.resizeStart=new r.EventEmitter,this.resizing=new r.EventEmitter,this.resizeEnd=new r.EventEmitter,this.mouseup=new u.Subject,this.mousedown=new u.Subject,this.mousemove=new u.Subject,this.destroy$=new u.Subject,this.resizeEdges$=new u.Subject,this.pointerEventListeners=o.getInstance(t,i)}return e.prototype.ngOnInit=function(){var o,s=this,e=u.merge(this.pointerEventListeners.pointerDown,this.mousedown),n=u.merge(this.pointerEventListeners.pointerMove,this.mousemove).pipe(a.tap(function(e){var t=e.event;o&&t.preventDefault()}),a.share()),i=u.merge(this.pointerEventListeners.pointerUp,this.mouseup),r=function(){o&&o.clonedNode&&(s.elm.nativeElement.parentElement.removeChild(o.clonedNode),s.renderer.setStyle(s.elm.nativeElement,"visibility","inherit"))},c=function(){return l({},g,s.resizeCursors)};this.resizeEdges$.pipe(a.startWith(this.resizeEdges),a.map(function(){return s.resizeEdges&&Object.keys(s.resizeEdges).some(function(e){return!!s.resizeEdges[e]})}),a.switchMap(function(e){return e?n:u.EMPTY}),a.auditTime(this.mouseMoveThrottleMS),a.takeUntil(this.destroy$)).subscribe(function(e){var t=f({clientX:e.clientX,clientY:e.clientY,elm:s.elm,allowedEdges:s.resizeEdges,cursorPrecision:s.resizeCursorPrecision}),n=c();if(!o){var i=v(t,n);s.renderer.setStyle(s.elm.nativeElement,"cursor",i)}s.setElementClass(s.elm,"resize-left-hover",!0===t.left),s.setElementClass(s.elm,"resize-right-hover",!0===t.right),s.setElementClass(s.elm,"resize-top-hover",!0===t.top),s.setElementClass(s.elm,"resize-bottom-hover",!0===t.bottom)}),e.pipe(a.mergeMap(function(t){function r(e){return{clientX:e.clientX-t.clientX,clientY:e.clientY-t.clientY}}var l=function(){var e={x:1,y:1};return o&&(s.resizeSnapGrid.left&&o.edges.left?e.x=+s.resizeSnapGrid.left:s.resizeSnapGrid.right&&o.edges.right&&(e.x=+s.resizeSnapGrid.right),s.resizeSnapGrid.top&&o.edges.top?e.y=+s.resizeSnapGrid.top:s.resizeSnapGrid.bottom&&o.edges.bottom&&(e.y=+s.resizeSnapGrid.bottom)),e};function c(e,t){return{x:Math.ceil(e.clientX/t.x),y:Math.ceil(e.clientY/t.y)}}return u.merge(n.pipe(a.take(1)).pipe(a.map(function(e){return[,e]})),n.pipe(a.pairwise())).pipe(a.map(function(e){var t=d(e,2),n=t[0],i=t[1];return[n?r(n):n,r(i)]})).pipe(a.filter(function(e){var t=d(e,2),n=t[0],i=t[1];if(!n)return!0;var r=l(),o=c(n,r),s=c(i,r);return o.x!==s.x||o.y!==s.y})).pipe(a.map(function(e){var t=d(e,2)[1],n=l();return{clientX:Math.round(t.clientX/n.x)*n.x,clientY:Math.round(t.clientY/n.y)*n.y}})).pipe(a.takeUntil(u.merge(i,e)))})).pipe(a.filter(function(){return!!o})).pipe(a.map(function(e){var t=e.clientX,n=e.clientY;return p(o.startingRect,o.edges,t,n)})).pipe(a.filter(function(e){return s.allowNegativeResizes||!!(e.height&&e.width&&0<e.height&&0<e.width)})).pipe(a.filter(function(e){return!s.validateResize||s.validateResize({rectangle:e,edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:e})})}),a.takeUntil(this.destroy$)).subscribe(function(e){o&&o.clonedNode&&(s.renderer.setStyle(o.clonedNode,"height",e.height+"px"),s.renderer.setStyle(o.clonedNode,"width",e.width+"px"),s.renderer.setStyle(o.clonedNode,"top",e.top+"px"),s.renderer.setStyle(o.clonedNode,"left",e.left+"px")),0<s.resizing.observers.length&&s.zone.run(function(){s.resizing.emit({edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:e}),rectangle:e})}),o.currentRect=e}),e.pipe(a.map(function(e){var t=e.clientX,n=e.clientY;return e.edges||f({clientX:t,clientY:n,elm:s.elm,allowedEdges:s.resizeEdges,cursorPrecision:s.resizeCursorPrecision})})).pipe(a.filter(function(e){return 0<Object.keys(e).length}),a.takeUntil(this.destroy$)).subscribe(function(e){o&&r();var t=function l(e,t){var n=0,i=0,r=e.nativeElement.style,o=["transform","-ms-transform","-moz-transform","-o-transform"].map(function(e){return r[e]}).find(function(e){return!!e});if(o&&o.includes("translate")&&(n=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$1"),i=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$2")),"absolute"===t)return{height:e.nativeElement.offsetHeight,width:e.nativeElement.offsetWidth,top:e.nativeElement.offsetTop-i,bottom:e.nativeElement.offsetHeight+e.nativeElement.offsetTop-i,left:e.nativeElement.offsetLeft-n,right:e.nativeElement.offsetWidth+e.nativeElement.offsetLeft-n};var s=e.nativeElement.getBoundingClientRect();return{height:s.height,width:s.width,top:s.top-i,bottom:s.bottom-i,left:s.left-n,right:s.right-n,scrollTop:e.nativeElement.scrollTop,scrollLeft:e.nativeElement.scrollLeft}}(s.elm,s.ghostElementPositioning);o={edges:e,startingRect:t,currentRect:t};var n=c(),i=v(o.edges,n);s.renderer.setStyle(document.body,"cursor",i),s.setElementClass(s.elm,b,!0),s.enableGhostResize&&(o.clonedNode=s.elm.nativeElement.cloneNode(!0),s.elm.nativeElement.parentElement.appendChild(o.clonedNode),s.renderer.setStyle(s.elm.nativeElement,"visibility","hidden"),s.renderer.setStyle(o.clonedNode,"position",s.ghostElementPositioning),s.renderer.setStyle(o.clonedNode,"left",o.startingRect.left+"px"),s.renderer.setStyle(o.clonedNode,"top",o.startingRect.top+"px"),s.renderer.setStyle(o.clonedNode,"height",o.startingRect.height+"px"),s.renderer.setStyle(o.clonedNode,"width",o.startingRect.width+"px"),s.renderer.setStyle(o.clonedNode,"cursor",v(o.edges,n)),s.renderer.addClass(o.clonedNode,"resize-ghost-element"),o.clonedNode.scrollTop=o.startingRect.scrollTop,o.clonedNode.scrollLeft=o.startingRect.scrollLeft),0<s.resizeStart.observers.length&&s.zone.run(function(){s.resizeStart.emit({edges:y({edges:e,initialRectangle:t,newRectangle:t}),rectangle:p(t,{},0,0)})})}),i.pipe(a.takeUntil(this.destroy$)).subscribe(function(){o&&(s.renderer.removeClass(s.elm.nativeElement,b),s.renderer.setStyle(document.body,"cursor",""),s.renderer.setStyle(s.elm.nativeElement,"cursor",""),0<s.resizeEnd.observers.length&&s.zone.run(function(){s.resizeEnd.emit({edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:o.currentRect}),rectangle:o.currentRect})}),r(),o=null)})},e.prototype.ngOnChanges=function(e){e.resizeEdges&&this.resizeEdges$.next(this.resizeEdges)},e.prototype.ngOnDestroy=function(){t.isPlatformBrowser(this.platformId)&&this.renderer.setStyle(document.body,"cursor",""),this.mousedown.complete(),this.mouseup.complete(),this.mousemove.complete(),this.resizeEdges$.complete(),this.destroy$.next()},e.prototype.setElementClass=function(e,t,n){n?this.renderer.addClass(e.nativeElement,t):this.renderer.removeClass(e.nativeElement,t)},e.decorators=[{type:r.Directive,args:[{selector:"[mwlResizable]"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Inject,args:[r.PLATFORM_ID]}]},{type:r.Renderer2},{type:r.ElementRef},{type:r.NgZone}]},e.propDecorators={validateResize:[{type:r.Input}],resizeEdges:[{type:r.Input}],enableGhostResize:[{type:r.Input}],resizeSnapGrid:[{type:r.Input}],resizeCursors:[{type:r.Input}],resizeCursorPrecision:[{type:r.Input}],ghostElementPositioning:[{type:r.Input}],allowNegativeResizes:[{type:r.Input}],mouseMoveThrottleMS:[{type:r.Input}],resizeStart:[{type:r.Output}],resizing:[{type:r.Output}],resizeEnd:[{type:r.Output}]},e}(),o=function(){function n(r,o){this.pointerDown=new u.Observable(function(t){var e,n;return o.runOutsideAngular(function(){e=r.listen("document","mousedown",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchstart",function(e){t.next({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY,event:e})}))}),function(){e(),s&&n()}}).pipe(a.share()),this.pointerMove=new u.Observable(function(t){var e,n;return o.runOutsideAngular(function(){e=r.listen("document","mousemove",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchmove",function(e){t.next({clientX:e.targetTouches[0].clientX,clientY:e.targetTouches[0].clientY,event:e})}))}),function(){e(),s&&n()}}).pipe(a.share()),this.pointerUp=new u.Observable(function(t){var e,n,i;return o.runOutsideAngular(function(){e=r.listen("document","mouseup",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchend",function(e){t.next({clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,event:e})}),i=r.listen("document","touchcancel",function(e){t.next({clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,event:e})}))}),function(){e(),s&&(n(),i())}}).pipe(a.share())}return n.getInstance=function(e,t){return n.instance||(n.instance=new n(e,t)),n.instance},n}(),i=function(){function e(e,t,n,i){this.renderer=e,this.element=t,this.zone=n,this.resizable=i,this.resizeEdges={},this.eventListeners={},this.destroy$=new u.Subject}return e.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular(function(){t.listenOnTheHost("mousedown").subscribe(function(e){t.onMousedown(e,e.clientX,e.clientY)}),t.listenOnTheHost("mouseup").subscribe(function(e){t.onMouseup(e.clientX,e.clientY)}),s&&(t.listenOnTheHost("touchstart").subscribe(function(e){t.onMousedown(e,e.touches[0].clientX,e.touches[0].clientY)}),u.merge(t.listenOnTheHost("touchend"),t.listenOnTheHost("touchcancel")).subscribe(function(e){t.onMouseup(e.changedTouches[0].clientX,e.changedTouches[0].clientY)}))})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.unsubscribeEventListeners()},e.prototype.onMousedown=function(e,t,n){var i=this;e.preventDefault(),this.eventListeners.touchmove||(this.eventListeners.touchmove=this.renderer.listen(this.element.nativeElement,"touchmove",function(e){i.onMousemove(e,e.targetTouches[0].clientX,e.targetTouches[0].clientY)})),this.eventListeners.mousemove||(this.eventListeners.mousemove=this.renderer.listen(this.element.nativeElement,"mousemove",function(e){i.onMousemove(e,e.clientX,e.clientY)})),this.resizable.mousedown.next({clientX:t,clientY:n,edges:this.resizeEdges})},e.prototype.onMouseup=function(e,t){this.unsubscribeEventListeners(),this.resizable.mouseup.next({clientX:e,clientY:t,edges:this.resizeEdges})},e.prototype.onMousemove=function(e,t,n){this.resizable.mousemove.next({clientX:t,clientY:n,edges:this.resizeEdges,event:e})},e.prototype.unsubscribeEventListeners=function(){var t=this;Object.keys(this.eventListeners).forEach(function(e){t.eventListeners[e](),delete t.eventListeners[e]})},e.prototype.listenOnTheHost=function(e){return u.fromEvent(this.element.nativeElement,e).pipe(a.takeUntil(this.destroy$))},e.decorators=[{type:r.Directive,args:[{selector:"[mwlResizeHandle]"}]}],e.ctorParameters=function(){return[{type:r.Renderer2},{type:r.ElementRef},{type:r.NgZone},{type:n}]},e.propDecorators={resizeEdges:[{type:r.Input}]},e}(),z=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{declarations:[n,i],exports:[n,i]}]}],e}();e.ResizableDirective=n,e.ResizeHandleDirective=i,e.ResizableModule=z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("angular-resizable-element",["exports","@angular/common","@angular/core","rxjs","rxjs/operators"],t):t(e["angular-resizable-element"]={},e.ng.common,e.ng.core,e.rxjs,e.rxjs.operators)}(this,function(e,t,r,u,a){"use strict";var l=function(){return(l=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)s.push(i.value)}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s}var s="undefined"!=typeof window&&("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints);function c(e,t,n){return void 0===n&&(n=3),Math.abs(e-t)<n}function d(e,t,n,i){var r={top:e.top,bottom:e.bottom,left:e.left,right:e.right};return t.top&&(r.top+=i),t.bottom&&(r.bottom+=i),t.left&&(r.left+=n),t.right&&(r.right+=n),r.height=r.bottom-r.top,r.width=r.right-r.left,r}function h(e){var t=e.clientY,n=e.rect;return t>=n.top&&t<=n.bottom}function m(e){var t=e.clientX,n=e.rect;return t>=n.left&&t<=n.right}function f(e){var t=e.clientX,n=e.clientY,i=e.elm,r=e.allowedEdges,o=e.cursorPrecision,s=i.nativeElement.getBoundingClientRect(),l={};return r.left&&c(t,s.left,o)&&h({clientY:n,rect:s})&&(l.left=!0),r.right&&c(t,s.right,o)&&h({clientY:n,rect:s})&&(l.right=!0),r.top&&c(n,s.top,o)&&m({clientX:t,rect:s})&&(l.top=!0),r.bottom&&c(n,s.bottom,o)&&m({clientX:t,rect:s})&&(l.bottom=!0),l}var g=Object.freeze({topLeft:"nw-resize",topRight:"ne-resize",bottomLeft:"sw-resize",bottomRight:"se-resize",leftOrRight:"col-resize",topOrBottom:"row-resize"});function v(e,t){return e.left&&e.top?t.topLeft:e.right&&e.top?t.topRight:e.left&&e.bottom?t.bottomLeft:e.right&&e.bottom?t.bottomRight:e.left||e.right?t.leftOrRight:e.top||e.bottom?t.topOrBottom:""}function y(e){var t=e.edges,n=e.initialRectangle,i=e.newRectangle,r={};return Object.keys(t).forEach(function(e){r[e]=(i[e]||0)-(n[e]||0)}),r}var b="resize-active",n=function(){function e(e,t,n,i){this.platformId=e,this.renderer=t,this.elm=n,this.zone=i,this.resizeEdges={},this.enableGhostResize=!1,this.resizeSnapGrid={},this.resizeCursors=g,this.resizeCursorPrecision=3,this.ghostElementPositioning="fixed",this.allowNegativeResizes=!1,this.mouseMoveThrottleMS=50,this.resizeStart=new r.EventEmitter,this.resizing=new r.EventEmitter,this.resizeEnd=new r.EventEmitter,this.mouseup=new u.Subject,this.mousedown=new u.Subject,this.mousemove=new u.Subject,this.destroy$=new u.Subject,this.resizeEdges$=new u.Subject,this.pointerEventListeners=o.getInstance(t,i)}return e.prototype.ngOnInit=function(){var o,s=this,e=u.merge(this.pointerEventListeners.pointerDown,this.mousedown),n=u.merge(this.pointerEventListeners.pointerMove,this.mousemove).pipe(a.tap(function(e){var t=e.event;if(o)try{t.preventDefault()}catch(n){}}),a.share()),i=u.merge(this.pointerEventListeners.pointerUp,this.mouseup),r=function(){o&&o.clonedNode&&(s.elm.nativeElement.parentElement.removeChild(o.clonedNode),s.renderer.setStyle(s.elm.nativeElement,"visibility","inherit"))},c=function(){return l({},g,s.resizeCursors)};this.resizeEdges$.pipe(a.startWith(this.resizeEdges),a.map(function(){return s.resizeEdges&&Object.keys(s.resizeEdges).some(function(e){return!!s.resizeEdges[e]})}),a.switchMap(function(e){return e?n:u.EMPTY}),a.auditTime(this.mouseMoveThrottleMS),a.takeUntil(this.destroy$)).subscribe(function(e){var t=f({clientX:e.clientX,clientY:e.clientY,elm:s.elm,allowedEdges:s.resizeEdges,cursorPrecision:s.resizeCursorPrecision}),n=c();if(!o){var i=v(t,n);s.renderer.setStyle(s.elm.nativeElement,"cursor",i)}s.setElementClass(s.elm,"resize-left-hover",!0===t.left),s.setElementClass(s.elm,"resize-right-hover",!0===t.right),s.setElementClass(s.elm,"resize-top-hover",!0===t.top),s.setElementClass(s.elm,"resize-bottom-hover",!0===t.bottom)}),e.pipe(a.mergeMap(function(t){function r(e){return{clientX:e.clientX-t.clientX,clientY:e.clientY-t.clientY}}var l=function(){var e={x:1,y:1};return o&&(s.resizeSnapGrid.left&&o.edges.left?e.x=+s.resizeSnapGrid.left:s.resizeSnapGrid.right&&o.edges.right&&(e.x=+s.resizeSnapGrid.right),s.resizeSnapGrid.top&&o.edges.top?e.y=+s.resizeSnapGrid.top:s.resizeSnapGrid.bottom&&o.edges.bottom&&(e.y=+s.resizeSnapGrid.bottom)),e};function c(e,t){return{x:Math.ceil(e.clientX/t.x),y:Math.ceil(e.clientY/t.y)}}return u.merge(n.pipe(a.take(1)).pipe(a.map(function(e){return[,e]})),n.pipe(a.pairwise())).pipe(a.map(function(e){var t=p(e,2),n=t[0],i=t[1];return[n?r(n):n,r(i)]})).pipe(a.filter(function(e){var t=p(e,2),n=t[0],i=t[1];if(!n)return!0;var r=l(),o=c(n,r),s=c(i,r);return o.x!==s.x||o.y!==s.y})).pipe(a.map(function(e){var t=p(e,2)[1],n=l();return{clientX:Math.round(t.clientX/n.x)*n.x,clientY:Math.round(t.clientY/n.y)*n.y}})).pipe(a.takeUntil(u.merge(i,e)))})).pipe(a.filter(function(){return!!o})).pipe(a.map(function(e){var t=e.clientX,n=e.clientY;return d(o.startingRect,o.edges,t,n)})).pipe(a.filter(function(e){return s.allowNegativeResizes||!!(e.height&&e.width&&0<e.height&&0<e.width)})).pipe(a.filter(function(e){return!s.validateResize||s.validateResize({rectangle:e,edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:e})})}),a.takeUntil(this.destroy$)).subscribe(function(e){o&&o.clonedNode&&(s.renderer.setStyle(o.clonedNode,"height",e.height+"px"),s.renderer.setStyle(o.clonedNode,"width",e.width+"px"),s.renderer.setStyle(o.clonedNode,"top",e.top+"px"),s.renderer.setStyle(o.clonedNode,"left",e.left+"px")),0<s.resizing.observers.length&&s.zone.run(function(){s.resizing.emit({edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:e}),rectangle:e})}),o.currentRect=e}),e.pipe(a.map(function(e){var t=e.clientX,n=e.clientY;return e.edges||f({clientX:t,clientY:n,elm:s.elm,allowedEdges:s.resizeEdges,cursorPrecision:s.resizeCursorPrecision})})).pipe(a.filter(function(e){return 0<Object.keys(e).length}),a.takeUntil(this.destroy$)).subscribe(function(e){o&&r();var t=function l(e,t){var n=0,i=0,r=e.nativeElement.style,o=["transform","-ms-transform","-moz-transform","-o-transform"].map(function(e){return r[e]}).find(function(e){return!!e});if(o&&o.includes("translate")&&(n=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$1"),i=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$2")),"absolute"===t)return{height:e.nativeElement.offsetHeight,width:e.nativeElement.offsetWidth,top:e.nativeElement.offsetTop-i,bottom:e.nativeElement.offsetHeight+e.nativeElement.offsetTop-i,left:e.nativeElement.offsetLeft-n,right:e.nativeElement.offsetWidth+e.nativeElement.offsetLeft-n};var s=e.nativeElement.getBoundingClientRect();return{height:s.height,width:s.width,top:s.top-i,bottom:s.bottom-i,left:s.left-n,right:s.right-n,scrollTop:e.nativeElement.scrollTop,scrollLeft:e.nativeElement.scrollLeft}}(s.elm,s.ghostElementPositioning);o={edges:e,startingRect:t,currentRect:t};var n=c(),i=v(o.edges,n);s.renderer.setStyle(document.body,"cursor",i),s.setElementClass(s.elm,b,!0),s.enableGhostResize&&(o.clonedNode=s.elm.nativeElement.cloneNode(!0),s.elm.nativeElement.parentElement.appendChild(o.clonedNode),s.renderer.setStyle(s.elm.nativeElement,"visibility","hidden"),s.renderer.setStyle(o.clonedNode,"position",s.ghostElementPositioning),s.renderer.setStyle(o.clonedNode,"left",o.startingRect.left+"px"),s.renderer.setStyle(o.clonedNode,"top",o.startingRect.top+"px"),s.renderer.setStyle(o.clonedNode,"height",o.startingRect.height+"px"),s.renderer.setStyle(o.clonedNode,"width",o.startingRect.width+"px"),s.renderer.setStyle(o.clonedNode,"cursor",v(o.edges,n)),s.renderer.addClass(o.clonedNode,"resize-ghost-element"),o.clonedNode.scrollTop=o.startingRect.scrollTop,o.clonedNode.scrollLeft=o.startingRect.scrollLeft),0<s.resizeStart.observers.length&&s.zone.run(function(){s.resizeStart.emit({edges:y({edges:e,initialRectangle:t,newRectangle:t}),rectangle:d(t,{},0,0)})})}),i.pipe(a.takeUntil(this.destroy$)).subscribe(function(){o&&(s.renderer.removeClass(s.elm.nativeElement,b),s.renderer.setStyle(document.body,"cursor",""),s.renderer.setStyle(s.elm.nativeElement,"cursor",""),0<s.resizeEnd.observers.length&&s.zone.run(function(){s.resizeEnd.emit({edges:y({edges:o.edges,initialRectangle:o.startingRect,newRectangle:o.currentRect}),rectangle:o.currentRect})}),r(),o=null)})},e.prototype.ngOnChanges=function(e){e.resizeEdges&&this.resizeEdges$.next(this.resizeEdges)},e.prototype.ngOnDestroy=function(){t.isPlatformBrowser(this.platformId)&&this.renderer.setStyle(document.body,"cursor",""),this.mousedown.complete(),this.mouseup.complete(),this.mousemove.complete(),this.resizeEdges$.complete(),this.destroy$.next()},e.prototype.setElementClass=function(e,t,n){n?this.renderer.addClass(e.nativeElement,t):this.renderer.removeClass(e.nativeElement,t)},e.decorators=[{type:r.Directive,args:[{selector:"[mwlResizable]",exportAs:"mwlResizable"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Inject,args:[r.PLATFORM_ID]}]},{type:r.Renderer2},{type:r.ElementRef},{type:r.NgZone}]},e.propDecorators={validateResize:[{type:r.Input}],resizeEdges:[{type:r.Input}],enableGhostResize:[{type:r.Input}],resizeSnapGrid:[{type:r.Input}],resizeCursors:[{type:r.Input}],resizeCursorPrecision:[{type:r.Input}],ghostElementPositioning:[{type:r.Input}],allowNegativeResizes:[{type:r.Input}],mouseMoveThrottleMS:[{type:r.Input}],resizeStart:[{type:r.Output}],resizing:[{type:r.Output}],resizeEnd:[{type:r.Output}]},e}(),o=function(){function n(r,o){this.pointerDown=new u.Observable(function(t){var e,n;return o.runOutsideAngular(function(){e=r.listen("document","mousedown",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchstart",function(e){t.next({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY,event:e})}))}),function(){e(),s&&n()}}).pipe(a.share()),this.pointerMove=new u.Observable(function(t){var e,n;return o.runOutsideAngular(function(){e=r.listen("document","mousemove",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchmove",function(e){t.next({clientX:e.targetTouches[0].clientX,clientY:e.targetTouches[0].clientY,event:e})}))}),function(){e(),s&&n()}}).pipe(a.share()),this.pointerUp=new u.Observable(function(t){var e,n,i;return o.runOutsideAngular(function(){e=r.listen("document","mouseup",function(e){t.next({clientX:e.clientX,clientY:e.clientY,event:e})}),s&&(n=r.listen("document","touchend",function(e){t.next({clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,event:e})}),i=r.listen("document","touchcancel",function(e){t.next({clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,event:e})}))}),function(){e(),s&&(n(),i())}}).pipe(a.share())}return n.getInstance=function(e,t){return n.instance||(n.instance=new n(e,t)),n.instance},n}(),i=function(){function e(e,t,n,i){this.renderer=e,this.element=t,this.zone=n,this.resizableDirective=i,this.resizeEdges={},this.eventListeners={},this.destroy$=new u.Subject}return e.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular(function(){t.listenOnTheHost("mousedown").subscribe(function(e){t.onMousedown(e,e.clientX,e.clientY)}),t.listenOnTheHost("mouseup").subscribe(function(e){t.onMouseup(e.clientX,e.clientY)}),s&&(t.listenOnTheHost("touchstart").subscribe(function(e){t.onMousedown(e,e.touches[0].clientX,e.touches[0].clientY)}),u.merge(t.listenOnTheHost("touchend"),t.listenOnTheHost("touchcancel")).subscribe(function(e){t.onMouseup(e.changedTouches[0].clientX,e.changedTouches[0].clientY)}))})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.unsubscribeEventListeners()},e.prototype.onMousedown=function(e,t,n){var i=this;e.preventDefault(),this.eventListeners.touchmove||(this.eventListeners.touchmove=this.renderer.listen(this.element.nativeElement,"touchmove",function(e){i.onMousemove(e,e.targetTouches[0].clientX,e.targetTouches[0].clientY)})),this.eventListeners.mousemove||(this.eventListeners.mousemove=this.renderer.listen(this.element.nativeElement,"mousemove",function(e){i.onMousemove(e,e.clientX,e.clientY)})),this.resizable.mousedown.next({clientX:t,clientY:n,edges:this.resizeEdges})},e.prototype.onMouseup=function(e,t){this.unsubscribeEventListeners(),this.resizable.mouseup.next({clientX:e,clientY:t,edges:this.resizeEdges})},Object.defineProperty(e.prototype,"resizable",{get:function(){return this.resizableDirective||this.resizableContainer},enumerable:!0,configurable:!0}),e.prototype.onMousemove=function(e,t,n){this.resizable.mousemove.next({clientX:t,clientY:n,edges:this.resizeEdges,event:e})},e.prototype.unsubscribeEventListeners=function(){var t=this;Object.keys(this.eventListeners).forEach(function(e){t.eventListeners[e](),delete t.eventListeners[e]})},e.prototype.listenOnTheHost=function(e){return u.fromEvent(this.element.nativeElement,e).pipe(a.takeUntil(this.destroy$))},e.decorators=[{type:r.Directive,args:[{selector:"[mwlResizeHandle]"}]}],e.ctorParameters=function(){return[{type:r.Renderer2},{type:r.ElementRef},{type:r.NgZone},{type:n,decorators:[{type:r.Optional}]}]},e.propDecorators={resizeEdges:[{type:r.Input}],resizableContainer:[{type:r.Input}]},e}(),z=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{declarations:[n,i],exports:[n,i]}]}],e}();e.ResizableDirective=n,e.ResizeHandleDirective=i,e.ResizableModule=z,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=angular-resizable-element.umd.min.js.map

@@ -5,2 +5,12 @@ # Change Log

<a name="3.4.0"></a>
# [3.4.0](https://github.com/mattlewis92/angular-resizable-element/compare/v3.3.5...v3.4.0) (2021-06-02)
### Features
* **mwlResizeHandle:** add `resizableContainer` input ([862249f](https://github.com/mattlewis92/angular-resizable-element/commit/862249f))
<a name="3.3.5"></a>

@@ -7,0 +17,0 @@ ## [3.3.5](https://github.com/mattlewis92/angular-resizable-element/compare/v3.3.4...v3.3.5) (2021-02-02)

@@ -5,3 +5,3 @@ /**

*/
import { Directive, Input, Renderer2, ElementRef, NgZone } from '@angular/core';
import { Directive, Input, Renderer2, ElementRef, NgZone, Optional } from '@angular/core';
import { fromEvent, merge, Subject } from 'rxjs';

@@ -21,2 +21,7 @@ import { takeUntil } from 'rxjs/operators';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -28,9 +33,9 @@ export class ResizeHandleDirective {

* @param {?} zone
* @param {?} resizable
* @param {?} resizableDirective
*/
constructor(renderer, element, zone, resizable) {
constructor(renderer, element, zone, resizableDirective) {
this.renderer = renderer;
this.element = element;
this.zone = zone;
this.resizable = resizable;
this.resizableDirective = resizableDirective;
/**

@@ -110,4 +115,12 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

}
// directive might be passed from DI or as an input
/**
* @private
* @return {?}
*/
get resizable() {
return this.resizableDirective || this.resizableContainer;
}
/**
* @private
* @param {?} event

@@ -156,6 +169,7 @@ * @param {?} clientX

{ type: NgZone },
{ type: ResizableDirective }
{ type: ResizableDirective, decorators: [{ type: Optional }] }
];
ResizeHandleDirective.propDecorators = {
resizeEdges: [{ type: Input }]
resizeEdges: [{ type: Input }],
resizableContainer: [{ type: Input }]
};

@@ -169,3 +183,8 @@ if (false) {

/**
* Reference to ResizableDirective in case if handle is not located inside of element with ResizableDirective
* @type {?}
*/
ResizeHandleDirective.prototype.resizableContainer;
/**
* @type {?}
* @private

@@ -198,4 +217,4 @@ */

*/
ResizeHandleDirective.prototype.resizable;
ResizeHandleDirective.prototype.resizableDirective;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzaXplLWhhbmRsZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlc2l6YWJsZS1lbGVtZW50LyIsInNvdXJjZXMiOlsicmVzaXplLWhhbmRsZS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFNBQVMsRUFDVCxVQUFVLEVBR1YsTUFBTSxFQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNqRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDM0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFM0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDOzs7Ozs7Ozs7Ozs7QUFnQnBELE1BQU0sT0FBTyxxQkFBcUI7Ozs7Ozs7SUFjaEMsWUFDVSxRQUFtQixFQUNuQixPQUFtQixFQUNuQixJQUFZLEVBQ1osU0FBNkI7UUFIN0IsYUFBUSxHQUFSLFFBQVEsQ0FBVztRQUNuQixZQUFPLEdBQVAsT0FBTyxDQUFZO1FBQ25CLFNBQUksR0FBSixJQUFJLENBQVE7UUFDWixjQUFTLEdBQVQsU0FBUyxDQUFvQjs7OztRQWQ5QixnQkFBVyxHQUFVLEVBQUUs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F0ZSBvbk1vdXNlbW92ZShcbiAgICBldmVudDogTW91c2VFdmVudCB8IFRvdWNoRXZlbnQsXG4gICAgY2xpZW50WDogbnVtYmVyLFxuICAgIGNsaWVudFk6IG51bWJlclxuICApOiB2b2lkIHtcbiAgICB0aGlzLnJlc2l6YWJsZS5tb3VzZW1vdmUubmV4dCh7XG4gICAgICBjbGllbnRYLFxuICAgICAgY2xpZW50WSxcbiAgICAgIGVkZ2VzOiB0aGlzLnJlc2l6ZUVkZ2VzLFxuICAgICAgZXZlbnRcbiAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgdW5zdWJzY3JpYmVFdmVudExpc3RlbmVycygpOiB2b2lkIHtcbiAgICBPYmplY3Qua2V5cyh0aGlzLmV2ZW50TGlzdGVuZXJzKS5mb3JFYWNoKHR5cGUgPT4ge1xuICAgICAgKHRoaXMgYXMgYW55KS5ldmVudExpc3RlbmVyc1t0eXBlXSgpO1xuICAgICAgZGVsZXRlIHRoaXMuZXZlbnRMaXN0ZW5lcnNbdHlwZV07XG4gICAgfSk7XG4gIH1cblxuICBwcml2YXRlIGxpc3Rlbk9uVGhlSG9zdDxUIGV4dGVuZHMgRXZlbnQ+KGV2ZW50TmFtZTogc3RyaW5nKSB7XG4gICAgcmV0dXJuIGZyb21FdmVudDxUPih0aGlzLmVsZW1lbnQubmF0aXZlRWxlbWVudCwgZXZlbnROYW1lKS5waXBlKFxuICAgICAgdGFrZVVudGlsKHRoaXMuZGVzdHJveSQpXG4gICAgKTtcbiAgfVxufVxuIl19

@@ -5,3 +5,3 @@ /**

*/
import { Directive, Input, Renderer2, ElementRef, NgZone } from '@angular/core';
import { Directive, Input, Renderer2, ElementRef, NgZone, Optional } from '@angular/core';
import { fromEvent, merge, Subject } from 'rxjs';

@@ -21,9 +21,14 @@ import { takeUntil } from 'rxjs/operators';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/
var ResizeHandleDirective = /** @class */ (function () {
function ResizeHandleDirective(renderer, element, zone, resizable) {
function ResizeHandleDirective(renderer, element, zone, resizableDirective) {
this.renderer = renderer;
this.element = element;
this.zone = zone;
this.resizable = resizable;
this.resizableDirective = resizableDirective;
/**

@@ -130,2 +135,16 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

};
Object.defineProperty(ResizeHandleDirective.prototype, "resizable", {
// directive might be passed from DI or as an input
get:
// directive might be passed from DI or as an input
/**
* @private
* @return {?}
*/
function () {
return this.resizableDirective || this.resizableContainer;
},
enumerable: true,
configurable: true
});
/**

@@ -193,6 +212,7 @@ * @private

{ type: NgZone },
{ type: ResizableDirective }
{ type: ResizableDirective, decorators: [{ type: Optional }] }
]; };
ResizeHandleDirective.propDecorators = {
resizeEdges: [{ type: Input }]
resizeEdges: [{ type: Input }],
resizableContainer: [{ type: Input }]
};

@@ -209,3 +229,8 @@ return ResizeHandleDirective;

/**
* Reference to ResizableDirective in case if handle is not located inside of element with ResizableDirective
* @type {?}
*/
ResizeHandleDirective.prototype.resizableContainer;
/**
* @type {?}
* @private

@@ -238,4 +263,4 @@ */

*/
ResizeHandleDirective.prototype.resizable;
ResizeHandleDirective.prototype.resizableDirective;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzaXplLWhhbmRsZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlc2l6YWJsZS1lbGVtZW50LyIsInNvdXJjZXMiOlsicmVzaXplLWhhbmRsZS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFNBQVMsRUFDVCxVQUFVLEVBR1YsTUFBTSxFQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sR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LFxuICAgIGNsaWVudFg6IG51bWJlcixcbiAgICBjbGllbnRZOiBudW1iZXJcbiAgKTogdm9pZCB7XG4gICAgdGhpcy5yZXNpemFibGUubW91c2Vtb3ZlLm5leHQoe1xuICAgICAgY2xpZW50WCxcbiAgICAgIGNsaWVudFksXG4gICAgICBlZGdlczogdGhpcy5yZXNpemVFZGdlcyxcbiAgICAgIGV2ZW50XG4gICAgfSk7XG4gIH1cblxuICBwcml2YXRlIHVuc3Vic2NyaWJlRXZlbnRMaXN0ZW5lcnMoKTogdm9pZCB7XG4gICAgT2JqZWN0LmtleXModGhpcy5ldmVudExpc3RlbmVycykuZm9yRWFjaCh0eXBlID0+IHtcbiAgICAgICh0aGlzIGFzIGFueSkuZXZlbnRMaXN0ZW5lcnNbdHlwZV0oKTtcbiAgICAgIGRlbGV0ZSB0aGlzLmV2ZW50TGlzdGVuZXJzW3R5cGVdO1xuICAgIH0pO1xuICB9XG5cbiAgcHJpdmF0ZSBsaXN0ZW5PblRoZUhvc3Q8VCBleHRlbmRzIEV2ZW50PihldmVudE5hbWU6IHN0cmluZykge1xuICAgIHJldHVybiBmcm9tRXZlbnQ8VD4odGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQsIGV2ZW50TmFtZSkucGlwZShcbiAgICAgIHRha2VVbnRpbCh0aGlzLmRlc3Ryb3kkKVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
import { isPlatformBrowser } from '@angular/common';
import { Directive, Renderer2, ElementRef, Output, Input, EventEmitter, NgZone, Inject, PLATFORM_ID, NgModule } from '@angular/core';
import { Directive, Renderer2, ElementRef, Output, Input, EventEmitter, NgZone, Inject, PLATFORM_ID, Optional, NgModule } from '@angular/core';
import { Subject, Observable, merge, EMPTY, fromEvent } from 'rxjs';

@@ -246,2 +246,7 @@ import { map, mergeMap, takeUntil, filter, pairwise, take, share, auditTime, switchMap, startWith, tap } from 'rxjs/operators';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -335,3 +340,9 @@ class ResizableDirective {

if (currentResize) {
event.preventDefault();
try {
event.preventDefault();
}
catch (e) {
// just adding try-catch not to see errors in console if there is a passive listener for same event somewhere
// browser does nothing except of writing errors to console
}
}

@@ -625,3 +636,4 @@ }), share());

{ type: Directive, args: [{
selector: '[mwlResizable]'
selector: '[mwlResizable]',
exportAs: 'mwlResizable'
},] }

@@ -785,2 +797,7 @@ ];

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -792,9 +809,9 @@ class ResizeHandleDirective {

* @param {?} zone
* @param {?} resizable
* @param {?} resizableDirective
*/
constructor(renderer, element, zone, resizable) {
constructor(renderer, element, zone, resizableDirective) {
this.renderer = renderer;
this.element = element;
this.zone = zone;
this.resizable = resizable;
this.resizableDirective = resizableDirective;
/**

@@ -874,4 +891,12 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

}
// directive might be passed from DI or as an input
/**
* @private
* @return {?}
*/
get resizable() {
return this.resizableDirective || this.resizableContainer;
}
/**
* @private
* @param {?} event

@@ -920,6 +945,7 @@ * @param {?} clientX

{ type: NgZone },
{ type: ResizableDirective }
{ type: ResizableDirective, decorators: [{ type: Optional }] }
];
ResizeHandleDirective.propDecorators = {
resizeEdges: [{ type: Input }]
resizeEdges: [{ type: Input }],
resizableContainer: [{ type: Input }]
};

@@ -926,0 +952,0 @@

import { __assign, __read } from 'tslib';
import { isPlatformBrowser } from '@angular/common';
import { Directive, Renderer2, ElementRef, Output, Input, EventEmitter, NgZone, Inject, PLATFORM_ID, NgModule } from '@angular/core';
import { Directive, Renderer2, ElementRef, Output, Input, EventEmitter, NgZone, Inject, PLATFORM_ID, Optional, NgModule } from '@angular/core';
import { Subject, Observable, merge, EMPTY, fromEvent } from 'rxjs';

@@ -252,2 +252,7 @@ import { map, mergeMap, takeUntil, filter, pairwise, take, share, auditTime, switchMap, startWith, tap } from 'rxjs/operators';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -346,3 +351,9 @@ var ResizableDirective = /** @class */ (function () {

if (currentResize) {
event.preventDefault();
try {
event.preventDefault();
}
catch (e) {
// just adding try-catch not to see errors in console if there is a passive listener for same event somewhere
// browser does nothing except of writing errors to console
}
}

@@ -665,3 +676,4 @@ }), share());

{ type: Directive, args: [{
selector: '[mwlResizable]'
selector: '[mwlResizable]',
exportAs: 'mwlResizable'
},] }

@@ -831,9 +843,14 @@ ];

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/
var ResizeHandleDirective = /** @class */ (function () {
function ResizeHandleDirective(renderer, element, zone, resizable) {
function ResizeHandleDirective(renderer, element, zone, resizableDirective) {
this.renderer = renderer;
this.element = element;
this.zone = zone;
this.resizable = resizable;
this.resizableDirective = resizableDirective;
/**

@@ -940,2 +957,16 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

};
Object.defineProperty(ResizeHandleDirective.prototype, "resizable", {
// directive might be passed from DI or as an input
get:
// directive might be passed from DI or as an input
/**
* @private
* @return {?}
*/
function () {
return this.resizableDirective || this.resizableContainer;
},
enumerable: true,
configurable: true
});
/**

@@ -1003,6 +1034,7 @@ * @private

{ type: NgZone },
{ type: ResizableDirective }
{ type: ResizableDirective, decorators: [{ type: Optional }] }
]; };
ResizeHandleDirective.propDecorators = {
resizeEdges: [{ type: Input }]
resizeEdges: [{ type: Input }],
resizableContainer: [{ type: Input }]
};

@@ -1009,0 +1041,0 @@ return ResizeHandleDirective;

{
"name": "angular-resizable-element",
"version": "3.3.5",
"version": "3.4.0",
"description": "An angular 6.0+ directive that allows an element to be dragged and resized",

@@ -5,0 +5,0 @@ "repository": {

@@ -24,2 +24,7 @@ import { Renderer2, ElementRef, OnInit, EventEmitter, OnDestroy, NgZone, OnChanges, SimpleChanges } from '@angular/core';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -26,0 +31,0 @@ export declare class ResizableDirective implements OnInit, OnChanges, OnDestroy {

@@ -14,2 +14,7 @@ import { Renderer2, ElementRef, OnInit, OnDestroy, NgZone } from '@angular/core';

* ```
* Or in case they are sibling elements:
* ```html
* <div mwlResizable #resizableElement="mwlResizable"></div>
* <div mwlResizeHandle [resizableContainer]="resizableElement" [resizeEdges]="{bottom: true, right: true}"></div>
* ```
*/

@@ -20,3 +25,3 @@ export declare class ResizeHandleDirective implements OnInit, OnDestroy {

private zone;
private resizable;
private resizableDirective;
/**

@@ -26,5 +31,9 @@ * The `Edges` object that contains the edges of the parent element that dragging the handle will trigger a resize on

resizeEdges: Edges;
/**
* Reference to ResizableDirective in case if handle is not located inside of element with ResizableDirective
*/
resizableContainer: ResizableDirective;
private eventListeners;
private destroy$;
constructor(renderer: Renderer2, element: ElementRef, zone: NgZone, resizable: ResizableDirective);
constructor(renderer: Renderer2, element: ElementRef, zone: NgZone, resizableDirective: ResizableDirective);
ngOnInit(): void;

@@ -40,2 +49,3 @@ ngOnDestroy(): void;

onMouseup(clientX: number, clientY: number): void;
private readonly resizable;
private onMousemove;

@@ -42,0 +52,0 @@ private unsubscribeEventListeners;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc