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

@progress/kendo-react-popup

Package Overview
Dependencies
Maintainers
1
Versions
1239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-react-popup - npm Package Compare versions

Comparing version 2.2.0-dev.201810091020 to 2.2.0-dev.201810091021

2

dist/systemjs/kendo-react-popup.js

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

System.register("@progress/kendo-react-popup",["react","react-dom/server","react-dom","@progress/kendo-react-animation","@progress/kendo-react-common","prop-types","@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,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=2)}([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 o=n(3);e.Popup=o.default,function(t){for(var e in t)i(e,t[e])}(e)},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)}),h=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 m=n(4),v=n(5),r=n(6),a=n(7),g=n(8),y=n(9),w=n(0),l=n(10),s=n(11),p=n(12),c={left:-1e3,top:0},f="k-animation-container-shown",u=function(t){return v.findDOMNode(t)},d=function(e){function t(t){var a=e.call(this,t)||this;return a._exitingAnimation=!1,a._prevShow=!1,a._reposition=!1,a._element=null,a.onOpened=function(){var t=u(a);a._element=t,a.props.show&&t&&t.classList.add(f),a.attachRepositionHandlers(),a.props.open&&a.props.open.call(void 0,{target:a})},a.onClosing=function(){var t=u(a);!a.props.show&&t&&t.classList.remove(f),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:n,element:e,elementAlign:i,anchorAlign:o,offset:l});return a._positionService.positionElement({anchor:n,anchorAlign:o,collisions:r,element:e,currentLocation:s,elementAlign:i})},a._flipped=!1,a._offset=a.props.offset,a._prevShow=t.show,a._domService=new s.DOMService,a._alignService=new l.AlignService(a._domService),a._positionService=new p.PositionService(a._domService),a.onOpened=a.onOpened.bind(a),a.onClosing=a.onClosing.bind(a),a.reposition=w.throttle(a.reposition.bind(a),w.FRAME_DURATION),a}return i(t,e),t.prototype.componentDidUpdate=function(){this._prevShow=this.props.show,this._reposition=!1},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers(),this._element=null},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,s=t.appendTo,a=void 0===s?w.isWindowAvailable()?document.body:void 0:s;if(r){var p=this.calculatePosition(this.props,a);this._offset=p.offset,this._flipped=!!p.flipped}var c=this._flipped&&r?"up":"down",f=e?void 0:0,u=Object.assign({},this.props.style||{},h({},this._offset));if(this._exitingAnimation=this._exitingAnimation||this._prevShow&&!r,(r||this._exitingAnimation)&&a){var d=m.createElement(g.Slide,{componentChildClassName:y.classNames(i,"k-popup"),className:y.classNames(o),id:l,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:c,style:u,transitionEnterDuration:f,transitionExitDuration:f,appear:!0},r?n:null);return v.createPortal(d,a)}return null},t.prototype.calculatePosition=function(t,e){if(!e||!w.isWindowAvailable())return{flipped:!1,offset:t.offset};var n,o=document.createElement("div"),i=Object.assign({},t.style||{},h({visibility:"hidden"},c)),r=y.classNames("k-animation-container",f,t.className);if(e.appendChild(o),this._prevShow&&this._reposition&&this._element)n=m.createElement("div",{className:r,style:h({},i,{width:this._element.offsetWidth,height:this._element.offsetHeight})});else{var l=y.classNames(t.popupClass,"k-popup","k-child-animation-container");n=m.createElement("div",{className:r,style:i},m.Children.map(t.children,function(t,e){return m.createElement("div",{key:e,className:l},t)}))}o.innerHTML=a.renderToStaticMarkup(n);var s=this.position(t,o.firstChild,t.anchor);return o.parentNode.removeChild(o),s},t.prototype.attachRepositionHandlers=function(){this.detachRepositionHandlers(),window.addEventListener("resize",this.reposition),window.addEventListener("scroll",this.reposition,!0)},t.prototype.detachRepositionHandlers=function(){window.removeEventListener("resize",this.reposition),window.removeEventListener("scroll",this.reposition,!0)},t.prototype.reposition=function(t){"scroll"===t.type&&this._element&&this._element.contains(t.target)||(this.forceUpdate(),this._reposition=!0)},t.propTypes={anchor:function(t){var e=t.anchor;if(e&&"number"!=typeof e.nodeType)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)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([w.CollisionType.fit,w.CollisionType.flip]),vertical:r.oneOf([w.CollisionType.fit,w.CollisionType.flip])}),anchorAlign:r.shape({horizontal:r.oneOf([w.AlignPoint.left,w.AlignPoint.center,w.AlignPoint.right]),vertical:r.oneOf([w.AlignPoint.top,w.AlignPoint.center,w.AlignPoint.bottom])}),popupAlign:r.shape({horizontal:r.oneOf([w.AlignPoint.left,w.AlignPoint.center,w.AlignPoint.right]),vertical:r.oneOf([w.AlignPoint.top,w.AlignPoint.center,w.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:w.CollisionType.fit,vertical:w.CollisionType.flip},anchorAlign:{horizontal:w.AlignPoint.left,vertical:w.AlignPoint.bottom},popupAlign:{horizontal:w.AlignPoint.left,vertical:w.AlignPoint.top},offset:c,animate:!0,show:!1},t}(m.Component);e.default=d},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=a},function(t,e){t.exports=o},function(t,e){t.exports=l},function(t,e){t.exports=s},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,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 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}])}}});
System.register("@progress/kendo-react-popup",["prop-types","@progress/kendo-react-animation","react","@progress/kendo-react-common","react-dom","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,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=2)}([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 o=n(3);e.Popup=o.default,function(t){for(var e in t)i(e,t[e])}(e)},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)}),h=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 m=n(4),v=n(5),r=n(6),a=n(7),g=n(8),y=n(9),w=n(0),l=n(10),s=n(11),p=n(12),c={left:-1e3,top:0},f="k-animation-container-shown",u=function(t){return v.findDOMNode(t)},d=function(e){function t(t){var a=e.call(this,t)||this;return a._exitingAnimation=!1,a._prevShow=!1,a._reposition=!1,a._element=null,a.onOpened=function(){var t=u(a);a._element=t,a.props.show&&t&&t.classList.add(f),a.attachRepositionHandlers(),a.props.open&&a.props.open.call(void 0,{target:a})},a.onClosing=function(){var t=u(a);!a.props.show&&t&&t.classList.remove(f),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:n,element:e,elementAlign:i,anchorAlign:o,offset:l});return a._positionService.positionElement({anchor:n,anchorAlign:o,collisions:r,element:e,currentLocation:s,elementAlign:i})},a._flipped=!1,a._offset=a.props.offset,a._prevShow=t.show,a._domService=new s.DOMService,a._alignService=new l.AlignService(a._domService),a._positionService=new p.PositionService(a._domService),a.onOpened=a.onOpened.bind(a),a.onClosing=a.onClosing.bind(a),a.reposition=w.throttle(a.reposition.bind(a),w.FRAME_DURATION),a}return i(t,e),t.prototype.componentDidUpdate=function(){this._prevShow=this.props.show,this._reposition=!1},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers(),this._element=null},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,s=t.appendTo,a=void 0===s?w.isWindowAvailable()?document.body:void 0:s;if(r){var p=this.calculatePosition(this.props,a);this._offset=p.offset,this._flipped=!!p.flipped}var c=this._flipped&&r?"up":"down",f=e?void 0:0,u=Object.assign({},this.props.style||{},h({},this._offset));if(this._exitingAnimation=this._exitingAnimation||this._prevShow&&!r,(r||this._exitingAnimation)&&a){var d=m.createElement(g.Slide,{componentChildClassName:y.classNames(i,"k-popup"),className:y.classNames(o),id:l,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:c,style:u,transitionEnterDuration:f,transitionExitDuration:f,appear:!0},r?n:null);return v.createPortal(d,a)}return null},t.prototype.calculatePosition=function(t,e){if(!e||!w.isWindowAvailable())return{flipped:!1,offset:t.offset};var n,o=document.createElement("div"),i=Object.assign({},t.style||{},h({visibility:"hidden"},c)),r=y.classNames("k-animation-container",f,t.className);if(e.appendChild(o),this._prevShow&&this._reposition&&this._element)n=m.createElement("div",{className:r,style:h({},i,{width:this._element.offsetWidth,height:this._element.offsetHeight})});else{var l=y.classNames(t.popupClass,"k-popup","k-child-animation-container");n=m.createElement("div",{className:r,style:i},m.Children.map(t.children,function(t,e){return m.createElement("div",{key:e,className:l},t)}))}o.innerHTML=a.renderToStaticMarkup(n);var s=this.position(t,o.firstChild,t.anchor);return o.parentNode.removeChild(o),s},t.prototype.attachRepositionHandlers=function(){this.detachRepositionHandlers(),window.addEventListener("resize",this.reposition),window.addEventListener("scroll",this.reposition,!0)},t.prototype.detachRepositionHandlers=function(){window.removeEventListener("resize",this.reposition),window.removeEventListener("scroll",this.reposition,!0)},t.prototype.reposition=function(t){"scroll"===t.type&&this._element&&this._element.contains(t.target)||(this.forceUpdate(),this._reposition=!0)},t.propTypes={anchor:function(t){var e=t.anchor;if(e&&"number"!=typeof e.nodeType)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)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([w.CollisionType.fit,w.CollisionType.flip]),vertical:r.oneOf([w.CollisionType.fit,w.CollisionType.flip])}),anchorAlign:r.shape({horizontal:r.oneOf([w.AlignPoint.left,w.AlignPoint.center,w.AlignPoint.right]),vertical:r.oneOf([w.AlignPoint.top,w.AlignPoint.center,w.AlignPoint.bottom])}),popupAlign:r.shape({horizontal:r.oneOf([w.AlignPoint.left,w.AlignPoint.center,w.AlignPoint.right]),vertical:r.oneOf([w.AlignPoint.top,w.AlignPoint.center,w.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:w.CollisionType.fit,vertical:w.CollisionType.flip},anchorAlign:{horizontal:w.AlignPoint.left,vertical:w.AlignPoint.bottom},popupAlign:{horizontal:w.AlignPoint.left,vertical:w.AlignPoint.top},offset:c,animate:!0,show:!1},t}(m.Component);e.default=d},function(t,e){t.exports=r},function(t,e){t.exports=s},function(t,e){t.exports=n},function(t,e){t.exports=a},function(t,e){t.exports=o},function(t,e){t.exports=l},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,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 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}])}}});
{
"name": "@progress/kendo-react-popup",
"description": "KendoReact Popup package",
"version": "2.2.0-dev.201810091020",
"version": "2.2.0-dev.201810091021",
"repository": {

@@ -31,4 +31,4 @@ "type": "git",

"@progress/kendo-popup-common": "^1.2.2",
"@progress/kendo-react-animation": "2.2.0-dev.201810091020",
"@progress/kendo-react-common": "2.2.0-dev.201810091020",
"@progress/kendo-react-animation": "2.2.0-dev.201810091021",
"@progress/kendo-react-common": "2.2.0-dev.201810091021",
"prop-types": "^15.6.0"

@@ -35,0 +35,0 @@ },

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