@progress/kendo-react-dialogs 4.11.0-dev.202111171558 → 4.12.0-dev.202111220849
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
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing","react-dom"],t):"object"==typeof exports?exports.KendoReactDialogs=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):e.KendoReactDialogs=t(e.React,e.PropTypes,e.KendoLicensing,e.ReactDOM)}(window,(function(e,t,n,o){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserSupportService",(function(){return r})),n.d(t,"canUseDOM",(function(){return i})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s})),n.d(t,"cloneDate",(function(){return c})),n.d(t,"clone",(function(){return l})),n.d(t,"cloneObject",(function(){return d})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return f})),n.d(t,"Draggable",(function(){return M})),n.d(t,"focusFirstFocusableChild",(function(){return D})),n.d(t,"FormComponent",(function(){return x})),n.d(t,"getTabIndex",(function(){return T})),n.d(t,"getter",(function(){return I})),n.d(t,"guid",(function(){return P})),n.d(t,"Keys",(function(){return R})),n.d(t,"noop",(function(){return L})),n.d(t,"getScrollbarWidth",(function(){return A})),n.d(t,"setScrollbarWidth",(function(){return z})),n.d(t,"setter",(function(){return W})),n.d(t,"mapTree",(function(){return X})),n.d(t,"mapTreeItem",(function(){return Y})),n.d(t,"extendDataItem",(function(){return Z})),n.d(t,"getItemPath",(function(){return q})),n.d(t,"validatePackage",(function(){return $})),n.d(t,"hasRelativeStackingContext",(function(){return G})),n.d(t,"dispatchEvent",(function(){return J})),n.d(t,"AsyncFocusBlur",(function(){return te})),n.d(t,"createPropsContext",(function(){return re})),n.d(t,"withPropsContext",(function(){return ie})),n.d(t,"useDir",(function(){return ae})),n.d(t,"useAsyncFocusBlur",(function(){return Q})),n.d(t,"useDraggable",(function(){return se})),n.d(t,"useRtl",(function(){return ue})),n.d(t,"useMouse",(function(){return ce})),n.d(t,"useCustomComponent",(function(){return le})),n.d(t,"usePropsContext",(function(){return ne})),n.d(t,"Icon",(function(){return he})),n.d(t,"SvgIcon",(function(){return we})),n.d(t,"Typography",(function(){return je}));var o=function(){return"undefined"!=typeof document?document:{}},r=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=o();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),i=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?s.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},u=n(0),c=function(e){return e?new Date(e.getTime()):null};function l(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];t[n]=p(o,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(u.isValidElement(e))return u.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(1),g=function(e,t){return function(n){return t(e(n))}},m=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},v=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},w=function(){},y=function(e){return e.preventDefault()},b=/touch/;function k(e){return e.type.match(b)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var E=function(e){var t=this,n=e.press;void 0===n&&(n=w);var o=e.drag;void 0===o&&(o=w);var r=e.release;void 0===r&&(r=w);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=g(k,n),this._dragHandler=g(k,o),this._releaseHandler=g(k,r),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(m(t.document,"mousemove",t._mousemove),m(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){v(t.document,"mousemove",t._mousemove),v(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(m(t.document,"pointermove",t._pointermove),m(t.document,"pointerup",t._pointerup),m(t.document,"pointercancel",t._pointerup),m(t.document,"contextmenu",y),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(v(t.document,"pointermove",t._pointermove),v(t.document,"pointerup",t._pointerup),v(t.document,"pointercancel",t._pointerup),v(t.document,"contextmenu",y),t._releaseHandler(e))}},C={document:{configurable:!0}};E.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},C.document.get=function(){return this._element?this._element.ownerDocument:document},E.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},E.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?m(e,"pointerdown",this._pointerdown):(m(e,"mousedown",this._mousedown),this._mouseOnly||(m(e,"touchstart",this._touchstart),m(e,"touchmove",this._touchmove),m(e,"touchend",this._touchend)))},E.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return v(e,"pointerdown",this._pointerdown),v(this.document,"pointermove",this._pointermove),v(this.document,"pointerup",this._pointerup),v(this.document,"contextmenu",y),void v(this.document,"pointercancel",this._pointerup);v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend))},E.prototype._usePointers=function(){return!this._mouseOnly&&E.supportPointerEvent()},E.prototype.update=function(e){var t=e.press;void 0===t&&(t=w);var n=e.drag;void 0===n&&(n=w);var o=e.release;void 0===o&&(o=w);var r=e.mouseOnly;void 0===r&&(r=!1),this._pressHandler=g(k,t),this._dragHandler=g(k,n),this._releaseHandler=g(k,o),this._mouseOnly=r},E.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(E.prototype,C),E.default=E;var O,S=E,_=(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)}),M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new S({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.childRef=function(e){var n=t.props.childRef;t.element=e,n&&"function"==typeof n&&n(e)},t}return _(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return u.cloneElement(u.Children.only(this.props.children),{ref:this.childRef})},t.propTypes={children:h.element.isRequired},t}(u.Component),D=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}},x=function(){},T=function(e,t,n){var o="string"==typeof e?parseInt(e,void 0):e;if(NaN!==o)return void 0!==o?o:t?n?void 0:-1:0},j=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function B(e){var t=[];return e.replace(j,(function(e,n,o,r){t.push(void 0!==n?n:o||r)})),t}var N={};function I(e){if(N[e])return N[e];var t=B(e);return N[e]=function(e){for(var n=e,o=0;o<t.length&&n;o++)n=n[t[o]];return n},N[e]}N.undefined=function(){};var P=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},R={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},L=function(){},A=function(){return!(!i||!document.body)&&(new r).scrollbarWidth},z=function(){if(!i||!document.body)return!1;var e=(new r).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},F={undefined:function(e){return e}},U=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function W(e){if(F[e])return F[e];var t=B(e);return F[e]=function(e,n,o){for(var r=e,i=t.length-1,a=0;a<i&&r;a++)r=r[t[a]]=r[t[a]]||U(t[a+1],o);r[t[i]]=n},F[e]}var H=function(){return(H=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function K(e,t,n){var o;return n?H({},e,((o={})[t]=n.length?n.slice():void 0,o)):e&&e[t]?e[t].slice():[]}var X=function(e,t,n){return e.map((function(e){return function e(t,n,o){if(t[n]){var r=K(t,n).map((function(t){return e(t,n,o)}));return o(K(t,n,r))}return o(t)}(e,t,n)})).slice()},Y=function(e,t,n,o){for(var r=e,i=[],a=0;a<t.length;a++)r=r[t[a]],r=Array.isArray(r)?r:r[n],i.push(r);var s=i.length>1?i[i.length-2]:e,u=t[t.length-1],c=o(s[u]);s.splice(u,1,c)},Z=function(e,t,n){var o;return Object.assign({},e,e[t]?((o={})[t]=e[t].slice(),o):{},n||{})},q=function(e,t,n){var o=[],r=t.slice();if(r.length){var i=e[r.shift()||0];for(o.push(i);r.length&&n;)i=i[n][r.shift()||0],o.push(i)}return o},V=n(3);function $(e){if(void 0!==V)V.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}var G=function(e){if(!i)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var o=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),o};function J(e,t,n,o){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,o))}}function Q(e){var t=e.onFocus,n=e.onBlur,o=e.onSyncFocus,r=e.onSyncBlur,i=u.useRef(!1),a=u.useRef(0),s=u.useCallback((function(e){clearTimeout(a.current),a.current=window.setTimeout((function(){return e()}))}),[a]),c=u.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(a.current),o&&o.call.apply(o,[void 0].concat(e)),i.current||(i.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[i,t,o]),l=u.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r&&r.call.apply(r,[void 0].concat(e)),s((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,s,n,r]);return u.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:c,onBlur:l}}var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},te=function(e){var t=e.children,n=Q({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,ee({},n))},ne=function(e,t){return u.useContext(e)(t)},oe=function(){return(oe=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},re=function(){return u.createContext((function(e){return e}))},ie=function(e,t){return u.forwardRef((function(n,o){var r=ne(e,n);return u.createElement(t,oe({},r,{ref:o}))}))};function ae(e,t,n){var o=u.useState(t),r=o[0],i=o[1];return u.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}function se(e,t){var n=t.onPress,o=t.onDrag,r=t.onRelease,i=u.useMemo((function(){return new S({press:n,drag:o,release:r})}),[]);u.useEffect((function(){var t=e.current;if(t)return i.bindTo(t),function(){i.destroy()}}),[]),u.useEffect((function(){i.update({press:n,drag:o,release:r})}),[n,o,r])}function ue(e,t,n){var o=u.useState(t),r=o[0],i=o[1];return u.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}var ce=function(e,t,n){void 0===n&&(n={});var o=u.useCallback((function(o){n.onMouseDown&&n.onMouseDown.call(void 0,o),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseDown,e.onMouseDown,t]),r=u.useCallback((function(o){n.onMouseUp&&n.onMouseUp.call(void 0,o),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:u.useCallback((function(o){n.onClick&&n.onClick.call(void 0,o),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onClick,e.onClick,t]),onMouseUp:r,onMouseDown:o,onDoubleClick:u.useCallback((function(o){n.onDoubleClick&&n.onDoubleClick.call(void 0,o),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:u.useCallback((function(o){n.onMouseEnter&&n.onMouseEnter.call(void 0,o),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:u.useCallback((function(o){n.onMouseLeave&&n.onMouseLeave.call(void 0,o),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:u.useCallback((function(o){n.onMouseMove&&n.onMouseMove.call(void 0,o),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:u.useCallback((function(o){n.onMouseOut&&n.onMouseOut.call(void 0,o),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:u.useCallback((function(o){n.onMouseOver&&n.onMouseOver.call(void 0,o),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseOver,e.onMouseOver,t])}},le=function(e){return u.isValidElement(e)?[e.type,e.props]:[e,{}]},de={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},fe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},he=u.forwardRef((function(e,t){var n=e.className,o=e.name,r=e.themeColor,i=e.size,a=e.flip,c=e.style,l=fe(e,["className","name","themeColor","size","flip","style"]),d=u.useRef(null),p=u.useRef(null);u.useImperativeHandle(d,(function(){return{element:p.current}})),u.useImperativeHandle(t,(function(){return d.current}));var f=u.useMemo((function(){return r||ge.themeColor}),[r]),h=u.useMemo((function(){return i||ge.size}),[i]),g=u.useMemo((function(){return a||ge.flip}),[a]),m=u.useMemo((function(){return s("k-icon","k-i-"+o,"k-color-"+f,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},de[h],n)}),[o,f,h,g,n]),v=ce(e,d);return u.createElement("span",pe({ref:p},l,v,{className:m,style:c,role:"presentation"}))}));he.propTypes={style:h.object,classNames:h.string,name:h.string,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var ge={size:"default",themeColor:"inherit",flip:"default"};he.displayName="KendoIcon";var me=function(){return(me=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},ve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},we=u.forwardRef((function(e,t){var n=e.children,o=e.className,r=e.svgClassName,i=e.icon,a=e.flip,c=e.size,l=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=ve(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=u.useRef(null);u.useImperativeHandle(t,(function(){return{element:g.current}}));var m=u.useMemo((function(){return i?i.name:ye.icon}),[i]),v=u.useMemo((function(){return p||ye.themeColor}),[p]),w=u.useMemo((function(){return c||ye.size}),[c]),y=u.useMemo((function(){return a||ye.flip}),[a]),b=u.useMemo((function(){return f||ye.viewBox}),[f]),k=u.useMemo((function(){return s("k-svg-icon","k-color-"+v,"k-svg-i-"+m,{"k-flip-h":"horizontal"===y||"both"===y,"k-flip-v":"vertical"===y||"both"===y},de[w],o)}),[m,v,w,y,o]),E=u.useMemo((function(){return e.width&&e.height?me({width:e.width,height:e.height},l):e.width?me({width:e.width,height:e.width},l):e.height?me({width:e.height,height:e.height},l):me({},l)}),[e.width,e.height,l]);return u.createElement("span",{className:k,style:E,ref:g},u.createElement("svg",me({className:r,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:b,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));we.propTypes={style:h.object,classNames:h.string,children:h.any,icon:h.object,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var ye={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};we.displayName="KendoSvgIcon";var be={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ke={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Ee={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},Ce={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},Oe={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},Se={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},_e={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Me={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},De=function(){return(De=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},xe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},Te=function(e){var t=u.forwardRef((function(t,n){var o=t.className,r=t.fontSize,i=t.fontWeight,a=t.textAlign,s=t.textTransform,c=t.themeColor,l=t.margin,d=xe(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=u.useRef(null),f=u.useRef(null);u.useImperativeHandle(p,(function(){return{element:f.current,props:t}})),u.useImperativeHandle(n,(function(){return p.current}));var h=e,g=function(){if(void 0!==l){if("string"==typeof l)return[Ee[l]];if("number"==typeof l&&l>=0&&l<=24)return["k-m-"+l];if("object"==typeof l){var e=[];return Object.keys(l).forEach((function(t){var n,o;null!==l[t]&&void 0!==l[t]&&e.push((n=t,o=l[t],""+Oe[n]+("string"==typeof o?Ce[o]:o)))})),e.join(" ")}}};return u.createElement(h,De({ref:f,className:["k-"+("p"===e?"paragraph":e),be[r],ke[i],Se[a],_e[s],Me[c],g(),o].filter((function(e){return void 0!==e})).join(" ")},d),t.children)}));return t.propTypes={style:h.object,className:h.string,fontSize:h.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:h.oneOf(["light","normal","bold"]),margin:h.oneOfType([h.number,h.object,h.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:h.oneOf(["left","right","center","justify"]),textTransform:h.oneOf(["lowercase","uppercase","capitalize"]),themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},je={h1:Te("h1"),h2:Te("h2"),h3:Te("h3"),h4:Te("h4"),h5:Te("h5"),h6:Te("h6"),p:Te("p"),code:Te("code"),pre:Te("pre")}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(1),i=n(2);t.DialogActionsBar=function(e){var t=e.layout,n=void 0===t?a.layout:t,r=e.children,s=i.classNames("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return o.createElement("div",{className:s},r)},t.DialogActionsBar.propTypes={children:r.any,layout:r.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:1637163729,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}),function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(t.windowStage||(t.windowStage={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(1),i=n(2);t.WindowActionsBar=function(e){var t=e.layout,n=void 0===t?a.layout:t,r=e.children,s=i.classNames("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return o.createElement("div",{className:s},r)},t.WindowActionsBar.propTypes={children:r.any,layout:r.oneOf(["start","center","end","stretched"])};var a={layout:"end"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);t.Dialog=o.Dialog;var r=n(5);t.DialogActionsBar=r.DialogActionsBar;var i=n(12);t.Window=i.Window;var a=n(8);t.WindowActionsBar=a.WindowActionsBar},function(e,t,n){"use strict";var o,r=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)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),u=n(1),c=n(11),l=n(5),d=n(2),p=n(2),f=n(6),h=function(e){function t(t){var n=e.call(this,t)||this;return n.DialogRef=a.createRef(),n.titleId=n.generateTitleId(),n.handleCloseDialog=function(e){e.preventDefault(),d.dispatchEvent(n.props.onClose,e,n,void 0)},n.handleKeyDown=function(e){e.keyCode===d.Keys.esc&&n.props.onClose&&(e.preventDefault(),n.handleCloseDialog(e));var t=n.DialogRef.current;if(t&&e.keyCode===d.Keys.tab){var o=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),r=o[0],i=o[o.length-1];e.shiftKey?document.activeElement===r&&(i.focus(),e.preventDefault()):document.activeElement===i&&(r.focus(),e.preventDefault())}},p.validatePackage(f.packageMetadata),n}return r(t,e),t.prototype.componentDidMount=function(){this.DialogRef.current&&this.props.autoFocus&&this.DialogRef.current.focus()},t.prototype.render=function(){var e=void 0!==this.props.id?this.props.id:this.titleId,t=this.props,n=t.title,o=t.width,r=t.height,u=t.children,l=t.minWidth,d=t.dir,p=t.style,f=t.contentStyle,h=a.Children.toArray(u),g=this.getContent(h),m=this.getActionBar(h),v=n?{"aria-labelledby":e}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,y=a.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:d,style:p,ref:this.DialogRef},a.createElement("div",{className:"k-overlay"}),a.createElement("div",i({},v,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:r,minWidth:l}}),this.props.title&&a.createElement(c.DialogTitleBar,{closeIcon:w,onCloseButtonClick:this.handleCloseDialog,id:e},n),a.createElement("div",{className:"k-window-content k-dialog-content",style:f},g),m));return this.props.appendTo?s.createPortal(y,this.props.appendTo):y},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===l.DialogActionsBar}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==l.DialogActionsBar}))},t.prototype.generateTitleId=function(){return"dialog-title"+d.guid()},t.propTypes={title:u.any,id:u.string,dir:u.string,style:u.object,closeIcon:u.bool,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),minWidth:u.oneOfType([u.number,u.string]),autoFocus:u.bool},t.defaultProps={autoFocus:!1},t}(a.Component);t.Dialog=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,r=e.id,i=e.closeIcon;return o.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:r},o.createElement("div",{className:"k-window-title k-dialog-title"},t),o.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&o.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"},o.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,r=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)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),u=n(1),c=n(13),l=n(2),d=n(2),p=n(14),f=n(15),h=n(7),g=n(2),m=n(6),v=n(8),w=function(e){function t(t){var n=e.call(this,t)||this;return n.offSetCoordinates={x:0,y:0},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==h.windowStage.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==h.windowStage.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.handleKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,o=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case l.Keys.up:e.preventDefault(),o<=n.height-5&&n.setState({height:n.height-5});break;case l.Keys.down:e.preventDefault(),n.setState({height:n.height+5});break;case l.Keys.left:t<=n.width-5&&n.setState({width:n.width-5});break;case l.Keys.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case l.Keys.up:n.windowStage===h.windowStage.MINIMIZED?(n.handleRestore(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})):n.windowStage===h.windowStage.DEFAULT&&(n.handleFullscreen(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.FULLSCREEN}));break;case l.Keys.down:n.windowStage===h.windowStage.FULLSCREEN?(n.handleRestore(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})):n.windowStage===h.windowStage.DEFAULT&&(n.handleMinimize(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case l.Keys.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case l.Keys.up:n.setState({top:n.state.top-5});break;case l.Keys.down:n.setState({top:n.state.top+5});break;case l.Keys.left:n.setState({left:n.state.left-5});break;case l.Keys.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo?n.props.appendTo.offsetHeight/2-e/2:window.innerHeight/2-e/2},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo?n.props.appendTo.offsetWidth/2-e/2:window.innerWidth/2-e/2},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:h.windowStage.MINIMIZED,height:0}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:window.innerWidth,height:n.props.appendTo?n.props.appendTo.offsetHeight:window.innerHeight,stage:h.windowStage.FULLSCREEN}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===h.windowStage.FULLSCREEN?n.setState({stage:h.windowStage.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===h.windowStage.MINIMIZED&&n.setState({stage:h.windowStage.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),l.dispatchEvent(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===h.windowStage.FULLSCREEN||n.windowStage===h.windowStage.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var o=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,r=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,u=n.props.minHeight||100,c=n.top-r,l=n.left-o,d=o-n.left,p=r-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&u-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=r),t.direction.indexOf("s")>=0&&u-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+l)<0&&(n.left>0&&(f.width=i+l),f.left=o),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,o,r){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:o,end:r,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){n.windowStage===h.windowStage.FULLSCREEN&&n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:window.innerWidth,height:n.props.appendTo?n.props.appendTo.offsetHeight:window.innerHeight})},n.setZindex=function(){if(n.state.focused){var e=document&&document.querySelectorAll(".k-window"),t=10002;return e.forEach((function(e){var n=window.getComputedStyle(e,null),o=parseInt(null!==n.zIndex?n.zIndex:"10002",10);o>t&&(t=o)})),n.windowElement&&t.toString()===n.windowElement.style.zIndex?n.windowElement.style.zIndex:(t+1).toString()}return n.windowElement.style.zIndex},g.validatePackage(m.packageMetadata),n.state={stage:n.props.stage||h.windowStage.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return r(t,e),t.prototype.componentDidMount=function(){if(window&&window.addEventListener("resize",this.handleBrowserWindowResize),this.props.appendTo){var e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect();this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top}},t.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){if(this.props.appendTo){var e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect();this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top}},t.prototype.render=function(){var e=this,t=a.Children.toArray(this.props.children),n=this.getContent(t),o=this.getActionBar(t),r=l.classNames("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=a.createElement(a.Fragment,null,this.props.modal&&a.createElement("div",{className:"k-overlay"}),a.createElement("div",{tabIndex:0,onFocus:function(){return e.setState({focused:!0})},onBlur:function(){return e.setState({focused:!1})},onKeyDown:this.handleKeyDown,ref:function(t){return e.windowElement=t},className:r,style:i({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:this.setZindex()},this.props.style)},a.createElement(f.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},a.createElement(d.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.draggable=t}},a.createElement(c.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!==h.windowStage.MINIMIZED?a.createElement(a.Fragment,null,a.createElement("div",{className:"k-window-content"},n),o):null,this.windowStage===h.windowStage.DEFAULT&&this.props.resizable?a.createElement(p.ResizeHandlers,{onResize:this.handleResize}):null)));return this.props.appendTo?s.createPortal(u,this.props.appendTo):u},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==h.windowStage.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==h.windowStage.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===h.windowStage.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetWidth;e=window.innerWidth}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===h.windowStage.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;e=window.innerHeight}else this.windowStage===h.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===v.WindowActionsBar}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==v.WindowActionsBar}))},t.propTypes={id:u.string,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),left:u.oneOfType([u.number,u.string]),top:u.oneOfType([u.number,u.string]),initialwidth:u.oneOfType([u.number,u.string]),initialHeight:u.oneOfType([u.number,u.string]),initialLeft:u.oneOfType([u.number,u.string]),initialTop:u.oneOfType([u.number,u.string]),minWidth:u.oneOfType([u.number,u.string]),minHeight:u.oneOfType([u.number,u.string]),resizable:u.bool,draggable:u.bool,title:u.any,shouldUpdateOnDrag:u.bool,stage:u.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:u.string,style:u.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t}(a.Component);t.Window=w},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 r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(7),a=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,a=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,u=e.onDoubleClick,c=e.stage,l=e.forwardedRef,d=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},r.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),p=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:a,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:a},r.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),f=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:s},r.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),h=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},r.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:l,onDoubleClick:u},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},c===i.windowStage.DEFAULT&&d,c===i.windowStage.DEFAULT&&p,c!==i.windowStage.DEFAULT&&f,h))};t.WindowTitleBar=r.forwardRef((function(e,t){return r.createElement(a,o({},e,{forwardedRef:t}))}))},function(e,t,n){"use strict";var o,r=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 i=n(0),a=n(2),s=["n","e","s","w","se","sw","ne","nw"],u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return i.createElement("div",null," ",s.map((function(t,n){return i.createElement(a.Draggable,{key:n,onDrag:function(n){var o=n.event;o.originalEvent.preventDefault(),e.props.onResize(o,{end:!1,direction:t})},onRelease:function(n){var o=n.event;o.originalEvent.preventDefault(),e.props.onResize(o,{end:!0,direction:t})}},i.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(i.Component);t.ResizeHandlers=u},function(e,t,n){"use strict";var o,r=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 i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(n(0).Component);t.MiddleLayerOptimization=i}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing","react-dom"],t):"object"==typeof exports?exports.KendoReactDialogs=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):e.KendoReactDialogs=t(e.React,e.PropTypes,e.KendoLicensing,e.ReactDOM)}(window,(function(e,t,n,o){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserSupportService",(function(){return r})),n.d(t,"canUseDOM",(function(){return i})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s})),n.d(t,"cloneDate",(function(){return c})),n.d(t,"clone",(function(){return l})),n.d(t,"cloneObject",(function(){return d})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return f})),n.d(t,"Draggable",(function(){return M})),n.d(t,"focusFirstFocusableChild",(function(){return D})),n.d(t,"FormComponent",(function(){return x})),n.d(t,"getTabIndex",(function(){return T})),n.d(t,"getter",(function(){return I})),n.d(t,"guid",(function(){return P})),n.d(t,"Keys",(function(){return R})),n.d(t,"noop",(function(){return L})),n.d(t,"getScrollbarWidth",(function(){return A})),n.d(t,"setScrollbarWidth",(function(){return z})),n.d(t,"setter",(function(){return W})),n.d(t,"mapTree",(function(){return X})),n.d(t,"mapTreeItem",(function(){return Y})),n.d(t,"extendDataItem",(function(){return Z})),n.d(t,"getItemPath",(function(){return q})),n.d(t,"validatePackage",(function(){return $})),n.d(t,"hasRelativeStackingContext",(function(){return G})),n.d(t,"dispatchEvent",(function(){return J})),n.d(t,"AsyncFocusBlur",(function(){return te})),n.d(t,"createPropsContext",(function(){return re})),n.d(t,"withPropsContext",(function(){return ie})),n.d(t,"useDir",(function(){return ae})),n.d(t,"useAsyncFocusBlur",(function(){return Q})),n.d(t,"useDraggable",(function(){return se})),n.d(t,"useRtl",(function(){return ue})),n.d(t,"useMouse",(function(){return ce})),n.d(t,"useCustomComponent",(function(){return le})),n.d(t,"usePropsContext",(function(){return ne})),n.d(t,"Icon",(function(){return he})),n.d(t,"SvgIcon",(function(){return we})),n.d(t,"Typography",(function(){return je}));var o=function(){return"undefined"!=typeof document?document:{}},r=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=o();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),i=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?s.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},u=n(0),c=function(e){return e?new Date(e.getTime()):null};function l(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];t[n]=p(o,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(u.isValidElement(e))return u.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(1),g=function(e,t){return function(n){return t(e(n))}},m=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},v=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},w=function(){},y=function(e){return e.preventDefault()},b=/touch/;function k(e){return e.type.match(b)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var E=function(e){var t=this,n=e.press;void 0===n&&(n=w);var o=e.drag;void 0===o&&(o=w);var r=e.release;void 0===r&&(r=w);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=g(k,n),this._dragHandler=g(k,o),this._releaseHandler=g(k,r),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(m(t.document,"mousemove",t._mousemove),m(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){v(t.document,"mousemove",t._mousemove),v(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(m(t.document,"pointermove",t._pointermove),m(t.document,"pointerup",t._pointerup),m(t.document,"pointercancel",t._pointerup),m(t.document,"contextmenu",y),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(v(t.document,"pointermove",t._pointermove),v(t.document,"pointerup",t._pointerup),v(t.document,"pointercancel",t._pointerup),v(t.document,"contextmenu",y),t._releaseHandler(e))}},C={document:{configurable:!0}};E.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},C.document.get=function(){return this._element?this._element.ownerDocument:document},E.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},E.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?m(e,"pointerdown",this._pointerdown):(m(e,"mousedown",this._mousedown),this._mouseOnly||(m(e,"touchstart",this._touchstart),m(e,"touchmove",this._touchmove),m(e,"touchend",this._touchend)))},E.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return v(e,"pointerdown",this._pointerdown),v(this.document,"pointermove",this._pointermove),v(this.document,"pointerup",this._pointerup),v(this.document,"contextmenu",y),void v(this.document,"pointercancel",this._pointerup);v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend))},E.prototype._usePointers=function(){return!this._mouseOnly&&E.supportPointerEvent()},E.prototype.update=function(e){var t=e.press;void 0===t&&(t=w);var n=e.drag;void 0===n&&(n=w);var o=e.release;void 0===o&&(o=w);var r=e.mouseOnly;void 0===r&&(r=!1),this._pressHandler=g(k,t),this._dragHandler=g(k,n),this._releaseHandler=g(k,o),this._mouseOnly=r},E.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(E.prototype,C),E.default=E;var O,S=E,_=(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)}),M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new S({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.childRef=function(e){var n=t.props.childRef;t.element=e,n&&"function"==typeof n&&n(e)},t}return _(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return u.cloneElement(u.Children.only(this.props.children),{ref:this.childRef})},t.propTypes={children:h.element.isRequired},t}(u.Component),D=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}},x=function(){},T=function(e,t,n){var o="string"==typeof e?parseInt(e,void 0):e;if(NaN!==o)return void 0!==o?o:t?n?void 0:-1:0},j=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function B(e){var t=[];return e.replace(j,(function(e,n,o,r){t.push(void 0!==n?n:o||r)})),t}var N={};function I(e){if(N[e])return N[e];var t=B(e);return N[e]=function(e){for(var n=e,o=0;o<t.length&&n;o++)n=n[t[o]];return n},N[e]}N.undefined=function(){};var P=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},R={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},L=function(){},A=function(){return!(!i||!document.body)&&(new r).scrollbarWidth},z=function(){if(!i||!document.body)return!1;var e=(new r).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},F={undefined:function(e){return e}},U=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function W(e){if(F[e])return F[e];var t=B(e);return F[e]=function(e,n,o){for(var r=e,i=t.length-1,a=0;a<i&&r;a++)r=r[t[a]]=r[t[a]]||U(t[a+1],o);r[t[i]]=n},F[e]}var H=function(){return(H=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function K(e,t,n){var o;return n?H({},e,((o={})[t]=n.length?n.slice():void 0,o)):e&&e[t]?e[t].slice():[]}var X=function(e,t,n){return e.map((function(e){return function e(t,n,o){if(t[n]){var r=K(t,n).map((function(t){return e(t,n,o)}));return o(K(t,n,r))}return o(t)}(e,t,n)})).slice()},Y=function(e,t,n,o){for(var r=e,i=[],a=0;a<t.length;a++)r=r[t[a]],r=Array.isArray(r)?r:r[n],i.push(r);var s=i.length>1?i[i.length-2]:e,u=t[t.length-1],c=o(s[u]);s.splice(u,1,c)},Z=function(e,t,n){var o;return Object.assign({},e,e[t]?((o={})[t]=e[t].slice(),o):{},n||{})},q=function(e,t,n){var o=[],r=t.slice();if(r.length){var i=e[r.shift()||0];for(o.push(i);r.length&&n;)i=i[n][r.shift()||0],o.push(i)}return o},V=n(3);function $(e){if(void 0!==V)V.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}var G=function(e){if(!i)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var o=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),o};function J(e,t,n,o){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,o))}}function Q(e){var t=e.onFocus,n=e.onBlur,o=e.onSyncFocus,r=e.onSyncBlur,i=u.useRef(!1),a=u.useRef(0),s=u.useCallback((function(e){clearTimeout(a.current),a.current=window.setTimeout((function(){return e()}))}),[a]),c=u.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(a.current),o&&o.call.apply(o,[void 0].concat(e)),i.current||(i.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[i,t,o]),l=u.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r&&r.call.apply(r,[void 0].concat(e)),s((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,s,n,r]);return u.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:c,onBlur:l}}var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},te=function(e){var t=e.children,n=Q({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,ee({},n))},ne=function(e,t){return u.useContext(e)(t)},oe=function(){return(oe=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},re=function(){return u.createContext((function(e){return e}))},ie=function(e,t){return u.forwardRef((function(n,o){var r=ne(e,n);return u.createElement(t,oe({},r,{ref:o}))}))};function ae(e,t,n){var o=u.useState(t),r=o[0],i=o[1];return u.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}function se(e,t){var n=t.onPress,o=t.onDrag,r=t.onRelease,i=u.useMemo((function(){return new S({press:n,drag:o,release:r})}),[]);u.useEffect((function(){var t=e.current;if(t)return i.bindTo(t),function(){i.destroy()}}),[]),u.useEffect((function(){i.update({press:n,drag:o,release:r})}),[n,o,r])}function ue(e,t,n){var o=u.useState(t),r=o[0],i=o[1];return u.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}var ce=function(e,t,n){void 0===n&&(n={});var o=u.useCallback((function(o){n.onMouseDown&&n.onMouseDown.call(void 0,o),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseDown,e.onMouseDown,t]),r=u.useCallback((function(o){n.onMouseUp&&n.onMouseUp.call(void 0,o),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:u.useCallback((function(o){n.onClick&&n.onClick.call(void 0,o),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onClick,e.onClick,t]),onMouseUp:r,onMouseDown:o,onDoubleClick:u.useCallback((function(o){n.onDoubleClick&&n.onDoubleClick.call(void 0,o),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:u.useCallback((function(o){n.onMouseEnter&&n.onMouseEnter.call(void 0,o),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:u.useCallback((function(o){n.onMouseLeave&&n.onMouseLeave.call(void 0,o),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:u.useCallback((function(o){n.onMouseMove&&n.onMouseMove.call(void 0,o),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:u.useCallback((function(o){n.onMouseOut&&n.onMouseOut.call(void 0,o),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:u.useCallback((function(o){n.onMouseOver&&n.onMouseOver.call(void 0,o),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:o})}),[n.onMouseOver,e.onMouseOver,t])}},le=function(e){return u.isValidElement(e)?[e.type,e.props]:[e,{}]},de={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},fe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},he=u.forwardRef((function(e,t){var n=e.className,o=e.name,r=e.themeColor,i=e.size,a=e.flip,c=e.style,l=fe(e,["className","name","themeColor","size","flip","style"]),d=u.useRef(null),p=u.useRef(null);u.useImperativeHandle(d,(function(){return{element:p.current}})),u.useImperativeHandle(t,(function(){return d.current}));var f=u.useMemo((function(){return r||ge.themeColor}),[r]),h=u.useMemo((function(){return i||ge.size}),[i]),g=u.useMemo((function(){return a||ge.flip}),[a]),m=u.useMemo((function(){return s("k-icon","k-i-"+o,"k-color-"+f,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},de[h],n)}),[o,f,h,g,n]),v=ce(e,d);return u.createElement("span",pe({ref:p},l,v,{className:m,style:c,role:"presentation"}))}));he.propTypes={style:h.object,classNames:h.string,name:h.string,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var ge={size:"default",themeColor:"inherit",flip:"default"};he.displayName="KendoIcon";var me=function(){return(me=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},ve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},we=u.forwardRef((function(e,t){var n=e.children,o=e.className,r=e.svgClassName,i=e.icon,a=e.flip,c=e.size,l=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=ve(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=u.useRef(null);u.useImperativeHandle(t,(function(){return{element:g.current}}));var m=u.useMemo((function(){return i?i.name:ye.icon}),[i]),v=u.useMemo((function(){return p||ye.themeColor}),[p]),w=u.useMemo((function(){return c||ye.size}),[c]),y=u.useMemo((function(){return a||ye.flip}),[a]),b=u.useMemo((function(){return f||ye.viewBox}),[f]),k=u.useMemo((function(){return s("k-svg-icon","k-color-"+v,"k-svg-i-"+m,{"k-flip-h":"horizontal"===y||"both"===y,"k-flip-v":"vertical"===y||"both"===y},de[w],o)}),[m,v,w,y,o]),E=u.useMemo((function(){return e.width&&e.height?me({width:e.width,height:e.height},l):e.width?me({width:e.width,height:e.width},l):e.height?me({width:e.height,height:e.height},l):me({},l)}),[e.width,e.height,l]);return u.createElement("span",{className:k,style:E,ref:g},u.createElement("svg",me({className:r,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:b,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));we.propTypes={style:h.object,classNames:h.string,children:h.any,icon:h.object,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var ye={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};we.displayName="KendoSvgIcon";var be={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ke={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Ee={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},Ce={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},Oe={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},Se={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},_e={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Me={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},De=function(){return(De=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},xe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n},Te=function(e){var t=u.forwardRef((function(t,n){var o=t.className,r=t.fontSize,i=t.fontWeight,a=t.textAlign,s=t.textTransform,c=t.themeColor,l=t.margin,d=xe(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=u.useRef(null),f=u.useRef(null);u.useImperativeHandle(p,(function(){return{element:f.current,props:t}})),u.useImperativeHandle(n,(function(){return p.current}));var h=e,g=function(){if(void 0!==l){if("string"==typeof l)return[Ee[l]];if("number"==typeof l&&l>=0&&l<=24)return["k-m-"+l];if("object"==typeof l){var e=[];return Object.keys(l).forEach((function(t){var n,o;null!==l[t]&&void 0!==l[t]&&e.push((n=t,o=l[t],""+Oe[n]+("string"==typeof o?Ce[o]:o)))})),e.join(" ")}}};return u.createElement(h,De({ref:f,className:["k-"+("p"===e?"paragraph":e),be[r],ke[i],Se[a],_e[s],Me[c],g(),o].filter((function(e){return void 0!==e})).join(" ")},d),t.children)}));return t.propTypes={style:h.object,className:h.string,fontSize:h.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:h.oneOf(["light","normal","bold"]),margin:h.oneOfType([h.number,h.object,h.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:h.oneOf(["left","right","center","justify"]),textTransform:h.oneOf(["lowercase","uppercase","capitalize"]),themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},je={h1:Te("h1"),h2:Te("h2"),h3:Te("h3"),h4:Te("h4"),h5:Te("h5"),h6:Te("h6"),p:Te("p"),code:Te("code"),pre:Te("pre")}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(1),i=n(2);t.DialogActionsBar=function(e){var t=e.layout,n=void 0===t?a.layout:t,r=e.children,s=i.classNames("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return o.createElement("div",{className:s},r)},t.DialogActionsBar.propTypes={children:r.any,layout:r.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:1637569969,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}),function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(t.windowStage||(t.windowStage={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(1),i=n(2);t.WindowActionsBar=function(e){var t=e.layout,n=void 0===t?a.layout:t,r=e.children,s=i.classNames("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return o.createElement("div",{className:s},r)},t.WindowActionsBar.propTypes={children:r.any,layout:r.oneOf(["start","center","end","stretched"])};var a={layout:"end"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);t.Dialog=o.Dialog;var r=n(5);t.DialogActionsBar=r.DialogActionsBar;var i=n(12);t.Window=i.Window;var a=n(8);t.WindowActionsBar=a.WindowActionsBar},function(e,t,n){"use strict";var o,r=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)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),u=n(1),c=n(11),l=n(5),d=n(2),p=n(2),f=n(6),h=function(e){function t(t){var n=e.call(this,t)||this;return n.DialogRef=a.createRef(),n.titleId=n.generateTitleId(),n.handleCloseDialog=function(e){e.preventDefault(),d.dispatchEvent(n.props.onClose,e,n,void 0)},n.handleKeyDown=function(e){e.keyCode===d.Keys.esc&&n.props.onClose&&(e.preventDefault(),n.handleCloseDialog(e));var t=n.DialogRef.current;if(t&&e.keyCode===d.Keys.tab){var o=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),r=o[0],i=o[o.length-1];e.shiftKey?document.activeElement===r&&(i.focus(),e.preventDefault()):document.activeElement===i&&(r.focus(),e.preventDefault())}},p.validatePackage(f.packageMetadata),n}return r(t,e),t.prototype.componentDidMount=function(){this.DialogRef.current&&this.props.autoFocus&&this.DialogRef.current.focus()},t.prototype.render=function(){var e=void 0!==this.props.id?this.props.id:this.titleId,t=this.props,n=t.title,o=t.width,r=t.height,u=t.children,l=t.minWidth,d=t.dir,p=t.style,f=t.contentStyle,h=a.Children.toArray(u),g=this.getContent(h),m=this.getActionBar(h),v=n?{"aria-labelledby":e}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,y=a.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:d,style:p,ref:this.DialogRef},a.createElement("div",{className:"k-overlay"}),a.createElement("div",i({},v,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:r,minWidth:l}}),this.props.title&&a.createElement(c.DialogTitleBar,{closeIcon:w,onCloseButtonClick:this.handleCloseDialog,id:e},n),a.createElement("div",{className:"k-window-content k-dialog-content",style:f},g),m));return this.props.appendTo?s.createPortal(y,this.props.appendTo):y},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===l.DialogActionsBar}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==l.DialogActionsBar}))},t.prototype.generateTitleId=function(){return"dialog-title"+d.guid()},t.propTypes={title:u.any,id:u.string,dir:u.string,style:u.object,closeIcon:u.bool,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),minWidth:u.oneOfType([u.number,u.string]),autoFocus:u.bool},t.defaultProps={autoFocus:!1},t}(a.Component);t.Dialog=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.DialogTitleBar=function(e){var t=e.children,n=e.onCloseButtonClick,r=e.id,i=e.closeIcon;return o.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:r},o.createElement("div",{className:"k-window-title k-dialog-title"},t),o.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&o.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"},o.createElement("span",{className:"k-icon k-i-x"}))))}},function(e,t,n){"use strict";var o,r=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)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),u=n(1),c=n(13),l=n(2),d=n(2),p=n(14),f=n(15),h=n(7),g=n(2),m=n(6),v=n(8),w=function(e){function t(t){var n=e.call(this,t)||this;return n.offSetCoordinates={x:0,y:0},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==h.windowStage.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==h.windowStage.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.handleKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,o=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case l.Keys.up:e.preventDefault(),o<=n.height-5&&n.setState({height:n.height-5});break;case l.Keys.down:e.preventDefault(),n.setState({height:n.height+5});break;case l.Keys.left:t<=n.width-5&&n.setState({width:n.width-5});break;case l.Keys.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case l.Keys.up:n.windowStage===h.windowStage.MINIMIZED?(n.handleRestore(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})):n.windowStage===h.windowStage.DEFAULT&&(n.handleFullscreen(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.FULLSCREEN}));break;case l.Keys.down:n.windowStage===h.windowStage.FULLSCREEN?(n.handleRestore(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})):n.windowStage===h.windowStage.DEFAULT&&(n.handleMinimize(e),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case l.Keys.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case l.Keys.up:n.setState({top:n.state.top-5});break;case l.Keys.down:n.setState({top:n.state.top+5});break;case l.Keys.left:n.setState({left:n.state.left-5});break;case l.Keys.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo?n.props.appendTo.offsetHeight/2-e/2:window.innerHeight/2-e/2},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo?n.props.appendTo.offsetWidth/2-e/2:window.innerWidth/2-e/2},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:h.windowStage.MINIMIZED,height:0}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:window.innerWidth,height:n.props.appendTo?n.props.appendTo.offsetHeight:window.innerHeight,stage:h.windowStage.FULLSCREEN}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===h.windowStage.FULLSCREEN?n.setState({stage:h.windowStage.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===h.windowStage.MINIMIZED&&n.setState({stage:h.windowStage.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),l.dispatchEvent(n.props.onStageChange,e,n,{state:h.windowStage.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),l.dispatchEvent(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===h.windowStage.FULLSCREEN||n.windowStage===h.windowStage.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var o=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,r=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,u=n.props.minHeight||100,c=n.top-r,l=n.left-o,d=o-n.left,p=r-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&u-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=r),t.direction.indexOf("s")>=0&&u-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+l)<0&&(n.left>0&&(f.width=i+l),f.left=o),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,o,r){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:o,end:r,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){n.windowStage===h.windowStage.FULLSCREEN&&n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:window.innerWidth,height:n.props.appendTo?n.props.appendTo.offsetHeight:window.innerHeight})},n.setZindex=function(){if(n.state.focused){var e=document&&document.querySelectorAll(".k-window"),t=10002;return e.forEach((function(e){var n=window.getComputedStyle(e,null),o=parseInt(null!==n.zIndex?n.zIndex:"10002",10);o>t&&(t=o)})),n.windowElement&&t.toString()===n.windowElement.style.zIndex?n.windowElement.style.zIndex:(t+1).toString()}return n.windowElement.style.zIndex},g.validatePackage(m.packageMetadata),n.state={stage:n.props.stage||h.windowStage.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return r(t,e),t.prototype.componentDidMount=function(){if(window&&window.addEventListener("resize",this.handleBrowserWindowResize),this.props.appendTo){var e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect();this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top}},t.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){if(this.props.appendTo){var e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect();this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top}},t.prototype.render=function(){var e=this,t=a.Children.toArray(this.props.children),n=this.getContent(t),o=this.getActionBar(t),r=l.classNames("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=a.createElement(a.Fragment,null,this.props.modal&&a.createElement("div",{className:"k-overlay"}),a.createElement("div",{tabIndex:0,onFocus:function(){return e.setState({focused:!0})},onBlur:function(){return e.setState({focused:!1})},onKeyDown:this.handleKeyDown,ref:function(t){return e.windowElement=t},className:r,style:i({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:this.setZindex()},this.props.style)},a.createElement(f.MiddleLayerOptimization,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},a.createElement(d.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.draggable=t}},a.createElement(c.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!==h.windowStage.MINIMIZED?a.createElement(a.Fragment,null,a.createElement("div",{className:"k-window-content"},n),o):null,this.windowStage===h.windowStage.DEFAULT&&this.props.resizable?a.createElement(p.ResizeHandlers,{onResize:this.handleResize}):null)));return this.props.appendTo?s.createPortal(u,this.props.appendTo):u},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==h.windowStage.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==h.windowStage.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===h.windowStage.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetWidth;e=window.innerWidth}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===h.windowStage.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;e=window.innerHeight}else this.windowStage===h.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===v.WindowActionsBar}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==v.WindowActionsBar}))},t.propTypes={id:u.string,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),left:u.oneOfType([u.number,u.string]),top:u.oneOfType([u.number,u.string]),initialwidth:u.oneOfType([u.number,u.string]),initialHeight:u.oneOfType([u.number,u.string]),initialLeft:u.oneOfType([u.number,u.string]),initialTop:u.oneOfType([u.number,u.string]),minWidth:u.oneOfType([u.number,u.string]),minHeight:u.oneOfType([u.number,u.string]),resizable:u.bool,draggable:u.bool,title:u.any,shouldUpdateOnDrag:u.bool,stage:u.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:u.string,style:u.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t}(a.Component);t.Window=w},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 r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(7),a=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,a=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,u=e.onDoubleClick,c=e.stage,l=e.forwardedRef,d=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},r.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),p=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:a,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:a},r.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),f=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:s},r.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),h=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},r.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:l,onDoubleClick:u},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},c===i.windowStage.DEFAULT&&d,c===i.windowStage.DEFAULT&&p,c!==i.windowStage.DEFAULT&&f,h))};t.WindowTitleBar=r.forwardRef((function(e,t){return r.createElement(a,o({},e,{forwardedRef:t}))}))},function(e,t,n){"use strict";var o,r=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 i=n(0),a=n(2),s=["n","e","s","w","se","sw","ne","nw"],u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return i.createElement("div",null," ",s.map((function(t,n){return i.createElement(a.Draggable,{key:n,onDrag:function(n){var o=n.event;o.originalEvent.preventDefault(),e.props.onResize(o,{end:!1,direction:t})},onRelease:function(n){var o=n.event;o.originalEvent.preventDefault(),e.props.onResize(o,{end:!0,direction:t})}},i.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(i.Component);t.ResizeHandlers=u},function(e,t,n){"use strict";var o,r=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 i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(n(0).Component);t.MiddleLayerOptimization=i}])}));
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-dialogs',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1637569969,
|
|
9
9
|
version: '',
|
|
10
10
|
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'
|
|
11
11
|
};
|
|
@@ -7,7 +7,7 @@ exports.packageMetadata = {
|
|
|
7
7
|
name: '@progress/kendo-react-dialogs',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1637569969,
|
|
11
11
|
version: '',
|
|
12
12
|
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'
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-react-dialogs",["react","react-dom","prop-types","@progress/kendo-react-common"],function(r){var a,s,p,d;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){p=t(e)},function(e){d=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;n=[function(e,t){e.exports=a},function(e,t){e.exports=d},function(e,t){e.exports=p},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:1637163729,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}),(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(9);t.Dialog=o.Dialog;o=n(4);t.DialogActionsBar=o.DialogActionsBar;o=n(11);t.Window=o.Window;n=n(7);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)}),u=this&&this.__assign||function(){return(u=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,h=n(0),f=n(3),a=n(2),g=n(10),s=n(4),p=n(1),d=n(1),l=n(5),a=(r=h.Component,i(c,r),c.prototype.componentDidMount=function(){this.DialogRef.current&&this.props.autoFocus&&this.DialogRef.current.focus()},c.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,p=t.style,d=t.contentStyle,l=h.Children.toArray(r),c=this.getContent(l),t=this.getActionBar(l),r=n?{"aria-labelledby":e}:null,l=void 0===this.props.closeIcon||this.props.closeIcon,t=h.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:s,style:p,ref:this.DialogRef},h.createElement("div",{className:"k-overlay"}),h.createElement("div",u({},r,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:i,minWidth:a}}),this.props.title&&h.createElement(g.DialogTitleBar,{closeIcon:l,onCloseButtonClick:this.handleCloseDialog,id:e},n),h.createElement("div",{className:"k-window-content k-dialog-content",style:d},c),t));return this.props.appendTo?f.createPortal(t,this.props.appendTo):t},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"+p.guid()},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);function c(e){var o=r.call(this,e)||this;return o.DialogRef=h.createRef(),o.titleId=o.generateTitleId(),o.handleCloseDialog=function(e){e.preventDefault(),p.dispatchEvent(o.props.onClose,e,o,void 0)},o.handleKeyDown=function(e){e.keyCode===p.Keys.esc&&o.props.onClose&&(e.preventDefault(),o.handleCloseDialog(e));var t,n=o.DialogRef.current;n&&e.keyCode===p.Keys.tab&&(n=(t=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))[0],t=t[t.length-1],e.shiftKey?document.activeElement===n&&(t.focus(),e.preventDefault()):document.activeElement===t&&(n.focus(),e.preventDefault()))},d.validatePackage(l.packageMetadata),o}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)}),r=this&&this.__assign||function(){return(r=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 a,s=n(0),p=n(3),d=n(2),l=n(12),c=n(1),u=n(1),h=n(13),f=n(14),g=n(6),w=n(1),y=n(5),m=n(7),d=(a=s.Component,i(v,a),v.prototype.componentDidMount=function(){var e,t;window&&window.addEventListener("resize",this.handleBrowserWindowResize),this.props.appendTo&&(e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},v.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},v.prototype.componentDidUpdate=function(){var e,t;this.props.appendTo&&(e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},v.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=this.getContent(e),o=this.getActionBar(e),e=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(s.Fragment,null,this.props.modal&&s.createElement("div",{className:"k-overlay"}),s.createElement("div",{tabIndex:0,onFocus:function(){return t.setState({focused:!0})},onBlur:function(){return t.setState({focused:!1})},onKeyDown:this.handleKeyDown,ref:function(e){return t.windowElement=e},className:e,style:r({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:this.setZindex()},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 this.props.appendTo?p.createPortal(o,this.props.appendTo):o},Object.defineProperty(v.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(v.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(v.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;e=window.innerWidth}return e},enumerable:!0,configurable:!0}),Object.defineProperty(v.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;e=window.innerHeight}else this.windowStage===g.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),v.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===m.WindowActionsBar})},v.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==m.WindowActionsBar})},v.propTypes={id:d.string,width:d.oneOfType([d.number,d.string]),height:d.oneOfType([d.number,d.string]),left:d.oneOfType([d.number,d.string]),top:d.oneOfType([d.number,d.string]),initialwidth:d.oneOfType([d.number,d.string]),initialHeight:d.oneOfType([d.number,d.string]),initialLeft:d.oneOfType([d.number,d.string]),initialTop:d.oneOfType([d.number,d.string]),minWidth:d.oneOfType([d.number,d.string]),minHeight:d.oneOfType([d.number,d.string]),resizable:d.bool,draggable:d.bool,title:d.any,shouldUpdateOnDrag:d.bool,stage:d.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:d.string,style:d.object},v.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},v);function v(e){var h=a.call(this,e)||this;return h.offSetCoordinates={x:0,y: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.handleKeyDown=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.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;return void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),h.props.appendTo?h.props.appendTo.offsetHeight/2-e/2:window.innerHeight/2-e/2},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;return void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),h.props.appendTo?h.props.appendTo.offsetWidth/2-e/2:window.innerWidth/2-e/2},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,h.setState({left:0,top:0,width:h.props.appendTo?h.props.appendTo.offsetWidth:window.innerWidth,height:h.props.appendTo?h.props.appendTo.offsetHeight:window.innerHeight,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,p=h.top-o,d=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+p)<0&&(0<h.top&&(u.height=r+p),u.top=o),0<=t.direction.indexOf("s")&&s-c<0&&(u.height=c),0<=t.direction.indexOf("w")&&a-(i+d)<0&&(0<h.left&&(u.width=i+d),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(){h.windowStage===g.windowStage.FULLSCREEN&&h.setState({width:h.props.appendTo?h.props.appendTo.offsetWidth:window.innerWidth,height:h.props.appendTo?h.props.appendTo.offsetHeight:window.innerHeight})},h.setZindex=function(){if(h.state.focused){var e=document&&document.querySelectorAll(".k-window"),t=10002;return e.forEach(function(e){e=window.getComputedStyle(e,null),e=parseInt(null!==e.zIndex?e.zIndex:"10002",10);t<e&&(t=e)}),h.windowElement&&t.toString()===h.windowElement.style.zIndex?h.windowElement.style.zIndex:(t+1).toString()}return h.windowElement.style.zIndex},w.validatePackage(y.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},h.windowCoordinatesState={leftBeforeAction:h.getInitialLeft(),topBeforeAction:h.getInitialTop(),widthBeforeAction:h.getInitialWidth(),heightBeforeAction:h.getInitialHeight()},h}t.Window=d},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,p=e.forwardedRef,o=e.minimizeButton?d.createElement(e.minimizeButton,{onClick:o,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},d.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),i=e.maximizeButton?d.createElement(e.maximizeButton,{onClick:i,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},d.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),r=e.restoreButton?d.createElement(e.restoreButton,{onClick:r,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:r},d.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),n=e.closeButton?d.createElement(e.closeButton,{onClick:n,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},d.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return d.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:p,onDoubleClick:a},d.createElement("div",{className:"k-window-title"},t||""),d.createElement("div",{className:"k-window-actions"},s===l.windowStage.DEFAULT&&o,s===l.windowStage.DEFAULT&&i,s!==l.windowStage.DEFAULT&&r,n))}var d=n(0),l=n(6);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=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),p=["n","e","s","w","se","sw","ne","nw"],i=(r=a.Component,i(d,r),d.prototype.render=function(){var n=this;return a.createElement("div",null," ",p.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"}}))}))},d);function d(){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}],o={},i.m=n,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=8)}}});
|
|
1
|
+
System.register("@progress/kendo-react-dialogs",["react","react-dom","prop-types","@progress/kendo-react-common"],function(r){var a,s,p,d;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){p=t(e)},function(e){d=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;n=[function(e,t){e.exports=a},function(e,t){e.exports=d},function(e,t){e.exports=p},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:1637569969,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}),(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(9);t.Dialog=o.Dialog;o=n(4);t.DialogActionsBar=o.DialogActionsBar;o=n(11);t.Window=o.Window;n=n(7);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)}),u=this&&this.__assign||function(){return(u=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,h=n(0),f=n(3),a=n(2),g=n(10),s=n(4),p=n(1),d=n(1),l=n(5),a=(r=h.Component,i(c,r),c.prototype.componentDidMount=function(){this.DialogRef.current&&this.props.autoFocus&&this.DialogRef.current.focus()},c.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,p=t.style,d=t.contentStyle,l=h.Children.toArray(r),c=this.getContent(l),t=this.getActionBar(l),r=n?{"aria-labelledby":e}:null,l=void 0===this.props.closeIcon||this.props.closeIcon,t=h.createElement("div",{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.handleKeyDown,tabIndex:0,dir:s,style:p,ref:this.DialogRef},h.createElement("div",{className:"k-overlay"}),h.createElement("div",u({},r,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:o,height:i,minWidth:a}}),this.props.title&&h.createElement(g.DialogTitleBar,{closeIcon:l,onCloseButtonClick:this.handleCloseDialog,id:e},n),h.createElement("div",{className:"k-window-content k-dialog-content",style:d},c),t));return this.props.appendTo?f.createPortal(t,this.props.appendTo):t},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"+p.guid()},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);function c(e){var o=r.call(this,e)||this;return o.DialogRef=h.createRef(),o.titleId=o.generateTitleId(),o.handleCloseDialog=function(e){e.preventDefault(),p.dispatchEvent(o.props.onClose,e,o,void 0)},o.handleKeyDown=function(e){e.keyCode===p.Keys.esc&&o.props.onClose&&(e.preventDefault(),o.handleCloseDialog(e));var t,n=o.DialogRef.current;n&&e.keyCode===p.Keys.tab&&(n=(t=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))[0],t=t[t.length-1],e.shiftKey?document.activeElement===n&&(t.focus(),e.preventDefault()):document.activeElement===t&&(n.focus(),e.preventDefault()))},d.validatePackage(l.packageMetadata),o}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)}),r=this&&this.__assign||function(){return(r=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 a,s=n(0),p=n(3),d=n(2),l=n(12),c=n(1),u=n(1),h=n(13),f=n(14),g=n(6),w=n(1),y=n(5),m=n(7),d=(a=s.Component,i(v,a),v.prototype.componentDidMount=function(){var e,t;window&&window.addEventListener("resize",this.handleBrowserWindowResize),this.props.appendTo&&(e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},v.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},v.prototype.componentDidUpdate=function(){var e,t;this.props.appendTo&&(e=this.props.appendTo.getBoundingClientRect(),t=document.body.getBoundingClientRect(),this.offSetCoordinates.x=e.left-t.left,this.offSetCoordinates.y=e.top-t.top)},v.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=this.getContent(e),o=this.getActionBar(e),e=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(s.Fragment,null,this.props.modal&&s.createElement("div",{className:"k-overlay"}),s.createElement("div",{tabIndex:0,onFocus:function(){return t.setState({focused:!0})},onBlur:function(){return t.setState({focused:!1})},onKeyDown:this.handleKeyDown,ref:function(e){return t.windowElement=e},className:e,style:r({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:this.setZindex()},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 this.props.appendTo?p.createPortal(o,this.props.appendTo):o},Object.defineProperty(v.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(v.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(v.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;e=window.innerWidth}return e},enumerable:!0,configurable:!0}),Object.defineProperty(v.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;e=window.innerHeight}else this.windowStage===g.windowStage.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),v.prototype.getActionBar=function(e){return e.filter(function(e){return e&&e.type===m.WindowActionsBar})},v.prototype.getContent=function(e){return e.filter(function(e){return e&&e.type!==m.WindowActionsBar})},v.propTypes={id:d.string,width:d.oneOfType([d.number,d.string]),height:d.oneOfType([d.number,d.string]),left:d.oneOfType([d.number,d.string]),top:d.oneOfType([d.number,d.string]),initialwidth:d.oneOfType([d.number,d.string]),initialHeight:d.oneOfType([d.number,d.string]),initialLeft:d.oneOfType([d.number,d.string]),initialTop:d.oneOfType([d.number,d.string]),minWidth:d.oneOfType([d.number,d.string]),minHeight:d.oneOfType([d.number,d.string]),resizable:d.bool,draggable:d.bool,title:d.any,shouldUpdateOnDrag:d.bool,stage:d.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:d.string,style:d.object},v.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},v);function v(e){var h=a.call(this,e)||this;return h.offSetCoordinates={x:0,y: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.handleKeyDown=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.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;return void 0!==h.props.height?e=h.props.height:void 0!==h.props.initialHeight&&(e=h.props.initialHeight),h.props.appendTo?h.props.appendTo.offsetHeight/2-e/2:window.innerHeight/2-e/2},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;return void 0!==h.props.width?e=h.props.width:void 0!==h.props.initialWidth&&(e=h.props.initialWidth),h.props.appendTo?h.props.appendTo.offsetWidth/2-e/2:window.innerWidth/2-e/2},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,h.setState({left:0,top:0,width:h.props.appendTo?h.props.appendTo.offsetWidth:window.innerWidth,height:h.props.appendTo?h.props.appendTo.offsetHeight:window.innerHeight,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,p=h.top-o,d=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+p)<0&&(0<h.top&&(u.height=r+p),u.top=o),0<=t.direction.indexOf("s")&&s-c<0&&(u.height=c),0<=t.direction.indexOf("w")&&a-(i+d)<0&&(0<h.left&&(u.width=i+d),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(){h.windowStage===g.windowStage.FULLSCREEN&&h.setState({width:h.props.appendTo?h.props.appendTo.offsetWidth:window.innerWidth,height:h.props.appendTo?h.props.appendTo.offsetHeight:window.innerHeight})},h.setZindex=function(){if(h.state.focused){var e=document&&document.querySelectorAll(".k-window"),t=10002;return e.forEach(function(e){e=window.getComputedStyle(e,null),e=parseInt(null!==e.zIndex?e.zIndex:"10002",10);t<e&&(t=e)}),h.windowElement&&t.toString()===h.windowElement.style.zIndex?h.windowElement.style.zIndex:(t+1).toString()}return h.windowElement.style.zIndex},w.validatePackage(y.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},h.windowCoordinatesState={leftBeforeAction:h.getInitialLeft(),topBeforeAction:h.getInitialTop(),widthBeforeAction:h.getInitialWidth(),heightBeforeAction:h.getInitialHeight()},h}t.Window=d},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,p=e.forwardedRef,o=e.minimizeButton?d.createElement(e.minimizeButton,{onClick:o,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},d.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),i=e.maximizeButton?d.createElement(e.maximizeButton,{onClick:i,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},d.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),r=e.restoreButton?d.createElement(e.restoreButton,{onClick:r,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:r},d.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),n=e.closeButton?d.createElement(e.closeButton,{onClick:n,stage:s}):d.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},d.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return d.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:p,onDoubleClick:a},d.createElement("div",{className:"k-window-title"},t||""),d.createElement("div",{className:"k-window-actions"},s===l.windowStage.DEFAULT&&o,s===l.windowStage.DEFAULT&&i,s!==l.windowStage.DEFAULT&&r,n))}var d=n(0),l=n(6);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=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),p=["n","e","s","w","se","sw","ne","nw"],i=(r=a.Component,i(d,r),d.prototype.render=function(){var n=this;return a.createElement("div",null," ",p.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"}}))}))},d);function d(){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}],o={},i.m=n,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=8)}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dialogs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0-dev.202111220849",
|
|
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.
|
|
38
|
+
"@progress/kendo-react-common": "4.12.0-dev.202111220849",
|
|
39
39
|
"prop-types": "^15.6.0"
|
|
40
40
|
},
|
|
41
41
|
"@progress": {
|