@progress/kendo-react-dialogs 2.11.0-dev.201905141017 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register("@progress/kendo-react-dialogs",["react","@progress/kendo-react-common","prop-types"],function(a){var r,s,l;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){s=t(e)},function(e){l=t(e)}],execute:function(){function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,o;o={},i.m=n=[function(e,t){e.exports=r},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.DialogActionsBar=function(e){var t=e.children;return o.createElement("div",{className:"k-dialog-buttongroup k-dialog-button-layout-stretched"},t)}},function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.windowStage||(t.windowStage={})).DEFAULT="DEFAULT",o.FULLSCREEN="FULLSCREEN",o.MINIMIZED="MINIMIZED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6);t.Dialog=o.Dialog;var i=n(3);t.DialogActionsBar=i.DialogActionsBar;var r=n(8);t.Window=r.Window,function(e){for(var t in e)a(t,e[t])}(t)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r,w=n(0),a=n(2),f=n(7),s=n(3),l=n(1),d=(r=w.Component,i(p,r),p.prototype.render=function(){var e=void 0!==this.props.id?this.props.id:this.titleId,t=this.props,n=t.title,o=t.width,i=t.height,r=t.children,a=t.minWidth,s=t.dir,l=t.style,d=w.Children.toArray(r),p=this.getContent(d),c=this.getActionBar(d),u=n?{"aria-labelledby":e}:null,h=void 0===this.props.closeIcon||this.props.closeIcon;return w.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:s,style:l},w.createElement("div",{className:"k-overlay"}),w.createElement("div",g({},u,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:i,minWidth:a}}),this.props.title&&w.createElement(f.DialogTitleBar,{closeIcon:h,onCloseButtonClick:this.handleCloseDialog,id:e},n),w.createElement("div",{className:"k-content k-window-content k-dialog-content"},p),c))},p.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===s.DialogActionsBar})},p.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==s.DialogActionsBar})},p.prototype.generateTitleId=function(){return"dialog-title"+l.guid()},p.propTypes={title:a.any,id:a.string,dir:a.string,style:a.object,closeIcon:a.bool,width:a.oneOfType([a.number,a.string]),height:a.oneOfType([a.number,a.string]),minWidth:a.oneOfType([a.number,a.string])},p);function p(){var t=null!==r&&r.apply(this,arguments)||this;return t.titleId=t.generateTitleId(),t.handleCloseDialog=function(e){e.preventDefault(),l.dispatchEvent(t.props.onClose,e,t,void 0)},t.handleKeyDown=function(e){e.keyCode===l.Keys.esc&&t.props.onClose&&(e.preventDefault(),t.handleCloseDialog(e))},t}t.Dialog=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement("a",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close"},r.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var a,s=n(0),l=n(2),d=n(9),p=n(1),c=n(1),u=n(10),h=n(11),g=n(4),w=(a=s.Component,i(f,a),f.prototype.componentDidMount=function(){window&&window.addEventListener("resize",this.handleBrowserWindowResize)},f.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},f.prototype.render=function(){var t=this;return s.createElement("div",{tabIndex:0,onFocus:function(e){return e.target.classList.add("k-state-focused")},onBlur:function(e){return e.target.classList.remove("k-state-focused")},onKeyDown:this.handleKeyDown,ref:function(e){return t.windowElement=e},className:"k-widget k-window k-window-wrapper",style:r({top:this.top,left:this.left,width:this.width,height:this.height||""},this.props.style)},s.createElement(h.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},s.createElement(c.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},s.createElement(d.WindowTitleBar,{stage:this.windowStage,onDoubleClick:this.handleDoubleClick,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow},this.props.title)),this.windowStage!==g.windowStage.MINIMIZED?s.createElement("div",{className:"k-content k-window-content"},this.props.children):null,this.windowStage===g.windowStage.DEFAULT&&this.props.resizable?s.createElement(u.ResizeHandlers,{onResize:this.handleResize}):null))},Object.defineProperty(f.prototype,"top",{get:function(){return this.windowStage!==g.windowStage.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"left",{get:function(){return this.windowStage!==g.windowStage.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"width",{get:function(){var e=this.props.width||this.state.width;return this.windowStage===g.windowStage.FULLSCREEN&&(e=window.innerWidth),e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"height",{get:function(){var e=this.props.height||this.state.height;return this.windowStage===g.windowStage.FULLSCREEN?e=window.innerHeight:this.windowStage===g.windowStage.MINIMIZED&&(e=0),e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),f.propTypes={id:l.string,width:l.oneOfType([l.number,l.string]),height:l.oneOfType([l.number,l.string]),left:l.oneOfType([l.number,l.string]),top:l.oneOfType([l.number,l.string]),initialwidth:l.oneOfType([l.number,l.string]),initialHeight:l.oneOfType([l.number,l.string]),initialLeft:l.oneOfType([l.number,l.string]),initialTop:l.oneOfType([l.number,l.string]),minWidth:l.oneOfType([l.number,l.string]),minHeight:l.oneOfType([l.number,l.string]),resizable:l.bool,draggable:l.bool,title:l.any,shouldUpdateOnDrag:l.bool,stage:l.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"])},f.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0},f);function f(e){var c=a.call(this,e)||this;return c.onPress=function(e){var t=e.event;c.windowCoordinatesState.differenceLeft=t.pageX-c.left,c.windowCoordinatesState.differenceTop=t.pageY-c.top},c.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),c.windowStage!==g.windowStage.FULLSCREEN&&c.props.draggable&&(c.setState({top:Math.max(t.pageY-c.windowCoordinatesState.differenceTop,0),left:t.pageX-c.windowCoordinatesState.differenceLeft,isDragging:!0}),c.props.onMove&&c.dispatchMoveEvent(c.props.onMove,t,!0,!1))},c.onRelease=function(e){var t=e.event;c.windowStage!==g.windowStage.FULLSCREEN&&c.props.draggable&&c.props.onMove&&c.dispatchMoveEvent(c.props.onMove,t,!0,!0),c.setState({isDragging:!1})},c.handleKeyDown=function(e){if(e.target===e.currentTarget){var t=c.props.minWidth||120,n=c.props.minHeight||100;if(e.ctrlKey&&c.props.resizable){switch(e.keyCode){case p.Keys.up:e.preventDefault(),n<=c.height-5&&c.setState({height:c.height-5});break;case p.Keys.down:e.preventDefault(),c.setState({height:c.height+5});break;case p.Keys.left:t<=c.width-5&&c.setState({width:c.width-5});break;case p.Keys.right:c.setState({width:c.width+5});break;default:return}c.dispatchMoveEvent(c.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case p.Keys.up:c.windowStage===g.windowStage.MINIMIZED?(c.handleRestore(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:g.windowStage.DEFAULT})):c.windowStage===g.windowStage.DEFAULT&&(c.handleFullscreen(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:g.windowStage.FULLSCREEN}));break;case p.Keys.down:c.windowStage===g.windowStage.FULLSCREEN?(c.handleRestore(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:"DEFAULT"})):c.windowStage===g.windowStage.DEFAULT&&(c.handleMinimize(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:"MINIMIZED"}))}else{if(!e.ctrlKey)switch(e.keyCode){case p.Keys.esc:return void(c.props.onClose&&(e.preventDefault(),c.handleCloseWindow(e),p.dispatchEvent(c.props.onClose,e,c,void 0)));case p.Keys.up:c.setState({top:c.state.top-5});break;case p.Keys.down:c.setState({top:c.state.top+5});break;case p.Keys.left:c.setState({left:c.state.left-5});break;case p.Keys.right:c.setState({left:c.state.left+5});break;default:return}c.dispatchMoveEvent(c.props.onMove,e,!1,void 0)}}},c.getInitialTop=function(){return c.props.height?window.innerHeight/2-c.props.height/2:window.innerHeight/2-150},c.getInitialLeft=function(){return window.innerWidth/2-(void 0!==c.props.width?c.props.width:300)/2},c.handleMinimize=function(e){e.preventDefault(),c.setState({stage:g.windowStage.MINIMIZED,height:0}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"MINIMIZED"})},c.handleFullscreen=function(e){e.preventDefault(),c.windowCoordinatesState.leftBeforeAction=c.left,c.windowCoordinatesState.topBeforeAction=c.top,c.windowCoordinatesState.widthBeforeAction=c.width,c.windowCoordinatesState.heightBeforeAction=c.height,c.setState({left:0,top:0,width:window.innerWidth,height:window.innerHeight,stage:g.windowStage.FULLSCREEN}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"FULLSCREEN"})},c.handleRestore=function(e){e.preventDefault(),c.windowStage===g.windowStage.FULLSCREEN?c.setState({stage:g.windowStage.DEFAULT,left:c.windowCoordinatesState.leftBeforeAction,top:c.windowCoordinatesState.topBeforeAction,width:c.windowCoordinatesState.widthBeforeAction,height:c.windowCoordinatesState.heightBeforeAction}):c.windowStage===g.windowStage.MINIMIZED&&c.setState({stage:g.windowStage.DEFAULT,height:c.windowCoordinatesState.heightBeforeAction}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"DEFAULT"})},c.handleCloseWindow=function(e){e.preventDefault(),p.dispatchEvent(c.props.onClose,e,c,void 0)},c.handleDoubleClick=function(e){c.windowStage===g.windowStage.FULLSCREEN||c.windowStage===g.windowStage.MINIMIZED?c.handleRestore(e):c.handleFullscreen(e)},c.handleResize=function(e,t){var n=c.width,o=c.height,i=c.props.minWidth||120,r=c.props.minHeight||100,a=c.top-e.pageY,s=c.left-e.pageX,l=e.pageX-c.left,d=e.pageY-c.top,p=Object.assign({},c.state,{isDragging:!t.end});0<=t.direction.indexOf("n")&&r-(o+a)<0&&(p.top=e.pageY,p.height=o+a),0<=t.direction.indexOf("s")&&r-d<0&&(p.height=d),0<=t.direction.indexOf("w")&&i-(n+s)<0&&(p.left=e.pageX,p.width=n+s),0<=t.direction.indexOf("e")&&i-l<0&&(p.width=l),c.setState(p),c.dispatchMoveEvent(c.props.onResize,e,!0,t.end)},c.dispatchMoveEvent=function(e,t,n,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:n,end:o,target:c,left:c.state.left,top:c.state.top,width:c.state.width,hight:c.state.height})},c.handleBrowserWindowResize=function(){c.windowStage===g.windowStage.FULLSCREEN&&c.setState({width:window.innerWidth,height:window.innerHeight})},c.state={stage:c.props.stage||g.windowStage.DEFAULT,isDragging:!1,top:c.props.top||c.props.initialTop||c.getInitialTop(),left:c.props.left||c.props.initialLeft||c.getInitialLeft(),width:c.props.width||c.props.initialWidth||300,height:c.props.height||c.props.initialHeight||300},c.windowCoordinatesState={leftBeforeAction:c.props.left||c.props.initialLeft||c.getInitialLeft(),topBeforeAction:c.props.top||c.props.initialTop||c.getInitialTop(),widthBeforeAction:c.props.width||c.props.initialWidth||300,heightBeforeAction:c.props.height||c.props.initialHeight||300},c}t.Window=w},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});function i(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,r=e.onRestoreButtonClick,a=e.onDoubleClick,s=e.stage,l=e.forwardedRef;return d.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",ref:l,onDoubleClick:a},d.createElement("div",{className:"k-window-title"},t||""),s===p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:o},d.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),s===p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:i},d.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),s!==p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:r},d.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:n},d.createElement("span",{className:"k-icon k-i-close",role:"presentation"})))}var d=n(0),p=n(4);t.WindowTitleBar=d.forwardRef(function(e,t){return d.createElement(i,o({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),s=n(1),l=["n","e","s","w","se","sw","ne","nw"],d=(r=a.Component,i(p,r),p.prototype.render=function(){var o=this;return a.createElement("div",null," ",l.map(function(n,e){return a.createElement(s.Draggable,{key:e,onDrag:function(e){var t=e.event;t.originalEvent.preventDefault(),o.props.onResize(t,{end:!1,direction:n})},onRelease:function(e){var t=e.event;t.originalEvent.preventDefault(),o.props.onResize(t,{end:!1,direction:n})}},a.createElement("div",{style:{display:"block"},className:"k-resize-handle k-resize-"+n}))}))},p);function p(){return null!==r&&r.apply(this,arguments)||this}t.ResizeHandlers=d},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=(r=n(0).Component,i(s,r),s.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},s.prototype.render=function(){return this.props.children},s);function s(){return null!==r&&r.apply(this,arguments)||this}t.MiddleLayerOptimization=a}],i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=5)}}});
1
+ System.register("@progress/kendo-react-dialogs",["@progress/kendo-react-common","prop-types","react"],function(a){var r,s,l;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){s=t(e)},function(e){l=t(e)}],execute:function(){function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,o;o={},i.m=n=[function(e,t){e.exports=l},function(e,t){e.exports=r},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.DialogActionsBar=function(e){var t=e.children;return o.createElement("div",{className:"k-dialog-buttongroup k-dialog-button-layout-stretched"},t)}},function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.windowStage||(t.windowStage={})).DEFAULT="DEFAULT",o.FULLSCREEN="FULLSCREEN",o.MINIMIZED="MINIMIZED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6);t.Dialog=o.Dialog;var i=n(3);t.DialogActionsBar=i.DialogActionsBar;var r=n(8);t.Window=r.Window,function(e){for(var t in e)a(t,e[t])}(t)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r,w=n(0),a=n(2),f=n(7),s=n(3),l=n(1),d=(r=w.Component,i(p,r),p.prototype.render=function(){var e=void 0!==this.props.id?this.props.id:this.titleId,t=this.props,n=t.title,o=t.width,i=t.height,r=t.children,a=t.minWidth,s=t.dir,l=t.style,d=w.Children.toArray(r),p=this.getContent(d),c=this.getActionBar(d),u=n?{"aria-labelledby":e}:null,h=void 0===this.props.closeIcon||this.props.closeIcon;return w.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:s,style:l},w.createElement("div",{className:"k-overlay"}),w.createElement("div",g({},u,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:i,minWidth:a}}),this.props.title&&w.createElement(f.DialogTitleBar,{closeIcon:h,onCloseButtonClick:this.handleCloseDialog,id:e},n),w.createElement("div",{className:"k-content k-window-content k-dialog-content"},p),c))},p.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===s.DialogActionsBar})},p.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==s.DialogActionsBar})},p.prototype.generateTitleId=function(){return"dialog-title"+l.guid()},p.propTypes={title:a.any,id:a.string,dir:a.string,style:a.object,closeIcon:a.bool,width:a.oneOfType([a.number,a.string]),height:a.oneOfType([a.number,a.string]),minWidth:a.oneOfType([a.number,a.string])},p);function p(){var t=null!==r&&r.apply(this,arguments)||this;return t.titleId=t.generateTitleId(),t.handleCloseDialog=function(e){e.preventDefault(),l.dispatchEvent(t.props.onClose,e,t,void 0)},t.handleKeyDown=function(e){e.keyCode===l.Keys.esc&&t.props.onClose&&(e.preventDefault(),t.handleCloseDialog(e))},t}t.Dialog=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement("a",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close"},r.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var a,s=n(0),l=n(2),d=n(9),p=n(1),c=n(1),u=n(10),h=n(11),g=n(4),w=(a=s.Component,i(f,a),f.prototype.componentDidMount=function(){window&&window.addEventListener("resize",this.handleBrowserWindowResize)},f.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},f.prototype.render=function(){var t=this;return s.createElement("div",{tabIndex:0,onFocus:function(e){return e.target.classList.add("k-state-focused")},onBlur:function(e){return e.target.classList.remove("k-state-focused")},onKeyDown:this.handleKeyDown,ref:function(e){return t.windowElement=e},className:"k-widget k-window k-window-wrapper",style:r({top:this.top,left:this.left,width:this.width,height:this.height||""},this.props.style)},s.createElement(h.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},s.createElement(c.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},s.createElement(d.WindowTitleBar,{stage:this.windowStage,onDoubleClick:this.handleDoubleClick,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow},this.props.title)),this.windowStage!==g.windowStage.MINIMIZED?s.createElement("div",{className:"k-content k-window-content"},this.props.children):null,this.windowStage===g.windowStage.DEFAULT&&this.props.resizable?s.createElement(u.ResizeHandlers,{onResize:this.handleResize}):null))},Object.defineProperty(f.prototype,"top",{get:function(){return this.windowStage!==g.windowStage.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"left",{get:function(){return this.windowStage!==g.windowStage.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"width",{get:function(){var e=this.props.width||this.state.width;return this.windowStage===g.windowStage.FULLSCREEN&&(e=window.innerWidth),e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"height",{get:function(){var e=this.props.height||this.state.height;return this.windowStage===g.windowStage.FULLSCREEN?e=window.innerHeight:this.windowStage===g.windowStage.MINIMIZED&&(e=0),e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),f.propTypes={id:l.string,width:l.oneOfType([l.number,l.string]),height:l.oneOfType([l.number,l.string]),left:l.oneOfType([l.number,l.string]),top:l.oneOfType([l.number,l.string]),initialwidth:l.oneOfType([l.number,l.string]),initialHeight:l.oneOfType([l.number,l.string]),initialLeft:l.oneOfType([l.number,l.string]),initialTop:l.oneOfType([l.number,l.string]),minWidth:l.oneOfType([l.number,l.string]),minHeight:l.oneOfType([l.number,l.string]),resizable:l.bool,draggable:l.bool,title:l.any,shouldUpdateOnDrag:l.bool,stage:l.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"])},f.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0},f);function f(e){var c=a.call(this,e)||this;return c.onPress=function(e){var t=e.event;c.windowCoordinatesState.differenceLeft=t.pageX-c.left,c.windowCoordinatesState.differenceTop=t.pageY-c.top},c.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),c.windowStage!==g.windowStage.FULLSCREEN&&c.props.draggable&&(c.setState({top:Math.max(t.pageY-c.windowCoordinatesState.differenceTop,0),left:t.pageX-c.windowCoordinatesState.differenceLeft,isDragging:!0}),c.props.onMove&&c.dispatchMoveEvent(c.props.onMove,t,!0,!1))},c.onRelease=function(e){var t=e.event;c.windowStage!==g.windowStage.FULLSCREEN&&c.props.draggable&&c.props.onMove&&c.dispatchMoveEvent(c.props.onMove,t,!0,!0),c.setState({isDragging:!1})},c.handleKeyDown=function(e){if(e.target===e.currentTarget){var t=c.props.minWidth||120,n=c.props.minHeight||100;if(e.ctrlKey&&c.props.resizable){switch(e.keyCode){case p.Keys.up:e.preventDefault(),n<=c.height-5&&c.setState({height:c.height-5});break;case p.Keys.down:e.preventDefault(),c.setState({height:c.height+5});break;case p.Keys.left:t<=c.width-5&&c.setState({width:c.width-5});break;case p.Keys.right:c.setState({width:c.width+5});break;default:return}c.dispatchMoveEvent(c.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case p.Keys.up:c.windowStage===g.windowStage.MINIMIZED?(c.handleRestore(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:g.windowStage.DEFAULT})):c.windowStage===g.windowStage.DEFAULT&&(c.handleFullscreen(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:g.windowStage.FULLSCREEN}));break;case p.Keys.down:c.windowStage===g.windowStage.FULLSCREEN?(c.handleRestore(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:"DEFAULT"})):c.windowStage===g.windowStage.DEFAULT&&(c.handleMinimize(e),p.dispatchEvent(c.props.onStageChange,e,c,{state:"MINIMIZED"}))}else{if(!e.ctrlKey)switch(e.keyCode){case p.Keys.esc:return void(c.props.onClose&&(e.preventDefault(),c.handleCloseWindow(e),p.dispatchEvent(c.props.onClose,e,c,void 0)));case p.Keys.up:c.setState({top:c.state.top-5});break;case p.Keys.down:c.setState({top:c.state.top+5});break;case p.Keys.left:c.setState({left:c.state.left-5});break;case p.Keys.right:c.setState({left:c.state.left+5});break;default:return}c.dispatchMoveEvent(c.props.onMove,e,!1,void 0)}}},c.getInitialTop=function(){return c.props.height?window.innerHeight/2-c.props.height/2:window.innerHeight/2-150},c.getInitialLeft=function(){return window.innerWidth/2-(void 0!==c.props.width?c.props.width:300)/2},c.handleMinimize=function(e){e.preventDefault(),c.setState({stage:g.windowStage.MINIMIZED,height:0}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"MINIMIZED"})},c.handleFullscreen=function(e){e.preventDefault(),c.windowCoordinatesState.leftBeforeAction=c.left,c.windowCoordinatesState.topBeforeAction=c.top,c.windowCoordinatesState.widthBeforeAction=c.width,c.windowCoordinatesState.heightBeforeAction=c.height,c.setState({left:0,top:0,width:window.innerWidth,height:window.innerHeight,stage:g.windowStage.FULLSCREEN}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"FULLSCREEN"})},c.handleRestore=function(e){e.preventDefault(),c.windowStage===g.windowStage.FULLSCREEN?c.setState({stage:g.windowStage.DEFAULT,left:c.windowCoordinatesState.leftBeforeAction,top:c.windowCoordinatesState.topBeforeAction,width:c.windowCoordinatesState.widthBeforeAction,height:c.windowCoordinatesState.heightBeforeAction}):c.windowStage===g.windowStage.MINIMIZED&&c.setState({stage:g.windowStage.DEFAULT,height:c.windowCoordinatesState.heightBeforeAction}),p.dispatchEvent(c.props.onStageChange,e,c,{state:"DEFAULT"})},c.handleCloseWindow=function(e){e.preventDefault(),p.dispatchEvent(c.props.onClose,e,c,void 0)},c.handleDoubleClick=function(e){c.windowStage===g.windowStage.FULLSCREEN||c.windowStage===g.windowStage.MINIMIZED?c.handleRestore(e):c.handleFullscreen(e)},c.handleResize=function(e,t){var n=c.width,o=c.height,i=c.props.minWidth||120,r=c.props.minHeight||100,a=c.top-e.pageY,s=c.left-e.pageX,l=e.pageX-c.left,d=e.pageY-c.top,p=Object.assign({},c.state,{isDragging:!t.end});0<=t.direction.indexOf("n")&&r-(o+a)<0&&(p.top=e.pageY,p.height=o+a),0<=t.direction.indexOf("s")&&r-d<0&&(p.height=d),0<=t.direction.indexOf("w")&&i-(n+s)<0&&(p.left=e.pageX,p.width=n+s),0<=t.direction.indexOf("e")&&i-l<0&&(p.width=l),c.setState(p),c.dispatchMoveEvent(c.props.onResize,e,!0,t.end)},c.dispatchMoveEvent=function(e,t,n,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:n,end:o,target:c,left:c.state.left,top:c.state.top,width:c.state.width,hight:c.state.height})},c.handleBrowserWindowResize=function(){c.windowStage===g.windowStage.FULLSCREEN&&c.setState({width:window.innerWidth,height:window.innerHeight})},c.state={stage:c.props.stage||g.windowStage.DEFAULT,isDragging:!1,top:c.props.top||c.props.initialTop||c.getInitialTop(),left:c.props.left||c.props.initialLeft||c.getInitialLeft(),width:c.props.width||c.props.initialWidth||300,height:c.props.height||c.props.initialHeight||300},c.windowCoordinatesState={leftBeforeAction:c.props.left||c.props.initialLeft||c.getInitialLeft(),topBeforeAction:c.props.top||c.props.initialTop||c.getInitialTop(),widthBeforeAction:c.props.width||c.props.initialWidth||300,heightBeforeAction:c.props.height||c.props.initialHeight||300},c}t.Window=w},function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});function i(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,r=e.onRestoreButtonClick,a=e.onDoubleClick,s=e.stage,l=e.forwardedRef;return d.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",ref:l,onDoubleClick:a},d.createElement("div",{className:"k-window-title"},t||""),s===p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:o},d.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),s===p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:i},d.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),s!==p.windowStage.DEFAULT&&d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:r},d.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),d.createElement("button",{className:"k-button-icon k-button k-bare",onClick:n},d.createElement("span",{className:"k-icon k-i-close",role:"presentation"})))}var d=n(0),p=n(4);t.WindowTitleBar=d.forwardRef(function(e,t){return d.createElement(i,o({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),s=n(1),l=["n","e","s","w","se","sw","ne","nw"],d=(r=a.Component,i(p,r),p.prototype.render=function(){var o=this;return a.createElement("div",null," ",l.map(function(n,e){return a.createElement(s.Draggable,{key:e,onDrag:function(e){var t=e.event;t.originalEvent.preventDefault(),o.props.onResize(t,{end:!1,direction:n})},onRelease:function(e){var t=e.event;t.originalEvent.preventDefault(),o.props.onResize(t,{end:!1,direction:n})}},a.createElement("div",{style:{display:"block"},className:"k-resize-handle k-resize-"+n}))}))},p);function p(){return null!==r&&r.apply(this,arguments)||this}t.ResizeHandlers=d},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,a=(r=n(0).Component,i(s,r),s.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},s.prototype.render=function(){return this.props.children},s);function s(){return null!==r&&r.apply(this,arguments)||this}t.MiddleLayerOptimization=a}],i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=5)}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dialogs",
3
- "version": "2.11.0-dev.201905141017",
3
+ "version": "2.11.0",
4
4
  "description": "KendoReact Dialogs package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "react-dom": "^16.8.2"
28
28
  },
29
29
  "dependencies": {
30
- "@progress/kendo-react-common": "2.11.0-dev.201905141017",
30
+ "@progress/kendo-react-common": "2.11.0",
31
31
  "prop-types": "^15.6.0"
32
32
  },
33
33
  "@progress": {