@progress/kendo-react-dialogs 4.13.0 → 4.14.0-dev.202112150919

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","react-dom","prop-types","@progress/kendo-react-common"],function(r){var a,s,d,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){p=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=a},function(e,t){e.exports=p},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DATA_DIALOGS_ID="data-windowid",t.DEFAULT_DIALOGS_ZINDEX=10002,t.ZINDEX_DIALOGS_STEP=2,t.DIALOGS_SELECTOR=".k-window:not(.k-dialog), .k-dialog-wrapper"},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(2),r=n(1);t.DialogActionsBar=function(e){var t=e.layout,t=void 0===t?a.layout:t,e=e.children,t=r.classNames("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===t,"k-justify-content-center":"center"===t,"k-justify-content-end":"end"===t,"k-justify-content-stretch":"stretched"===t});return o.createElement("div",{className:t},e)},t.DialogActionsBar.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var a={layout:"stretched"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1638880453,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(3);t.getMaxZIndex=function(e,n,o){var i=e;if(n&&n.defaultView){var e=n.querySelectorAll(a.DIALOGS_SELECTOR),r=!1;return e.forEach(function(e){var t=n.defaultView.getComputedStyle(e,null);e.getAttribute(a.DATA_DIALOGS_ID)!==o&&null!==t.zIndex&&(t=parseInt(t.zIndex,10),i<=t&&(i=t,r=!0))}),r?i+a.ZINDEX_DIALOGS_STEP:i}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t=t.windowStage||(t.windowStage={})).DEFAULT="DEFAULT",t.FULLSCREEN="FULLSCREEN",t.MINIMIZED="MINIMIZED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(2),r=n(1);t.WindowActionsBar=function(e){var t=e.layout,t=void 0===t?a.layout:t,e=e.children,t=r.classNames("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===t,"k-justify-content-center":"center"===t,"k-justify-content-end":"end"===t,"k-justify-content-stretch":"stretched"===t});return o.createElement("div",{className:t},e)},t.WindowActionsBar.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var a={layout:"end"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11);t.Dialog=o.Dialog;o=n(5);t.DialogActionsBar=o.DialogActionsBar;o=n(13);t.Window=o.Window;n=n(9);t.WindowActionsBar=n.WindowActionsBar,function(e){for(var t in e)r(t,e[t])}(t)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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||function(){return(g=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r,w=n(0),m=n(4),a=n(2),y=n(12),s=n(5),v=n(1),d=n(1),p=n(6),l=n(7),S=n(3),a=(r=w.Component,i(c,r),c.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},c.prototype.render=function(){var t=this,e=void 0!==this.props.id?this.props.id:this.titleId,n=this.props,o=n.title,i=n.width,r=n.height,a=n.children,s=n.minWidth,d=n.dir,p=n.style,l=n.contentStyle,c=w.Children.toArray(a),u=this.getContent(c),h=this.getActionBar(c),f=o?{"aria-labelledby":e}:null,n=void 0===this.props.closeIcon||this.props.closeIcon,a=this.getCurrentZIndex(),h=w.createElement(v.ZIndexContext.Provider,{value:a},w.createElement("div",g({},((c={})[S.DATA_DIALOGS_ID]=this._id,c),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:d,style:g({zIndex:a},p),ref:function(e){return t.element=e}}),w.createElement("div",{className:"k-overlay"}),w.createElement("div",g({},f,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:i,height:r,minWidth:s}}),this.props.title&&w.createElement(y.DialogTitleBar,{closeIcon:n,onCloseButtonClick:this.onCloseDialog,id:e},o),w.createElement("div",{className:"k-window-content k-dialog-content",style:l},u),h)));return v.canUseDOM?m.createPortal(h,this.props.appendTo||document.body):null},c.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===s.DialogActionsBar})},c.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==s.DialogActionsBar})},c.prototype.generateTitleId=function(){return"dialog-title"+this._id},c.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]),autoFocus:a.bool},c.defaultProps={autoFocus:!1},c.contextType=v.ZIndexContext,c);function c(e){var i=r.call(this,e)||this;return i._id=v.guid(),i.titleId=i.generateTitleId(),i.onCloseDialog=function(e){e.preventDefault(),v.dispatchEvent(i.props.onClose,e,i,void 0)},i.onKeyDown=function(e){e.keyCode===v.Keys.esc&&i.props.onClose&&(e.preventDefault(),i.onCloseDialog(e));var t,n,o=i.element;o&&e.keyCode===v.Keys.tab&&(t=(n=o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))[0],o=n[n.length-1],n=i.getDocument(),e.shiftKey?n&&n.activeElement===t&&(o.focus(),e.preventDefault()):n&&n.activeElement===o&&(t.focus(),e.preventDefault()))},i.getCurrentZIndex=function(){return i.state?i.state.zIndex>(i.context?i.context+S.ZINDEX_DIALOGS_STEP:0)?i.state.zIndex:i.context+S.ZINDEX_DIALOGS_STEP:i.context||S.DEFAULT_DIALOGS_ZINDEX},i.getDocument=function(){return i.props.appendTo?i.props.appendTo.ownerDocument:document},d.validatePackage(p.packageMetadata),i.state={zIndex:l.getMaxZIndex(i.getCurrentZIndex(),i.getDocument(),i._id)},i}t.Dialog=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,e=e.closeIcon;return i.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},i.createElement("div",{className:"k-window-title k-dialog-title"},t),i.createElement("div",{className:"k-window-actions k-dialog-actions"},e&&i.createElement("a",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-flat k-button-icon k-window-action k-dialog-action k-dialog-close"},i.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(0),d=n(4),p=n(2),l=n(14),c=n(1),u=n(1),h=n(15),f=n(16),g=n(8),w=n(1),m=n(6),y=n(9),v=n(3),S=n(7),p=(r=s.Component,i(E,r),E.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();this.props.appendTo&&t&&(e=this.props.appendTo.getBoundingClientRect(),t=t.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},E.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},E.prototype.componentDidUpdate=function(){var e,t=this.getDocument();this.props.appendTo&&t&&(e=this.props.appendTo.getBoundingClientRect(),t=t.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},E.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=this.getContent(e),o=this.getActionBar(e),i=this.getCurrentZIndex(),r=c.classNames("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),o=s.createElement(c.ZIndexContext.Provider,{value:i},s.createElement(s.Fragment,null,this.props.modal&&s.createElement("div",{className:"k-overlay",style:a({zIndex:i},this.props.overlayStyle)}),s.createElement("div",a({},((e={})[v.DATA_DIALOGS_ID]=this._id,e),{tabIndex:0,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:r,style:a({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:i},this.props.style)}),s.createElement(f.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},s.createElement(u.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},s.createElement(l.WindowTitleBar,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton},this.props.title)),this.windowStage!==g.windowStage.MINIMIZED?s.createElement(s.Fragment,null,s.createElement("div",{className:"k-window-content"},n),o):null,this.windowStage===g.windowStage.DEFAULT&&this.props.resizable?s.createElement(h.ResizeHandlers,{onResize:this.handleResize}):null))));return c.canUseDOM?d.createPortal(o,this.props.appendTo||document.body):null},Object.defineProperty(E.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(E.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(E.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===g.windowStage.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetWidth;var t=this.getWindow(),e=t?t.innerWidth:0}return e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===g.windowStage.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetHeight;var t=this.getWindow(),e=t?t.innerHeight:0}else this.windowStage===g.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),E.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===y.WindowActionsBar})},E.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==y.WindowActionsBar})},E.propTypes={width:p.oneOfType([p.number,p.string]),height:p.oneOfType([p.number,p.string]),left:p.oneOfType([p.number,p.string]),top:p.oneOfType([p.number,p.string]),initialwidth:p.oneOfType([p.number,p.string]),initialHeight:p.oneOfType([p.number,p.string]),initialLeft:p.oneOfType([p.number,p.string]),initialTop:p.oneOfType([p.number,p.string]),minWidth:p.oneOfType([p.number,p.string]),minHeight:p.oneOfType([p.number,p.string]),resizable:p.bool,draggable:p.bool,title:p.any,shouldUpdateOnDrag:p.bool,stage:p.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:p.string,style:p.object,overlayStyle:p.object},E.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},E.contextType=c.ZIndexContext,E);function E(e){var h=r.call(this,e)||this;return h.offSetCoordinates={x:0,y:0},h._id=c.guid(),h.onKeyDown=function(e){if(e.target===e.currentTarget){var t=h.props.minWidth||120,n=h.props.minHeight||100;if(e.ctrlKey&&h.props.resizable){switch(e.keyCode){case c.Keys.up:e.preventDefault(),n<=h.height-5&&h.setState({height:h.height-5});break;case c.Keys.down:e.preventDefault(),h.setState({height:h.height+5});break;case c.Keys.left:t<=h.width-5&&h.setState({width:h.width-5});break;case c.Keys.right:h.setState({width:h.width+5});break;default:return}h.dispatchMoveEvent(h.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case c.Keys.up:h.windowStage===g.windowStage.MINIMIZED?(h.handleRestore(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})):h.windowStage===g.windowStage.DEFAULT&&(h.handleFullscreen(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.FULLSCREEN}));break;case c.Keys.down:h.windowStage===g.windowStage.FULLSCREEN?(h.handleRestore(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})):h.windowStage===g.windowStage.DEFAULT&&(h.handleMinimize(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case c.Keys.esc:return void(h.props.onClose&&h.handleCloseWindow(e));case c.Keys.up:h.setState({top:h.state.top-5});break;case c.Keys.down:h.setState({top:h.state.top+5});break;case c.Keys.left:h.setState({left:h.state.left-5});break;case c.Keys.right:h.setState({left:h.state.left+5});break;default:return}h.dispatchMoveEvent(h.props.onMove,e,!1,void 0)}}},h.onPress=function(e){e=e.event;h.windowCoordinatesState.differenceLeft=e.pageX-h.left,h.windowCoordinatesState.differenceTop=e.pageY-h.top},h.onDrag=function(e){e=e.event;e.originalEvent.preventDefault(),h.windowStage!==g.windowStage.FULLSCREEN&&h.props.draggable&&(h.setState({top:Math.max(e.pageY-h.windowCoordinatesState.differenceTop,0),left:e.pageX-h.windowCoordinatesState.differenceLeft,isDragging:!0}),h.props.onMove&&h.dispatchMoveEvent(h.props.onMove,e,!0,!1))},h.onRelease=function(e){e=e.event;h.windowStage!==g.windowStage.FULLSCREEN&&h.props.draggable&&h.props.onMove&&h.dispatchMoveEvent(h.props.onMove,e,!0,!0),h.setState({isDragging:!1})},h.onFocus=function(){h._blurTimeout?(clearTimeout(h._blurTimeout),h._blurTimeout=void 0):h.setState({focused:!0,zIndex:S.getMaxZIndex(h.getCurrentZIndex(),h.getDocument(),h._id)})},h.onBlur=function(){clearTimeout(h._blurTimeout);var e=h.getWindow();e&&(h._blurTimeout=e.setTimeout(function(){h.setState({focused:!1}),h._blurTimeout=void 0}))},h.getInitialTop=function(){if(void 0!==h.props.top)return h.props.top;if(void 0!==h.props.initialTop)return h.props.initialTop;var e=300;if(void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),h.props.appendTo)return h.props.appendTo.offsetHeight/2-e/2;var t=h.getWindow();return t?t.innerHeight/2-e/2:0},h.getInitialLeft=function(){if(void 0!==h.props.left)return h.props.left;if(void 0!==h.props.initialLeft)return h.props.initialLeft;var e=300;if(void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),h.props.appendTo)return h.props.appendTo.offsetWidth/2-e/2;var t=h.getWindow();return t?t.innerWidth/2-e/2:0},h.getInitialWidth=function(){var e=300;return void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),e},h.getInitialHeight=function(){var e=300;return void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),e},h.handleMinimize=function(e){e.preventDefault(),h.windowCoordinatesState.leftBeforeAction=h.left,h.windowCoordinatesState.topBeforeAction=h.top,h.windowCoordinatesState.widthBeforeAction=h.width,h.windowCoordinatesState.heightBeforeAction=h.height,h.setState({stage:g.windowStage.MINIMIZED,height:0}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.MINIMIZED})},h.handleFullscreen=function(e){e.preventDefault(),h.windowCoordinatesState.leftBeforeAction=h.left,h.windowCoordinatesState.topBeforeAction=h.top,h.windowCoordinatesState.widthBeforeAction=h.width,h.windowCoordinatesState.heightBeforeAction=h.height;var t=h.getWindow(),n=t?t.innerWidth:0,t=t?t.innerHeight:0;h.setState({left:0,top:0,width:h.props.appendTo?h.props.appendTo.offsetWidth:n,height:h.props.appendTo?h.props.appendTo.offsetHeight:t,stage:g.windowStage.FULLSCREEN}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.FULLSCREEN})},h.handleRestore=function(e){e.preventDefault(),h.windowStage===g.windowStage.FULLSCREEN?h.setState({stage:g.windowStage.DEFAULT,left:h.windowCoordinatesState.leftBeforeAction,top:h.windowCoordinatesState.topBeforeAction,width:h.windowCoordinatesState.widthBeforeAction,height:h.windowCoordinatesState.heightBeforeAction}):h.windowStage===g.windowStage.MINIMIZED&&h.setState({stage:g.windowStage.DEFAULT,height:h.windowCoordinatesState.heightBeforeAction}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})},h.handleCloseWindow=function(e){e.preventDefault(),c.dispatchEvent(h.props.onClose,e,h,{state:void 0})},h.handleDoubleClick=function(e){h.windowStage===g.windowStage.FULLSCREEN||h.windowStage===g.windowStage.MINIMIZED?h.handleRestore(e):h.handleFullscreen(e)},h.handleResize=function(e,t){var n=h.props.appendTo?e.pageX-h.offSetCoordinates.x:e.pageX,o=h.props.appendTo?e.pageY-h.offSetCoordinates.y:e.pageY,i=h.width,r=h.height,a=h.props.minWidth||120,s=h.props.minHeight||100,d=h.top-o,p=h.left-n,l=n-h.left,c=o-h.top,u=Object.assign({},h.state,{isDragging:!t.end});0<=t.direction.indexOf("n")&&s-(r+d)<0&&(0<h.top&&(u.height=r+d),u.top=o),0<=t.direction.indexOf("s")&&s-c<0&&(u.height=c),0<=t.direction.indexOf("w")&&a-(i+p)<0&&(0<h.left&&(u.width=i+p),u.left=n),0<=t.direction.indexOf("e")&&a-l<0&&(u.width=l),h.setState(u),h.dispatchMoveEvent(h.props.onResize,e,!0,t.end)},h.dispatchMoveEvent=function(e,t,n,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent||t.originalEvent,drag:n,end:o,target:h,left:h.state.left,top:h.state.top,width:h.state.width,hight:h.state.height,height:h.state.height})},h.handleBrowserWindowResize=function(){var e,t;h.windowStage===g.windowStage.FULLSCREEN&&(e=(t=h.getWindow())?t.innerWidth:0,t=t?t.innerHeight:0,h.setState({width:h.props.appendTo?h.props.appendTo.offsetWidth:e,height:h.props.appendTo?h.props.appendTo.offsetHeight:t}))},h.getCurrentZIndex=function(){return h.state?h.state.zIndex>(h.context?h.context+v.ZINDEX_DIALOGS_STEP:0)?h.state.zIndex:h.context+v.ZINDEX_DIALOGS_STEP:h.context||v.DEFAULT_DIALOGS_ZINDEX},h.getDocument=function(){return h.props.appendTo?h.props.appendTo.ownerDocument:document},h.getWindow=function(){var e=h.getDocument();return e&&e.defaultView},w.validatePackage(m.packageMetadata),h.state={stage:h.props.stage||g.windowStage.DEFAULT,isDragging:!1,top:h.getInitialTop(),left:h.getInitialLeft(),width:h.getInitialWidth(),height:h.getInitialHeight(),focused:!0,zIndex:S.getMaxZIndex(h.getCurrentZIndex(),h.getDocument(),h._id)},h.windowCoordinatesState={leftBeforeAction:h.getInitialLeft(),topBeforeAction:h.getInitialTop(),widthBeforeAction:h.getInitialWidth(),heightBeforeAction:h.getInitialHeight()},h}t.Window=p},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=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}).apply(this,arguments)};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,d=e.forwardedRef,o=e.minimizeButton?p.createElement(e.minimizeButton,{onClick:o,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},p.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),i=e.maximizeButton?p.createElement(e.maximizeButton,{onClick:i,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},p.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),r=e.restoreButton?p.createElement(e.restoreButton,{onClick:r,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:r},p.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),n=e.closeButton?p.createElement(e.closeButton,{onClick:n,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},p.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return p.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:d,onDoubleClick:a},p.createElement("div",{className:"k-window-title"},t||""),p.createElement("div",{className:"k-window-actions"},s===l.windowStage.DEFAULT&&o,s===l.windowStage.DEFAULT&&i,s!==l.windowStage.DEFAULT&&r,n))}var p=n(0),l=n(8);t.WindowTitleBar=p.forwardRef(function(e,t){return p.createElement(i,o({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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),d=["n","e","s","w","se","sw","ne","nw"],i=(r=a.Component,i(p,r),p.prototype.render=function(){var n=this;return a.createElement("div",null," ",d.map(function(t,e){return a.createElement(s.Draggable,{key:e,onDrag:function(e){e=e.event;e.originalEvent.preventDefault(),n.props.onResize(e,{end:!1,direction:t})},onRelease:function(e){e=e.event;e.originalEvent.preventDefault(),n.props.onResize(e,{end:!0,direction:t})}},a.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))}))},p);function p(){return null!==r&&r.apply(this,arguments)||this}t.ResizeHandlers=i},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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,i=(r=n(0).Component,i(a,r),a.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},a.prototype.render=function(){return this.props.children},a);function a(){return null!==r&&r.apply(this,arguments)||this}t.MiddleLayerOptimization=i}],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=10)}}});
1
+ System.register("@progress/kendo-react-dialogs",["prop-types","@progress/kendo-react-common","react-dom","react"],function(r){var a,s,d,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){p=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=p},function(e,t){e.exports=s},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DATA_DIALOGS_ID="data-windowid",t.DEFAULT_DIALOGS_ZINDEX=10002,t.ZINDEX_DIALOGS_STEP=2,t.DIALOGS_SELECTOR=".k-window:not(.k-dialog), .k-dialog-wrapper"},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(2),r=n(1);t.DialogActionsBar=function(e){var t=e.layout,t=void 0===t?a.layout:t,e=e.children,t=r.classNames("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===t,"k-justify-content-center":"center"===t,"k-justify-content-end":"end"===t,"k-justify-content-stretch":"stretched"===t});return o.createElement("div",{className:t},e)},t.DialogActionsBar.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var a={layout:"stretched"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639558579,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(3);t.getMaxZIndex=function(e,n,o){var i=e;if(n&&n.defaultView){var e=n.querySelectorAll(a.DIALOGS_SELECTOR),r=!1;return e.forEach(function(e){var t=n.defaultView.getComputedStyle(e,null);e.getAttribute(a.DATA_DIALOGS_ID)!==o&&null!==t.zIndex&&(t=parseInt(t.zIndex,10),i<=t&&(i=t,r=!0))}),r?i+a.ZINDEX_DIALOGS_STEP:i}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t=t.windowStage||(t.windowStage={})).DEFAULT="DEFAULT",t.FULLSCREEN="FULLSCREEN",t.MINIMIZED="MINIMIZED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(2),r=n(1);t.WindowActionsBar=function(e){var t=e.layout,t=void 0===t?a.layout:t,e=e.children,t=r.classNames("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===t,"k-justify-content-center":"center"===t,"k-justify-content-end":"end"===t,"k-justify-content-stretch":"stretched"===t});return o.createElement("div",{className:t},e)},t.WindowActionsBar.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var a={layout:"end"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11);t.Dialog=o.Dialog,t.DialogPropsContext=o.DialogPropsContext;o=n(5);t.DialogActionsBar=o.DialogActionsBar;o=n(13);t.Window=o.Window,t.WindowPropsContext=o.WindowPropsContext;n=n(9);t.WindowActionsBar=n.WindowActionsBar,function(e){for(var t in e)r(t,e[t])}(t)},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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||function(){return(g=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r,w=n(0),m=n(4),a=n(2),v=n(12),s=n(5),y=n(1),d=n(1),p=n(6),l=n(7),S=n(3),a=(r=w.Component,i(c,r),c.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},c.prototype.render=function(){var t=this,e=void 0!==this.props.id?this.props.id:this.titleId,n=this.props,o=n.title,i=n.width,r=n.height,a=n.children,s=n.minWidth,d=n.dir,p=n.style,l=n.contentStyle,c=w.Children.toArray(a),u=this.getContent(c),h=this.getActionBar(c),f=o?{"aria-labelledby":e}:null,n=void 0===this.props.closeIcon||this.props.closeIcon,a=this.getCurrentZIndex(),h=w.createElement(y.ZIndexContext.Provider,{value:a},w.createElement("div",g({},((c={})[S.DATA_DIALOGS_ID]=this._id,c),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:d,style:g({zIndex:a},p),ref:function(e){return t.element=e}}),w.createElement("div",{className:"k-overlay"}),w.createElement("div",g({},f,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:i,height:r,minWidth:s}}),this.props.title&&w.createElement(v.DialogTitleBar,{closeIcon:n,onCloseButtonClick:this.onCloseDialog,id:e},o),w.createElement("div",{className:"k-window-content k-dialog-content",style:l},u),h)));return y.canUseDOM?m.createPortal(h,this.props.appendTo||document.body):null},c.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===s.DialogActionsBar})},c.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==s.DialogActionsBar})},c.prototype.generateTitleId=function(){return"dialog-title"+this._id},c.displayName="Dialog",c.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]),autoFocus:a.bool},c.defaultProps={autoFocus:!1},c.contextType=y.ZIndexContext,c);function c(e){var i=r.call(this,e)||this;return i._id=y.guid(),i.titleId=i.generateTitleId(),i.onCloseDialog=function(e){e.preventDefault(),y.dispatchEvent(i.props.onClose,e,i,void 0)},i.onKeyDown=function(e){e.keyCode===y.Keys.esc&&i.props.onClose&&(e.preventDefault(),i.onCloseDialog(e));var t,n,o=i.element;o&&e.keyCode===y.Keys.tab&&(t=(n=o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))[0],o=n[n.length-1],n=i.getDocument(),e.shiftKey?n&&n.activeElement===t&&(o.focus(),e.preventDefault()):n&&n.activeElement===o&&(t.focus(),e.preventDefault()))},i.getCurrentZIndex=function(){return i.state?i.state.zIndex>(i.context?i.context+S.ZINDEX_DIALOGS_STEP:0)?i.state.zIndex:i.context+S.ZINDEX_DIALOGS_STEP:i.context||S.DEFAULT_DIALOGS_ZINDEX},i.getDocument=function(){return i.props.appendTo?i.props.appendTo.ownerDocument:document},d.validatePackage(p.packageMetadata),i.state={zIndex:l.getMaxZIndex(i.getCurrentZIndex(),i.getDocument(),i._id)},i}t.DialogPropsContext=y.createPropsContext(),t.Dialog=y.withPropsContext(t.DialogPropsContext,a),t.Dialog.displayName="KendoReactDialog"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,e=e.closeIcon;return i.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},i.createElement("div",{className:"k-window-title k-dialog-title"},t),i.createElement("div",{className:"k-window-actions k-dialog-actions"},e&&i.createElement("a",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-flat k-button-icon k-window-action k-dialog-action k-dialog-close"},i.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(0),d=n(4),p=n(2),l=n(14),c=n(1),u=n(1),h=n(15),f=n(16),g=n(8),w=n(1),m=n(6),v=n(9),y=n(3),S=n(7),p=(r=s.Component,i(E,r),E.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();this.props.appendTo&&t&&(e=this.props.appendTo.getBoundingClientRect(),t=t.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},E.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},E.prototype.componentDidUpdate=function(){var e,t=this.getDocument();this.props.appendTo&&t&&(e=this.props.appendTo.getBoundingClientRect(),t=t.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},E.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=this.getContent(e),o=this.getActionBar(e),i=this.getCurrentZIndex(),r=c.classNames("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),o=s.createElement(c.ZIndexContext.Provider,{value:i},s.createElement(s.Fragment,null,this.props.modal&&s.createElement("div",{className:"k-overlay",style:a({zIndex:i},this.props.overlayStyle)}),s.createElement("div",a({},((e={})[y.DATA_DIALOGS_ID]=this._id,e),{tabIndex:0,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:r,style:a({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:i},this.props.style)}),s.createElement(f.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},s.createElement(u.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},s.createElement(l.WindowTitleBar,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton},this.props.title)),this.windowStage!==g.windowStage.MINIMIZED?s.createElement(s.Fragment,null,s.createElement("div",{className:"k-window-content"},n),o):null,this.windowStage===g.windowStage.DEFAULT&&this.props.resizable?s.createElement(h.ResizeHandlers,{onResize:this.handleResize}):null))));return c.canUseDOM?d.createPortal(o,this.props.appendTo||document.body):null},Object.defineProperty(E.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(E.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(E.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===g.windowStage.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetWidth;var t=this.getWindow(),e=t?t.innerWidth:0}return e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===g.windowStage.FULLSCREEN){if(this.props.appendTo)return this.props.appendTo.offsetHeight;var t=this.getWindow(),e=t?t.innerHeight:0}else this.windowStage===g.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),E.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===v.WindowActionsBar})},E.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==v.WindowActionsBar})},E.displayName="Window",E.propTypes={width:p.number,height:p.number,left:p.number,top:p.number,initialWidth:p.number,initialHeight:p.number,initialLeft:p.number,initialTop:p.number,minWidth:p.number,minHeight:p.number,resizable:p.bool,draggable:p.bool,title:p.any,shouldUpdateOnDrag:p.bool,stage:p.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:p.string,style:p.object,overlayStyle:p.object},E.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},E.contextType=c.ZIndexContext,E);function E(e){var h=r.call(this,e)||this;return h.offSetCoordinates={x:0,y:0},h._id=c.guid(),h.onKeyDown=function(e){if(e.target===e.currentTarget){var t=h.props.minWidth||120,n=h.props.minHeight||100;if(e.ctrlKey&&h.props.resizable){switch(e.keyCode){case c.Keys.up:e.preventDefault(),n<=h.height-5&&h.setState({height:h.height-5});break;case c.Keys.down:e.preventDefault(),h.setState({height:h.height+5});break;case c.Keys.left:t<=h.width-5&&h.setState({width:h.width-5});break;case c.Keys.right:h.setState({width:h.width+5});break;default:return}h.dispatchMoveEvent(h.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case c.Keys.up:h.windowStage===g.windowStage.MINIMIZED?(h.handleRestore(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})):h.windowStage===g.windowStage.DEFAULT&&(h.handleFullscreen(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.FULLSCREEN}));break;case c.Keys.down:h.windowStage===g.windowStage.FULLSCREEN?(h.handleRestore(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})):h.windowStage===g.windowStage.DEFAULT&&(h.handleMinimize(e),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case c.Keys.esc:return void(h.props.onClose&&h.handleCloseWindow(e));case c.Keys.up:h.setState({top:h.state.top-5});break;case c.Keys.down:h.setState({top:h.state.top+5});break;case c.Keys.left:h.setState({left:h.state.left-5});break;case c.Keys.right:h.setState({left:h.state.left+5});break;default:return}h.dispatchMoveEvent(h.props.onMove,e,!1,void 0)}}},h.onPress=function(e){e=e.event;h.windowCoordinatesState.differenceLeft=e.pageX-h.left,h.windowCoordinatesState.differenceTop=e.pageY-h.top},h.onDrag=function(e){e=e.event;e.originalEvent.preventDefault(),h.windowStage!==g.windowStage.FULLSCREEN&&h.props.draggable&&(h.setState({top:Math.max(e.pageY-h.windowCoordinatesState.differenceTop,0),left:e.pageX-h.windowCoordinatesState.differenceLeft,isDragging:!0}),h.props.onMove&&h.dispatchMoveEvent(h.props.onMove,e,!0,!1))},h.onRelease=function(e){e=e.event;h.windowStage!==g.windowStage.FULLSCREEN&&h.props.draggable&&h.props.onMove&&h.dispatchMoveEvent(h.props.onMove,e,!0,!0),h.setState({isDragging:!1})},h.onFocus=function(){h._blurTimeout?(clearTimeout(h._blurTimeout),h._blurTimeout=void 0):h.setState({focused:!0,zIndex:S.getMaxZIndex(h.getCurrentZIndex(),h.getDocument(),h._id)})},h.onBlur=function(){clearTimeout(h._blurTimeout);var e=h.getWindow();e&&(h._blurTimeout=e.setTimeout(function(){h.setState({focused:!1}),h._blurTimeout=void 0}))},h.getInitialTop=function(){if(void 0!==h.props.top)return h.props.top;if(void 0!==h.props.initialTop)return h.props.initialTop;var e=300;if(void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),h.props.appendTo)return h.props.appendTo.offsetHeight/2-e/2;var t=h.getWindow();return t?t.innerHeight/2-e/2:0},h.getInitialLeft=function(){if(void 0!==h.props.left)return h.props.left;if(void 0!==h.props.initialLeft)return h.props.initialLeft;var e=300;if(void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),h.props.appendTo)return h.props.appendTo.offsetWidth/2-e/2;var t=h.getWindow();return t?t.innerWidth/2-e/2:0},h.getInitialWidth=function(){var e=300;return void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),e},h.getInitialHeight=function(){var e=300;return void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),e},h.handleMinimize=function(e){e.preventDefault(),h.windowCoordinatesState.leftBeforeAction=h.left,h.windowCoordinatesState.topBeforeAction=h.top,h.windowCoordinatesState.widthBeforeAction=h.width,h.windowCoordinatesState.heightBeforeAction=h.height,h.setState({stage:g.windowStage.MINIMIZED,height:0}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.MINIMIZED})},h.handleFullscreen=function(e){e.preventDefault(),h.windowCoordinatesState.leftBeforeAction=h.left,h.windowCoordinatesState.topBeforeAction=h.top,h.windowCoordinatesState.widthBeforeAction=h.width,h.windowCoordinatesState.heightBeforeAction=h.height;var t=h.getWindow(),n=t?t.innerWidth:0,t=t?t.innerHeight:0;h.setState({left:0,top:0,width:h.props.appendTo?h.props.appendTo.offsetWidth:n,height:h.props.appendTo?h.props.appendTo.offsetHeight:t,stage:g.windowStage.FULLSCREEN}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.FULLSCREEN})},h.handleRestore=function(e){e.preventDefault(),h.windowStage===g.windowStage.FULLSCREEN?h.setState({stage:g.windowStage.DEFAULT,left:h.windowCoordinatesState.leftBeforeAction,top:h.windowCoordinatesState.topBeforeAction,width:h.windowCoordinatesState.widthBeforeAction,height:h.windowCoordinatesState.heightBeforeAction}):h.windowStage===g.windowStage.MINIMIZED&&h.setState({stage:g.windowStage.DEFAULT,height:h.windowCoordinatesState.heightBeforeAction}),c.dispatchEvent(h.props.onStageChange,e,h,{state:g.windowStage.DEFAULT})},h.handleCloseWindow=function(e){e.preventDefault(),c.dispatchEvent(h.props.onClose,e,h,{state:void 0})},h.handleDoubleClick=function(e){h.windowStage===g.windowStage.FULLSCREEN||h.windowStage===g.windowStage.MINIMIZED?h.handleRestore(e):h.handleFullscreen(e)},h.handleResize=function(e,t){var n=h.props.appendTo?e.pageX-h.offSetCoordinates.x:e.pageX,o=h.props.appendTo?e.pageY-h.offSetCoordinates.y:e.pageY,i=h.width,r=h.height,a=h.props.minWidth||120,s=h.props.minHeight||100,d=h.top-o,p=h.left-n,l=n-h.left,c=o-h.top,u=Object.assign({},h.state,{isDragging:!t.end});0<=t.direction.indexOf("n")&&s-(r+d)<0&&(0<h.top&&(u.height=r+d),u.top=o),0<=t.direction.indexOf("s")&&s-c<0&&(u.height=c),0<=t.direction.indexOf("w")&&a-(i+p)<0&&(0<h.left&&(u.width=i+p),u.left=n),0<=t.direction.indexOf("e")&&a-l<0&&(u.width=l),h.setState(u),h.dispatchMoveEvent(h.props.onResize,e,!0,t.end)},h.dispatchMoveEvent=function(e,t,n,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent||t.originalEvent,drag:n,end:o,target:h,left:h.state.left,top:h.state.top,width:h.state.width,hight:h.state.height,height:h.state.height})},h.handleBrowserWindowResize=function(){var e,t;h.windowStage===g.windowStage.FULLSCREEN&&(e=(t=h.getWindow())?t.innerWidth:0,t=t?t.innerHeight:0,h.setState({width:h.props.appendTo?h.props.appendTo.offsetWidth:e,height:h.props.appendTo?h.props.appendTo.offsetHeight:t}))},h.getCurrentZIndex=function(){return h.state?h.state.zIndex>(h.context?h.context+y.ZINDEX_DIALOGS_STEP:0)?h.state.zIndex:h.context+y.ZINDEX_DIALOGS_STEP:h.context||y.DEFAULT_DIALOGS_ZINDEX},h.getDocument=function(){return h.props.appendTo?h.props.appendTo.ownerDocument:document},h.getWindow=function(){var e=h.getDocument();return e&&e.defaultView},w.validatePackage(m.packageMetadata),h.state={stage:h.props.stage||g.windowStage.DEFAULT,isDragging:!1,top:h.getInitialTop(),left:h.getInitialLeft(),width:h.getInitialWidth(),height:h.getInitialHeight(),focused:!0,zIndex:S.getMaxZIndex(h.getCurrentZIndex(),h.getDocument(),h._id)},h.windowCoordinatesState={leftBeforeAction:h.getInitialLeft(),topBeforeAction:h.getInitialTop(),widthBeforeAction:h.getInitialWidth(),heightBeforeAction:h.getInitialHeight()},h}t.WindowPropsContext=u.createPropsContext(),t.Window=u.withPropsContext(t.WindowPropsContext,p),t.Window.displayName="KendoReactWindow"},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=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}).apply(this,arguments)};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,d=e.forwardedRef,o=e.minimizeButton?p.createElement(e.minimizeButton,{onClick:o,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},p.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),i=e.maximizeButton?p.createElement(e.maximizeButton,{onClick:i,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},p.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),r=e.restoreButton?p.createElement(e.restoreButton,{onClick:r,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:r},p.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),n=e.closeButton?p.createElement(e.closeButton,{onClick:n,stage:s}):p.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},p.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return p.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:d,onDoubleClick:a},p.createElement("div",{className:"k-window-title"},t||""),p.createElement("div",{className:"k-window-actions"},s===l.windowStage.DEFAULT&&o,s===l.windowStage.DEFAULT&&i,s!==l.windowStage.DEFAULT&&r,n))}var p=n(0),l=n(8);t.WindowTitleBar=p.forwardRef(function(e,t){return p.createElement(i,o({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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),d=["n","e","s","w","se","sw","ne","nw"],i=(r=a.Component,i(p,r),p.prototype.render=function(){var n=this;return a.createElement("div",null," ",d.map(function(t,e){return a.createElement(s.Draggable,{key:e,onDrag:function(e){e=e.event;e.originalEvent.preventDefault(),n.props.onResize(e,{end:!1,direction:t})},onRelease:function(e){e=e.event;e.originalEvent.preventDefault(),n.props.onResize(e,{end:!0,direction:t})}},a.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))}))},p);function p(){return null!==r&&r.apply(this,arguments)||this}t.ResizeHandlers=i},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(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])})(e,t)},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,i=(r=n(0).Component,i(a,r),a.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},a.prototype.render=function(){return this.props.children},a);function a(){return null!==r&&r.apply(this,arguments)||this}t.MiddleLayerOptimization=i}],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=10)}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dialogs",
3
- "version": "4.13.0",
3
+ "version": "4.14.0-dev.202112150919",
4
4
  "description": "KendoReact Dialogs package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "react-dom": "^16.8.2 || ^17.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@progress/kendo-react-common": "4.13.0",
38
+ "@progress/kendo-react-common": "4.14.0-dev.202112150919",
39
39
  "prop-types": "^15.6.0"
40
40
  },
41
41
  "devDependencies": {