@progress/kendo-react-tooltip 4.11.0 → 4.13.0-dev.202111231559
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.KendoReactTooltip=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):e.KendoReactTooltip=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=4)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},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 u})),n.d(t,"classNames",(function(){return l})),n.d(t,"cloneDate",(function(){return a})),n.d(t,"clone",(function(){return c})),n.d(t,"cloneObject",(function(){return p})),n.d(t,"cloneValue",(function(){return f})),n.d(t,"cloneArray",(function(){return d})),n.d(t,"Draggable",(function(){return C})),n.d(t,"focusFirstFocusableChild",(function(){return T})),n.d(t,"FormComponent",(function(){return P})),n.d(t,"getTabIndex",(function(){return j})),n.d(t,"getter",(function(){return N})),n.d(t,"guid",(function(){return R})),n.d(t,"Keys",(function(){return H})),n.d(t,"noop",(function(){return L})),n.d(t,"getScrollbarWidth",(function(){return B})),n.d(t,"setScrollbarWidth",(function(){return U})),n.d(t,"setter",(function(){return F})),n.d(t,"mapTree",(function(){return X})),n.d(t,"mapTreeItem",(function(){return Y})),n.d(t,"extendDataItem",(function(){return q})),n.d(t,"getItemPath",(function(){return V})),n.d(t,"validatePackage",(function(){return G})),n.d(t,"hasRelativeStackingContext",(function(){return J})),n.d(t,"dispatchEvent",(function(){return Q})),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 ue})),n.d(t,"useAsyncFocusBlur",(function(){return Z})),n.d(t,"useDraggable",(function(){return le})),n.d(t,"useRtl",(function(){return se})),n.d(t,"useMouse",(function(){return ae})),n.d(t,"useCustomComponent",(function(){return ce})),n.d(t,"usePropsContext",(function(){return ne})),n.d(t,"Icon",(function(){return he})),n.d(t,"SvgIcon",(function(){return ye})),n.d(t,"Typography",(function(){return De}));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),u=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))},l=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)?l.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(" ")},s=n(0),a=function(e){return e?new Date(e.getTime()):null};function c(e){var t={};return p(e,t),t}function p(e,t){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];t[n]=f(o,t[n])}}function f(e,t){if(Array.isArray(e))return d(e);if(e instanceof Date)return a(e);if(s.isValidElement(e))return s.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return p(e,n),n}return e}function d(e){return e.map((function(e){return f(e,void 0)}))}var h=n(1),m=function(e,t){return function(n){return t(e(n))}},v=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},g=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},y=function(){},b=function(e){return e.preventDefault()},w=/touch/;function O(e){return e.type.match(w)?{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 k=function(e){var t=this,n=e.press;void 0===n&&(n=y);var o=e.drag;void 0===o&&(o=y);var r=e.release;void 0===r&&(r=y);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=m(O,n),this._dragHandler=m(O,o),this._releaseHandler=m(O,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||(v(t.document,"mousemove",t._mousemove),v(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){g(t.document,"mousemove",t._mousemove),g(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(t.document,"pointermove",t._pointermove),v(t.document,"pointerup",t._pointerup),v(t.document,"pointercancel",t._pointerup),v(t.document,"contextmenu",b),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(g(t.document,"pointermove",t._pointermove),g(t.document,"pointerup",t._pointerup),g(t.document,"pointercancel",t._pointerup),g(t.document,"contextmenu",b),t._releaseHandler(e))}},_={document:{configurable:!0}};k.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},_.document.get=function(){return this._element?this._element.ownerDocument:document},k.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},k.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?v(e,"pointerdown",this._pointerdown):(v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend)))},k.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return g(e,"pointerdown",this._pointerdown),g(this.document,"pointermove",this._pointermove),g(this.document,"pointerup",this._pointerup),g(this.document,"contextmenu",b),void g(this.document,"pointercancel",this._pointerup);g(e,"mousedown",this._mousedown),this._mouseOnly||(g(e,"touchstart",this._touchstart),g(e,"touchmove",this._touchmove),g(e,"touchend",this._touchend))},k.prototype._usePointers=function(){return!this._mouseOnly&&k.supportPointerEvent()},k.prototype.update=function(e){var t=e.press;void 0===t&&(t=y);var n=e.drag;void 0===n&&(n=y);var o=e.release;void 0===o&&(o=y);var r=e.mouseOnly;void 0===r&&(r=!1),this._pressHandler=m(O,t),this._dragHandler=m(O,n),this._releaseHandler=m(O,o),this._mouseOnly=r},k.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(k.prototype,_),k.default=k;var M,E=k,x=(M=function(e,t){return(M=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}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new E({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 x(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 s.cloneElement(s.Children.only(this.props.children),{ref:this.childRef})},t.propTypes={children:h.element.isRequired},t}(s.Component),T=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()}},P=function(){},j=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},D=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function S(e){var t=[];return e.replace(D,(function(e,n,o,r){t.push(void 0!==n?n:o||r)})),t}var I={};function N(e){if(I[e])return I[e];var t=S(e);return I[e]=function(e){for(var n=e,o=0;o<t.length&&n;o++)n=n[t[o]];return n},I[e]}I.undefined=function(){};var R=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},H={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(){},B=function(){return!(!i||!document.body)&&(new r).scrollbarWidth},U=function(){if(!i||!document.body)return!1;var e=(new r).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},z={undefined:function(e){return e}},A=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function F(e){if(z[e])return z[e];var t=S(e);return z[e]=function(e,n,o){for(var r=e,i=t.length-1,u=0;u<i&&r;u++)r=r[t[u]]=r[t[u]]||A(t[u+1],o);r[t[i]]=n},z[e]}var K=function(){return(K=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 W(e,t,n){var o;return n?K({},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=W(t,n).map((function(t){return e(t,n,o)}));return o(W(t,n,r))}return o(t)}(e,t,n)})).slice()},Y=function(e,t,n,o){for(var r=e,i=[],u=0;u<t.length;u++)r=r[t[u]],r=Array.isArray(r)?r:r[n],i.push(r);var l=i.length>1?i[i.length-2]:e,s=t[t.length-1],a=o(l[s]);l.splice(s,1,a)},q=function(e,t,n){var o;return Object.assign({},e,e[t]?((o={})[t]=e[t].slice(),o):{},n||{})},V=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},$=n(2);function G(e){if(void 0!==$)$.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 J=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 Q(e,t,n,o){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,o))}}function Z(e){var t=e.onFocus,n=e.onBlur,o=e.onSyncFocus,r=e.onSyncBlur,i=s.useRef(!1),u=s.useRef(0),l=s.useCallback((function(e){clearTimeout(u.current),u.current=window.setTimeout((function(){return e()}))}),[u]),a=s.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(u.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]),c=s.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r&&r.call.apply(r,[void 0].concat(e)),l((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,l,n,r]);return s.useEffect((function(){return function(){clearTimeout(u.current)}}),[]),{onFocus:a,onBlur:c}}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=Z({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,ee({},n))},ne=function(e,t){return s.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 s.createContext((function(e){return e}))},ie=function(e,t){return s.forwardRef((function(n,o){var r=ne(e,n);return s.createElement(t,oe({},r,{ref:o}))}))};function ue(e,t,n){var o=s.useState(t),r=o[0],i=o[1];return s.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}function le(e,t){var n=t.onPress,o=t.onDrag,r=t.onRelease,i=s.useMemo((function(){return new E({press:n,drag:o,release:r})}),[]);s.useEffect((function(){var t=e.current;if(t)return i.bindTo(t),function(){i.destroy()}}),[]),s.useEffect((function(){i.update({press:n,drag:o,release:r})}),[n,o,r])}function se(e,t,n){var o=s.useState(t),r=o[0],i=o[1];return s.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),r}var ae=function(e,t,n){void 0===n&&(n={});var o=s.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=s.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:s.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:s.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:s.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:s.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:s.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:s.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:s.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])}},ce=function(e){return s.isValidElement(e)?[e.type,e.props]:[e,{}]},pe={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},fe=function(){return(fe=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)},de=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=s.forwardRef((function(e,t){var n=e.className,o=e.name,r=e.themeColor,i=e.size,u=e.flip,a=e.style,c=de(e,["className","name","themeColor","size","flip","style"]),p=s.useRef(null),f=s.useRef(null);s.useImperativeHandle(p,(function(){return{element:f.current}})),s.useImperativeHandle(t,(function(){return p.current}));var d=s.useMemo((function(){return r||me.themeColor}),[r]),h=s.useMemo((function(){return i||me.size}),[i]),m=s.useMemo((function(){return u||me.flip}),[u]),v=s.useMemo((function(){return l("k-icon","k-i-"+o,"k-color-"+d,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},pe[h],n)}),[o,d,h,m,n]),g=ae(e,p);return s.createElement("span",fe({ref:f},c,g,{className:v,style:a,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 me={size:"default",themeColor:"inherit",flip:"default"};he.displayName="KendoIcon";var ve=function(){return(ve=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)},ge=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},ye=s.forwardRef((function(e,t){var n=e.children,o=e.className,r=e.svgClassName,i=e.icon,u=e.flip,a=e.size,c=e.style,p=e.svgStyle,f=e.themeColor,d=e.viewBox,h=ge(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=s.useRef(null);s.useImperativeHandle(t,(function(){return{element:m.current}}));var v=s.useMemo((function(){return i?i.name:be.icon}),[i]),g=s.useMemo((function(){return f||be.themeColor}),[f]),y=s.useMemo((function(){return a||be.size}),[a]),b=s.useMemo((function(){return u||be.flip}),[u]),w=s.useMemo((function(){return d||be.viewBox}),[d]),O=s.useMemo((function(){return l("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},pe[y],o)}),[v,g,y,b,o]),k=s.useMemo((function(){return e.width&&e.height?ve({width:e.width,height:e.height},c):e.width?ve({width:e.width,height:e.width},c):e.height?ve({width:e.height,height:e.height},c):ve({},c)}),[e.width,e.height,c]);return s.createElement("span",{className:O,style:k,ref:m},s.createElement("svg",ve({className:r,style:p,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:w,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));ye.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 be={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};ye.displayName="KendoSvgIcon";var we={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},Oe={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ke={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"},_e={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},Me={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},Ee={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},xe={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Ce={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"},Te=function(){return(Te=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)},Pe=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},je=function(e){var t=s.forwardRef((function(t,n){var o=t.className,r=t.fontSize,i=t.fontWeight,u=t.textAlign,l=t.textTransform,a=t.themeColor,c=t.margin,p=Pe(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),f=s.useRef(null),d=s.useRef(null);s.useImperativeHandle(f,(function(){return{element:d.current,props:t}})),s.useImperativeHandle(n,(function(){return f.current}));var h=e,m=function(){if(void 0!==c){if("string"==typeof c)return[ke[c]];if("number"==typeof c&&c>=0&&c<=24)return["k-m-"+c];if("object"==typeof c){var e=[];return Object.keys(c).forEach((function(t){var n,o;null!==c[t]&&void 0!==c[t]&&e.push((n=t,o=c[t],""+Me[n]+("string"==typeof o?_e[o]:o)))})),e.join(" ")}}};return s.createElement(h,Te({ref:d,className:["k-"+("p"===e?"paragraph":e),we[r],Oe[i],Ee[u],xe[l],Ce[a],m(),o].filter((function(e){return void 0!==e})).join(" ")},p),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},De={h1:je("h1"),h2:je("h2"),h3:je("h3"),h4:je("h4"),h5:je("h5"),h6:je("h6"),p:je("p"),code:je("code"),pre:je("pre")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.Tooltip=o.Tooltip},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)},u=this&&this.__rest||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};Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),s=n(6),a=n(1),c=n(3),p=n(7),f=n(3),d=n(8),h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={targetElement:null,open:!1,title:""},n.top=0,n.left=0,n.willOpen=!1,n.handleMouseOut=function(e){var t=n.state.targetElement,o=t?t.ownerDocument:document,r=o&&o.elementFromPoint(e.clientX,e.clientY);p.isTooltipElement(r)||n.props.open||(clearInterval(n.updateIntervalId),n.willOpen=!1,n.onClose(e))},n.handleMouseOver=function(e){var t=e.target;n.isVisible(t)&&!p.isTooltipElement(t)&&t!==n.state.targetElement&&n.showToolTip(e)},n.handleBodyMousemove=function(e){n.top=e.clientY,n.left=e.clientX},n.onClose=function(e){c.dispatchEvent(n.props.onClose,e,n,void 0),n.setState({targetElement:null,open:!1,title:""})},n.setUpdateInterval=function(){n.props.updateInterval&&(n.updateIntervalId=setInterval(n.onIntervalUpdate,n.props.updateInterval))},n.onIntervalUpdate=function(){var e=n.state.targetElement;e&&(null===e.parentElement?n.onClose({target:e}):n.showToolTip({target:e}))},n.position=function(e){var t=p.getDomRect(n.state.targetElement);return{left:p.getLeftPosition(n.left,e.offsetWidth,t,n.props.anchorElement,n.props.position),top:p.getTopPosition(n.top,t,e.offsetHeight,n.props.anchorElement,n.props.position)}},n.getTitle=function(e){for(;e;){if(null!==e.getAttribute("title")||e.titleExpando)return{title:e.getAttribute("title")||e.titleExpando,element:e};e=n.props.parentTitle&&e.parentElement||null}return{title:"",element:e}},n.calloutClassName=function(){switch(n.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return n.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},f.validatePackage(d.packageMetadata),n}return r(t,e),t.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},t.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},t.prototype.componentDidUpdate=function(){this.props.open&&this.props.targetElement&&this.showToolTip({target:this.props.targetElement})},t.prototype.render=function(){var e=this;if(this.props.children){var n=this.props,o=n.children,r=u(n,["children"]),a=null;return l.createElement("div",{onMouseOver:function(e){a&&a.handleMouseOver(e)},onMouseOut:function(e){a&&a.handleMouseOut(e)}},l.createElement(t,i({ref:function(e){return a=e}},r)),o)}if(!1===this.props.open)return null;var p=this.state.targetElement;return p&&this.state.title&&p.ownerDocument&&s.createPortal(l.createElement("div",{ref:function(t){var n;t&&(n=e.props.onPosition?e.props.onPosition.call(void 0,{element:t,targetElement:e.state.targetElement,mouseTop:e.top,mouseLeft:e.left,anchorElement:e.props.anchorElement,position:e.props.position,target:e}):e.position(t),t.style.left=n.left+"px",t.style.top=n.top+"px")},className:c.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:this.props.style,tabIndex:0},l.createElement("div",{className:c.classNames("k-tooltip",this.props.tooltipClassName),style:i({position:"relative"},this.props.tooltipStyle)},l.createElement("div",{className:"k-tooltip-content"},this.props.content&&l.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&l.createElement("div",{ref:function(t){t&&(t.className=e.calloutClassName(),"auto"===e.props.position&&(e.left<window.screen.availWidth/2?t.style.left=e.props.setCalloutOnPositionAuto||"25%":t.style.left=e.props.setCalloutOnPositionAuto||"75%"))}}))),this.props.appendTo?this.props.appendTo:p.ownerDocument.body)},t.prototype.showToolTip=function(e){var t=this;clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),e.target.hasChildNodes()&&e.target.childNodes.forEach((function(t){"title"===t.nodeName&&(e.target.titleExpando=t.innerHTML,t.remove())}));var n=this.props.targetElement||e.target,o=this.getTitle(n);o.title?(o.element&&(o.element.titleExpando=o.title,o.element.title=""),this.willOpen=!0,this.props.openDelay?this.openTimeoutId=window.setTimeout((function(){t.willOpen&&t.setState({targetElement:n,open:!0,title:o.title},t.setUpdateInterval)}),this.props.openDelay):this.setState({targetElement:n,open:!0,title:o.title},this.setUpdateInterval),this.state.title!==o.title&&c.dispatchEvent(this.props.onOpen,e,this,void 0)):this.state.open&&this.onClose(e)},t.prototype.isVisible=function(e){return!this.props.filter||this.props.filter(e)},t.propTypes={anchorElement:a.oneOf(["pointer","target"]),content:a.func,filter:a.func,openDelay:a.number,position:a.oneOf(["right","left","top","bottom","auto"]),updateInterval:a.number},t.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},t}(l.PureComponent);t.Tooltip=h},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getLeftPosition=function(e,t,n,o,r){switch(r){case"bottom":return"pointer"===o?e-t/2:n.left-t/2+n.width/2;case"left":return"pointer"===o?e-t-10:n.left-t-10;case"right":return"pointer"===o?e+10:n.right+10;case"top":return"pointer"===o?e-t/2:n.left-t/2+n.width/2;default:return"pointer"===o?e<window.screen.availWidth/2?e-10:e-t+10:e<window.screen.availWidth/2?n.left:n.right-t}},t.getTopPosition=function(e,t,n,o,r){switch(r){case"bottom":return"pointer"===o?e+10:t.bottom+10;case"left":case"right":return"pointer"===o?e-n/2:t.top-n/2+t.height/2;case"top":return"pointer"===o?e-n-10:t.top-n-10;default:return"pointer"===o?e<window.innerHeight/2?e+10:e-n-10:e<window.innerHeight/2?t.bottom+10:t.top-n-10}},t.getDomRect=function(e){return null!==e?e.getBoundingClientRect():document.body.getBoundingClientRect()},t.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],t.isTooltipElement=function(e){if(null===e)return!1;for(var n=e;n;){if(null!==n&&n.classList&&n.classList.contains("k-tooltip"))return!0;n=null!==n.parentNode&&n.parentNode}return t.toolTipSelectors.filter((function(t){return t===e.className})).length>0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1637236861,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"}}])}));
|
|
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.KendoReactTooltip=t(require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("react-dom")):e.KendoReactTooltip=t(e.React,e.PropTypes,e.KendoLicensing,e.ReactDOM)}(window,(function(e,t,n,r){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=4)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserSupportService",(function(){return o})),n.d(t,"canUseDOM",(function(){return i})),n.d(t,"canUseRef",(function(){return l})),n.d(t,"classNames",(function(){return a})),n.d(t,"cloneDate",(function(){return c})),n.d(t,"clone",(function(){return s})),n.d(t,"cloneObject",(function(){return f})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return d})),n.d(t,"focusFirstFocusableChild",(function(){return v})),n.d(t,"FormComponent",(function(){return m})),n.d(t,"getTabIndex",(function(){return h})),n.d(t,"getter",(function(){return O})),n.d(t,"guid",(function(){return E})),n.d(t,"Keys",(function(){return C})),n.d(t,"noop",(function(){return k})),n.d(t,"getScrollbarWidth",(function(){return w})),n.d(t,"setScrollbarWidth",(function(){return D})),n.d(t,"setter",(function(){return T})),n.d(t,"mapTree",(function(){return N})),n.d(t,"mapTreeItem",(function(){return S})),n.d(t,"extendDataItem",(function(){return L})),n.d(t,"getItemPath",(function(){return _})),n.d(t,"validatePackage",(function(){return j})),n.d(t,"hasRelativeStackingContext",(function(){return U})),n.d(t,"dispatchEvent",(function(){return A})),n.d(t,"AsyncFocusBlur",(function(){return X})),n.d(t,"createPropsContext",(function(){return W})),n.d(t,"withPropsContext",(function(){return z})),n.d(t,"useDir",(function(){return V})),n.d(t,"useAsyncFocusBlur",(function(){return H})),n.d(t,"useRtl",(function(){return F})),n.d(t,"useMouse",(function(){return G})),n.d(t,"useCustomComponent",(function(){return $})),n.d(t,"usePropsContext",(function(){return B})),n.d(t,"COLLECTION_ACTION",(function(){return q})),n.d(t,"useCollection",(function(){return J})),n.d(t,"Icon",(function(){return ne})),n.d(t,"SvgIcon",(function(){return le})),n.d(t,"Typography",(function(){return Oe})),n.d(t,"DragAndDrop",(function(){return He})),n.d(t,"Draggable",(function(){return Ke})),n.d(t,"Droppable",(function(){return Xe})),n.d(t,"useDraggable",(function(){return Ie})),n.d(t,"useDroppable",(function(){return je}));var r=function(){return"undefined"!=typeof document?document:{}},o=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=r();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),l=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))},a=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)?a.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 s(e){var t={};return f(e,t),t}function f(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=p(r,t[n])}}function p(e,t){if(Array.isArray(e))return d(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 f(e,n),n}return e}function d(e){return e.map((function(e){return p(e,void 0)}))}var v=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()}},m=function(){},h=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0},g=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function y(e){var t=[];return e.replace(g,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var b={};function O(e){if(b[e])return b[e];var t=y(e);return b[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},b[e]}b.undefined=function(){};var E=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},C={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},k=function(){},w=function(){return!(!i||!document.body)&&(new o).scrollbarWidth},D=function(){if(!i||!document.body)return!1;var e=(new o).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},x={undefined:function(e){return e}},M=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function T(e){if(x[e])return x[e];var t=y(e);return x[e]=function(e,n,r){for(var o=e,i=t.length-1,l=0;l<i&&o;l++)o=o[t[l]]=o[t[l]]||M(t[l+1],r);o[t[i]]=n},x[e]}var P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function R(e,t,n){var r;return n?P({},e,((r={})[t]=n.length?n.slice():void 0,r)):e&&e[t]?e[t].slice():[]}var N=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var o=R(t,n).map((function(t){return e(t,n,r)}));return r(R(t,n,o))}return r(t)}(e,t,n)})).slice()},S=function(e,t,n,r){for(var o=e,i=[],l=0;l<t.length;l++)o=o[t[l]],o=Array.isArray(o)?o:o[n],i.push(o);var a=i.length>1?i[i.length-2]:e,u=t[t.length-1],c=r(a[u]);a.splice(u,1,c)},L=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},_=function(e,t,n){var r=[],o=t.slice();if(o.length){var i=e[o.shift()||0];for(r.push(i);o.length&&n;)i=i[n][o.shift()||0],r.push(i)}return r},I=n(2);function j(e){if(void 0!==I)I.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 U=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 r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r};function A(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}function H(e){var t=e.onFocus,n=e.onBlur,r=e.onSyncFocus,o=e.onSyncBlur,i=u.useRef(!1),l=u.useRef(0),a=u.useCallback((function(e){clearTimeout(l.current),l.current=window.setTimeout((function(){return e()}))}),[l]),c=u.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(l.current),r&&r.call.apply(r,[void 0].concat(e)),i.current||(i.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[i,t,r]),s=u.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o&&o.call.apply(o,[void 0].concat(e)),a((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,a,n,o]);return u.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),{onFocus:c,onBlur:s}}var K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},X=function(e){var t=e.children,n=H({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,K({},n))},B=function(e,t){return u.useContext(e)(t)},Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},W=function(){return u.createContext((function(e){return e}))},z=function(e,t){return u.forwardRef((function(n,r){var o=B(e,n);return u.createElement(t,Y({},o,{ref:r}))}))};function V(e,t,n){var r=u.useState(t),o=r[0],i=r[1];return u.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}function F(e,t,n){var r=u.useState(t),o=r[0],i=r[1];return u.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}var q,G=function(e,t,n){void 0===n&&(n={});var r=u.useCallback((function(r){n.onMouseDown&&n.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseDown,e.onMouseDown,t]),o=u.useCallback((function(r){n.onMouseUp&&n.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:u.useCallback((function(r){n.onClick&&n.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onClick,e.onClick,t]),onMouseUp:o,onMouseDown:r,onDoubleClick:u.useCallback((function(r){n.onDoubleClick&&n.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:u.useCallback((function(r){n.onMouseEnter&&n.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:u.useCallback((function(r){n.onMouseLeave&&n.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:u.useCallback((function(r){n.onMouseMove&&n.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:u.useCallback((function(r){n.onMouseOut&&n.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:u.useCallback((function(r){n.onMouseOver&&n.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOver,e.onMouseOver,t])}},$=function(e){return u.isValidElement(e)?[e.type,e.props]:[e,{}]};!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(q||(q={}));var J=function(e){void 0===e&&(e=[]);var t=u.useRef(e),n=u.useCallback((function(e){switch(e.type){case q.add:t.current.push(e.item);break;case q.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},Q=n(1),Z={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},ne=u.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,l=e.flip,c=e.style,s=te(e,["className","name","themeColor","size","flip","style"]),f=u.useRef(null),p=u.useRef(null);u.useImperativeHandle(f,(function(){return{element:p.current}})),u.useImperativeHandle(t,(function(){return f.current}));var d=u.useMemo((function(){return o||re.themeColor}),[o]),v=u.useMemo((function(){return i||re.size}),[i]),m=u.useMemo((function(){return l||re.flip}),[l]),h=u.useMemo((function(){return a("k-icon","k-i-"+r,"k-color-"+d,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},Z[v],n)}),[r,d,v,m,n]),g=G(e,f);return u.createElement("span",ee({ref:p},s,g,{className:h,style:c,role:"presentation"}))}));ne.propTypes={style:Q.object,classNames:Q.string,name:Q.string,themeColor:Q.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:Q.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:Q.oneOf(["default","horizontal","vertical","both"])};var re={size:"default",themeColor:"inherit",flip:"default"};ne.displayName="KendoIcon";var oe=function(){return(oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},le=u.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,l=e.flip,c=e.size,s=e.style,f=e.svgStyle,p=e.themeColor,d=e.viewBox,v=ie(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=u.useRef(null);u.useImperativeHandle(t,(function(){return{element:m.current}}));var h=u.useMemo((function(){return i?i.name:ae.icon}),[i]),g=u.useMemo((function(){return p||ae.themeColor}),[p]),y=u.useMemo((function(){return c||ae.size}),[c]),b=u.useMemo((function(){return l||ae.flip}),[l]),O=u.useMemo((function(){return d||ae.viewBox}),[d]),E=u.useMemo((function(){return a("k-svg-icon","k-color-"+g,"k-svg-i-"+h,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},Z[y],r)}),[h,g,y,b,r]),C=u.useMemo((function(){return e.width&&e.height?oe({width:e.width,height:e.height},s):e.width?oe({width:e.width,height:e.width},s):e.height?oe({width:e.height,height:e.height},s):oe({},s)}),[e.width,e.height,s]);return u.createElement("span",{className:E,style:C,ref:m},u.createElement("svg",oe({className:o,style:f,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:O,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},v),i?void 0:n))}));le.propTypes={style:Q.object,classNames:Q.string,children:Q.any,icon:Q.object,themeColor:Q.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:Q.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:Q.oneOf(["default","horizontal","vertical","both"])};var ae={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};le.displayName="KendoSvgIcon";var ue,ce={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},se={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},fe={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"},pe={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},de={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ve={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},me={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},he={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"},ge=function(){return(ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ye=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},be=function(e){var t=u.forwardRef((function(t,n){var r=t.className,o=t.fontSize,i=t.fontWeight,l=t.textAlign,a=t.textTransform,c=t.themeColor,s=t.margin,f=ye(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=u.useRef(null),d=u.useRef(null);u.useImperativeHandle(p,(function(){return{element:d.current,props:t}})),u.useImperativeHandle(n,(function(){return p.current}));var v=e,m=function(){if(void 0!==s){if("string"==typeof s)return[fe[s]];if("number"==typeof s&&s>=0&&s<=24)return["k-m-"+s];if("object"==typeof s){var e=[];return Object.keys(s).forEach((function(t){var n,r;null!==s[t]&&void 0!==s[t]&&e.push((n=t,r=s[t],""+de[n]+("string"==typeof r?pe[r]:r)))})),e.join(" ")}}};return u.createElement(v,ge({ref:d,className:["k-"+("p"===e?"paragraph":e),ce[o],se[i],ve[l],me[a],he[c],m(),r].filter((function(e){return void 0!==e})).join(" ")},f),t.children)}));return t.propTypes={style:Q.object,className:Q.string,fontSize:Q.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:Q.oneOf(["light","normal","bold"]),margin:Q.oneOfType([Q.number,Q.object,Q.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:Q.oneOf(["left","right","center","justify"]),textTransform:Q.oneOf(["lowercase","uppercase","capitalize"]),themeColor:Q.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},Oe={h1:be("h1"),h2:be("h2"),h3:be("h3"),h4:be("h4"),h5:be("h5"),h6:be("h6"),p:be("p"),code:be("code"),pre:be("pre")},Ee=function(e,t){var n=0,r=null;return t.forEach((function(t){if(t&&e){var o=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.max(r.top,n.top),i=Math.max(r.left,n.left),l=Math.min(r.left+r.width,n.left+n.width),a=Math.min(r.top+r.height,n.top+n.height),u=l-i,c=a-o;if(i<l&&o<a){var s=r.width*r.height,f=n.width*n.height,p=u*c;return Number((p/(s+f-p)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r},Ce=function(){var e=window&&window.navigator.userAgent;if(!e)return!1;var t=!1,n=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in r)if(r.hasOwnProperty(o)&&(n=e.match(r[o]))){(t={})[o]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.DOCUMENT_NODE||n[2],10);break}return t},ke=function(e){return e&&e.ownerDocument||window.document},we=function(e){var t=Ce(),n=ke(e);return t.edge||t.safari?n.body:n.documentElement},De=function(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=window.getComputedStyle(e,"overflow").overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},xe=function(e){var t=we(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&!De(n)&&n!==document.body;)n=n.parentNode;return n===document.body?t:n};!function(e){e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.CONTEXT_MENU="contextmenu",e.TOUCH_START="touchstart",e.TOUCH_MOVE="touchmove",e.TOUCH_END="touchend",e.TOUCH_CANCEL="touchcancel",e.SCROLL="scroll",e.START="KENDO_DRAG_AND_DROP_START",e.MOVE="KENDO_DRAG_AND_DROP_MOVE",e.END="KENDO_DRAG_AND_DROP_END",e.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(ue||(ue={}));var Me=function(){},Te=function(e,t,n){void 0===n&&(n={});var r,o,i,l,a=n.onIsPressedChange,u=void 0===a?Me:a,c=n.onIsScrollingChange,s=void 0===c?Me:c,f=n.onVelocityChange,p=void 0===f?Me:f,d=n.onOffsetChange,v=void 0===d?Me:d,m=n.onPageOffsetChange,h=void 0===m?Me:m,g=n.onClientOffsetChange,y=void 0===g?Me:g,b=n.onScrollOffsetChange,O=void 0===b?Me:b,E=n.onInitialScrollOffsetChange,C=void 0===E?Me:E,k=t.payload,w=k.element,D=k.hint,x=e.autoScrollDirection,M=e.scrollableParent,T=function(e,t){return function(e){return/^touch/.test(e.type)}(e)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(e){return/^(scroll)/.test(e.type)}(e)?{pageX:t.pageOffset.x,pageY:t.pageOffset.y,clientX:t.clientOffset.x,clientY:t.clientOffset.y,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,originalEvent:e}}(t.event,e);switch(T.type){case ue.POINTER_DOWN:if(T.type===ue.POINTER_DOWN&&(!T.originalEvent.isPrimary||0!==T.originalEvent.button))break;case ue.MOUSE_DOWN:if(T.type===ue.MOUSE_DOWN&&T.originalEvent.which&&T.originalEvent.which>1||e.ignoreMouse)break;case ue.TOUCH_START:if(T.type===ue.TOUCH_START&&1!==T.originalEvent.touches.length)break;case ue.START:var P=M||xe(t.payload.element);C(P instanceof Window?{x:P.scrollX,y:P.scrollY}:{x:P.scrollLeft,y:P.scrollTop}),y({x:T.clientX,y:T.clientY}),h({x:T.pageX,y:T.pageY}),v({x:T.offsetX,y:T.offsetY}),u(!0),k.onPress&&k.onPress(T);break;case ue.SCROLL:if(T.type===ue.SCROLL&&!e.pressed)break;var R=M||xe(w),N=R instanceof Window?{x:R.scrollX,y:R.scrollY}:{x:R.scrollLeft,y:R.scrollTop};T.scrollX=N.x-e.initialScrollOffset.x,T.scrollY=N.y-e.initialScrollOffset.y,O({x:T.scrollX,y:T.scrollY});case ue.POINTER_MOVE:if(T.type===ue.POINTER_MOVE&&!T.originalEvent.isPrimary)break;case ue.MOUSE_MOVE:case ue.TOUCH_MOVE:if(T.type===ue.TOUCH_MOVE&&1!==T.originalEvent.touches.length)break;case ue.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==T.originalEvent.type&&w){var S=ke(w),L=M||xe(S.elementFromPoint(T.clientX,T.clientY)),_=function(e,t,n){var r={x:0,y:0};return e-n.left<50?r.x=-(50-(e-n.left)):n.right-e<50&&(r.x=50-(n.right-e)),t-n.top<50?r.y=-(50-(t-n.top)):n.bottom-t<50&&(r.y=50-(n.bottom-t)),r}(T.pageX,T.pageY,function(e,t){var n=we(e);if(e===n)return{top:n.scrollTop,left:n.scrollLeft,bottom:n.scrollTop+t.innerHeight,right:n.scrollLeft+t.innerWidth};var r=e.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(L,function(e){var t=ke(e);return t&&t.defaultView||window}(w)));p({x:x&&!1===x.horizontal?0:_.x,y:x&&!1===x.vertical?0:_.y}),s(0!==_.y||0!==_.x)}!e.drag&&k.onDragStart&&k.onDragStart(T),k.onDrag&&k.onDrag(T);var I=Ee(D||w,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(D||w)}))),j=e.drops.find((function(e){return e.element===I}));j&&I&&(r=T.clientX,o=T.clientY,i=M||xe(I),(l=i.getBoundingClientRect()).top<=o&&l.left<=r&&o<=l.bottom&&r<=l.right)&&I!==w?(e.drop&&e.drop.element)!==I?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(T),j.onDragEnter&&j.onDragEnter(T)):j.onDragOver&&j.onDragOver(T):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(T)}y({x:T.clientX,y:T.clientY}),h({x:T.pageX,y:T.pageY});break;case ue.POINTER_UP:if(T.type===ue.POINTER_UP&&!T.originalEvent.isPrimary)break;case ue.MOUSE_UP:case ue.TOUCH_END:if(T.type===ue.TOUCH_END&&1!==T.originalEvent.touches.length)break;case ue.END:u(!1),k.onRelease&&k.onRelease(T),e.drop&&e.drop.onDrop&&e.drop.onDrop(T),k.onDragEnd&&k.onDragEnd(T);break;case ue.POINTER_CANCEL:case ue.CONTEXT_MENU:case ue.TOUCH_CANCEL:case ue.CANCEL:u(!1),k.onDragEnd&&k.onDragEnd(T),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(T)}},Pe=function(e,t){if(e){var n,r;e===we(e)?(n=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(n=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var o=e.scrollTop+t.y,i=n&&o>0&&o<e.scrollHeight,l=e.scrollLeft+t.x,a=r&&l>0&&l<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),a?e.scrollLeft+=t.x:r&&l<0&&(e.scrollLeft=0)}},Re=function(e,t){var n=u.useContext(e),r=n[0],o=n[1],i=u.useState(t),l=i[0],a=i[1];return[void 0!==r?r:l,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==r?o.apply(void 0,e):a(e[0])}]},Ne=u.createContext([void 0,k]),Se=u.createContext([void 0,k]),Le=u.createContext([[],k,k]),_e=u.createContext([[],k,k]);function Ie(e,t,n){void 0===n&&(n={});var r=t.onPress,o=void 0===r?k:r,i=t.onRelease,l=void 0===i?k:i,a=t.onDragStart,c=void 0===a?k:a,s=t.onDrag,f=void 0===s?k:s,p=t.onDragEnd,d=void 0===p?k:p,v=n.hint,m=void 0===v?null:v,h=n.mouseOnly,g=void 0!==h&&h,y=n.autoScroll,b=void 0===y||y,O=n.scrollContainer,E=void 0===O?null:O,C=u.useState(!1),w=C[0],D=C[1],x=u.useState(!1),M=x[0],T=x[1],P=Re(Se)[0],R=Re(Ne),N=R[0],S=R[1],L=u.useContext(_e)[0],_=u.useContext(Le),I=_[0],j=_[1],U=_[2],A=u.useRef({x:0,y:0}),H=u.useRef(),K=u.useRef(!1),X=u.useRef(),B=u.useRef(!1),Y=u.useRef({x:0,y:0}),W=u.useRef({x:0,y:0}),z=u.useRef({x:0,y:0}),V=u.useRef({x:0,y:0}),F=u.useRef({x:0,y:0}),q=u.useRef({x:0,y:0}),G=Boolean(window&&"undefined"!=typeof window&&window.PointerEvent),$=!g&&G,J=u.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),Q=u.useCallback((function(){return m&&m.current&&m.current.element?m.current.element:m?m.current:null}),[m]),Z=u.useCallback((function(){return E&&E.current&&E.current.element?E.current.element:E?E.current:null}),[E]),ee=u.useCallback((function(){return"object"==typeof b&&b.boundaryElementRef&&b.boundaryElementRef.current&&b.boundaryElementRef.current.element?b.boundaryElementRef.current.element:"object"==typeof b&&b.boundaryElementRef&&b.boundaryElementRef.current?b.boundaryElementRef.current:null}),[b]),te=u.useRef(null);u.useImperativeHandle(te,(function(){return{element:J(),hint:Q(),onPress:ve,onDragStart:he,onDrag:ge,onDragEnd:ye,onRelease:me,data:e.current}}));var ne=u.useCallback((function(){var e=J();return e&&e.ownerDocument||document}),[J]),re=u.useCallback((function(){var e=ne();return e&&e.defaultView||window}),[ne]),oe=u.useCallback((function(){return{drag:N?N.current:null,drop:P?P.current:null,drags:I.map((function(e){return e.current})),drops:L.map((function(e){return e.current})),pressed:w,ignoreMouse:K.current,scrollOffset:F.current,offset:Y.current,pageOffset:W.current,initialScrollOffset:q.current,clientOffset:z.current,initialClientOffset:V.current,velocity:A.current,autoScroll:Boolean("object"==typeof b?!1!==b.enabled:b),scrollableParent:ee(),autoScrollDirection:"object"==typeof b?b.direction:{horizontal:!0,vertical:!0},isScrolling:M}}),[N,P,I,L,w,b,ee,M]),ie=u.useCallback((function(e){D(e)}),[]),le=u.useCallback((function(e){T(e)}),[]),ae=u.useCallback((function(e){A.current=e}),[]),ue=u.useCallback((function(e){Y.current=e}),[]),ce=u.useCallback((function(e){z.current=e}),[]),se=u.useCallback((function(e){W.current=e}),[]),fe=u.useCallback((function(e){V.current=e}),[]),pe=u.useCallback((function(e){F.current=e}),[]),de=u.useCallback((function(e){q.current=e}),[]),ve=u.useCallback((function(e){o(e)}),[o]),me=u.useCallback((function(e){l(e)}),[l]),he=u.useCallback((function(t){S(te,{target:e.current,event:t}),c(t)}),[S,e,c]),ge=u.useCallback((function(e){f(e)}),[f]),ye=u.useCallback((function(t){B.current||(S(null,{target:e.current,event:t}),d(t))}),[d,S,e]),be=u.useCallback((function(e){Te(oe(),{event:e,payload:te.current},{onVelocityChange:ae,onOffsetChange:ue,onClientOffsetChange:ce,onPageOffsetChange:se,onInitialClientOffsetChange:fe,onScrollOffsetChange:pe,onInitialScrollOffsetChange:de,onIsPressedChange:ie,onIsScrollingChange:le})}),[oe,ae,ue,se,ce,fe,de,ie,pe,le]),Oe=u.useCallback((function(e){be(e)}),[be]),Ee=u.useCallback((function(e){be(e)}),[be]),Ce=u.useCallback((function(e){be(e)}),[be]),ke=u.useCallback((function(e){be(e)}),[be]),we=u.useCallback((function(e){be(e)}),[be]),De=u.useCallback((function(e){be(e)}),[be]),Me=u.useCallback((function(e){be(e)}),[be]),Ie=u.useCallback((function(e){e.preventDefault(),be(e)}),[be]),je=u.useCallback((function(e){e.preventDefault(),be(e)}),[be]),Ue=u.useCallback((function(e){e.preventDefault(),be(e)}),[be]),Ae=u.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=re();K.current=!0,X.current=t.setTimeout((function(){K.current=!1}),2e3)}be(e)}),[be,re]),He=u.useCallback((function(e){be(e)}),[be]),Ke=u.useCallback((function(){var e=J();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[J]),Xe=u.useCallback((function(){return j(te),function(){U(te)}}),[U,j]);u.useEffect((function(){var e=re();if(M){var t=Z()||xe(document.elementFromPoint(z.current.x,z.current.y));e.clearInterval(H.current),H.current=e.setInterval((function(){Pe(t,{x:A.current.x,y:A.current.y})}),50)}return function(){e.clearInterval(H.current)}}),[J,Z,re,M]),u.useEffect(Ke,[Ke]),u.useEffect((function(){var e=re(),t=J(),n=ne();if($){if(t)xe(t).addEventListener("scroll",He,{passive:!0}),t.addEventListener("pointerdown",Oe,{passive:!0});w&&(n.addEventListener("pointermove",Ee),n.addEventListener("pointerup",ke,!0),n.addEventListener("contextmenu",Ie),n.addEventListener("pointercancel",Ce,{passive:!0}))}else e.addEventListener("touchmove",k,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",we,{passive:!0}),g||(t.addEventListener("touchstart",je,{passive:!0}),w&&(t.addEventListener("touchmove",Ue,{passive:!0}),t.addEventListener("touchend",Ae,{passive:!0})))),w&&(n.addEventListener("mousemove",De,{passive:!0}),n.addEventListener("mouseup",Me,{passive:!0}));return function(){if(t){var r=xe(t);r&&r.removeEventListener("scroll",He),t.removeEventListener("pointerdown",Oe),t.removeEventListener("mousedown",we),t.removeEventListener("touchstart",je),t.removeEventListener("touchmove",Ue),t.removeEventListener("touchend",Ae)}n.removeEventListener("pointermove",Ee),n.removeEventListener("pointerup",ke,!0),n.removeEventListener("contextmenu",Ie),n.removeEventListener("pointercancel",Ce),n.removeEventListener("mousemove",De),n.removeEventListener("mouseup",Me),e.removeEventListener("touchmove",k),e.clearTimeout(X.current)}}),[w,re,J,ne,g,$,Ie,we,De,Me,Ce,Oe,Ee,ke,Ae,Ue,je,He]),u.useEffect((function(){return function(){B.current=!0}}),[]),u.useLayoutEffect(Xe,[Xe])}function je(e,t){void 0===t&&(t={onDragEnter:k,onDragOver:k,onDragLeave:k,onDrop:k});var n=t.onDragEnter,r=void 0===n?k:n,o=t.onDragOver,i=void 0===o?k:o,l=t.onDragLeave,a=void 0===l?k:l,c=t.onDrop,s=void 0===c?k:c,f=Re(Se)[1],p=u.useContext(_e),d=p[1],v=p[2],m=u.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),h=u.useRef(null);u.useImperativeHandle(h,(function(){return{element:m(),onDragEnter:g,onDragOver:y,onDragLeave:b,onDrop:O,data:e.current}}));var g=u.useCallback((function(t){f(h,{target:e.current,event:t}),r(t)}),[f,e,r]),y=u.useCallback((function(e){i(e)}),[i]),b=u.useCallback((function(t){f(null,{target:e.current,event:t}),a(t)}),[f,e,a]),O=u.useCallback((function(t){f(null,{target:e.current,event:t}),s(t)}),[f,e,s]),E=u.useCallback((function(){return d(h),function(){v(h)}}),[v,d]);u.useLayoutEffect(E,[E])}var Ue=function(){return(Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ae=function(e,t,n){var r=u.useState(t||e),o=r[0],i=r[1];return[void 0!==t?t:o,u.useCallback((function(e,t){i(e),n&&n.call(void 0,Ue({},t,{value:e}))}),[n,i])]},He=function(e){var t=Ae(null,void 0),n=t[0],r=t[1],o=Ae(null,void 0),i=o[0],l=o[1],a=J([]),c=a[0],s=a[1],f=J([]),p=f[0],d=f[1];return u.createElement(Ne.Provider,{value:[n,r]},u.createElement(Se.Provider,{value:[i,l]},u.createElement(Le.Provider,{value:[c,function(e){s({type:q.add,item:e})},function(e){s({type:q.remove,item:e})}]},u.createElement(_e.Provider,{value:[p,function(e){d({type:q.add,item:e})},function(e){d({type:q.remove,item:e})}]},e.children))))};He.displayName="KendoReactDragAndDrop";var Ke=u.forwardRef((function(e,t){var n=u.useRef(null),r=u.useRef(null),o=u.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);u.useImperativeHandle(r,(function(){return{element:o()||null}})),u.useImperativeHandle(t,(function(){return r.current})),u.useImperativeHandle(e.childRef,(function(){return n.current}));var i=u.useCallback((function(t){e.onPress&&e.onPress({element:o(),target:r.current,event:t})}),[o,e.onPress]),l=u.useCallback((function(t){e.onRelease&&e.onRelease({element:o(),target:r.current,event:t})}),[o,e.onRelease]),a=u.useCallback((function(t){e.onDragStart&&e.onDragStart({element:o(),target:r.current,event:t})}),[e,o]),c=u.useCallback((function(t){e.onDrag&&e.onDrag({element:o(),target:r.current,event:t})}),[o,e.onDrag]),s=u.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:o(),target:r.current,event:t})}),[o,e.onDragEnd]);return Ie(n,{onPress:i,onRelease:l,onDragStart:a,onDrag:c,onDragEnd:s},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?u.cloneElement(u.Children.only(e.children),{ref:n}):null}));Ke.displayName="KendoReactDraggable";var Xe=u.forwardRef((function(e,t){var n=u.useRef(null),r=u.useRef(null),o=u.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);u.useImperativeHandle(r,(function(){return{element:o()||void 0}})),u.useImperativeHandle(t,(function(){return r.current})),u.useImperativeHandle(e.childRef,(function(){return n.current}));var i=u.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:o(),target:r.current,event:t})}),[e.onDragEnter,o]),l=u.useCallback((function(t){e.onDragOver&&e.onDragOver({element:o(),target:r.current,event:t})}),[o,e.onDragOver]),a=u.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:o(),target:r.current,event:t})}),[e.onDragLeave,o]),c=u.useCallback((function(t){e.onDrop&&e.onDrop({element:o(),target:r.current,event:t})}),[e.onDrop,o]);return je(n,{onDragEnter:i,onDragOver:l,onDragLeave:a,onDrop:c}),e.children?u.cloneElement(u.Children.only(e.children),{ref:n}):null}));Xe.displayName="KendoReactDroppable"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.Tooltip=r.Tooltip},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=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}r(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,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),u=n(6),c=n(1),s=n(3),f=n(7),p=n(3),d=n(8),v=function(e){function t(t){var n=e.call(this,t)||this;return n.state={targetElement:null,open:!1,title:""},n.top=0,n.left=0,n.willOpen=!1,n.handleMouseOut=function(e){var t=n.state.targetElement,r=t?t.ownerDocument:document,o=r&&r.elementFromPoint(e.clientX,e.clientY);f.isTooltipElement(o)||n.props.open||(clearInterval(n.updateIntervalId),n.willOpen=!1,n.onClose(e))},n.handleMouseOver=function(e){var t=e.target;n.isVisible(t)&&!f.isTooltipElement(t)&&t!==n.state.targetElement&&n.showToolTip(e)},n.handleBodyMousemove=function(e){n.top=e.clientY,n.left=e.clientX},n.onClose=function(e){s.dispatchEvent(n.props.onClose,e,n,void 0),n.setState({targetElement:null,open:!1,title:""})},n.setUpdateInterval=function(){n.props.updateInterval&&(n.updateIntervalId=setInterval(n.onIntervalUpdate,n.props.updateInterval))},n.onIntervalUpdate=function(){var e=n.state.targetElement;e&&(null===e.parentElement?n.onClose({target:e}):n.showToolTip({target:e}))},n.position=function(e){var t=f.getDomRect(n.state.targetElement);return{left:f.getLeftPosition(n.left,e.offsetWidth,t,n.props.anchorElement,n.props.position),top:f.getTopPosition(n.top,t,e.offsetHeight,n.props.anchorElement,n.props.position)}},n.getTitle=function(e){for(;e;){if(null!==e.getAttribute("title")||e.titleExpando)return{title:e.getAttribute("title")||e.titleExpando,element:e};e=n.props.parentTitle&&e.parentElement||null}return{title:"",element:e}},n.calloutClassName=function(){switch(n.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return n.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},p.validatePackage(d.packageMetadata),n}return o(t,e),t.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},t.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},t.prototype.componentDidUpdate=function(){this.props.open&&this.props.targetElement&&this.showToolTip({target:this.props.targetElement})},t.prototype.render=function(){var e=this;if(this.props.children){var n=this.props,r=n.children,o=l(n,["children"]),c=null;return a.createElement("div",{onMouseOver:function(e){c&&c.handleMouseOver(e)},onMouseOut:function(e){c&&c.handleMouseOut(e)}},a.createElement(t,i({ref:function(e){return c=e}},o)),r)}if(!1===this.props.open)return null;var f=this.state.targetElement;return f&&this.state.title&&f.ownerDocument&&u.createPortal(a.createElement("div",{ref:function(t){var n;t&&(n=e.props.onPosition?e.props.onPosition.call(void 0,{element:t,targetElement:e.state.targetElement,mouseTop:e.top,mouseLeft:e.left,anchorElement:e.props.anchorElement,position:e.props.position,target:e}):e.position(t),t.style.left=n.left+"px",t.style.top=n.top+"px")},className:s.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:this.props.style,tabIndex:0},a.createElement("div",{className:s.classNames("k-tooltip",this.props.tooltipClassName),style:i({position:"relative"},this.props.tooltipStyle)},a.createElement("div",{className:"k-tooltip-content"},this.props.content&&a.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&a.createElement("div",{ref:function(t){t&&(t.className=e.calloutClassName(),"auto"===e.props.position&&(e.left<window.screen.availWidth/2?t.style.left=e.props.setCalloutOnPositionAuto||"25%":t.style.left=e.props.setCalloutOnPositionAuto||"75%"))}}))),this.props.appendTo?this.props.appendTo:f.ownerDocument.body)},t.prototype.showToolTip=function(e){var t=this;clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),e.target.hasChildNodes()&&e.target.childNodes.forEach((function(t){"title"===t.nodeName&&(e.target.titleExpando=t.innerHTML,t.remove())}));var n=this.props.targetElement||e.target,r=this.getTitle(n);r.title?(r.element&&(r.element.titleExpando=r.title,r.element.title=""),this.willOpen=!0,this.props.openDelay?this.openTimeoutId=window.setTimeout((function(){t.willOpen&&t.setState({targetElement:n,open:!0,title:r.title},t.setUpdateInterval)}),this.props.openDelay):this.setState({targetElement:n,open:!0,title:r.title},this.setUpdateInterval),this.state.title!==r.title&&s.dispatchEvent(this.props.onOpen,e,this,void 0)):this.state.open&&this.onClose(e)},t.prototype.isVisible=function(e){return!this.props.filter||this.props.filter(e)},t.propTypes={anchorElement:c.oneOf(["pointer","target"]),content:c.func,filter:c.func,openDelay:c.number,position:c.oneOf(["right","left","top","bottom","auto"]),updateInterval:c.number},t.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},t}(a.PureComponent);t.Tooltip=v},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getLeftPosition=function(e,t,n,r,o){switch(o){case"bottom":return"pointer"===r?e-t/2:n.left-t/2+n.width/2;case"left":return"pointer"===r?e-t-10:n.left-t-10;case"right":return"pointer"===r?e+10:n.right+10;case"top":return"pointer"===r?e-t/2:n.left-t/2+n.width/2;default:return"pointer"===r?e<window.screen.availWidth/2?e-10:e-t+10:e<window.screen.availWidth/2?n.left:n.right-t}},t.getTopPosition=function(e,t,n,r,o){switch(o){case"bottom":return"pointer"===r?e+10:t.bottom+10;case"left":case"right":return"pointer"===r?e-n/2:t.top-n/2+t.height/2;case"top":return"pointer"===r?e-n-10:t.top-n-10;default:return"pointer"===r?e<window.innerHeight/2?e+10:e-n-10:e<window.innerHeight/2?t.bottom+10:t.top-n-10}},t.getDomRect=function(e){return null!==e?e.getBoundingClientRect():document.body.getBoundingClientRect()},t.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],t.isTooltipElement=function(e){if(null===e)return!1;for(var n=e;n;){if(null!==n&&n.classList&&n.classList.contains("k-tooltip"))return!0;n=null!==n.parentNode&&n.parentNode}return t.toolTipSelectors.filter((function(t){return t===e.className})).length>0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1637682948,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"}}])}));
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-tooltip',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1637682948,
|
|
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-tooltip',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1637682948,
|
|
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-tooltip",["react-dom","
|
|
1
|
+
System.register("@progress/kendo-react-tooltip",["react-dom","prop-types","@progress/kendo-react-common","react"],function(i){var l,s,a,p;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){l=e(t)},function(t){s=e(t)},function(t){a=e(t)},function(t){p=e(t)}],execute:function(){function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,n;o=[function(t,e){t.exports=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});o=o(2);e.Tooltip=o.Tooltip,function(t){for(var e in t)i(e,t[e])}(e)},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},l=this&&this.__rest||function(t,e){var o={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&(o[r[n]]=t[r[n]]);return o};Object.defineProperty(e,"__esModule",{value:!0});var s,a=o(3),p=o(4),u=o(5),c=o(0),f=o(6),d=o(0),m=o(7),u=(s=a.PureComponent,r(h,s),h.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},h.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},h.prototype.componentDidUpdate=function(){this.props.open&&this.props.targetElement&&this.showToolTip({target:this.props.targetElement})},h.prototype.render=function(){var o=this;if(this.props.children){var t=this.props,e=t.children,t=l(t,["children"]),n=null;return a.createElement("div",{onMouseOver:function(t){n&&n.handleMouseOver(t)},onMouseOut:function(t){n&&n.handleMouseOut(t)}},a.createElement(h,i({ref:function(t){return n=t}},t)),e)}if(!1===this.props.open)return null;e=this.state.targetElement;return e&&this.state.title&&e.ownerDocument&&p.createPortal(a.createElement("div",{ref:function(t){var e;t&&(e=o.props.onPosition?o.props.onPosition.call(void 0,{element:t,targetElement:o.state.targetElement,mouseTop:o.top,mouseLeft:o.left,anchorElement:o.props.anchorElement,position:o.props.position,target:o}):o.position(t),t.style.left=e.left+"px",t.style.top=e.top+"px")},className:c.classNames("k-animation-container","k-animation-container-fixed","k-animation-container-shown",this.props.className),style:this.props.style,tabIndex:0},a.createElement("div",{className:c.classNames("k-tooltip",this.props.tooltipClassName),style:i({position:"relative"},this.props.tooltipStyle)},a.createElement("div",{className:"k-tooltip-content"},this.props.content&&a.createElement(this.props.content,{title:this.state.title,target:this.state.targetElement})||this.state.title),this.props.showCallout&&a.createElement("div",{ref:function(t){t&&(t.className=o.calloutClassName(),"auto"===o.props.position&&(o.left<window.screen.availWidth/2?t.style.left=o.props.setCalloutOnPositionAuto||"25%":t.style.left=o.props.setCalloutOnPositionAuto||"75%"))}}))),this.props.appendTo||e.ownerDocument.body)},h.prototype.showToolTip=function(e){var t=this;clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),e.target.hasChildNodes()&&e.target.childNodes.forEach(function(t){"title"===t.nodeName&&(e.target.titleExpando=t.innerHTML,t.remove())});var o=this.props.targetElement||e.target,n=this.getTitle(o);n.title?(n.element&&(n.element.titleExpando=n.title,n.element.title=""),this.willOpen=!0,this.props.openDelay?this.openTimeoutId=window.setTimeout(function(){t.willOpen&&t.setState({targetElement:o,open:!0,title:n.title},t.setUpdateInterval)},this.props.openDelay):this.setState({targetElement:o,open:!0,title:n.title},this.setUpdateInterval),this.state.title!==n.title&&c.dispatchEvent(this.props.onOpen,e,this,void 0)):this.state.open&&this.onClose(e)},h.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},h.propTypes={anchorElement:u.oneOf(["pointer","target"]),content:u.func,filter:u.func,openDelay:u.number,position:u.oneOf(["right","left","top","bottom","auto"]),updateInterval:u.number},h.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},h);function h(t){var o=s.call(this,t)||this;return o.state={targetElement:null,open:!1,title:""},o.top=0,o.left=0,o.willOpen=!1,o.handleMouseOut=function(t){var e=o.state.targetElement,e=e?e.ownerDocument:document,e=e&&e.elementFromPoint(t.clientX,t.clientY);f.isTooltipElement(e)||o.props.open||(clearInterval(o.updateIntervalId),o.willOpen=!1,o.onClose(t))},o.handleMouseOver=function(t){var e=t.target;o.isVisible(e)&&!f.isTooltipElement(e)&&e!==o.state.targetElement&&o.showToolTip(t)},o.handleBodyMousemove=function(t){o.top=t.clientY,o.left=t.clientX},o.onClose=function(t){c.dispatchEvent(o.props.onClose,t,o,void 0),o.setState({targetElement:null,open:!1,title:""})},o.setUpdateInterval=function(){o.props.updateInterval&&(o.updateIntervalId=setInterval(o.onIntervalUpdate,o.props.updateInterval))},o.onIntervalUpdate=function(){var t=o.state.targetElement;t&&(null===t.parentElement?o.onClose({target:t}):o.showToolTip({target:t}))},o.position=function(t){var e=f.getDomRect(o.state.targetElement);return{left:f.getLeftPosition(o.left,t.offsetWidth,e,o.props.anchorElement,o.props.position),top:f.getTopPosition(o.top,e,t.offsetHeight,o.props.anchorElement,o.props.position)}},o.getTitle=function(t){for(;t;){if(null!==t.getAttribute("title")||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=o.props.parentTitle&&t.parentElement||null}return{title:"",element:t}},o.calloutClassName=function(){switch(o.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return o.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},d.validatePackage(m.packageMetadata),o}e.Tooltip=u},function(t,e){t.exports=p},function(t,e){t.exports=l},function(t,e){t.exports=s},function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLeftPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;case"left":return"pointer"===n?t-e-10:o.left-e-10;case"right":return"pointer"===n?t+10:o.right+10;case"top":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;default:return"pointer"===n?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?o.left:o.right-e}},o.getTopPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t+10:e.bottom+10;case"left":case"right":return"pointer"===n?t-o/2:e.top-o/2+e.height/2;case"top":return"pointer"===n?t-o-10:e.top-o-10;default:return"pointer"===n?t<window.innerHeight/2?t+10:t-o-10:t<window.innerHeight/2?e.bottom+10:e.top-o-10}},o.getDomRect=function(t){return(null!==t?t:document.body).getBoundingClientRect()},o.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],o.isTooltipElement=function(e){if(null===e)return!1;for(var t=e;t;){if(null!==t&&t.classList&&t.classList.contains("k-tooltip"))return!0;t=null!==t.parentNode&&t.parentNode}return 0<o.toolTipSelectors.filter(function(t){return t===e.className}).length}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-react-tooltip",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1637682948,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"}}],n={},r.m=o,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-tooltip",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0-dev.202111231559",
|
|
4
4
|
"description": "KendoReact Tooltip package",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,13 +35,13 @@
|
|
|
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.13.0-dev.202111231559",
|
|
39
39
|
"prop-types": "^15.6.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@progress/kendo-licensing": "^1.0.1",
|
|
43
|
-
"@progress/kendo-react-grid": "4.
|
|
44
|
-
"@progress/kendo-react-intl": "4.
|
|
43
|
+
"@progress/kendo-react-grid": "4.13.0-dev.202111231559",
|
|
44
|
+
"@progress/kendo-react-intl": "4.13.0-dev.202111231559"
|
|
45
45
|
},
|
|
46
46
|
"@progress": {
|
|
47
47
|
"friendlyName": "Tooltip",
|