@progress/kendo-react-popup
Advanced tools
Comparing version 0.5.1 to 0.6.0-dev.201804101306
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-react-popup",["react","@progress/kendo-react-animation","react-dom","prop-types","@progress/kendo-react-common","react-dom/server","@progress/kendo-popup-common"],function(i){var n,o,r,l,s,a,p;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){n=e(t)},function(t){o=e(t)},function(t){r=e(t)},function(t){l=e(t)},function(t){s=e(t)},function(t){a=e(t)},function(t){p=e(t)}],execute:function(){!function(n){var o={};function i(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=n,i.c=o,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=e(1);r.eitherRect=function(t,e){return t||{height:0,left:e.left,top:e.top,width:0}},r.replaceOffset=function(t,e){return e?{height:t.height,left:e.left,top:e.top,width:t.width}:t},r.removeStackingOffset=function(t,e){return e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t},r.isDifferentOffset=function(t,e){var n=t.left,o=t.top,i=e.left,r=e.top;return 1<=Math.abs(n-i)||1<=Math.abs(o-r)},r.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},r.isWindowAvailable=function(){return"undefined"!=typeof window},r.hasBoundingRect=function(t){return!!t.getBoundingClientRect},r.OVERFLOW_REGEXP=/auto|scroll/;r.scrollableParents=function(t){var e,n,o=[];if(!r.isDocumentAvailable()||!r.isWindowAvailable())return o;for(var i=t.parentElement;i;)r.OVERFLOW_REGEXP.test((e=i,void 0,""+(n=window.getComputedStyle(e)).overflow+n.overflowX+n.overflowY))&&o.push(i),i=i.parentElement;return o.push(window),o},r.FRAME_DURATION=1e3/60,r.hasRelativeStackingContext=function(){if(!r.isDocumentAvailable())return!1;var t=document.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(t);var e=10!==t.children[0].getBoundingClientRect().top;return document.body.removeChild(t),e},r.HAS_RELATIVE_STACKING_CONTEXT=r.hasRelativeStackingContext(),r.zIndex=function(t,e){if(!t||!r.isDocumentAvailable()||!r.isWindowAvailable())return null;var n=i.siblingContainer(t,e);if(!n)return null;var o=[t].concat(i.parents(t,n)).reduce(function(t,e){var n=e.style.zIndex||window.getComputedStyle(e).zIndex,o=parseInt(n,10);return t<o?o:t},0);return o?o+1:null},r.CollisionType={fit:"fit",flip:"flip"},r.AlignPoint={left:"left",center:"center",right:"right",bottom:"bottom",top:"top"},r.throttle=function(n,o,i){var r,l,s,a;void 0===i&&(i={});var p=0;i=i||{};var c=function(){p=!1===i.leading?0:(new Date).getTime(),r=null,a=n.apply(l,s),r||(l=s=null)};return function(){var t=(new Date).getTime();p||!1!==i.leading||(p=t);var e=o-(t-p);return l=this,s=arguments,e<=0||o<e?(r&&(clearTimeout(r),r=null),p=t,a=n.apply(l,s),r||(l=s=null)):r||!1===i.trailing||(r=setTimeout(c,e)),a}}},function(t,e){t.exports=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var d=n(0),o=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,n=t.currentLocation,o=t.element,i=t.anchorAlign,r=t.elementAlign,l=t.collisions,s=this._dom,a=t.viewPort||s.stackingElementViewPort(o)||s.windowViewPort(o),p=d.eitherRect(s.offset(e),n),c=d.replaceOffset(s.staticOffset(o),n),f=this.elementRect(o,c),u=s.restrictToView({anchorAlign:i,anchorRect:p,collisions:l,elementAlign:r,elementRect:f,viewPort:a});return{flipped:u.flipped,offset:s.addOffset(c,u.offset)}},t.prototype.elementRect=function(t,e){return this._dom.removeScroll(e,this._dom.scrollPosition(t))},t}();e.PositionService=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(0),i=function(){function t(){}return t.prototype.addOffset=function(t,e){return{left:t.left+e.left,top:t.top+e.top}},t.prototype.align=function(t){return r.align(t)},t.prototype.boundingOffset=function(t){return r.boundingOffset(t)},t.prototype.getWindow=function(){return o.isWindowAvailable()?window:null},t.prototype.isBodyOffset=function(t){return r.isBodyOffset(t)},t.prototype.hasOffsetParent=function(t){if(!t)return!1;var e=t.offsetParent;return e&&!("BODY"===e.nodeName&&"static"===window.getComputedStyle(e).position)},t.prototype.offset=function(t){return t?r.offset(t):null},t.prototype.staticOffset=function(t){if(!t)return null;var e=t.style,n=e.left,o=e.top;t.style.left="0px",t.style.top="0px";var i=r.offset(t);return t.style.left=n,t.style.top=o,i},t.prototype.position=function(t,e){if(!t||!e)return null;var n=r.siblingContainer(t,e);return r.positionWithScroll(t,n)},t.prototype.relativeOffset=function(t,e){return r.applyLocationOffset(this.offset(t),e,this.isBodyOffset(t))},t.prototype.addScroll=function(t,e){return r.addScroll(t,e)},t.prototype.removeScroll=function(t,e){return r.removeScroll(t,e)},t.prototype.restrictToView=function(t){return r.restrictToView(t)},t.prototype.scrollPosition=function(t){return r.scrollPosition(t)},t.prototype.scrollableParents=function(t){return o.scrollableParents(t)},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?r.offset(e):null},t.prototype.stackingElementScroll=function(t){var e=this.getRelativeContextElement(t);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},t.prototype.stackingElementViewPort=function(t){var e=this.getRelativeContextElement(t);return e?{height:e.scrollHeight,width:e.scrollWidth}:null},t.prototype.getRelativeContextElement=function(t){if(!t||!o.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var e=t.parentElement;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null},t.prototype.useRelativePosition=function(t){return!!this.getRelativeContextElement(t)},t.prototype.windowViewPort=function(t){return r.getWindowViewPort(t)},t.prototype.zIndex=function(t,e){return o.zIndex(t,e)},t.prototype.zoomLevel=function(){return o.isDocumentAvailable()&&o.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1},t.prototype.isZoomed=function(){return 1<this.zoomLevel()},t}();e.DOMService=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(0),o=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,n=t.element,o=t.anchorAlign,i=t.elementAlign,r=t.offset,l=this._dom.hasOffsetParent(n)?this.relativeRect(e,n,r):this.absoluteRect(e,n,r);return this._dom.align({anchorAlign:o,anchorRect:l,elementAlign:i,elementRect:this._dom.offset(n)})},t.prototype.absoluteRect=function(t,e,n){var o=this._dom,i=f.eitherRect(o.offset(t),n),r=o.stackingElementOffset(e),l=f.removeStackingOffset(i,r),s=o.stackingElementScroll(e),a=o.addScroll(l,s),p=this.elementScrollPosition(t,e),c=o.removeScroll(a,p);return c.left+=window.scrollX||window.pageXOffset,c.top+=window.scrollY||window.pageYOffset,c},t.prototype.elementScrollPosition=function(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)},t.prototype.relativeRect=function(t,e,n){return f.eitherRect(this._dom.position(t,e),n)},t}();e.AlignService=o},function(t,e){t.exports=s},function(t,e){t.exports=o},function(t,e){t.exports=a},function(t,e){t.exports=l},function(t,e){t.exports=r},function(t,e){t.exports=n},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=this&&this.__assign||Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var d=n(10),h=n(9),r=n(8),s=n(7),m=n(6),v=n(5),l=n(0),p=n(4),c=n(3),f=n(2),a={left:-1e3,top:0},g="k-animation-container-shown",y=function(t){return h.findDOMNode(t)},_=function(e){function t(t){var a=e.call(this,t)||this;return a._exitingAnimation=!1,a.onOpened=function(){var t=y(a);a.props.show&&t.classList.add(g),a.attachRepositionHandlers(t),a.props.open&&a.props.open.call(void 0,{target:a})},a.onClosing=function(){a.props.show||y(a).classList.remove(g),a.detachRepositionHandlers()},a.onClosed=function(){a._exitingAnimation&&(a._exitingAnimation=!1,a.forceUpdate()),a.props.close&&a.props.close.call(void 0,{target:a})},a.position=function(t,e,n){var o=t.anchorAlign,i=t.popupAlign,r=t.collision,l=t.offset,s=a._alignService.alignElement({anchor:e,element:n,elementAlign:i,anchorAlign:o,offset:l});return a._positionService.positionElement({anchor:e,anchorAlign:o,collisions:r,element:n,currentLocation:s,elementAlign:i})},a._flipped=!1,a._offset=a.props.offset,a._appendTo=document?document.body:null,a._domService=new c.DOMService,a._alignService=new p.AlignService(a._domService),a._positionService=new f.PositionService(a._domService),a.onOpened=a.onOpened.bind(a),a.onClosing=a.onClosing.bind(a),a.reposition=l.throttle(a.reposition.bind(a),l.FRAME_DURATION),a}return i(t,e),t.prototype.componentWillReceiveProps=function(t){this.getDomElements(t),this._exitingAnimation=t.animate&&this.props.show&&!t.show},t.prototype.componentWillMount=function(){this.getDomElements(this.props)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers(),delete this._anchorElement,delete this._appendTo},t.prototype.render=function(){var t=this.props,e=t.animate,n=t.children,o=t.className,i=t.popupClass,r=t.show,l=t.id;if(r){var s=this.calculatePosition(this._anchorElement,this.props);this._offset=s.offset,this._flipped=!!s.flipped}var a=this._flipped&&r?"up":"down",p=e?void 0:0,c=Object.assign({},this.props.style||{},u({},this._offset));if((r||this._exitingAnimation)&&this._appendTo){var f=d.createElement(m.Slide,{componentChildClassName:v.classNames(i,"k-popup"),className:v.classNames(o),id:l,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:a,style:c,transitionEnterDuration:p,transitionExitDuration:p,appear:!0},r?n:null);return h.createPortal(f,this._appendTo)}return null},t.prototype.calculatePosition=function(t,e){if(!this._appendTo)return{flipped:!1,offset:this.props.offset};var n=document.createElement("div");this._appendTo.appendChild(n);var o=Object.assign({},e.style||{},u({visibility:"hidden"},a)),i={className:v.classNames(e.popupClass,"k-popup","k-child-animation-container")},r=d.createElement("div",{className:v.classNames("k-animation-container",g,e.className),style:o},d.Children.map(e.children,function(t,e){return d.createElement("div",u({key:e},i),t)}));n.innerHTML=s.renderToStaticMarkup(r);var l=this.position(e,t,n.firstChild);return n.parentNode.removeChild(n),l},t.prototype.attachRepositionHandlers=function(t){var e=this;this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this._anchorElement||t),this._scrollableParents.map(function(t){return t.addEventListener("scroll",e.reposition)}),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map(function(t){return t.removeEventListener("scroll",e.reposition)}),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.forceUpdate()},t.prototype.getDomElements=function(t){this._appendTo=y(t.appendTo)||(document?document.body:null),this._anchorElement=y(t.anchor)},t.propTypes={anchor:function(t){var e=t.anchor;if(e&&"number"!=typeof e.nodeType&&!e.isReactComponent)return new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed.")},appendTo:function(t){var e=t.appendTo;if(e&&"number"!=typeof e.nodeType&&!e.isReactComponent)return new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed.")},className:r.string,id:r.string,popupClass:r.string,collision:r.shape({horizontal:r.oneOf([l.CollisionType.fit,l.CollisionType.flip]),vertical:r.oneOf([l.CollisionType.fit,l.CollisionType.flip])}),anchorAlign:r.shape({horizontal:r.oneOf([l.AlignPoint.left,l.AlignPoint.center,l.AlignPoint.right]),vertical:r.oneOf([l.AlignPoint.top,l.AlignPoint.center,l.AlignPoint.bottom])}),popupAlign:r.shape({horizontal:r.oneOf([l.AlignPoint.left,l.AlignPoint.center,l.AlignPoint.right]),vertical:r.oneOf([l.AlignPoint.top,l.AlignPoint.center,l.AlignPoint.bottom])}),offset:r.shape({left:r.number,top:r.number}),children:r.oneOfType([r.element,r.node]),show:r.bool,animate:r.bool},t.defaultProps={collision:{horizontal:l.CollisionType.fit,vertical:l.CollisionType.flip},anchorAlign:{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.bottom},popupAlign:{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.top},offset:a,animate:!0,show:!1},t}(d.Component);e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(11);e.Popup=o.default,function(t){for(var e in t)i(e,t[e])}(e)}])}}}); | ||
System.register("@progress/kendo-react-popup",["react","react-dom","prop-types","react-dom/server","@progress/kendo-react-animation","@progress/kendo-react-common","@progress/kendo-popup-common"],function(i){var n,o,r,l,s,a,p;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){n=e(t)},function(t){o=e(t)},function(t){r=e(t)},function(t){l=e(t)},function(t){s=e(t)},function(t){a=e(t)},function(t){p=e(t)}],execute:function(){!function(n){var o={};function i(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=n,i.c=o,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=e(1);r.eitherRect=function(t,e){return t||{height:0,left:e.left,top:e.top,width:0}},r.replaceOffset=function(t,e){return e?{height:t.height,left:e.left,top:e.top,width:t.width}:t},r.removeStackingOffset=function(t,e){return e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t},r.isDifferentOffset=function(t,e){var n=t.left,o=t.top,i=e.left,r=e.top;return 1<=Math.abs(n-i)||1<=Math.abs(o-r)},r.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},r.isWindowAvailable=function(){return"undefined"!=typeof window},r.hasBoundingRect=function(t){return!!t.getBoundingClientRect},r.OVERFLOW_REGEXP=/auto|scroll/;r.scrollableParents=function(t){var e,n,o=[];if(!r.isDocumentAvailable()||!r.isWindowAvailable())return o;for(var i=t.parentElement;i;)r.OVERFLOW_REGEXP.test((e=i,void 0,""+(n=window.getComputedStyle(e)).overflow+n.overflowX+n.overflowY))&&o.push(i),i=i.parentElement;return o.push(window),o},r.FRAME_DURATION=1e3/60,r.hasRelativeStackingContext=function(){if(!r.isDocumentAvailable())return!1;var t=document.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(t);var e=10!==t.children[0].getBoundingClientRect().top;return document.body.removeChild(t),e},r.HAS_RELATIVE_STACKING_CONTEXT=r.hasRelativeStackingContext(),r.zIndex=function(t,e){if(!t||!r.isDocumentAvailable()||!r.isWindowAvailable())return null;var n=i.siblingContainer(t,e);if(!n)return null;var o=[t].concat(i.parents(t,n)).reduce(function(t,e){var n=e.style.zIndex||window.getComputedStyle(e).zIndex,o=parseInt(n,10);return t<o?o:t},0);return o?o+1:null},r.CollisionType={fit:"fit",flip:"flip"},r.AlignPoint={left:"left",center:"center",right:"right",bottom:"bottom",top:"top"},r.throttle=function(n,o,i){var r,l,s,a;void 0===i&&(i={});var p=0;i=i||{};var c=function(){p=!1===i.leading?0:(new Date).getTime(),r=null,a=n.apply(l,s),r||(l=s=null)};return function(){var t=(new Date).getTime();p||!1!==i.leading||(p=t);var e=o-(t-p);return l=this,s=arguments,e<=0||o<e?(r&&(clearTimeout(r),r=null),p=t,a=n.apply(l,s),r||(l=s=null)):r||!1===i.trailing||(r=setTimeout(c,e)),a}}},function(t,e){t.exports=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var d=n(0),o=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,n=t.currentLocation,o=t.element,i=t.anchorAlign,r=t.elementAlign,l=t.collisions,s=this._dom,a=t.viewPort||s.stackingElementViewPort(o)||s.windowViewPort(o),p=d.eitherRect(s.offset(e),n),c=d.replaceOffset(s.staticOffset(o),n),f=this.elementRect(o,c),u=s.restrictToView({anchorAlign:i,anchorRect:p,collisions:l,elementAlign:r,elementRect:f,viewPort:a});return{flipped:u.flipped,offset:s.addOffset(c,u.offset)}},t.prototype.elementRect=function(t,e){return this._dom.removeScroll(e,this._dom.scrollPosition(t))},t}();e.PositionService=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(0),i=function(){function t(){}return t.prototype.addOffset=function(t,e){return{left:t.left+e.left,top:t.top+e.top}},t.prototype.align=function(t){return r.align(t)},t.prototype.boundingOffset=function(t){return r.boundingOffset(t)},t.prototype.getWindow=function(){return o.isWindowAvailable()?window:null},t.prototype.isBodyOffset=function(t){return r.isBodyOffset(t)},t.prototype.hasOffsetParent=function(t){if(!t)return!1;var e=t.offsetParent;return e&&!("BODY"===e.nodeName&&"static"===window.getComputedStyle(e).position)},t.prototype.offset=function(t){return t?r.offset(t):null},t.prototype.staticOffset=function(t){if(!t)return null;var e=t.style,n=e.left,o=e.top;t.style.left="0px",t.style.top="0px";var i=r.offset(t);return t.style.left=n,t.style.top=o,i},t.prototype.position=function(t,e){if(!t||!e)return null;var n=r.siblingContainer(t,e);return r.positionWithScroll(t,n)},t.prototype.relativeOffset=function(t,e){return r.applyLocationOffset(this.offset(t),e,this.isBodyOffset(t))},t.prototype.addScroll=function(t,e){return r.addScroll(t,e)},t.prototype.removeScroll=function(t,e){return r.removeScroll(t,e)},t.prototype.restrictToView=function(t){return r.restrictToView(t)},t.prototype.scrollPosition=function(t){return r.scrollPosition(t)},t.prototype.scrollableParents=function(t){return o.scrollableParents(t)},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?r.offset(e):null},t.prototype.stackingElementScroll=function(t){var e=this.getRelativeContextElement(t);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},t.prototype.stackingElementViewPort=function(t){var e=this.getRelativeContextElement(t);return e?{height:e.scrollHeight,width:e.scrollWidth}:null},t.prototype.getRelativeContextElement=function(t){if(!t||!o.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var e=t.parentElement;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null},t.prototype.useRelativePosition=function(t){return!!this.getRelativeContextElement(t)},t.prototype.windowViewPort=function(t){return r.getWindowViewPort(t)},t.prototype.zIndex=function(t,e){return o.zIndex(t,e)},t.prototype.zoomLevel=function(){return o.isDocumentAvailable()&&o.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1},t.prototype.isZoomed=function(){return 1<this.zoomLevel()},t}();e.DOMService=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(0),o=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,n=t.element,o=t.anchorAlign,i=t.elementAlign,r=t.offset,l=this._dom.hasOffsetParent(n)?this.relativeRect(e,n,r):this.absoluteRect(e,n,r);return this._dom.align({anchorAlign:o,anchorRect:l,elementAlign:i,elementRect:this._dom.offset(n)})},t.prototype.absoluteRect=function(t,e,n){var o=this._dom,i=f.eitherRect(o.offset(t),n),r=o.stackingElementOffset(e),l=f.removeStackingOffset(i,r),s=o.stackingElementScroll(e),a=o.addScroll(l,s),p=this.elementScrollPosition(t,e),c=o.removeScroll(a,p);return c.left+=window.scrollX||window.pageXOffset,c.top+=window.scrollY||window.pageYOffset,c},t.prototype.elementScrollPosition=function(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)},t.prototype.relativeRect=function(t,e,n){return f.eitherRect(this._dom.position(t,e),n)},t}();e.AlignService=o},function(t,e){t.exports=a},function(t,e){t.exports=s},function(t,e){t.exports=l},function(t,e){t.exports=r},function(t,e){t.exports=o},function(t,e){t.exports=n},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=this&&this.__assign||Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var d=n(10),h=n(9),r=n(8),s=n(7),m=n(6),v=n(5),l=n(0),p=n(4),c=n(3),f=n(2),a={left:-1e3,top:0},g="k-animation-container-shown",y=function(t){return h.findDOMNode(t)},_=function(e){function t(t){var a=e.call(this,t)||this;return a._exitingAnimation=!1,a.onOpened=function(){var t=y(a);a.props.show&&t.classList.add(g),a.attachRepositionHandlers(t),a.props.open&&a.props.open.call(void 0,{target:a})},a.onClosing=function(){a.props.show||y(a).classList.remove(g),a.detachRepositionHandlers()},a.onClosed=function(){a._exitingAnimation&&(a._exitingAnimation=!1,a.forceUpdate()),a.props.close&&a.props.close.call(void 0,{target:a})},a.position=function(t,e,n){var o=t.anchorAlign,i=t.popupAlign,r=t.collision,l=t.offset,s=a._alignService.alignElement({anchor:e,element:n,elementAlign:i,anchorAlign:o,offset:l});return a._positionService.positionElement({anchor:e,anchorAlign:o,collisions:r,element:n,currentLocation:s,elementAlign:i})},a._flipped=!1,a._offset=a.props.offset,a._appendTo=document?document.body:null,a._domService=new c.DOMService,a._alignService=new p.AlignService(a._domService),a._positionService=new f.PositionService(a._domService),a.onOpened=a.onOpened.bind(a),a.onClosing=a.onClosing.bind(a),a.reposition=l.throttle(a.reposition.bind(a),l.FRAME_DURATION),a}return i(t,e),t.prototype.componentWillReceiveProps=function(t){this.getDomElements(t),this._exitingAnimation=t.animate&&this.props.show&&!t.show},t.prototype.componentWillMount=function(){this.getDomElements(this.props)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers(),delete this._anchorElement,delete this._appendTo},t.prototype.render=function(){var t=this.props,e=t.animate,n=t.children,o=t.className,i=t.popupClass,r=t.show,l=t.id;if(r){var s=this.calculatePosition(this._anchorElement,this.props);this._offset=s.offset,this._flipped=!!s.flipped}var a=this._flipped&&r?"up":"down",p=e?void 0:0,c=Object.assign({},this.props.style||{},u({},this._offset));if((r||this._exitingAnimation)&&this._appendTo){var f=d.createElement(m.Slide,{componentChildClassName:v.classNames(i,"k-popup"),className:v.classNames(o),id:l,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:a,style:c,transitionEnterDuration:p,transitionExitDuration:p,appear:!0},r?n:null);return h.createPortal(f,this._appendTo)}return null},t.prototype.calculatePosition=function(t,e){if(!this._appendTo)return{flipped:!1,offset:this.props.offset};var n=document.createElement("div");this._appendTo.appendChild(n);var o=Object.assign({},e.style||{},u({visibility:"hidden"},a)),i={className:v.classNames(e.popupClass,"k-popup","k-child-animation-container")},r=d.createElement("div",{className:v.classNames("k-animation-container",g,e.className),style:o},d.Children.map(e.children,function(t,e){return d.createElement("div",u({key:e},i),t)}));n.innerHTML=s.renderToStaticMarkup(r);var l=this.position(e,t,n.firstChild);return n.parentNode.removeChild(n),l},t.prototype.attachRepositionHandlers=function(t){var e=this;this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this._anchorElement||t),this._scrollableParents.map(function(t){return t.addEventListener("scroll",e.reposition)}),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map(function(t){return t.removeEventListener("scroll",e.reposition)}),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.forceUpdate()},t.prototype.getDomElements=function(t){this._appendTo=y(t.appendTo)||(document?document.body:null),this._anchorElement=y(t.anchor)},t.propTypes={anchor:function(t){var e=t.anchor;if(e&&"number"!=typeof e.nodeType&&!e.isReactComponent)return new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed.")},appendTo:function(t){var e=t.appendTo;if(e&&"number"!=typeof e.nodeType&&!e.isReactComponent)return new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed.")},className:r.string,id:r.string,popupClass:r.string,collision:r.shape({horizontal:r.oneOf([l.CollisionType.fit,l.CollisionType.flip]),vertical:r.oneOf([l.CollisionType.fit,l.CollisionType.flip])}),anchorAlign:r.shape({horizontal:r.oneOf([l.AlignPoint.left,l.AlignPoint.center,l.AlignPoint.right]),vertical:r.oneOf([l.AlignPoint.top,l.AlignPoint.center,l.AlignPoint.bottom])}),popupAlign:r.shape({horizontal:r.oneOf([l.AlignPoint.left,l.AlignPoint.center,l.AlignPoint.right]),vertical:r.oneOf([l.AlignPoint.top,l.AlignPoint.center,l.AlignPoint.bottom])}),offset:r.shape({left:r.number,top:r.number}),children:r.oneOfType([r.element,r.node]),show:r.bool,animate:r.bool},t.defaultProps={collision:{horizontal:l.CollisionType.fit,vertical:l.CollisionType.flip},anchorAlign:{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.bottom},popupAlign:{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.top},offset:a,animate:!0,show:!1},t}(d.Component);e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(11);e.Popup=o.default,function(t){for(var e in t)i(e,t[e])}(e)}])}}}); |
{ | ||
"name": "@progress/kendo-react-popup", | ||
"description": "Kendo UI for React Popup package", | ||
"version": "0.5.1", | ||
"version": "0.6.0-dev.201804101306", | ||
"repository": { | ||
@@ -31,4 +31,4 @@ "type": "git", | ||
"@progress/kendo-popup-common": "^1.2.2", | ||
"@progress/kendo-react-animation": "0.5.1", | ||
"@progress/kendo-react-common": "0.5.1", | ||
"@progress/kendo-react-animation": "0.6.0-dev.201804101306", | ||
"@progress/kendo-react-common": "0.6.0-dev.201804101306", | ||
"prop-types": "^15.6.0" | ||
@@ -35,0 +35,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177672
+ Added@progress/kendo-react-animation@0.6.0-dev.201804101306(transitive)
+ Added@progress/kendo-react-common@0.6.0-dev.201804101306(transitive)
- Removed@progress/kendo-react-animation@0.5.1(transitive)
- Removed@progress/kendo-react-common@0.5.1(transitive)
Updated@progress/kendo-react-animation@0.6.0-dev.201804101306