@progress/kendo-react-scrollview
Advanced tools
Comparing version 4.14.1-dev.202201181415 to 4.14.1
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("prop-types"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing"],n):"object"==typeof exports?exports.KendoReactScrollview=n(require("react"),require("prop-types"),require("@progress/kendo-licensing")):e.KendoReactScrollview=n(e.React,e.PropTypes,e.KendoLicensing)}(window,(function(e,n,t){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=4)}([function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t},function(e,n,t){"use strict";t.r(n),t.d(n,"BrowserSupportService",(function(){return o})),t.d(n,"canUseDOM",(function(){return i})),t.d(n,"canUseRef",(function(){return u})),t.d(n,"classNames",(function(){return c})),t.d(n,"cloneDate",(function(){return l})),t.d(n,"clone",(function(){return s})),t.d(n,"cloneObject",(function(){return f})),t.d(n,"cloneValue",(function(){return d})),t.d(n,"cloneArray",(function(){return p})),t.d(n,"Draggable",(function(){return E})),t.d(n,"focusFirstFocusableChild",(function(){return j})),t.d(n,"FormComponent",(function(){return P})),t.d(n,"getTabIndex",(function(){return S})),t.d(n,"getter",(function(){return R})),t.d(n,"guid",(function(){return H})),t.d(n,"Keys",(function(){return I})),t.d(n,"noop",(function(){return z})),t.d(n,"getScrollbarWidth",(function(){return B})),t.d(n,"setScrollbarWidth",(function(){return K})),t.d(n,"setter",(function(){return F})),t.d(n,"mapTree",(function(){return W})),t.d(n,"mapTreeItem",(function(){return X})),t.d(n,"extendDataItem",(function(){return Y})),t.d(n,"getItemPath",(function(){return q})),t.d(n,"validatePackage",(function(){return G})),t.d(n,"hasRelativeStackingContext",(function(){return J})),t.d(n,"dispatchEvent",(function(){return Q})),t.d(n,"AsyncFocusBlur",(function(){return ne})),t.d(n,"createPropsContext",(function(){return oe})),t.d(n,"withPropsContext",(function(){return ie})),t.d(n,"useDir",(function(){return ue})),t.d(n,"useAsyncFocusBlur",(function(){return Z})),t.d(n,"useDraggable",(function(){return ce})),t.d(n,"useRtl",(function(){return ae})),t.d(n,"useMouse",(function(){return le})),t.d(n,"useCustomComponent",(function(){return se})),t.d(n,"usePropsContext",(function(){return te})),t.d(n,"Icon",(function(){return me})),t.d(n,"SvgIcon",(function(){return ye})),t.d(n,"Typography",(function(){return Te}));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 n=e.createElement("div");n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",e.body.appendChild(n),this.scrollbar=n.offsetWidth-n.scrollWidth,e.body.removeChild(n)}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))},c=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?c.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(n,t){return e[t]||e[n]&&n||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},a=t(0),l=function(e){return e?new Date(e.getTime()):null};function s(e){var n={};return f(e,n),n}function f(e,n){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];n[t]=d(r,n[t])}}function d(e,n){if(Array.isArray(e))return p(e);if(e instanceof Date)return l(e);if(a.isValidElement(e))return a.cloneElement(e,e.props);if(e&&"object"==typeof e){var t=n||{};return f(e,t),t}return e}function p(e){return e.map((function(e){return d(e,void 0)}))}var m=t(1),h=function(e,n){return function(t){return n(e(t))}},v=function(e,n,t){return e.addEventListener&&e.addEventListener(n,t)},g=function(e,n,t){return e&&e.removeEventListener&&e.removeEventListener(n,t)},y=function(){},b=function(e){return e.preventDefault()},w=/touch/;function k(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 O=function(e){var n=this,t=e.press;void 0===t&&(t=y);var r=e.drag;void 0===r&&(r=y);var o=e.release;void 0===o&&(o=y);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=h(k,t),this._dragHandler=h(k,r),this._releaseHandler=h(k,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&n._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&n._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(n._releaseHandler(e),n._ignoreMouse=!0,setTimeout(n._restoreMouse,2e3))},this._restoreMouse=function(){n._ignoreMouse=!1},this._mousedown=function(e){var t=e.which;t&&t>1||n._ignoreMouse||(v(n.document,"mousemove",n._mousemove),v(n.document,"mouseup",n._mouseup),n._pressHandler(e))},this._mousemove=function(e){n._dragHandler(e)},this._mouseup=function(e){g(n.document,"mousemove",n._mousemove),g(n.document,"mouseup",n._mouseup),n._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(n.document,"pointermove",n._pointermove),v(n.document,"pointerup",n._pointerup),v(n.document,"pointercancel",n._pointerup),v(n.document,"contextmenu",b),n._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&n._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(g(n.document,"pointermove",n._pointermove),g(n.document,"pointerup",n._pointerup),g(n.document,"pointercancel",n._pointerup),g(n.document,"contextmenu",b),n._releaseHandler(e))}},_={document:{configurable:!0}};O.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},_.document.get=function(){return this._element?this._element.ownerDocument:document},O.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},O.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)))},O.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))},O.prototype._usePointers=function(){return!this._mouseOnly&&O.supportPointerEvent()},O.prototype.update=function(e){var n=e.press;void 0===n&&(n=y);var t=e.drag;void 0===t&&(t=y);var r=e.release;void 0===r&&(r=y);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=h(k,n),this._dragHandler=h(k,t),this._releaseHandler=h(k,r),this._mouseOnly=o},O.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(O.prototype,_),O.default=O;var M,C=O,x=(M=function(e,n){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}M(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}),E=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.element=null,n.draggable=new C({press:function(e){n.element&&n.props.onPress&&n.props.onPress.call(void 0,{target:n,event:e,element:n.element})},drag:function(e){n.element&&n.props.onDrag&&n.props.onDrag.call(void 0,{target:n,event:e,element:n.element})},release:function(e){n.element&&n.props.onRelease&&n.props.onRelease.call(void 0,{target:n,event:e})}}),n.childRef=function(e){var t=n.props.childRef;n.element=e,t&&"function"==typeof t&&t(e)},n}return x(n,e),n.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},n.prototype.componentWillUnmount=function(){this.draggable.destroy()},n.prototype.render=function(){return a.cloneElement(a.Children.only(this.props.children),{ref:this.childRef})},n.propTypes={children:m.element.isRequired},n}(a.Component),j=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var n=e.querySelector('input, [tabindex]:not([tabindex="-1"])');n&&n.focus&&n.focus()}},P=function(){},S=function(e,n,t){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:n?t?void 0:-1:0},T=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function N(e){var n=[];return e.replace(T,(function(e,t,r,o){n.push(void 0!==t?t:r||o)})),n}var D={};function R(e){if(D[e])return D[e];var n=N(e);return D[e]=function(e){for(var t=e,r=0;r<n.length&&t;r++)t=t[n[r]];return t},D[e]}D.undefined=function(){};var H=function(){var e,n,t="";for(e=0;e<32;e++)n=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(t+="-"),t+=(12===e?4:16===e?3&n|8:n).toString(16);return t},I={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},z=function(){},B=function(){return!(!i||!document.body)&&(new o).scrollbarWidth},K=function(){if(!i||!document.body)return!1;var e=(new o).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},L={undefined:function(e){return e}},V=function(e,n){return n&&n.arrays&&!isNaN(Number(e))?[]:{}};function F(e){if(L[e])return L[e];var n=N(e);return L[e]=function(e,t,r){for(var o=e,i=n.length-1,u=0;u<i&&o;u++)o=o[n[u]]=o[n[u]]||V(n[u+1],r);o[n[i]]=t},L[e]}var U=function(){return(U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function A(e,n,t){var r;return t?U({},e,((r={})[n]=t.length?t.slice():void 0,r)):e&&e[n]?e[n].slice():[]}var W=function(e,n,t){return e.map((function(e){return function e(n,t,r){if(n[t]){var o=A(n,t).map((function(n){return e(n,t,r)}));return r(A(n,t,o))}return r(n)}(e,n,t)})).slice()},X=function(e,n,t,r){for(var o=e,i=[],u=0;u<n.length;u++)o=o[n[u]],o=Array.isArray(o)?o:o[t],i.push(o);var c=i.length>1?i[i.length-2]:e,a=n[n.length-1],l=r(c[a]);c.splice(a,1,l)},Y=function(e,n,t){var r;return Object.assign({},e,e[n]?((r={})[n]=e[n].slice(),r):{},t||{})},q=function(e,n,t){var r=[],o=n.slice();if(o.length){var i=e[o.shift()||0];for(r.push(i);o.length&&t;)i=i[t][o.shift()||0],r.push(i)}return r},$=t(2);function G(e){if(void 0!==$)$.validatePackage(e);else{var n="License activation failed for "+e.name+"\n";n+="The @progress/kendo-licensing script is not loaded.\n",n+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(n)}}var J=function(e){if(!i)return!1;var n=e?e.ownerDocument:document;if(!n||!n.body)return!1;var t=n.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',n.body.appendChild(t);var r=10!==t.children[0].getBoundingClientRect().top;return n.body.removeChild(t),r};function Q(e,n,t,r){if(e){var o={syntheticEvent:n,nativeEvent:n.nativeEvent,target:t};e.call(void 0,Object.assign(o,r))}}function Z(e){var n=e.onFocus,t=e.onBlur,r=e.onSyncFocus,o=e.onSyncBlur,i=a.useRef(!1),u=a.useRef(0),c=a.useCallback((function(e){clearTimeout(u.current),u.current=window.setTimeout((function(){return e()}))}),[u]),l=a.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];clearTimeout(u.current),r&&r.call.apply(r,[void 0].concat(e)),i.current||(i.current=!0,n&&n.call.apply(n,[void 0].concat(e)))}),[i,n,r]),s=a.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.call.apply(o,[void 0].concat(e)),c((function(){i.current&&t&&(i.current=!1,t.call.apply(t,[void 0].concat(e)))}))}),[i,c,t,o]);return a.useEffect((function(){return function(){clearTimeout(u.current)}}),[]),{onFocus:l,onBlur:s}}var ee=function(){return(ee=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},ne=function(e){var n=e.children,t=Z({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return n.call(void 0,ee({},t))},te=function(e,n){return a.useContext(e)(n)},re=function(){return(re=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},oe=function(){return a.createContext((function(e){return e}))},ie=function(e,n){return a.forwardRef((function(t,r){var o=te(e,t);return a.createElement(n,re({},o,{ref:r}))}))};function ue(e,n,t){var r=a.useState(n),o=r[0],i=r[1];return a.useEffect((function(){if(!o&&window&&e.current){var n=window.getComputedStyle(e.current).direction;n&&i(n)}}),t),o}function ce(e,n){var t=n.onPress,r=n.onDrag,o=n.onRelease,i=a.useMemo((function(){return new C({press:t,drag:r,release:o})}),[]);a.useEffect((function(){var n=e.current;if(n)return i.bindTo(n),function(){i.destroy()}}),[]),a.useEffect((function(){i.update({press:t,drag:r,release:o})}),[t,r,o])}function ae(e,n,t){var r=a.useState(n),o=r[0],i=r[1];return a.useEffect((function(){if(!o&&window&&e.current){var n=window.getComputedStyle(e.current).direction;n&&i(n)}}),t),o}var le=function(e,n,t){void 0===t&&(t={});var r=a.useCallback((function(r){t.onMouseDown&&t.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseDown,e.onMouseDown,n]),o=a.useCallback((function(r){t.onMouseUp&&t.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseUp,e.onMouseUp,n]);return{onClick:a.useCallback((function(r){t.onClick&&t.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onClick,e.onClick,n]),onMouseUp:o,onMouseDown:r,onDoubleClick:a.useCallback((function(r){t.onDoubleClick&&t.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onDoubleClick,e.onDoubleClick,n]),onMouseEnter:a.useCallback((function(r){t.onMouseEnter&&t.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseEnter,e.onMouseEnter,n]),onMouseLeave:a.useCallback((function(r){t.onMouseLeave&&t.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseLeave,e.onMouseLeave,n]),onMouseMove:a.useCallback((function(r){t.onMouseMove&&t.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseMove,e.onMouseMove,n]),onMouseOut:a.useCallback((function(r){t.onMouseOut&&t.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseOut,e.onMouseOut,n]),onMouseOver:a.useCallback((function(r){t.onMouseOver&&t.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseOver,e.onMouseOver,n])}},se=function(e){return a.isValidElement(e)?[e.type,e.props]:[e,{}]},fe={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},de=function(){return(de=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},pe=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},me=a.forwardRef((function(e,n){var t=e.className,r=e.name,o=e.themeColor,i=e.size,u=e.flip,l=e.style,s=pe(e,["className","name","themeColor","size","flip","style"]),f=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(f,(function(){return{element:d.current}})),a.useImperativeHandle(n,(function(){return f.current}));var p=a.useMemo((function(){return o||he.themeColor}),[o]),m=a.useMemo((function(){return i||he.size}),[i]),h=a.useMemo((function(){return u||he.flip}),[u]),v=a.useMemo((function(){return c("k-icon","k-i-"+r,"k-color-"+p,{"k-flip-h":"horizontal"===h||"both"===h,"k-flip-v":"vertical"===h||"both"===h},fe[m],t)}),[r,p,m,h,t]),g=le(e,f);return a.createElement("span",de({ref:d},s,g,{className:v,style:l,role:"presentation"}))}));me.propTypes={style:m.object,classNames:m.string,name:m.string,themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:m.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:m.oneOf(["default","horizontal","vertical","both"])};var he={size:"default",themeColor:"inherit",flip:"default"};me.displayName="KendoIcon";var ve=function(){return(ve=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},ge=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},ye=a.forwardRef((function(e,n){var t=e.children,r=e.className,o=e.svgClassName,i=e.icon,u=e.flip,l=e.size,s=e.style,f=e.svgStyle,d=e.themeColor,p=e.viewBox,m=ge(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),h=a.useRef(null);a.useImperativeHandle(n,(function(){return{element:h.current}}));var v=a.useMemo((function(){return i?i.name:be.icon}),[i]),g=a.useMemo((function(){return d||be.themeColor}),[d]),y=a.useMemo((function(){return l||be.size}),[l]),b=a.useMemo((function(){return u||be.flip}),[u]),w=a.useMemo((function(){return p||be.viewBox}),[p]),k=a.useMemo((function(){return c("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},fe[y],r)}),[v,g,y,b,r]),O=a.useMemo((function(){return e.width&&e.height?ve({width:e.width,height:e.height},s):e.width?ve({width:e.width,height:e.width},s):e.height?ve({width:e.height,height:e.height},s):ve({},s)}),[e.width,e.height,s]);return a.createElement("span",{className:k,style:O,ref:h},a.createElement("svg",ve({className:o,style:f,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:w,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},m),i?void 0:t))}));ye.propTypes={style:m.object,classNames:m.string,children:m.any,icon:m.object,themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:m.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:m.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"},ke={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Oe={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-"},Ce={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"},Ee={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"},je=function(){return(je=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},Pe=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},Se=function(e){var n=a.forwardRef((function(n,t){var r=n.className,o=n.fontSize,i=n.fontWeight,u=n.textAlign,c=n.textTransform,l=n.themeColor,s=n.margin,f=Pe(n,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),d=a.useRef(null),p=a.useRef(null);a.useImperativeHandle(d,(function(){return{element:p.current,props:n}})),a.useImperativeHandle(t,(function(){return d.current}));var m=e,h=function(){if(void 0!==s){if("string"==typeof s)return[Oe[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(n){var t,r;null!==s[n]&&void 0!==s[n]&&e.push((t=n,r=s[n],""+Me[t]+("string"==typeof r?_e[r]:r)))})),e.join(" ")}}};return a.createElement(m,je({ref:p,className:["k-"+("p"===e?"paragraph":e),we[o],ke[i],Ce[u],xe[c],Ee[l],h(),r].filter((function(e){return void 0!==e})).join(" ")},f),n.children)}));return n.propTypes={style:m.object,className:m.string,fontSize:m.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:m.oneOf(["light","normal","bold"]),margin:m.oneOfType([m.number,m.object,m.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:m.oneOf(["left","right","center","justify"]),textTransform:m.oneOf(["lowercase","uppercase","capitalize"]),themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},n.displayName="KendoReactTypography"+e.toUpperCase(),n},Te={h1:Se("h1"),h2:Se("h2"),h3:Se("h3"),h4:Se("h4"),h5:Se("h5"),h6:Se("h6"),p:Se("p"),code:Se("code"),pre:Se("pre")}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),o=t(1),i=t(3),u=t(3),c=t(6);n.ScrollView=r.forwardRef((function(e,n){u.validatePackage(c.packageMetadata);var t=e.className,o=e.style,a=e.children,l=e.pagerOverlay,s=e.pageable,f=e.arrows,d=e.endless,p=e.activeView,m=e.automaticViewChange,h=e.automaticViewChangeInterval,v=r.useState(p||1),g=v[0],y=v[1],b=r.useRef(null),w=r.useRef(null),k=r.useRef(null),O=r.Children.toArray(a),_=i.useRtl(b,e.dir),M="rtl"===_,C=r.useCallback((function(){b.current&&b.current.focus()}),[]),x=r.useCallback((function(){return{element:b.current,focus:C}}),[C]);r.useImperativeHandle(n,x);var E=r.useCallback((function(){d?y(g>1?g-1:O.length):g>1&&y(g-1)}),[g,O.length,d]),j=r.useCallback((function(){d?g<O.length?y(g+1):y(1):g<O.length&&y(g+1)}),[g,O.length,d]),P=r.useCallback((function(){M?j():E()}),[M,E,j]),S=r.useCallback((function(){M?E():j()}),[M,j,E]);function T(){k.current&&clearTimeout(k.current)}r.useEffect((function(){var e=O.length;w.current&&(w.current.style.setProperty("--kendo-scrollview-views",""+e),w.current.style.setProperty("--kendo-scrollview-current",""+g))}),[O,g,_]),r.useEffect((function(){if(m)return T(),k.current=setTimeout((function(){return y((function(e){return e===O.length?d?1:e:e+1}))}),h),function(){T()}}),[m,h,O.length,g,d]);var N=r.useCallback((function(e){switch(e.keyCode){case i.Keys.left:e.preventDefault(),M?j():E();break;case i.Keys.right:e.preventDefault(),M?E():j()}}),[M,j,E]),D=r.useMemo((function(){return i.classNames("k-widget k-scrollview",{"k-scrollview-light":"light"===l,"k-scrollview-dark":"dark"===l},t)}),[t,l]),R=r.Children.map(a||null,(function(e,n){return r.createElement("div",{className:"k-scrollview-view","aria-hidden":g!==n+1},e)})),H=r.useCallback((function(){var e;return e=M?g<O.length:g>1,(d||e)&&O.length>0}),[g,O.length,d,M]),I=r.useCallback((function(){var e;return e=M?g>1:g<O.length,(d||e)&&O.length>0}),[g,O.length,d,M]);return r.createElement("div",{className:D,style:o,ref:b,tabIndex:0,dir:_,onKeyDown:N},r.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:w},R),r.createElement("div",{className:"k-scrollview-elements"},f&&r.createElement(r.Fragment,null,H()&&r.createElement("a",{className:"k-scrollview-prev","aria-label":"previous",onClick:P},r.createElement("span",{className:"k-icon k-i-arrowhead-w"})),I()&&r.createElement("a",{className:"k-scrollview-next","aria-label":"next",onClick:S},r.createElement("span",{className:"k-icon k-i-arrowhead-e"}))),s&&r.createElement("div",{className:"k-scrollview-nav-wrap"},r.createElement("ul",{className:"k-scrollview-nav"},O.map((function(e,n){return r.createElement("li",{className:i.classNames("k-link",{"k-primary":g===n+1}),key:n+1,onClick:function(){return y(n+1)}})}))))))})),n.ScrollView.propTypes={activeView:o.number,arrows:o.bool,automaticViewChange:o.bool,automaticViewChangeInterval:o.number,children:o.any,className:o.string,dir:o.string,endless:o.bool,pageable:o.bool,pageOverlay:o.string,style:o.object};n.ScrollView.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},n.ScrollView.displayName="KendoScrollView"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.packageMetadata={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1642515205,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,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("prop-types"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-licensing"],n):"object"==typeof exports?exports.KendoReactScrollview=n(require("react"),require("prop-types"),require("@progress/kendo-licensing")):e.KendoReactScrollview=n(e.React,e.PropTypes,e.KendoLicensing)}(window,(function(e,n,t){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=4)}([function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t},function(e,n,t){"use strict";t.r(n),t.d(n,"BrowserSupportService",(function(){return o})),t.d(n,"canUseDOM",(function(){return i})),t.d(n,"canUseRef",(function(){return u})),t.d(n,"classNames",(function(){return c})),t.d(n,"cloneDate",(function(){return l})),t.d(n,"clone",(function(){return s})),t.d(n,"cloneObject",(function(){return f})),t.d(n,"cloneValue",(function(){return d})),t.d(n,"cloneArray",(function(){return p})),t.d(n,"Draggable",(function(){return E})),t.d(n,"focusFirstFocusableChild",(function(){return j})),t.d(n,"FormComponent",(function(){return P})),t.d(n,"getTabIndex",(function(){return S})),t.d(n,"getter",(function(){return R})),t.d(n,"guid",(function(){return H})),t.d(n,"Keys",(function(){return I})),t.d(n,"noop",(function(){return z})),t.d(n,"getScrollbarWidth",(function(){return B})),t.d(n,"setScrollbarWidth",(function(){return K})),t.d(n,"setter",(function(){return F})),t.d(n,"mapTree",(function(){return W})),t.d(n,"mapTreeItem",(function(){return X})),t.d(n,"extendDataItem",(function(){return Y})),t.d(n,"getItemPath",(function(){return q})),t.d(n,"validatePackage",(function(){return G})),t.d(n,"hasRelativeStackingContext",(function(){return J})),t.d(n,"dispatchEvent",(function(){return Q})),t.d(n,"AsyncFocusBlur",(function(){return ne})),t.d(n,"createPropsContext",(function(){return oe})),t.d(n,"withPropsContext",(function(){return ie})),t.d(n,"useDir",(function(){return ue})),t.d(n,"useAsyncFocusBlur",(function(){return Z})),t.d(n,"useDraggable",(function(){return ce})),t.d(n,"useRtl",(function(){return ae})),t.d(n,"useMouse",(function(){return le})),t.d(n,"useCustomComponent",(function(){return se})),t.d(n,"usePropsContext",(function(){return te})),t.d(n,"Icon",(function(){return me})),t.d(n,"SvgIcon",(function(){return ye})),t.d(n,"Typography",(function(){return Te}));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 n=e.createElement("div");n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",e.body.appendChild(n),this.scrollbar=n.offsetWidth-n.scrollWidth,e.body.removeChild(n)}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))},c=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?c.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(n,t){return e[t]||e[n]&&n||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},a=t(0),l=function(e){return e?new Date(e.getTime()):null};function s(e){var n={};return f(e,n),n}function f(e,n){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];n[t]=d(r,n[t])}}function d(e,n){if(Array.isArray(e))return p(e);if(e instanceof Date)return l(e);if(a.isValidElement(e))return a.cloneElement(e,e.props);if(e&&"object"==typeof e){var t=n||{};return f(e,t),t}return e}function p(e){return e.map((function(e){return d(e,void 0)}))}var m=t(1),h=function(e,n){return function(t){return n(e(t))}},v=function(e,n,t){return e.addEventListener&&e.addEventListener(n,t)},g=function(e,n,t){return e&&e.removeEventListener&&e.removeEventListener(n,t)},y=function(){},b=function(e){return e.preventDefault()},w=/touch/;function k(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 O=function(e){var n=this,t=e.press;void 0===t&&(t=y);var r=e.drag;void 0===r&&(r=y);var o=e.release;void 0===o&&(o=y);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=h(k,t),this._dragHandler=h(k,r),this._releaseHandler=h(k,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&n._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&n._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(n._releaseHandler(e),n._ignoreMouse=!0,setTimeout(n._restoreMouse,2e3))},this._restoreMouse=function(){n._ignoreMouse=!1},this._mousedown=function(e){var t=e.which;t&&t>1||n._ignoreMouse||(v(n.document,"mousemove",n._mousemove),v(n.document,"mouseup",n._mouseup),n._pressHandler(e))},this._mousemove=function(e){n._dragHandler(e)},this._mouseup=function(e){g(n.document,"mousemove",n._mousemove),g(n.document,"mouseup",n._mouseup),n._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(n.document,"pointermove",n._pointermove),v(n.document,"pointerup",n._pointerup),v(n.document,"pointercancel",n._pointerup),v(n.document,"contextmenu",b),n._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&n._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(g(n.document,"pointermove",n._pointermove),g(n.document,"pointerup",n._pointerup),g(n.document,"pointercancel",n._pointerup),g(n.document,"contextmenu",b),n._releaseHandler(e))}},_={document:{configurable:!0}};O.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},_.document.get=function(){return this._element?this._element.ownerDocument:document},O.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},O.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)))},O.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))},O.prototype._usePointers=function(){return!this._mouseOnly&&O.supportPointerEvent()},O.prototype.update=function(e){var n=e.press;void 0===n&&(n=y);var t=e.drag;void 0===t&&(t=y);var r=e.release;void 0===r&&(r=y);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=h(k,n),this._dragHandler=h(k,t),this._releaseHandler=h(k,r),this._mouseOnly=o},O.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(O.prototype,_),O.default=O;var M,C=O,x=(M=function(e,n){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}M(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}),E=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.element=null,n.draggable=new C({press:function(e){n.element&&n.props.onPress&&n.props.onPress.call(void 0,{target:n,event:e,element:n.element})},drag:function(e){n.element&&n.props.onDrag&&n.props.onDrag.call(void 0,{target:n,event:e,element:n.element})},release:function(e){n.element&&n.props.onRelease&&n.props.onRelease.call(void 0,{target:n,event:e})}}),n.childRef=function(e){var t=n.props.childRef;n.element=e,t&&"function"==typeof t&&t(e)},n}return x(n,e),n.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},n.prototype.componentWillUnmount=function(){this.draggable.destroy()},n.prototype.render=function(){return a.cloneElement(a.Children.only(this.props.children),{ref:this.childRef})},n.propTypes={children:m.element.isRequired},n}(a.Component),j=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var n=e.querySelector('input, [tabindex]:not([tabindex="-1"])');n&&n.focus&&n.focus()}},P=function(){},S=function(e,n,t){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:n?t?void 0:-1:0},T=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function N(e){var n=[];return e.replace(T,(function(e,t,r,o){n.push(void 0!==t?t:r||o)})),n}var D={};function R(e){if(D[e])return D[e];var n=N(e);return D[e]=function(e){for(var t=e,r=0;r<n.length&&t;r++)t=t[n[r]];return t},D[e]}D.undefined=function(){};var H=function(){var e,n,t="";for(e=0;e<32;e++)n=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(t+="-"),t+=(12===e?4:16===e?3&n|8:n).toString(16);return t},I={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},z=function(){},B=function(){return!(!i||!document.body)&&(new o).scrollbarWidth},K=function(){if(!i||!document.body)return!1;var e=(new o).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},L={undefined:function(e){return e}},V=function(e,n){return n&&n.arrays&&!isNaN(Number(e))?[]:{}};function F(e){if(L[e])return L[e];var n=N(e);return L[e]=function(e,t,r){for(var o=e,i=n.length-1,u=0;u<i&&o;u++)o=o[n[u]]=o[n[u]]||V(n[u+1],r);o[n[i]]=t},L[e]}var U=function(){return(U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function A(e,n,t){var r;return t?U({},e,((r={})[n]=t.length?t.slice():void 0,r)):e&&e[n]?e[n].slice():[]}var W=function(e,n,t){return e.map((function(e){return function e(n,t,r){if(n[t]){var o=A(n,t).map((function(n){return e(n,t,r)}));return r(A(n,t,o))}return r(n)}(e,n,t)})).slice()},X=function(e,n,t,r){for(var o=e,i=[],u=0;u<n.length;u++)o=o[n[u]],o=Array.isArray(o)?o:o[t],i.push(o);var c=i.length>1?i[i.length-2]:e,a=n[n.length-1],l=r(c[a]);c.splice(a,1,l)},Y=function(e,n,t){var r;return Object.assign({},e,e[n]?((r={})[n]=e[n].slice(),r):{},t||{})},q=function(e,n,t){var r=[],o=n.slice();if(o.length){var i=e[o.shift()||0];for(r.push(i);o.length&&t;)i=i[t][o.shift()||0],r.push(i)}return r},$=t(2);function G(e){if(void 0!==$)$.validatePackage(e);else{var n="License activation failed for "+e.name+"\n";n+="The @progress/kendo-licensing script is not loaded.\n",n+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(n)}}var J=function(e){if(!i)return!1;var n=e?e.ownerDocument:document;if(!n||!n.body)return!1;var t=n.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',n.body.appendChild(t);var r=10!==t.children[0].getBoundingClientRect().top;return n.body.removeChild(t),r};function Q(e,n,t,r){if(e){var o={syntheticEvent:n,nativeEvent:n.nativeEvent,target:t};e.call(void 0,Object.assign(o,r))}}function Z(e){var n=e.onFocus,t=e.onBlur,r=e.onSyncFocus,o=e.onSyncBlur,i=a.useRef(!1),u=a.useRef(0),c=a.useCallback((function(e){clearTimeout(u.current),u.current=window.setTimeout((function(){return e()}))}),[u]),l=a.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];clearTimeout(u.current),r&&r.call.apply(r,[void 0].concat(e)),i.current||(i.current=!0,n&&n.call.apply(n,[void 0].concat(e)))}),[i,n,r]),s=a.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.call.apply(o,[void 0].concat(e)),c((function(){i.current&&t&&(i.current=!1,t.call.apply(t,[void 0].concat(e)))}))}),[i,c,t,o]);return a.useEffect((function(){return function(){clearTimeout(u.current)}}),[]),{onFocus:l,onBlur:s}}var ee=function(){return(ee=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},ne=function(e){var n=e.children,t=Z({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return n.call(void 0,ee({},t))},te=function(e,n){return a.useContext(e)(n)},re=function(){return(re=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},oe=function(){return a.createContext((function(e){return e}))},ie=function(e,n){return a.forwardRef((function(t,r){var o=te(e,t);return a.createElement(n,re({},o,{ref:r}))}))};function ue(e,n,t){var r=a.useState(n),o=r[0],i=r[1];return a.useEffect((function(){if(!o&&window&&e.current){var n=window.getComputedStyle(e.current).direction;n&&i(n)}}),t),o}function ce(e,n){var t=n.onPress,r=n.onDrag,o=n.onRelease,i=a.useMemo((function(){return new C({press:t,drag:r,release:o})}),[]);a.useEffect((function(){var n=e.current;if(n)return i.bindTo(n),function(){i.destroy()}}),[]),a.useEffect((function(){i.update({press:t,drag:r,release:o})}),[t,r,o])}function ae(e,n,t){var r=a.useState(n),o=r[0],i=r[1];return a.useEffect((function(){if(!o&&window&&e.current){var n=window.getComputedStyle(e.current).direction;n&&i(n)}}),t),o}var le=function(e,n,t){void 0===t&&(t={});var r=a.useCallback((function(r){t.onMouseDown&&t.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseDown,e.onMouseDown,n]),o=a.useCallback((function(r){t.onMouseUp&&t.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseUp,e.onMouseUp,n]);return{onClick:a.useCallback((function(r){t.onClick&&t.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onClick,e.onClick,n]),onMouseUp:o,onMouseDown:r,onDoubleClick:a.useCallback((function(r){t.onDoubleClick&&t.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onDoubleClick,e.onDoubleClick,n]),onMouseEnter:a.useCallback((function(r){t.onMouseEnter&&t.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseEnter,e.onMouseEnter,n]),onMouseLeave:a.useCallback((function(r){t.onMouseLeave&&t.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseLeave,e.onMouseLeave,n]),onMouseMove:a.useCallback((function(r){t.onMouseMove&&t.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseMove,e.onMouseMove,n]),onMouseOut:a.useCallback((function(r){t.onMouseOut&&t.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseOut,e.onMouseOut,n]),onMouseOver:a.useCallback((function(r){t.onMouseOver&&t.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:n.current,syntheticEvent:r})}),[t.onMouseOver,e.onMouseOver,n])}},se=function(e){return a.isValidElement(e)?[e.type,e.props]:[e,{}]},fe={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},de=function(){return(de=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},pe=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},me=a.forwardRef((function(e,n){var t=e.className,r=e.name,o=e.themeColor,i=e.size,u=e.flip,l=e.style,s=pe(e,["className","name","themeColor","size","flip","style"]),f=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(f,(function(){return{element:d.current}})),a.useImperativeHandle(n,(function(){return f.current}));var p=a.useMemo((function(){return o||he.themeColor}),[o]),m=a.useMemo((function(){return i||he.size}),[i]),h=a.useMemo((function(){return u||he.flip}),[u]),v=a.useMemo((function(){return c("k-icon","k-i-"+r,"k-color-"+p,{"k-flip-h":"horizontal"===h||"both"===h,"k-flip-v":"vertical"===h||"both"===h},fe[m],t)}),[r,p,m,h,t]),g=le(e,f);return a.createElement("span",de({ref:d},s,g,{className:v,style:l,role:"presentation"}))}));me.propTypes={style:m.object,classNames:m.string,name:m.string,themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:m.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:m.oneOf(["default","horizontal","vertical","both"])};var he={size:"default",themeColor:"inherit",flip:"default"};me.displayName="KendoIcon";var ve=function(){return(ve=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},ge=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},ye=a.forwardRef((function(e,n){var t=e.children,r=e.className,o=e.svgClassName,i=e.icon,u=e.flip,l=e.size,s=e.style,f=e.svgStyle,d=e.themeColor,p=e.viewBox,m=ge(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),h=a.useRef(null);a.useImperativeHandle(n,(function(){return{element:h.current}}));var v=a.useMemo((function(){return i?i.name:be.icon}),[i]),g=a.useMemo((function(){return d||be.themeColor}),[d]),y=a.useMemo((function(){return l||be.size}),[l]),b=a.useMemo((function(){return u||be.flip}),[u]),w=a.useMemo((function(){return p||be.viewBox}),[p]),k=a.useMemo((function(){return c("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},fe[y],r)}),[v,g,y,b,r]),O=a.useMemo((function(){return e.width&&e.height?ve({width:e.width,height:e.height},s):e.width?ve({width:e.width,height:e.width},s):e.height?ve({width:e.height,height:e.height},s):ve({},s)}),[e.width,e.height,s]);return a.createElement("span",{className:k,style:O,ref:h},a.createElement("svg",ve({className:o,style:f,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:w,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},m),i?void 0:t))}));ye.propTypes={style:m.object,classNames:m.string,children:m.any,icon:m.object,themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:m.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:m.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"},ke={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Oe={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-"},Ce={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"},Ee={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"},je=function(){return(je=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},Pe=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t},Se=function(e){var n=a.forwardRef((function(n,t){var r=n.className,o=n.fontSize,i=n.fontWeight,u=n.textAlign,c=n.textTransform,l=n.themeColor,s=n.margin,f=Pe(n,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),d=a.useRef(null),p=a.useRef(null);a.useImperativeHandle(d,(function(){return{element:p.current,props:n}})),a.useImperativeHandle(t,(function(){return d.current}));var m=e,h=function(){if(void 0!==s){if("string"==typeof s)return[Oe[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(n){var t,r;null!==s[n]&&void 0!==s[n]&&e.push((t=n,r=s[n],""+Me[t]+("string"==typeof r?_e[r]:r)))})),e.join(" ")}}};return a.createElement(m,je({ref:p,className:["k-"+("p"===e?"paragraph":e),we[o],ke[i],Ce[u],xe[c],Ee[l],h(),r].filter((function(e){return void 0!==e})).join(" ")},f),n.children)}));return n.propTypes={style:m.object,className:m.string,fontSize:m.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:m.oneOf(["light","normal","bold"]),margin:m.oneOfType([m.number,m.object,m.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:m.oneOf(["left","right","center","justify"]),textTransform:m.oneOf(["lowercase","uppercase","capitalize"]),themeColor:m.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},n.displayName="KendoReactTypography"+e.toUpperCase(),n},Te={h1:Se("h1"),h2:Se("h2"),h3:Se("h3"),h4:Se("h4"),h5:Se("h5"),h6:Se("h6"),p:Se("p"),code:Se("code"),pre:Se("pre")}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),o=t(1),i=t(3),u=t(3),c=t(6);n.ScrollView=r.forwardRef((function(e,n){u.validatePackage(c.packageMetadata);var t=e.className,o=e.style,a=e.children,l=e.pagerOverlay,s=e.pageable,f=e.arrows,d=e.endless,p=e.activeView,m=e.automaticViewChange,h=e.automaticViewChangeInterval,v=r.useState(p||1),g=v[0],y=v[1],b=r.useRef(null),w=r.useRef(null),k=r.useRef(null),O=r.Children.toArray(a),_=i.useRtl(b,e.dir),M="rtl"===_,C=r.useCallback((function(){b.current&&b.current.focus()}),[]),x=r.useCallback((function(){return{element:b.current,focus:C}}),[C]);r.useImperativeHandle(n,x);var E=r.useCallback((function(){d?y(g>1?g-1:O.length):g>1&&y(g-1)}),[g,O.length,d]),j=r.useCallback((function(){d?g<O.length?y(g+1):y(1):g<O.length&&y(g+1)}),[g,O.length,d]),P=r.useCallback((function(){M?j():E()}),[M,E,j]),S=r.useCallback((function(){M?E():j()}),[M,j,E]);function T(){k.current&&clearTimeout(k.current)}r.useEffect((function(){var e=O.length;w.current&&(w.current.style.setProperty("--kendo-scrollview-views",""+e),w.current.style.setProperty("--kendo-scrollview-current",""+g))}),[O,g,_]),r.useEffect((function(){if(m)return T(),k.current=setTimeout((function(){return y((function(e){return e===O.length?d?1:e:e+1}))}),h),function(){T()}}),[m,h,O.length,g,d]);var N=r.useCallback((function(e){switch(e.keyCode){case i.Keys.left:e.preventDefault(),M?j():E();break;case i.Keys.right:e.preventDefault(),M?E():j()}}),[M,j,E]),D=r.useMemo((function(){return i.classNames("k-widget k-scrollview",{"k-scrollview-light":"light"===l,"k-scrollview-dark":"dark"===l},t)}),[t,l]),R=r.Children.map(a||null,(function(e,n){return r.createElement("div",{className:"k-scrollview-view","aria-hidden":g!==n+1},e)})),H=r.useCallback((function(){var e;return e=M?g<O.length:g>1,(d||e)&&O.length>0}),[g,O.length,d,M]),I=r.useCallback((function(){var e;return e=M?g>1:g<O.length,(d||e)&&O.length>0}),[g,O.length,d,M]);return r.createElement("div",{className:D,style:o,ref:b,tabIndex:0,dir:_,onKeyDown:N},r.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:w},R),r.createElement("div",{className:"k-scrollview-elements"},f&&r.createElement(r.Fragment,null,H()&&r.createElement("a",{className:"k-scrollview-prev","aria-label":"previous",onClick:P},r.createElement("span",{className:"k-icon k-i-arrowhead-w"})),I()&&r.createElement("a",{className:"k-scrollview-next","aria-label":"next",onClick:S},r.createElement("span",{className:"k-icon k-i-arrowhead-e"}))),s&&r.createElement("div",{className:"k-scrollview-nav-wrap"},r.createElement("ul",{className:"k-scrollview-nav"},O.map((function(e,n){return r.createElement("li",{className:i.classNames("k-link",{"k-primary":g===n+1}),key:n+1,onClick:function(){return y(n+1)}})}))))))})),n.ScrollView.propTypes={activeView:o.number,arrows:o.bool,automaticViewChange:o.bool,automaticViewChangeInterval:o.number,children:o.any,className:o.string,dir:o.string,endless:o.bool,pageable:o.bool,pageOverlay:o.string,style:o.object};n.ScrollView.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},n.ScrollView.displayName="KendoScrollView"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.packageMetadata={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1642517585,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"}}])})); |
@@ -8,5 +8,5 @@ /** | ||
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'], | ||
publishDate: 1642515205, | ||
publishDate: 1642517585, | ||
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' | ||
}; |
@@ -10,5 +10,5 @@ "use strict"; | ||
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'], | ||
publishDate: 1642515205, | ||
publishDate: 1642517585, | ||
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,1 +0,1 @@ | ||
System.register("@progress/kendo-react-scrollview",["react","@progress/kendo-react-common","prop-types"],function(l){var c,o,i;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){c=t(e)},function(e){o=t(e)},function(e){i=t(e)}],execute:function(){function a(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,r;r={},a.m=n=[function(e,t){e.exports=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(2)),function(e){for(var t in e)l(t,e[t])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var P=n(3),r=n(4),V=n(0),x=n(0),S=n(5);t.ScrollView=P.forwardRef(function(e,t){x.validatePackage(S.packageMetadata);var n=e.className,r=e.style,a=e.children,l=e.pagerOverlay,c=e.pageable,o=e.arrows,i=e.endless,u=e.activeView,s=e.automaticViewChange,f=e.automaticViewChangeInterval,d=P.useState(u||1),m=d[0],p=d[1],v=P.useRef(null),g=P.useRef(null),k=P.useRef(null),w=P.Children.toArray(a),b=V.useRtl(v,e.dir),y="rtl"===b,h=P.useCallback(function(){v.current&&v.current.focus()},[]),C=P.useCallback(function(){return{element:v.current,focus:h}},[h]);P.useImperativeHandle(t,C);var E=P.useCallback(function(){i?p(1<m?m-1:w.length):1<m&&p(m-1)},[m,w.length,i]),N=P.useCallback(function(){i?m<w.length?p(m+1):p(1):m<w.length&&p(m+1)},[m,w.length,i]),O=P.useCallback(function(){(y?N:E)()},[y,E,N]),u=P.useCallback(function(){(y?E:N)()},[y,N,E]);function _(){k.current&&clearTimeout(k.current)}P.useEffect(function(){var e=w.length;g.current&&(g.current.style.setProperty("--kendo-scrollview-views",""+e),g.current.style.setProperty("--kendo-scrollview-current",""+m))},[w,m,b]),P.useEffect(function(){if(s)return _(),k.current=setTimeout(function(){return p(function(e){return e===w.length?i?1:e:e+1})},f),function(){_()}},[s,f,w.length,m,i]);d=P.useCallback(function(e){switch(e.keyCode){case V.Keys.left:e.preventDefault(),(y?N:E)();break;case V.Keys.right:e.preventDefault(),(y?E:N)()}},[y,N,E]),e=P.useMemo(function(){return V.classNames("k-widget k-scrollview",{"k-scrollview-light":"light"===l,"k-scrollview-dark":"dark"===l},n)},[n,l]),t=P.Children.map(a||null,function(e,t){return P.createElement("div",{className:"k-scrollview-view","aria-hidden":m!==t+1},e)}),C=P.useCallback(function(){var e=y?m<w.length:1<m;return(i||e)&&0<w.length},[m,w.length,i,y]),a=P.useCallback(function(){var e=y?1<m:m<w.length;return(i||e)&&0<w.length},[m,w.length,i,y]);return P.createElement("div",{className:e,style:r,ref:v,tabIndex:0,dir:b,onKeyDown:d},P.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:g},t),P.createElement("div",{className:"k-scrollview-elements"},o&&P.createElement(P.Fragment,null,C()&&P.createElement("a",{className:"k-scrollview-prev","aria-label":"previous",onClick:O},P.createElement("span",{className:"k-icon k-i-arrowhead-w"})),a()&&P.createElement("a",{className:"k-scrollview-next","aria-label":"next",onClick:u},P.createElement("span",{className:"k-icon k-i-arrowhead-e"}))),c&&P.createElement("div",{className:"k-scrollview-nav-wrap"},P.createElement("ul",{className:"k-scrollview-nav"},w.map(function(e,t){return P.createElement("li",{className:V.classNames("k-link",{"k-primary":m===t+1}),key:t+1,onClick:function(){return p(t+1)}})})))))}),t.ScrollView.propTypes={activeView:r.number,arrows:r.bool,automaticViewChange:r.bool,automaticViewChangeInterval:r.number,children:r.any,className:r.string,dir:r.string,endless:r.bool,pageable:r.bool,pageOverlay:r.string,style:r.object},t.ScrollView.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},t.ScrollView.displayName="KendoScrollView"},function(e,t){e.exports=c},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1642515205,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"}}],a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}}}); | ||
System.register("@progress/kendo-react-scrollview",["react","prop-types","@progress/kendo-react-common"],function(l){var c,o,i;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){c=t(e)},function(e){o=t(e)},function(e){i=t(e)}],execute:function(){function a(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,r;r={},a.m=n=[function(e,t){e.exports=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(2)),function(e){for(var t in e)l(t,e[t])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var P=n(3),r=n(4),V=n(0),x=n(0),S=n(5);t.ScrollView=P.forwardRef(function(e,t){x.validatePackage(S.packageMetadata);var n=e.className,r=e.style,a=e.children,l=e.pagerOverlay,c=e.pageable,o=e.arrows,i=e.endless,u=e.activeView,s=e.automaticViewChange,f=e.automaticViewChangeInterval,d=P.useState(u||1),m=d[0],p=d[1],v=P.useRef(null),g=P.useRef(null),k=P.useRef(null),w=P.Children.toArray(a),b=V.useRtl(v,e.dir),y="rtl"===b,h=P.useCallback(function(){v.current&&v.current.focus()},[]),C=P.useCallback(function(){return{element:v.current,focus:h}},[h]);P.useImperativeHandle(t,C);var E=P.useCallback(function(){i?p(1<m?m-1:w.length):1<m&&p(m-1)},[m,w.length,i]),N=P.useCallback(function(){i?m<w.length?p(m+1):p(1):m<w.length&&p(m+1)},[m,w.length,i]),O=P.useCallback(function(){(y?N:E)()},[y,E,N]),u=P.useCallback(function(){(y?E:N)()},[y,N,E]);function _(){k.current&&clearTimeout(k.current)}P.useEffect(function(){var e=w.length;g.current&&(g.current.style.setProperty("--kendo-scrollview-views",""+e),g.current.style.setProperty("--kendo-scrollview-current",""+m))},[w,m,b]),P.useEffect(function(){if(s)return _(),k.current=setTimeout(function(){return p(function(e){return e===w.length?i?1:e:e+1})},f),function(){_()}},[s,f,w.length,m,i]);d=P.useCallback(function(e){switch(e.keyCode){case V.Keys.left:e.preventDefault(),(y?N:E)();break;case V.Keys.right:e.preventDefault(),(y?E:N)()}},[y,N,E]),e=P.useMemo(function(){return V.classNames("k-widget k-scrollview",{"k-scrollview-light":"light"===l,"k-scrollview-dark":"dark"===l},n)},[n,l]),t=P.Children.map(a||null,function(e,t){return P.createElement("div",{className:"k-scrollview-view","aria-hidden":m!==t+1},e)}),C=P.useCallback(function(){var e=y?m<w.length:1<m;return(i||e)&&0<w.length},[m,w.length,i,y]),a=P.useCallback(function(){var e=y?1<m:m<w.length;return(i||e)&&0<w.length},[m,w.length,i,y]);return P.createElement("div",{className:e,style:r,ref:v,tabIndex:0,dir:b,onKeyDown:d},P.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:g},t),P.createElement("div",{className:"k-scrollview-elements"},o&&P.createElement(P.Fragment,null,C()&&P.createElement("a",{className:"k-scrollview-prev","aria-label":"previous",onClick:O},P.createElement("span",{className:"k-icon k-i-arrowhead-w"})),a()&&P.createElement("a",{className:"k-scrollview-next","aria-label":"next",onClick:u},P.createElement("span",{className:"k-icon k-i-arrowhead-e"}))),c&&P.createElement("div",{className:"k-scrollview-nav-wrap"},P.createElement("ul",{className:"k-scrollview-nav"},w.map(function(e,t){return P.createElement("li",{className:V.classNames("k-link",{"k-primary":m===t+1}),key:t+1,onClick:function(){return p(t+1)}})})))))}),t.ScrollView.propTypes={activeView:r.number,arrows:r.bool,automaticViewChange:r.bool,automaticViewChangeInterval:r.number,children:r.any,className:r.string,dir:r.string,endless:r.bool,pageable:r.bool,pageOverlay:r.string,style:r.object},t.ScrollView.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},t.ScrollView.displayName="KendoScrollView"},function(e,t){e.exports=c},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1642517585,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"}}],a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}}}); |
{ | ||
"name": "@progress/kendo-react-scrollview", | ||
"description": "KendoReact ScrollView package", | ||
"version": "4.14.1-dev.202201181415", | ||
"version": "4.14.1", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
79684