@progress/kendo-react-sortable 6.1.1 → 7.0.0-develop.2

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.
Files changed (73) hide show
  1. package/LICENSE.md +1 -1
  2. package/{dist/npm/Sortable.d.ts → Sortable.d.ts} +8 -4
  3. package/dist/cdn/js/kendo-react-sortable.js +5 -1
  4. package/events/BaseEvent.d.ts +13 -0
  5. package/{dist/es/events → events}/PreventableEvent.d.ts +4 -0
  6. package/{dist/npm/events → events}/SortableOnDragEndEvent.d.ts +4 -0
  7. package/{dist/npm/events → events}/SortableOnDragOverEvent.d.ts +4 -0
  8. package/{dist/npm/events → events}/SortableOnDragStartEvent.d.ts +4 -0
  9. package/{dist/es/events → events}/SortableOnNavigateEvent.d.ts +4 -0
  10. package/index.d.ts +13 -0
  11. package/index.js +5 -0
  12. package/index.mjs +485 -0
  13. package/{dist/es/interfaces → interfaces}/SortableDefaultProps.d.ts +4 -1
  14. package/interfaces/SortableEmptyItemUIProps.d.ts +13 -0
  15. package/{dist/npm/interfaces → interfaces}/SortableItemUIProps.d.ts +4 -1
  16. package/{dist/es/interfaces → interfaces}/SortableProps.d.ts +4 -1
  17. package/messages/index.d.ts +14 -0
  18. package/package-metadata.d.ts +9 -0
  19. package/package.json +27 -37
  20. package/{dist/npm/utils → utils}/utils.d.ts +4 -0
  21. package/about.md +0 -3
  22. package/dist/es/Sortable.d.ts +0 -206
  23. package/dist/es/Sortable.js +0 -691
  24. package/dist/es/events/BaseEvent.d.ts +0 -10
  25. package/dist/es/events/BaseEvent.js +0 -1
  26. package/dist/es/events/PreventableEvent.js +0 -28
  27. package/dist/es/events/SortableOnDragEndEvent.d.ts +0 -27
  28. package/dist/es/events/SortableOnDragEndEvent.js +0 -16
  29. package/dist/es/events/SortableOnDragOverEvent.d.ts +0 -27
  30. package/dist/es/events/SortableOnDragOverEvent.js +0 -16
  31. package/dist/es/events/SortableOnDragStartEvent.d.ts +0 -24
  32. package/dist/es/events/SortableOnDragStartEvent.js +0 -34
  33. package/dist/es/events/SortableOnNavigateEvent.js +0 -16
  34. package/dist/es/interfaces/SortableDefaultProps.js +0 -1
  35. package/dist/es/interfaces/SortableEmptyItemUIProps.d.ts +0 -9
  36. package/dist/es/interfaces/SortableEmptyItemUIProps.js +0 -1
  37. package/dist/es/interfaces/SortableItemUIProps.d.ts +0 -38
  38. package/dist/es/interfaces/SortableItemUIProps.js +0 -1
  39. package/dist/es/interfaces/SortableProps.js +0 -1
  40. package/dist/es/main.d.ts +0 -9
  41. package/dist/es/main.js +0 -6
  42. package/dist/es/messages/index.d.ts +0 -10
  43. package/dist/es/messages/index.js +0 -11
  44. package/dist/es/package-metadata.d.ts +0 -5
  45. package/dist/es/package-metadata.js +0 -11
  46. package/dist/es/utils/utils.d.ts +0 -29
  47. package/dist/es/utils/utils.js +0 -84
  48. package/dist/npm/Sortable.js +0 -694
  49. package/dist/npm/events/BaseEvent.d.ts +0 -10
  50. package/dist/npm/events/BaseEvent.js +0 -2
  51. package/dist/npm/events/PreventableEvent.d.ts +0 -18
  52. package/dist/npm/events/PreventableEvent.js +0 -31
  53. package/dist/npm/events/SortableOnDragEndEvent.js +0 -19
  54. package/dist/npm/events/SortableOnDragOverEvent.js +0 -19
  55. package/dist/npm/events/SortableOnDragStartEvent.js +0 -37
  56. package/dist/npm/events/SortableOnNavigateEvent.d.ts +0 -27
  57. package/dist/npm/events/SortableOnNavigateEvent.js +0 -19
  58. package/dist/npm/interfaces/SortableDefaultProps.d.ts +0 -25
  59. package/dist/npm/interfaces/SortableDefaultProps.js +0 -2
  60. package/dist/npm/interfaces/SortableEmptyItemUIProps.d.ts +0 -9
  61. package/dist/npm/interfaces/SortableEmptyItemUIProps.js +0 -2
  62. package/dist/npm/interfaces/SortableItemUIProps.js +0 -2
  63. package/dist/npm/interfaces/SortableProps.d.ts +0 -60
  64. package/dist/npm/interfaces/SortableProps.js +0 -2
  65. package/dist/npm/main.d.ts +0 -9
  66. package/dist/npm/main.js +0 -13
  67. package/dist/npm/messages/index.d.ts +0 -10
  68. package/dist/npm/messages/index.js +0 -14
  69. package/dist/npm/package-metadata.d.ts +0 -5
  70. package/dist/npm/package-metadata.js +0 -14
  71. package/dist/npm/utils/utils.js +0 -93
  72. package/dist/systemjs/kendo-react-sortable.js +0 -1
  73. package/e2e-next/basic.tests.ts +0 -23
package/LICENSE.md CHANGED
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**End User Lic
8
8
 
9
9
  All available KendoReact commercial licenses may be obtained at the [KendoReact website](https://www.telerik.com/kendo-react-ui/pricing).
10
10
 
11
- *Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
11
+ *Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  import * as React from 'react';
2
6
  import * as PropTypes from 'prop-types';
3
7
  import { DraggableDragEvent, DraggableDragStartEvent, DraggableReleaseEvent } from '@progress/kendo-react-common';
@@ -181,15 +185,15 @@ export declare class Sortable extends React.Component<SortableProps, SortableSta
181
185
  /**
182
186
  * @hidden
183
187
  */
184
- renderData: () => JSX.Element[];
188
+ renderData: () => import("react/jsx-runtime").JSX.Element[];
185
189
  /**
186
190
  * @hidden
187
191
  */
188
- renderNoData: () => JSX.Element | undefined;
192
+ renderNoData: () => import("react/jsx-runtime").JSX.Element | undefined;
189
193
  /**
190
194
  * @hidden
191
195
  */
192
- renderDragCue: () => JSX.Element | undefined;
196
+ renderDragCue: () => import("react/jsx-runtime").JSX.Element | undefined;
193
197
  /**
194
198
  * @hidden
195
199
  */
@@ -201,6 +205,6 @@ export declare class Sortable extends React.Component<SortableProps, SortableSta
201
205
  /**
202
206
  * @hidden
203
207
  */
204
- render(): JSX.Element;
208
+ render(): import("react/jsx-runtime").JSX.Element;
205
209
  }
206
210
  export {};
@@ -1 +1,5 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["react","react-dom","prop-types","@progress/kendo-licensing","@progress/kendo-react-intl"],t):"object"==typeof exports?exports.KendoReactSortable=t(require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):e.KendoReactSortable=t(e.React,e.ReactDOM,e.PropTypes,e.KendoLicensing,e.KendoReactIntl)}(self,(function(e,t,n,r,o){return(()=>{"use strict";var i={695:function(e,t,n){var r,o,i=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,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},a.apply(this,arguments)},l=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Sortable=void 0;var c=n(899),u=n(994),s=n(189),f=n(216),d=n(36),v=n(257),p=n(169),g=n(329),m=n(499),h=n(364),b=n(137),y=n(216),E=n(363),O=n(216),C="data-sortable-id",x="data-sortable-component",D=((o={})[x]=!0,o),I=function(e){function t(t){var n=e.call(this,t)||this;return n.state={clientX:0,clientY:0,isDragging:!1,activeId:"",dragCueWidth:0,dragCueHeight:0},n.isRtl=!1,n.itemRefsMap={},n.oldSizesMap={},n.animatingItemMap={},n.draggableRef=null,n.isUnmounted=!1,n.focusActiveId=!1,n.isKeyboardNavigated=!1,n.isDragPrevented=!1,n.swapItems=function(e,t,n){var r=e[t];return e[t]=e[n],e[n]=r,n},n.generateNewState=function(e,t){var r=n.props.data,o=l([],r,!0);if(e>t)for(var i=e-1;i>=t;i--){var a=r[i];n.isItemDisabled(a)||(e=n.swapItems(o,e,i))}else for(i=e+1;i<=t;i++)a=r[i],n.isItemDisabled(a)||(e=n.swapItems(o,e,i));return o},n.closestSortableItem=function(e){for(var t=e;t;){var r=t.getAttribute(C);if(r&&n.itemRefsMap[r]===t)return{id:r,element:t};t=t.parentElement}return{id:"",element:null}},n.isSortable=function(e){return Boolean(e.hasAttribute(x))},n.closestSortable=function(e){for(var t=e;t;){if(n.isSortable(t))return t;t=t.parentElement}return null},n.isSameSortable=function(e){return n.closestSortable(e)===n.container},n.idComparer=function(e,t){return e+""==t+""},n.findItem=function(e){var t=n.props,r=t.data,o=t.idField;if(e+""){var i=(0,O.getter)(o);return(0,b.find)(r,(function(t){return n.idComparer(i(t),e)}))}},n.findIndex=function(e){var t=n.props,r=t.data,o=t.idField;return e+""?(0,b.findIndex)(r,(function(t){return n.idComparer(t[o],e)})):-1},n.isItemDisabled=function(e){return e&&!0===e[n.props.disabledField||""]},n.shouldResetActive=function(){var e=(0,f.getActiveElement)(document);if(e instanceof HTMLElement){var t=n.closestSortableItem(e).element;return!Boolean(t)}return!1},n.widgetTarget=function(e){var t=(0,b.closest)(e,(function(e){return(0,b.hasClasses)(e,"k-widget")||n.isSortable(e)}));return t&&!n.isSortable(t)},n.allowDrag=function(e){return e.hasAttribute(C)||!((0,b.isFocusable)(e)||n.widgetTarget(e))},n.onDragStart=function(e){var t=e.event,r=n.props.onDragStart,o=document.elementFromPoint(t.clientX,t.clientY),i=n.closestSortableItem(o),a=i.id,l=i.element,c=n.findItem(a);if(!a||c&&n.isItemDisabled(c)||!n.allowDrag(o)||!n.isSameSortable(o))n.isDragPrevented=!0;else{t.isTouch&&t.originalEvent.preventDefault();var u=new d.SortableOnDragStartEvent(n,n.findIndex(a),o);r&&r.call(void 0,u),n.isDragPrevented=u.isDefaultPrevented(),n.isDragPrevented?t.originalEvent.preventDefault():(n.offsetParent=(0,b.relativeContextElement)(n.container),n.setState({activeId:a,dragCueWidth:l&&l.clientWidth||0,dragCueHeight:l&&l.clientHeight||0}))}},n.onDragOver=function(e){var t=e.event,r=n.props,o=r.onDragOver,i=r.data;if(!n.isDragPrevented){t.originalEvent.preventDefault();var a=n.findIndex(n.state.activeId);if(-1!==a){var l=document.elementFromPoint(t.clientX,t.clientY),c=n.closestSortableItem(l),u=n.findIndex(c.id),s=i[u];if(o&&u>-1&&a!==u&&!n.isItemDisabled(s)&&!n.animatingItemMap[c.id]&&n.shouldReorder(c.element,t.clientX,t.clientY)){var f=new v.SortableOnDragOverEvent(n,a,u,n.generateNewState(a,u));o.call(void 0,f)}var d=n.parentOffset();n.setState({clientX:t.clientX-d.left,clientY:t.clientY-d.top,isDragging:!0})}else n.resetState()}},n.onDragEnd=function(e){var t=e.event,r=n.shouldResetActive();if(!n.isDragPrevented){var o=n.props,i=o.onDragEnd,a=o.data,l=document.elementFromPoint(t.clientX,t.clientY),c=n.closestSortableItem(l),u=n.findIndex(c.id),s=n.findIndex(n.state.activeId),f=n.isItemDisabled(a[u]);if((-1===u||f)&&(u=s),i){var d=n.generateNewState(s,u);if(!f){var v=n.thresholdRect(c.element);if(v&&(t.clientX<v.left||t.clientX>v.right||t.clientY<v.top||t.clientY>v.bottom)){var g=s;s=u,u=g,d=n.props.data.slice()}}var m=new p.SortableOnDragEndEvent(n,s,u,d);i.call(void 0,m)}n.resetState(r)}},n.shouldReorder=function(e,t,r){var o=n.thresholdRect(e);return o&&t>o.left&&t<o.right&&r>o.top&&r<o.bottom},n.thresholdRect=function(e){var t=n.state.activeId,r=n.container,o=(r?Array.from(r.childNodes):[]).find((function(e){return e instanceof HTMLElement&&e.getAttribute(C)===t}));if(!e||!o)return null;var i=o.getBoundingClientRect(),a=i.width,l=i.height,c=e.getBoundingClientRect(),u=c.top+c.height/2-l/2,s=c.left+c.width/2-a/2;return{top:u,left:s,bottom:u+l,right:s+a}},n.onItemBlur=function(){window.setTimeout((function(){n.isUnmounted||n.shouldResetActive()&&!n.state.isDragging&&n.setState({activeId:""})}))},n.onItemFocus=function(e){var t=n.closestSortableItem(e.currentTarget),r=t.id,o=t.element;!n.idComparer(r,n.state.activeId)&&n.isSameSortable(e.target)&&o===e.target&&n.setState({activeId:r})},n.onKeyDown=function(e){var t=n.props,r=t.data,o=t.idField,i=t.onNavigate,a=t.navigation,l=n.state.activeId;if(a&&l&&n.isSameSortable(e.target)){var c=n.isRtl,u=r.filter((function(e){return!n.isItemDisabled(e)})),s=(0,b.findIndex)(u,(function(e){return n.idComparer(e[o],l)})),d=u.length-1,v=s;switch(e.keyCode===f.Keys.left&&(e.keyCode=c?f.Keys.down:f.Keys.up),e.keyCode===f.Keys.right&&(e.keyCode=c?f.Keys.up:f.Keys.down),e.keyCode){case f.Keys.up:s>0&&(v=s-1);break;case f.Keys.down:s<d&&(v=s+1)}if(v!==s){e.stopPropagation(),e.preventDefault();var p=u[v],m=p?p[o]:"",h=u[s],y=h?h[o]:"";if(e.ctrlKey){if(i){var E=n.findIndex(y),O=n.findIndex(m),C=new g.SortableOnNavigateEvent(n,E,O,n.generateNewState(E,O));n.isKeyboardNavigated=!0,i.call(void 0,C)}}else n.focusActiveId=!0,n.setState({activeId:m+""})}}},n.resetState=function(e){n.isDragPrevented=!1,n.setState({clientX:0,clientY:0,isDragging:!1,dragCueWidth:0,dragCueHeight:0,activeId:e?"":n.state.activeId})},n.renderData=function(){var e=n.props,t=e.data,r=e.itemUI,o=e.idField,i=e.tabIndex;return t.map((function(e){var t,a=(0,O.getter)(o)(e),l=n.isItemDisabled(e),u=n.idComparer(n.state.activeId,a);return c.createElement(r,{key:a,forwardRef:function(e){return n.refAssign(e,a)},dataItem:e,isDisabled:l,isActive:u,isDragged:u&&n.state.isDragging,isDragCue:!1,attributes:(t={},t[C]=a,t["aria-disabled"]=l,t["aria-grabbed"]=u&&n.state.isDragging&&!n.isDragPrevented,t["aria-dropeffect"]=l?"none":"move",t.tabIndex=(0,f.getTabIndex)(i,l),t.onFocus=n.onItemFocus,t.onBlur=n.onItemBlur,t),style:{cursor:l?"auto":"move",MozUserSelect:"none",msUserSelect:"none",WebkitUserSelect:"none",userSelect:"none"}})}))},n.renderNoData=function(){var e=n.props.emptyItemUI,t=(0,m.provideLocalizationService)(n).toLanguageString(h.noData,h.messages[h.noData]);if(e)return c.createElement(e,{message:t})},n.renderDragCue=function(){var e=n.props.itemUI,t=n.state,r=t.isDragging,o=t.activeId,i=t.clientX,a=t.clientY,l=n.findItem(o);if(r&&l)return c.createElement(e,{dataItem:l,isDisabled:!1,isActive:!0,isDragged:!0,isDragCue:!0,style:{position:"fixed",top:a+10,left:i+10,width:n.state.dragCueWidth,height:n.state.dragCueHeight},attributes:{}})},n.refAssign=function(e,t){e?n.itemRefsMap[t]=e:delete n.itemRefsMap[t]},n.draggableRefAssign=function(e){n.draggableRef=e},(0,y.validatePackage)(E.packageMetadata),n}return i(t,e),Object.defineProperty(t.prototype,"container",{get:function(){return this.draggableRef&&this.draggableRef.element},enumerable:!1,configurable:!0}),t.prototype.getSnapshotBeforeUpdate=function(){var e=this,t=this.props,n=t.idField,r=t.animation;return this.oldSizesMap={},r?(this.props.data.forEach((function(t){var r=t[n],o=e.itemRefsMap[r],i=u.findDOMNode(o);i&&(e.oldSizesMap[r]=i.getBoundingClientRect())})),null):null},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props,r=n.idField,o=n.animation;this.focusActiveId&&(this.focusActiveId=!1,this.itemRefsMap[this.state.activeId].focus()),o&&(this.state.isDragging||this.isKeyboardNavigated)&&(this.isKeyboardNavigated=!1,e.data.forEach((function(e){var n=e[r],o=t.itemRefsMap[n];if(o){var i=o.getBoundingClientRect(),a=t.oldSizesMap[n],l=a.left-i.left,c=a.top-i.top;0===l&&0===c||requestAnimationFrame((function(){t.animatingItemMap[n]=!0,o.style.transform="translate(".concat(l,"px, ").concat(c,"px)"),o.style.transition="transform 0s",requestAnimationFrame((function(){o.style.transform="",o.style.transition="transform ".concat(200,"ms cubic-bezier(0.2, 0, 0, 1) 0s"),window.setTimeout((function(){return t.animatingItemMap[n]=!1}),200)}))}))}})))},t.prototype.componentDidMount=function(){this.isRtl=this.container&&"rtl"===getComputedStyle(this.container).direction||!1},t.prototype.componentWillUnmount=function(){this.isUnmounted=!0},t.prototype.parentOffset=function(){var e=this.offsetParent;if(e&&e.ownerDocument&&e!==e.ownerDocument.body){var t=e.getBoundingClientRect();return{left:t.left-e.scrollLeft,top:t.top-e.scrollTop}}return{left:0,top:0}},t.prototype.render=function(){var e=this.props,t=e.data,n=e.style,r=e.className,o=e.itemsWrapUI||"div";return c.createElement(f.Draggable,{onDragStart:this.onDragStart,onDrag:this.onDragOver,onDragEnd:this.onDragEnd,ref:this.draggableRefAssign},c.createElement(o,a({},D,{className:r,style:a({touchAction:"none"},n),onKeyDown:this.onKeyDown}),t&&t.length?this.renderData():this.renderNoData(),this.renderDragCue()))},t.defaultProps={navigation:!0,animation:!0,emptyItemUI:function(e){return c.createElement("div",null,e.message)}},t.propTypes={idField:s.string.isRequired,disabledField:s.string,data:s.array.isRequired,tabIndex:s.number,navigation:s.bool,animation:s.bool,itemsWrapUI:s.any,itemUI:s.func.isRequired,emptyItemUI:s.func,style:s.object,className:s.string,onDragStart:s.func,onDragOver:s.func,onDragEnd:s.func,onNavigate:s.func},t}(c.Component);t.Sortable=I,(0,m.registerForLocalization)(I)},120:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PreventableEvent=void 0;var n=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=n},169:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableOnDragEndEvent=void 0;t.SortableOnDragEndEvent=function(e,t,n,r){this.target=e,this.prevIndex=t,this.nextIndex=n,this.newState=r}},257:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableOnDragOverEvent=void 0;t.SortableOnDragOverEvent=function(e,t,n,r){this.target=e,this.prevIndex=t,this.nextIndex=n,this.newState=r}},36:function(e,t,n){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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SortableOnDragStartEvent=void 0;var i=function(e){function t(t,n,r){var o=e.call(this)||this;return o.target=t,o.prevIndex=n,o.element=r,o}return o(t,e),t}(n(120).PreventableEvent);t.SortableOnDragStartEvent=i},329:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableOnNavigateEvent=void 0;t.SortableOnNavigateEvent=function(e,t,n,r){this.target=e,this.prevIndex=t,this.nextIndex=n,this.newState=r}},364:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.messages=t.noData=void 0,t.noData="sortable.noData",t.messages=((n={})[t.noData]="No Data",n)},363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-sortable",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1700065191,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"}},137:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.relativeContextElement=t.closest=t.isFocusable=t.hasClasses=t.toClassList=t.findIndex=t.find=void 0;var r=n(216);t.find=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]},t.findIndex=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1};var o=function(e){return String(e).trim().split(" ")};t.toClassList=o,t.hasClasses=function(e,t){var n=o(t);return Boolean(o(e.className).find((function(e){return n.indexOf(e)>=0})))};var i=/^(?:a|input|select|option|textarea|button|object)$/i;t.isFocusable=function(e){if(e.tagName){var t=e.tagName.toLowerCase(),n=e.getAttribute("tabIndex"),r="-1"===n,o=null!==n&&!r;return i.test(t)&&(o=!e.disabled&&!r),o}return!1},t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e};var a=(0,r.hasRelativeStackingContext)();t.relativeContextElement=function(e){if(!e||!a)return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}}},216:(e,t,n)=>{n.r(t),n.d(t,{AsyncFocusBlur:()=>Z,BrowserSupportService:()=>c,COLLECTION_ACTION:()=>ie,DragAndDrop:()=>ze,Draggable:()=>tt,Droppable:()=>rt,FOCUSABLE_ELEMENTS:()=>lt,FormComponent:()=>b,Icon:()=>he,IconWrap:()=>De,IconsContext:()=>Ce,Keys:()=>I,Navigation:()=>ct,SortedPublicItemIds:()=>pt,SvgIcon:()=>Ee,TreeFieldsService:()=>vt,Typography:()=>je,WatermarkOverlay:()=>J,ZIndexContext:()=>i,addItem:()=>Yt,areAllDirectChildrenChecked:()=>Ht,canUseDOM:()=>u,canUseRef:()=>s,classNames:()=>f,clone:()=>v,cloneArray:()=>m,cloneDate:()=>d,cloneObject:()=>p,cloneValue:()=>g,createPropsContext:()=>te,dispatchEvent:()=>G,extendDataItem:()=>H,focusFirstFocusableChild:()=>h,getActiveElement:()=>st,getAllDirectIndirectChildrenIds:()=>Ft,getAllParents:()=>Bt,getInnerActiveElement:()=>ut,getItemPath:()=>B,getNestedValue:()=>ft,getScrollbarWidth:()=>k,getTabIndex:()=>y,getter:()=>x,guid:()=>D,hasChildren:()=>Rt,hasRelativeStackingContext:()=>Q,isArray:()=>dt,isEnabledAndAllParentsEnabled:()=>Lt,isItemExpandedAndWithChildren:()=>Nt,kendoThemeMaps:()=>ot,mapTree:()=>L,mapTreeItem:()=>F,memoizeOne:()=>at,noop:()=>w,removeItem:()=>Xt,resolveItemId:()=>Mt,resolveItemsIds:()=>Tt,setScrollbarWidth:()=>P,setter:()=>R,shouldShowValidationUI:()=>U,svgIconPropType:()=>ge,toIconClass:()=>pe,toIconName:()=>ve,treeIdUtils:()=>r,updateItem:()=>jt,useAsyncFocusBlur:()=>V,useCollection:()=>ce,useCustomComponent:()=>le,useDir:()=>re,useDocument:()=>ue,useDraggable:()=>et,useDroppable:()=>nt,useMouse:()=>ae,usePropsContext:()=>$,useRtl:()=>oe,useWindow:()=>se,useZIndexContext:()=>a,validatePackage:()=>z,withPropsContext:()=>ne});var r={};n.r(r),n.d(r,{EMPTY_ID:()=>gt,SEPARATOR:()=>ht,ZERO_LEVEL_ZERO_NODE_ID:()=>mt,createId:()=>Ct,getAllShortIds:()=>wt,getDecrementedItemIdAfterRemoval:()=>At,getDirectParentId:()=>xt,getFirstChildId:()=>Ot,getIdWithoutRootParentId:()=>Et,getItemById:()=>bt,getRootParentId:()=>yt,getShortId:()=>kt,isIdEmptyOrZeroLevel:()=>Dt,isIdZeroLevel:()=>It,isItemFirstFromSiblings:()=>Pt});var o=n(899),i=o.createContext(0),a=function(){return o.useContext(i)};i.displayName="KendoReactZIndexContext";var l=function(){return"undefined"!=typeof document?document:{}},c=function(){function e(){this.scrollbar=0}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=l();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="&nbsp;",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!1,configurable:!0}),e}(),u=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),s=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))},f=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={},r=function(e){return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?r(e):function(e){return"object"==typeof e?Object.keys(e).forEach((function(t){n[t]=e[t]})):n[e]=!0}(e)}))};return r(e),Object.keys(n).map((function(e){return n[e]&&e||null})).filter((function(e){return null!==e})).join(" ")},d=function(e){return e?new Date(e.getTime()):null};function v(e){var t={};return p(e,t),t}function p(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=g(r,t[n])}}function g(e,t){if(Array.isArray(e))return m(e);if(e instanceof Date)return d(e);if(o.isValidElement(e))return o.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return p(e,n),n}return e}function m(e){return e.map((function(e){return g(e,void 0)}))}var h=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()}},b=function(){},y=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},E=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function O(e){var t=[];return e.replace(E,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var C={};function x(e){if(C[e])return C[e];var t=O(e);return C[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},C[e]}C.undefined=function(){};var D=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},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},w=function(){},k=function(){return!(!u||!document.body)&&(new c).scrollbarWidth},P=function(){if(!u||!document.body)return!1;var e=(new c).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width","".concat(e,"px"))},A={undefined:function(e){return e}},S=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function R(e){if(A[e])return A[e];var t=O(e);return A[e]=function(e,n,r){for(var o=e,i=t.length-1,a=0;a<i&&o;a++)o=o[t[a]]=o[t[a]]||S(t[a+1],r);o[t[i]]=n},A[e]}var N=function(){return N=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},N.apply(this,arguments)},M=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function T(e,t,n){var r;return n?N(N({},e),((r={})[t]=n.length?M([],n,!0):void 0,r)):e&&e[t]?M([],e[t],!0):[]}function j(e,t,n){if(e[t]){var r=T(e,t).map((function(e){return j(e,t,n)}));return n(T(e,t,r))}return n(e)}var L=function(e,t,n){return M([],e.map((function(e){return j(e,t,n)})),!0)},F=function(e,t,n,r){for(var o=e,i=[],a=0;a<t.length;a++)o=o[t[a]],o=Array.isArray(o)?o:o[n],i.push(o);var l=i.length>1?i[i.length-2]:e,c=t[t.length-1],u=r(l[c]);l.splice(c,1,u)},H=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},B=function(e,t,n){var r=[],o=M([],t,!0);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},X=n(302),Y=["telerik.com","progress.com","stackblitz.io","csb.app"];function z(e){if(void 0!==X)X.validatePackage(e);else{var t="License activation failed for ".concat(e.name,"\n");t+="The @progress/kendo-licensing script is not loaded.\n",t+="See ".concat(e.licensingDocsUrl," for more information.\n"),console.warn(t)}}function U(e){return!Y.some((function(e){var t;return null===(t=globalThis.document)||void 0===t?void 0:t.location.hostname.endsWith(e)}))&&!(null==X?void 0:X.validatePackage(e))}var Q=function(e){if(!u)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)";var r=t.createElement("div");r.appendChild(t.createTextNode("child")),r.style.position="fixed",r.style.top="10px",n.appendChild(r),t.body.appendChild(n);var o=10!==r.getBoundingClientRect().top;return t.body.removeChild(n),o},K=n(994),_=!1,J=function(){var e=o.useState(!0),t=e[0],n=e[1],r=o.useState(!1),i=r[0],a=r[1];o.useEffect((function(){_||(a(!0),_=!0)}),[]);var l=o.createElement(o.Fragment,null,t&&o.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"fixed",top:"16px",right:"16px",padding:"12px",borderRadius:"4px",boxShadow:"0px 4px 5px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.03)",fontSize:"14px",fontWeight:400,lineHeight:"20px",backgroundColor:"#FFC000",color:"#1E1E1E",zIndex:999}},o.createElement("span",{style:{display:"flex",alignSelf:"center",marginRight:"8px"}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1L0 15H16L8 1ZM7 6V11H9V6H7ZM7 14V12H9V14H7Z",fill:"#1E1E1E"}))),o.createElement("span",null,"No valid license found for KendoReact. Learn how to activate your license."),o.createElement("div",{style:{display:"flex",alignItems:"center",marginLeft:"24px"}},o.createElement("a",{href:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-banner",style:{marginRight:"8px",display:"flex"}},o.createElement("button",{title:"Learn More",style:{display:"inline-flex",position:"relative",border:"none",borderRadius:"4px",padding:"5px",backgroundColor:"transparent",transition:"color 0.2s ease-in-out",outline:"none",cursor:"pointer"}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.createElement("path",{d:"M15 8C15 11.8656 11.8656 15 8 15C4.13437 15 1 11.8656 1 8C1 4.13437 4.13437 1 8 1C11.8656 1 15 4.13437 15 8ZM14 8C14 4.6875 11.3125 2 8 2C4.6875 2 2 4.6875 2 8C2 11.3125 4.6875 14 8 14C11.3125 14 14 11.3125 14 8ZM11 6C11 7.4125 10.2687 8.05937 9.73125 8.53125C9.25937 8.94688 9 9.17813 9 10H7C7 8.275 7.84688 7.525 8.40938 7.03125C8.84062 6.65312 9 6.50938 9 6C9 5.45 8.55 5 8 5C7.45 5 7 5.45 7 6H5C5 4.34375 6.34375 3 8 3C9.65625 3 11 4.34375 11 6ZM9 13V11H7V13H9Z",fill:"#1E1E1E"})))),o.createElement("button",{title:"Close",style:{display:"inline-flex",position:"relative",border:"none",borderRadius:"4px",padding:"5px",backgroundColor:"transparent",transition:"color 0.2s ease-in-out",outline:"none",cursor:"pointer"},onClick:function(){n(!1)}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.createElement("path",{d:"M13 4.41562L9.41563 8L13 11.5844L11.5844 13L8 9.41563L4.41562 13L3 11.5844L6.58437 8L3 4.41562L4.41562 3L8 6.58437L11.5844 3L13 4.41562Z",fill:"#1E1E1E"}))))));return o.createElement(o.Fragment,null,o.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,right:0,bottom:0,opacity:.2,zIndex:101,pointerEvents:"none",backgroundImage:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAY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vRXx4LNF12avdfsLJyADQf17IkbjNzgIwoOUK27p8Sv58Nl6vf1qJ6DL/kE7+VD/jonZ+A0OgvB8wAngbH8UN/ZQ/45IwfgNDoLwvOUEtLw3qr6N1D8wiOimYvxGwyAYC2lFkxNAjCCGmf8Q6h8QRHeR7knF+A0bBJqqmgr5NO6gGYc5gTYHe/qC+gfC7bv3jCUx3K5ibepYmPJp3BvNXNyut+M0xpn/EOpPyBG4AM1cCCEJkmLMhxASiKenp3saf4Fg2Vc9FsjpSuZo3hr/115r1lMAe+bNZrPO2fip/wH+nq9iKZkD8ZknLhfq79EQ8MneK7JYpGyov5JShV9oOAjKvnSjeP1LNn6j5EHgWl7akgPF6k/j31PiIGCef09x+jPP+5qSBgGd/2uKcgIHEdCJkBp/EOSaCaHxv00J+tdoDnRJ8V+jtePLHGshaPzvk7P+pGC47SOkYCqDn6FvH42fkAJxuyPdaN01FlIGbnc/37TkFE8o3L4nAmvHCyQ5/S3gw24oYXAvuyKxbLgwktK/xNr+rsFqKpU8sa78Zlz5hSMZ/Znq6Y4UikVMf72oYyYkGNHrT+PvnpgHAVd+3ROt/jT+/ohxEFD//ohOf4rfPzENAurfP1E5AVzPRPH7xx8EuJ1WBoDGPxyH+ruhjlTjbnR9AxMhvYLPHA4YGkjPIMpP4x+WIfUnhYMZx2voMRFCSFlohVqR3XwIIaQc3O5OtrGQJFC9RkKKRCsyRxICi/YuFgvs986ERA3Eh1ahUkT4GQg0Vc9XQqInqP6ODRyTA046VJ7Y1x/XdgmJnmD6M8+bLiGKRVjemy6t9WeeN30aBsGHI/bUP33a6M88bybYIPjs9o3658Gx+tuLmefNgGN1pP55QB0JIYQQQgghhBBCCJGy+T9ftRg+rVNPfAAAAABJRU5ErkJggg==')"}}),i&&K.createPortal(l,document.body))};function G(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}var W=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function V(e){var t=e.onFocus,n=e.onBlur,r=e.onSyncFocus,i=e.onSyncBlur,a=o.useRef(!1),l=o.useRef(0),c=o.useCallback((function(e){clearTimeout(l.current),l.current=window.setTimeout((function(){return e()}))}),[l]),u=o.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(l.current),r&&r.call(void 0,e[0]),a.current||(a.current=!0,t&&t.call.apply(t,W([void 0],e,!1)))}),[a,t,r]),s=o.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i&&i.call(void 0,e[0]),c((function(){a.current&&n&&(a.current=!1,n.call.apply(n,W([void 0],e,!1)))}))}),[a,c,n,i]);return o.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),{onFocus:u,onBlur:s}}var q=function(){return q=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},q.apply(this,arguments)},Z=function(e){var t=e.children,n=V({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return o.createElement(o.Fragment,null,t.call(void 0,q({},n)))},$=function(e,t){return o.useContext(e)(t)},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},ee.apply(this,arguments)},te=function(){return o.createContext((function(e){return e}))},ne=function(e,t){return o.forwardRef((function(n,r){var i=$(e,n);return o.createElement(t,ee({},i,{ref:r}))}))};function re(e,t,n){var r=o.useState(t),i=r[0],a=r[1];return o.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}function oe(e,t,n){var r=o.useState(t),i=r[0],a=r[1];return o.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}var ie,ae=function(e,t,n){void 0===n&&(n={});var r=o.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]),i=o.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:o.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:i,onMouseDown:r,onDoubleClick:o.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:o.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:o.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:o.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:o.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:o.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])}},le=function(e){return[e,{}]};!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(ie||(ie={}));var ce=function(e){void 0===e&&(e=[]);var t=o.useRef(e),n=o.useCallback((function(e){switch(e.type){case ie.add:t.current.push(e.item);break;case ie.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},ue=function(e){var t=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]);return o.useCallback((function(){var e=t();return e&&e.ownerDocument||document}),[t])},se=function(e){var t=ue(e);return o.useCallback((function(){var e=t();return e&&e.defaultView||window}),[t])},fe=n(189),de={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl",xxlarge:"k-icon-xxl",xxxlarge:"k-icon-xxxl"},ve=function(e){return e.replace(/^k-i-/,"")},pe=function(e){return"k-i-"+e},ge=fe.shape({name:fe.string.isRequired,content:fe.string.isRequired,viewBox:fe.string.isRequired}),me=function(){return me=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},me.apply(this,arguments)},he=o.forwardRef((function(e,t){var n=e.className,r=e.name,i=e.themeColor,a=e.size,l=e.flip,c=e.style,u=e.id,s=e.tabIndex,d=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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","name","themeColor","size","flip","style","id","tabIndex"]),v=o.useRef(null),p=o.useRef(null);o.useImperativeHandle(v,(function(){return{element:p.current}})),o.useImperativeHandle(t,(function(){return v.current}));var g=o.useMemo((function(){return a||be.size}),[a]),m=o.useMemo((function(){return l||be.flip}),[l]),h=o.useMemo((function(){var e;return f("k-icon","k-font-icon",r&&pe(r),((e={})["k-color-".concat(i)]=i,e["k-flip-h"]="horizontal"===m||"both"===m,e["k-flip-v"]="vertical"===m||"both"===m,e),de[g],n)}),[r,i,g,m,n]),b=ae(e,v);return o.createElement("span",me({ref:p},d,b,{className:h,id:u,tabIndex:s,style:c,role:"presentation"}))}));he.propTypes={style:fe.object,classNames:fe.string,name:fe.string,themeColor:fe.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:fe.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:fe.oneOf(["default","horizontal","vertical","both"])};var be={size:"default",flip:"default"};he.displayName="KendoIcon";var ye=function(){return ye=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},ye.apply(this,arguments)},Ee=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.svgClassName,a=e.icon,l=e.flip,c=e.id,u=e.tabIndex,s=e.size,d=e.style,v=e.svgStyle,p=e.themeColor,g=e.viewBox,m=(e.name,e.onClick),h=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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","className","svgClassName","icon","flip","id","tabIndex","size","style","svgStyle","themeColor","viewBox","name","onClick"]),b=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:b.current}}));var y=o.useMemo((function(){return a?a.name:Oe.icon}),[a]),E=o.useMemo((function(){return s||Oe.size}),[s]),O=o.useMemo((function(){return l||Oe.flip}),[l]),C=o.useMemo((function(){return g||Oe.viewBox}),[g]),x=o.useMemo((function(){var e;return f("k-icon","k-svg-icon","k-svg-i-"+y,((e={})["k-color-".concat(p)]=p,e["k-flip-h"]="horizontal"===O||"both"===O,e["k-flip-v"]="vertical"===O||"both"===O,e),de[E],r)}),[y,p,E,O,r]),D=o.useMemo((function(){return e.width&&e.height?ye({width:e.width,height:e.height},d):e.width?ye({width:e.width,height:e.width},d):e.height?ye({width:e.height,height:e.height},d):ye({},d)}),[e.width,e.height,d]);return o.createElement("span",{className:x,style:D,ref:b,onClick:m},o.createElement("svg",ye({id:c,className:i,style:v,"aria-hidden":!0,tabIndex:u,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:a?a.viewBox:C,dangerouslySetInnerHTML:a?{__html:a.content}:void 0},h),a?void 0:n))}));Ee.propTypes={style:fe.object,classNames:fe.string,children:fe.any,icon:fe.object,themeColor:fe.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:fe.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:fe.oneOf(["default","horizontal","vertical","both"])};var Oe={size:"default",flip:"default",icon:"",viewBox:"0 0 24 24"};Ee.displayName="KendoSvgIcon";var Ce=o.createContext({type:"svg"});Ce.displayName="KendoReactIconsContext";var xe=function(){return xe=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},xe.apply(this,arguments)},De=o.forwardRef((function(e,t){var n,r,i=o.useContext(Ce),a=i.type,l=i.icons,c=e.icon,u=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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["icon"]),s="svg"===a?(null===(n=e.icon)||void 0===n?void 0:n.name)||e.name:e.name||(null===(r=e.icon)||void 0===r?void 0:r.name),f=(s=s&&l&&l[s]&&"string"==typeof l[s]?l[s]:s)&&l&&l[s]&&"string"!=typeof l[s]?l[s]:c;return"svg"===a&&f?o.createElement(Ee,xe({},e,{icon:f,ref:t})):o.createElement(he,xe({},u,{name:s,ref:t}))}));De.displayName="KendoIconWrap";var Ie={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},we={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"},Pe={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},Ae={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},Se={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},Re={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Ne={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"},Me=function(){return Me=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},Me.apply(this,arguments)},Te=function(e){var t=o.forwardRef((function(t,n){var r=t.id,i=t.style,a=t.className,l=t.fontSize,c=t.fontWeight,u=t.textAlign,s=t.textTransform,f=t.themeColor,d=t.margin,v=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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["id","style","className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=o.useRef(null),g=o.useRef(null);o.useImperativeHandle(p,(function(){return{element:g.current,props:t}})),o.useImperativeHandle(n,(function(){return p.current}));var m=e;return o.createElement(m,Me({id:r,ref:g,className:["k-".concat("p"===e?"paragraph":e),Ie[l],we[c],Se[u],Re[s],Ne[f],function(){if(void 0!==d){if("string"==typeof d)return[ke[d]];if("number"==typeof d&&d>=0&&d<=24)return["k-m-".concat(d)];if("object"==typeof d){var e=[];return Object.keys(d).forEach((function(t){var n,r,o;null!==d[t]&&void 0!==d[t]&&e.push((n=t,o="string"==typeof(r=d[t])?Pe[r]:r,"".concat(Ae[n]).concat(o)))})),e.join(" ")}}}(),a].filter((function(e){return void 0!==e})).join(" "),style:i},v),t.children)}));return t.propTypes={style:fe.object,className:fe.string,fontSize:fe.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:fe.oneOf(["light","normal","bold"]),margin:fe.oneOfType([fe.number,fe.object,fe.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:fe.oneOf(["left","right","center","justify"]),textTransform:fe.oneOf(["lowercase","uppercase","capitalize"]),themeColor:fe.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography".concat(e.toUpperCase()),t},je={h1:Te("h1"),h2:Te("h2"),h3:Te("h3"),h4:Te("h4"),h5:Te("h5"),h6:Te("h6"),p:Te("p"),code:Te("code"),pre:Te("pre")},Le=function(){return Le=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},Le.apply(this,arguments)},Fe=function(e,t,n){var r=o.useState(t||e),i=r[0],a=r[1];return[void 0!==t?t:i,o.useCallback((function(e,t){a(e),n&&n.call(void 0,Le(Le({},t),{value:e}))}),[n,a])]},He=o.createContext([void 0,w]),Be=o.createContext([void 0,w]),Xe=o.createContext([[],w,w]),Ye=o.createContext([[],w,w]),ze=function(e){var t=Fe(null,void 0),n=t[0],r=t[1],i=Fe(null,void 0),a=i[0],l=i[1],c=ce([]),u=c[0],s=c[1],f=ce([]),d=f[0],v=f[1];return o.createElement(He.Provider,{value:[n,r]},o.createElement(Be.Provider,{value:[a,l]},o.createElement(Xe.Provider,{value:[u,function(e){s({type:ie.add,item:e})},function(e){s({type:ie.remove,item:e})}]},o.createElement(Ye.Provider,{value:[d,function(e){v({type:ie.add,item:e})},function(e){v({type:ie.remove,item:e})}]},e.children))))};ze.displayName="KendoReactDragAndDrop";var Ue,Qe=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},_e=function(e){var t=Qe(),n=Ke(e);return t.edge||t.safari?n.body:n.documentElement},Je=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},Ge=function(e){var t=_e(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE&&!Je(n);)n=n.parentNode;return!n||n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?n:t};!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 We=function(){},Ve=function(e,t,n){void 0===n&&(n={});var r,o,i,a,l,c=n.onIsPressedChange,u=void 0===c?We:c,s=n.onIsScrollingChange,f=void 0===s?We:s,d=n.onVelocityChange,v=void 0===d?We:d,p=n.onOffsetChange,g=void 0===p?We:p,m=n.onPageOffsetChange,h=void 0===m?We:m,b=n.onClientOffsetChange,y=void 0===b?We:b,E=n.onScrollOffsetChange,O=void 0===E?We:E,C=n.onInitialScrollOffsetChange,x=void 0===C?We:C,D=t.payload,I=D.element,w=D.hint,k=e.autoScrollDirection,P=e.scrollableParent,A=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(A.type){case Ue.POINTER_DOWN:if(A.type===Ue.POINTER_DOWN&&(!A.originalEvent.isPrimary||0!==A.originalEvent.button))break;case Ue.MOUSE_DOWN:if(A.type===Ue.MOUSE_DOWN&&A.originalEvent.which&&A.originalEvent.which>1||e.ignoreMouse)break;case Ue.TOUCH_START:if(A.type===Ue.TOUCH_START&&1!==A.originalEvent.touches.length)break;case Ue.START:var S=P||Ge(t.payload.element);x(S instanceof Window?{x:S.scrollX,y:S.scrollY}:{x:S.scrollLeft,y:S.scrollTop}),y({x:A.clientX,y:A.clientY}),h({x:A.pageX,y:A.pageY}),g({x:A.offsetX,y:A.offsetY}),u(!0),D.onPress&&D.onPress(A);break;case Ue.SCROLL:if(A.type===Ue.SCROLL&&!e.pressed)break;var R=P||Ge(I),N=R instanceof Window?{x:R.scrollX,y:R.scrollY}:{x:R.scrollLeft,y:R.scrollTop};A.scrollX=N.x-e.initialScrollOffset.x,A.scrollY=N.y-e.initialScrollOffset.y,O({x:A.scrollX,y:A.scrollY});case Ue.POINTER_MOVE:if(A.type===Ue.POINTER_MOVE&&!A.originalEvent.isPrimary)break;case Ue.MOUSE_MOVE:case Ue.TOUCH_MOVE:if(A.type===Ue.TOUCH_MOVE&&1!==A.originalEvent.touches.length)break;case Ue.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==A.originalEvent.type&&I){var M=Ke(I),T=P||Ge(M.elementFromPoint(A.clientX,A.clientY)),j=(r=A.clientX,o=A.clientY,i=function(e,t){var n=_e(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}}(T,function(e){var t=Ke(e);return t&&t.defaultView||window}(I)),a={x:0,y:0},l=50,r-i.left<l?a.x=-(l-(r-i.left)):i.right-r<l&&(a.x=l-(i.right-r)),o-i.top<l?a.y=-(l-(o-i.top)):i.bottom-o<l&&(a.y=l-(i.bottom-o)),a);v({x:k&&!1===k.horizontal?0:j.x,y:k&&!1===k.vertical?0:j.y}),f(0!==j.y||0!==j.x)}!e.drag&&D.onDragStart&&D.onDragStart(A),D.onDrag&&D.onDrag(A);var L=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),a=Math.min(r.left+r.width,n.left+n.width),l=Math.min(r.top+r.height,n.top+n.height),c=a-i,u=l-o;if(i<a&&o<l){var s=r.width*r.height,f=n.width*n.height,d=c*u;return Number((d/(s+f-d)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r}(w||I,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(w||I)}))),F=e.drops.find((function(e){return e.element===L}));F&&L&&function(e,t,n){var r=n.getBoundingClientRect();return r.top<=t&&r.left<=e&&t<=r.bottom&&e<=r.right}(A.clientX,A.clientY,P||Ge(L))&&L!==I?(e.drop&&e.drop.element)!==L?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(A),F.onDragEnter&&F.onDragEnter(A)):F.onDragOver&&F.onDragOver(A):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(A)}y({x:A.clientX,y:A.clientY}),h({x:A.pageX,y:A.pageY});break;case Ue.POINTER_UP:if(A.type===Ue.POINTER_UP&&!A.originalEvent.isPrimary)break;case Ue.MOUSE_UP:case Ue.TOUCH_END:if(A.type===Ue.TOUCH_END&&1!==A.originalEvent.touches.length)break;case Ue.END:u(!1),f(!1),O({x:0,y:0}),D.onRelease&&D.onRelease(A),e.drop&&e.drop.onDrop&&e.drop.onDrop(A),e.drag&&D.onDragEnd&&D.onDragEnd(A);break;case Ue.POINTER_CANCEL:case Ue.CONTEXT_MENU:case Ue.TOUCH_CANCEL:case Ue.CANCEL:u(!1),f(!1),O({x:0,y:0}),D.onDragEnd&&D.onDragEnd(A),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(A)}},qe=function(e,t){if(e){var n,r;e===_e(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,a=e.scrollLeft+t.x,l=r&&a>0&&a<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),l?e.scrollLeft+=t.x:r&&a<0&&(e.scrollLeft=0)}},Ze=function(e,t){var n=o.useContext(e),r=n[0],i=n[1],a=o.useState(t),l=a[0],c=a[1];return[void 0!==r?r:l,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==r?i.apply(void 0,e):c(e[0])}]},$e=2e3;function et(e,t,n){void 0===n&&(n={});var r=t.onPress,i=void 0===r?w:r,a=t.onRelease,l=void 0===a?w:a,c=t.onDragStart,u=void 0===c?w:c,s=t.onDrag,f=void 0===s?w:s,d=t.onDragEnd,v=void 0===d?w:d,p=n.hint,g=void 0===p?null:p,m=n.mouseOnly,h=void 0!==m&&m,b=n.autoScroll,y=void 0===b||b,E=n.scrollContainer,O=void 0===E?null:E,C=o.useState(!1),x=C[0],D=C[1],I=o.useState(!1),k=I[0],P=I[1],A=Ze(Be)[0],S=Ze(He),R=S[0],N=S[1],M=o.useContext(Ye)[0],T=o.useContext(Xe),j=T[0],L=T[1],F=T[2],H=o.useRef({x:0,y:0}),B=o.useRef(),X=o.useRef(!1),Y=o.useRef(),z=o.useRef(null),U=o.useRef(!1),Q=o.useRef({x:0,y:0}),K=o.useRef({x:0,y:0}),_=o.useRef({x:0,y:0}),J=o.useRef({x:0,y:0}),G=o.useRef({x:0,y:0}),W=o.useRef({x:0,y:0}),V=Boolean("undefined"!=typeof window&&window.PointerEvent),q=!h&&V,Z=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),$=o.useCallback((function(){return g&&g.current&&g.current.element?g.current.element:g?g.current:null}),[g]),ee=o.useCallback((function(){return O&&O.current&&O.current.element?O.current.element:O?O.current:null}),[O]),te=o.useCallback((function(){return"object"==typeof y&&y.boundaryElementRef&&y.boundaryElementRef.current&&y.boundaryElementRef.current.element?y.boundaryElementRef.current.element:"object"==typeof y&&y.boundaryElementRef&&y.boundaryElementRef.current?y.boundaryElementRef.current:null}),[y]),ne=o.useRef(null);o.useImperativeHandle(ne,(function(){return{element:Z(),hint:$(),onPress:ge,onDragStart:he,onDrag:be,onDragEnd:ye,onRelease:me,data:e.current}}));var re=o.useCallback((function(){var e=Z();return e&&e.ownerDocument||document}),[Z]),oe=o.useCallback((function(){var e=re();return e&&e.defaultView||window}),[re]),ie=o.useCallback((function(){return{drag:R?R.current:null,drop:A?A.current:null,drags:j.map((function(e){return e.current})),drops:M.map((function(e){return e.current})),pressed:x,ignoreMouse:X.current,scrollOffset:G.current,offset:Q.current,pageOffset:K.current,initialScrollOffset:W.current,clientOffset:_.current,initialClientOffset:J.current,velocity:H.current,autoScroll:Boolean("object"==typeof y?!1!==y.enabled:y),scrollableParent:te(),autoScrollDirection:"object"==typeof y?y.direction:{horizontal:!0,vertical:!0},isScrolling:k}}),[R,A,j,M,x,y,te,k]),ae=o.useCallback((function(e){D(e)}),[]),le=o.useCallback((function(e){P(e)}),[]),ce=o.useCallback((function(e){H.current=e}),[]),ue=o.useCallback((function(e){Q.current=e}),[]),se=o.useCallback((function(e){_.current=e}),[]),fe=o.useCallback((function(e){K.current=e}),[]),de=o.useCallback((function(e){J.current=e}),[]),ve=o.useCallback((function(e){G.current=e}),[]),pe=o.useCallback((function(e){W.current=e}),[]),ge=o.useCallback((function(e){i(e)}),[i]),me=o.useCallback((function(e){l(e)}),[l]),he=o.useCallback((function(t){N(ne,{target:e.current,event:t}),u(t)}),[N,e,u]),be=o.useCallback((function(e){f(e)}),[f]),ye=o.useCallback((function(t){U.current||(N(null,{target:e.current,event:t}),v(t))}),[v,N,e]),Ee=o.useCallback((function(e){Ve(ie(),{event:e,payload:ne.current},{onVelocityChange:ce,onOffsetChange:ue,onClientOffsetChange:se,onPageOffsetChange:fe,onInitialClientOffsetChange:de,onScrollOffsetChange:ve,onInitialScrollOffsetChange:pe,onIsPressedChange:ae,onIsScrollingChange:le})}),[ie,ce,ue,fe,se,de,pe,ae,ve,le]),Oe=o.useCallback((function(e){Ee(e)}),[Ee]),Ce=o.useCallback((function(e){Ee(e)}),[Ee]),xe=o.useCallback((function(e){Ee(e)}),[Ee]),De=o.useCallback((function(e){Ee(e)}),[Ee]),Ie=o.useCallback((function(e){Ee(e)}),[Ee]),we=o.useCallback((function(e){Ee(e)}),[Ee]),ke=o.useCallback((function(e){Ee(e)}),[Ee]),Pe=o.useCallback((function(e){e.preventDefault(),Ee(e)}),[Ee]),Ae=o.useCallback((function(e){e.preventDefault(),Ee(e)}),[Ee]),Se=o.useCallback((function(e){e.preventDefault(),Ee(e)}),[Ee]),Re=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=oe();X.current=!0,Y.current=t.setTimeout((function(){X.current=!1}),$e)}Ee(e)}),[Ee,oe]),Ne=o.useCallback((function(e){Ee(e)}),[Ee]),Me=o.useCallback((function(){var e=Z();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[Z]),Te=o.useCallback((function(){return L(ne),function(){F(ne)}}),[F,L]);o.useEffect((function(){var e=oe();if(k){var t=ee()||Ge(document.elementFromPoint(_.current.x,_.current.y));e.clearInterval(B.current),B.current=e.setInterval((function(){qe(t,{x:H.current.x,y:H.current.y})}),50)}return function(){e.clearInterval(B.current)}}),[Z,ee,oe,k]),o.useEffect(Me,[Me]),o.useEffect((function(){var e=oe(),t=Z(),n=re();return q?(t&&(z.current=Ge(t),z.current&&z.current.addEventListener("scroll",Ne,{passive:!0}),t.addEventListener("pointerdown",Oe,{passive:!0})),x&&(n.addEventListener("pointermove",Ce),n.addEventListener("pointerup",De,!0),n.addEventListener("contextmenu",Pe),n.addEventListener("pointercancel",xe,{passive:!0}))):(e.addEventListener("touchmove",w,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Ie,{passive:!0}),h||(t.addEventListener("touchstart",Ae,{passive:!0}),x&&(t.addEventListener("touchmove",Se,{passive:!0}),t.addEventListener("touchend",Re,{passive:!0})))),x&&(n.addEventListener("mousemove",we,{passive:!0}),n.addEventListener("mouseup",ke,{passive:!0}))),function(){z.current&&z.current.removeEventListener("scroll",Ne),t&&(t.removeEventListener("pointerdown",Oe),t.removeEventListener("mousedown",Ie),t.removeEventListener("touchstart",Ae),t.removeEventListener("touchmove",Se),t.removeEventListener("touchend",Re)),n.removeEventListener("pointermove",Ce),n.removeEventListener("pointerup",De,!0),n.removeEventListener("contextmenu",Pe),n.removeEventListener("pointercancel",xe),n.removeEventListener("mousemove",we),n.removeEventListener("mouseup",ke),e.removeEventListener("touchmove",w),e.clearTimeout(Y.current)}}),[x,oe,Z,re,h,q,Pe,Ie,we,ke,xe,Oe,Ce,De,Re,Se,Ae,Ne]),o.useEffect((function(){return U.current=!1,function(){U.current=!0}}),[]),o.useLayoutEffect(Te,[Te])}var tt=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);o.useImperativeHandle(r,(function(){return{element:i()||null}})),o.useImperativeHandle(t,(function(){return r.current})),o.useImperativeHandle(e.childRef,(function(){return n.current}));var a=o.useCallback((function(t){e.onPress&&e.onPress({element:i(),target:r.current,event:t})}),[i,e.onPress]),l=o.useCallback((function(t){e.onRelease&&e.onRelease({element:i(),target:r.current,event:t})}),[i,e.onRelease]),c=o.useCallback((function(t){e.onDragStart&&e.onDragStart({element:i(),target:r.current,event:t})}),[e,i]),u=o.useCallback((function(t){e.onDrag&&e.onDrag({element:i(),target:r.current,event:t})}),[i,e.onDrag]),s=o.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:i(),target:r.current,event:t})}),[i,e.onDragEnd]);return et(n,{onPress:a,onRelease:l,onDragStart:c,onDrag:u,onDragEnd:s},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?o.cloneElement(o.Children.only(e.children),{ref:n}):null}));function nt(e,t){void 0===t&&(t={onDragEnter:w,onDragOver:w,onDragLeave:w,onDrop:w});var n=t.onDragEnter,r=void 0===n?w:n,i=t.onDragOver,a=void 0===i?w:i,l=t.onDragLeave,c=void 0===l?w:l,u=t.onDrop,s=void 0===u?w:u,f=Ze(Be)[1],d=o.useContext(Ye),v=d[1],p=d[2],g=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),m=o.useRef(null);o.useImperativeHandle(m,(function(){return{element:g(),onDragEnter:h,onDragOver:b,onDragLeave:y,onDrop:E,data:e.current}}));var h=o.useCallback((function(t){f(m,{target:e.current,event:t}),r(t)}),[f,e,r]),b=o.useCallback((function(e){a(e)}),[a]),y=o.useCallback((function(t){f(null,{target:e.current,event:t}),c(t)}),[f,e,c]),E=o.useCallback((function(t){f(null,{target:e.current,event:t}),s(t)}),[f,e,s]),O=o.useCallback((function(){return v(m),function(){p(m)}}),[p,v]);o.useLayoutEffect(O,[O])}tt.displayName="KendoReactDraggable";var rt=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);o.useImperativeHandle(r,(function(){return{element:i()||void 0}})),o.useImperativeHandle(t,(function(){return r.current})),o.useImperativeHandle(e.childRef,(function(){return n.current}));var a=o.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:i(),target:r.current,event:t})}),[e.onDragEnter,i]),l=o.useCallback((function(t){e.onDragOver&&e.onDragOver({element:i(),target:r.current,event:t})}),[i,e.onDragOver]),c=o.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:i(),target:r.current,event:t})}),[e.onDragLeave,i]),u=o.useCallback((function(t){e.onDrop&&e.onDrop({element:i(),target:r.current,event:t})}),[e.onDrop,i]);return nt(n,{onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:u}),e.children?o.cloneElement(o.Children.only(e.children),{ref:n}):null}));rt.displayName="KendoReactDroppable";var ot={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};function it(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||Number.isNaN(r)&&Number.isNaN(o)))return!1;var r,o;return!0}function at(e,t){void 0===t&&(t=it);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}var lt=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],ct=function(){function e(e){var t=this;this.rovingTabIndex=!0,this.update=function(){},this.focusNextIndex=function(e,n){var r=t.elements,o=r.indexOf(e)+n,i=r[(o=o<0?r.length-1:o)%r.length];return t.focusElement(i,e),i},this.tabIndex=e.tabIndex||0,this.root=e.root,this.selectors=e.selectors,this.focusOptions=e.focusOptions||{preventScroll:!0},this.rovingTabIndex=void 0===e.rovingTabIndex||e.rovingTabIndex,this.mouseEvents=e.mouseEvents||{},this.keyboardEvents=e.keyboardEvents||{}}return Object.defineProperty(e.prototype,"elements",{get:function(){return this.root.current?Array.from(this.root.current.querySelectorAll(this.selectors.join(","))):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return this.root.current&&this.root.current.querySelector(this.selectors.join(","))||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){var e=this.elements;return e[e.length-1]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this.elements.find((function(e){return e.matches(":focus")}))||null},enumerable:!1,configurable:!0}),e.prototype.focusNext=function(e){return this.focusNextIndex(e,1)},e.prototype.focusPrevious=function(e){return this.focusNextIndex(e,-1)},e.prototype.triggerKeyboardEvent=function(e,t){var n=e.target instanceof Element&&e.target.closest(this.selectors.join(",")),r=" "===e.key?"Space":e.key,o=e.nativeEvent.type;n&&this.keyboardEvents[o][r]&&this.keyboardEvents[o][r].call(void 0,n,this,e,t)},e.prototype.triggerMouseEvent=function(e){var t=e.target instanceof Element&&e.target.closest(this.selectors.join(",")),n=e.nativeEvent.type;t&&this.mouseEvents[n].call(void 0,t,this,e)},e.prototype.focusElement=function(e,t){e&&(t&&(this.rovingTabIndex&&t.removeAttribute("tabindex"),t.classList.remove("k-focus")),this.rovingTabIndex&&e.setAttribute("tabindex",String(this.tabIndex)),e.focus(this.focusOptions))},e}(),ut=function(e){var t=e.shadowRoot,n=e.contentDocument;return t&&t.activeElement?ut(t.activeElement):n&&n.activeElement?ut(n.activeElement):e},st=function(e){if(e&&e.activeElement)return ut(e.activeElement)};function ft(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function dt(e){return void 0!==e.length}var vt=function(){function e(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return ft(this.expandField,e)},e.prototype.selected=function(e){return ft(this.selectField,e)},e.prototype.text=function(e){return ft(this.textField,e)},e.prototype.disabled=function(e){return ft(this.disableField,e)},e.prototype.hasChildren=function(e){return ft(this.hasChildrenField,e)},e.prototype.children=function(e){return ft(this.childrenField,e)||[]},e.prototype.checked=function(e){return ft(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return ft(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&ft(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}(),pt=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,n=0;n<e.length;n++)n%5e4==0&&(t={},this.objects.push(t)),t[e[n]]=!0},e.prototype.hasId=function(e){return this.objects.some((function(t){return t[e]}))},e}(),gt="",mt="0",ht="_";function bt(e,t,n){if(It(e))return t[Number(e)];var r=t[Number(yt(e))],o=r&&r[n]||[];return o.length?bt(Et(e),o,n):void 0}function yt(e){return Dt(e)?e:e.split(ht)[0]}function Et(e){if(Dt(e))return e;var t=e.indexOf(ht);return e.substring(t+1)}function Ot(e){return Ct("0",e)}function Ct(e,t){return e=e.toString(),t?t+ht+e:e}function xt(e){var t=e.lastIndexOf(ht);return t<0?gt:e.substring(0,t)}function Dt(e){return e===gt||e.indexOf(ht)<0}function It(e){return e!==gt&&e.indexOf(ht)<0}function wt(e){return e.split(ht)}function kt(e){var t=e.lastIndexOf(ht);return t<0?e:e.substring(t+1)}function Pt(e){return kt(e)===mt}function At(e,t){var n=t;t="r"+ht+t;var r=xt(e="r"+ht+e)+ht;if(t.startsWith(r)){var o=t.substring(r.length);if(o){var i=yt(o);if(Number(kt(e))<Number(i))return Et(r+(Number(i)-1).toString()+o.substring(i.length))}}return n}var St=function(){return St=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},St.apply(this,arguments)};function Rt(e,t){var n=ft(t,e);return Boolean(n&&n.length)}function Nt(e,t){return t.expanded(e)&&Rt(e,t.getChildrenField())}function Mt(e,t,n,r){var o=Tt([e],t,n,r);return o.length?o[0]:void 0}function Tt(e,t,n,r){var o=[],i=new pt;return i.init(e),zt(i,t,n,gt,o,r),o}function jt(e,t,n,r,o){var i,a=Number(yt(t));if(a>=e.length)return e;var l=e,c=e[a];return c[r]||(c=(l=e.slice())[a]=Object.assign({},c,((i={})[r]=!0,i))),It(t)?n(c):c[o]&&(c[o]=jt(c[o],Et(t),n,r,o)),l}function Lt(e,t,n){for(var r=wt(e),o=t,i=0;i<r.length;i++){var a=o[Number(r[i])];if(n.disabled(a))return!1;o=a[n.getChildrenField()]}return!0}function Ft(e,t,n,r){return r?function e(t){for(var o=[],i=t[n]||[],a=0;a<i.length;a++)o.push(ft(r,i[a])),o=o.concat(e(i[a]));return o}(e):function e(t,r){for(var o=[],i=t[n]||[],a=0;a<i.length;a++){var l=Ct(a,r);o.push(l),o=o.concat(e(i[a],l))}return o}(e,t)}function Ht(e,t,n,r,o){return(e[r]||[]).every((function(e,r){return o.indexOf(n?ft(n,e):Ct(r,t))>-1}))}function Bt(e,t,n){for(var r=[],o=wt(e),i=n,a=0;a<o.length-1&&i;a++){var l=i[Number(o[a])];r.push(l),i=l[t]}return r}function Xt(e,t,n){var r=n.slice();if(It(e))r.splice(Number(e),1);else{var o=Number(yt(e)),i=r[o]=St({},r[o]);i[t]=Xt(Et(e),t,i[t])}return r}function Yt(e,t,n,r,o){var i=o.slice();if(It(r))if("child"===t){var a=i[Number(r)]=St({},i[Number(r)]);a[n]?(a[n]=a[n].slice(),a[n].push(e)):a[n]=[e]}else i.splice(Number(r)+("after"===t?1:0),0,e);else{var l=Number(yt(r)),c=i[l]=St({},i[l]);c[n]=Yt(e,t,n,Et(r),c[n])}return i}function zt(e,t,n,r,o,i){for(var a=0;a<n.length;a++){var l=n[a],c=Ct(a,r);e.hasId(ft(t,l))&&o.push(c),Rt(l,i)&&zt(e,t,ft(i,l),c,o,i)}}},302:e=>{e.exports=r},499:e=>{e.exports=o},189:e=>{e.exports=n},899:t=>{t.exports=e},994:e=>{e.exports=t}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,l),n.exports}l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.SortableOnNavigateEvent=e.SortableOnDragEndEvent=e.SortableOnDragOverEvent=e.SortableOnDragStartEvent=e.Sortable=void 0;var t=l(695);Object.defineProperty(e,"Sortable",{enumerable:!0,get:function(){return t.Sortable}});var n=l(36);Object.defineProperty(e,"SortableOnDragStartEvent",{enumerable:!0,get:function(){return n.SortableOnDragStartEvent}});var r=l(257);Object.defineProperty(e,"SortableOnDragOverEvent",{enumerable:!0,get:function(){return r.SortableOnDragOverEvent}});var o=l(169);Object.defineProperty(e,"SortableOnDragEndEvent",{enumerable:!0,get:function(){return o.SortableOnDragEndEvent}});var i=l(329);Object.defineProperty(e,"SortableOnNavigateEvent",{enumerable:!0,get:function(){return i.SortableOnNavigateEvent}})})(),c})()}));
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ (function(h,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-react-intl"],D):(h=typeof globalThis<"u"?globalThis:h||self,D(h.KendoReactSortable={},h.React,h.ReactDOM,h.PropTypes,h.KendoReactCommon,h.KendoReactIntl))})(this,function(h,D,B,F,u,T){"use strict";function w(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const I=w(D),_=w(B),g=w(F);class L{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class R extends L{constructor(i,t,e){super(),this.target=i,this.prevIndex=t,this.element=e}}class N{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}class O{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}class A{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}const x="sortable.noData",X={[x]:"No Data"},z=(r,i)=>{for(let t=0;t<r.length;t++)if(i(r[t]))return r[t]},C=(r,i)=>{for(let t=0;t<r.length;t++)if(i(r[t]))return t;return-1},M=r=>String(r).trim().split(" "),Y=(r,i)=>{const t=M(i);return!!M(r.className).find(e=>t.indexOf(e)>=0)},q=/^(?:a|input|select|option|textarea|button|object)$/i,W=r=>{if(r.tagName){const i=r.tagName.toLowerCase(),t=r.getAttribute("tabIndex"),e=t==="-1";let s=t!==null&&!e;return q.test(i)&&(s=!r.disabled&&!e),s}return!1},k=(r,i)=>{for(;r&&!i(r);)r=r.parentNode;return r},j=u.hasRelativeStackingContext(),H=r=>{if(!r||!j)return null;let i=r.parentElement;for(;i;){if(window.getComputedStyle(i).transform!=="none")return i;i=i.parentElement}},G={name:"@progress/kendo-react-sortable",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},P=200,S="data-sortable-id",U="data-sortable-component",$={[U]:!0};class E extends I.Component{constructor(i){super(i),this.state={clientX:0,clientY:0,isDragging:!1,activeId:"",dragCueWidth:0,dragCueHeight:0},this.isRtl=!1,this.itemRefsMap={},this.oldSizesMap={},this.animatingItemMap={},this.draggableRef=null,this.isUnmounted=!1,this.focusActiveId=!1,this.isKeyboardNavigated=!1,this.isDragPrevented=!1,this.swapItems=(t,e,s)=>{let n=t[e];return t[e]=t[s],t[s]=n,e=s,e},this.generateNewState=(t,e)=>{const{data:s}=this.props,n=[...s];if(t>e)for(let l=t-1;l>=e;l--){const c=s[l];this.isItemDisabled(c)||(t=this.swapItems(n,t,l))}else for(let l=t+1;l<=e;l++){const c=s[l];this.isItemDisabled(c)||(t=this.swapItems(n,t,l))}return n},this.closestSortableItem=t=>{let e=t;for(;e;){const s=e.getAttribute(S);if(s&&this.itemRefsMap[s]===e)return{id:s,element:e};e=e.parentElement}return{id:"",element:null}},this.isSortable=t=>!!t.hasAttribute(U),this.closestSortable=t=>{let e=t;for(;e;){if(this.isSortable(e))return e;e=e.parentElement}return null},this.isSameSortable=t=>this.closestSortable(t)===this.container,this.idComparer=(t,e)=>t+""==e+"",this.findItem=t=>{const{data:e,idField:s}=this.props;if(!(t+""))return;const n=u.getter(s);return z(e,a=>this.idComparer(n(a),t))},this.findIndex=t=>{const{data:e,idField:s}=this.props;return t+""?C(e,n=>this.idComparer(n[s],t)):-1},this.isItemDisabled=t=>t&&t[this.props.disabledField||""]===!0,this.shouldResetActive=()=>{const t=u.getActiveElement(document);return t instanceof HTMLElement?!this.closestSortableItem(t).element:!1},this.widgetTarget=t=>{const e=k(t,s=>Y(s,"k-widget")||this.isSortable(s));return e&&!this.isSortable(e)},this.allowDrag=t=>t.hasAttribute(S)||!(W(t)||this.widgetTarget(t)),this.onDragStart=t=>{const{event:e}=t,{onDragStart:s}=this.props,n=document.elementFromPoint(e.clientX,e.clientY),{id:a,element:l}=this.closestSortableItem(n),c=this.findItem(a);if(!a||c&&this.isItemDisabled(c)||!this.allowDrag(n)||!this.isSameSortable(n)){this.isDragPrevented=!0;return}e.isTouch&&e.originalEvent.preventDefault();const o=new R(this,this.findIndex(a),n);s&&s.call(void 0,o),this.isDragPrevented=o.isDefaultPrevented(),this.isDragPrevented?e.originalEvent.preventDefault():(this.offsetParent=H(this.container),this.setState({activeId:a,dragCueWidth:l&&l.clientWidth||0,dragCueHeight:l&&l.clientHeight||0}))},this.onDragOver=t=>{const{event:e}=t,{onDragOver:s,data:n}=this.props;if(this.isDragPrevented)return;e.originalEvent.preventDefault();const a=this.findIndex(this.state.activeId);if(a===-1){this.resetState();return}const l=document.elementFromPoint(e.clientX,e.clientY),c=this.closestSortableItem(l),o=this.findIndex(c.id),d=n[o];if(s&&o>-1&&a!==o&&!this.isItemDisabled(d)&&!this.animatingItemMap[c.id]&&this.shouldReorder(c.element,e.clientX,e.clientY)){const p=new N(this,a,o,this.generateNewState(a,o));s.call(void 0,p)}const f=this.parentOffset();this.setState({clientX:e.clientX-f.left,clientY:e.clientY-f.top,isDragging:!0})},this.onDragEnd=t=>{const{event:e}=t,s=this.shouldResetActive();if(this.isDragPrevented)return;const{onDragEnd:n,data:a}=this.props,l=document.elementFromPoint(e.clientX,e.clientY),c=this.closestSortableItem(l);let o=this.findIndex(c.id),d=this.findIndex(this.state.activeId);const f=this.isItemDisabled(a[o]);if((o===-1||f)&&(o=d),n){let p=this.generateNewState(d,o);if(!f){const m=this.thresholdRect(c.element);if(m&&(e.clientX<m.left||e.clientX>m.right||e.clientY<m.top||e.clientY>m.bottom)){const y=d;d=o,o=y,p=this.props.data.slice()}}const b=new O(this,d,o,p);n.call(void 0,b)}this.resetState(s)},this.shouldReorder=(t,e,s)=>{const n=this.thresholdRect(t);return n&&e>n.left&&e<n.right&&s>n.top&&s<n.bottom},this.thresholdRect=t=>{const e=this.state.activeId,s=this.container,a=(s?Array.from(s.childNodes):[]).find(m=>m instanceof HTMLElement&&m.getAttribute(S)===e);if(!t||!a)return null;const{width:l,height:c}=a.getBoundingClientRect(),o=t.getBoundingClientRect(),d=o.top+o.height/2-c/2,f=o.left+o.width/2-l/2,p=d+c,b=f+l;return{top:d,left:f,bottom:p,right:b}},this.onItemBlur=()=>{window.setTimeout(()=>{this.isUnmounted||this.shouldResetActive()&&!this.state.isDragging&&this.setState({activeId:""})})},this.onItemFocus=t=>{const{id:e,element:s}=this.closestSortableItem(t.currentTarget);!this.idComparer(e,this.state.activeId)&&this.isSameSortable(t.target)&&s===t.target&&this.setState({activeId:e})},this.onKeyDown=t=>{const{data:e,idField:s,onNavigate:n,navigation:a}=this.props,{activeId:l}=this.state;if(!a||!l||!this.isSameSortable(t.target))return;const c=this.isRtl,o=e.filter(v=>!this.isItemDisabled(v)),d=C(o,v=>this.idComparer(v[s],l)),f=o.length-1;let p=d;switch(t.keyCode===u.Keys.left&&(c?t.keyCode=u.Keys.down:t.keyCode=u.Keys.up),t.keyCode===u.Keys.right&&(c?t.keyCode=u.Keys.up:t.keyCode=u.Keys.down),t.keyCode){case u.Keys.up:d>0&&(p=d-1);break;case u.Keys.down:d<f&&(p=d+1);break}if(p===d)return;t.stopPropagation(),t.preventDefault();const b=o[p],m=b?b[s]:"",y=o[d],V=y?y[s]:"";if(t.ctrlKey){if(n){const v=this.findIndex(V),K=this.findIndex(m),J=new A(this,v,K,this.generateNewState(v,K));this.isKeyboardNavigated=!0,n.call(void 0,J)}}else this.focusActiveId=!0,this.setState({activeId:m+""})},this.resetState=t=>{this.isDragPrevented=!1,this.setState({clientX:0,clientY:0,isDragging:!1,dragCueWidth:0,dragCueHeight:0,activeId:t?"":this.state.activeId})},this.renderData=()=>{const{data:t,itemUI:e,idField:s,tabIndex:n}=this.props;return t.map(a=>{const c=u.getter(s)(a),o=this.isItemDisabled(a),d=this.idComparer(this.state.activeId,c);return I.createElement(e,{key:c,forwardRef:f=>this.refAssign(f,c),dataItem:a,isDisabled:o,isActive:d,isDragged:d&&this.state.isDragging,isDragCue:!1,attributes:{[S]:c,["aria-disabled"]:o,["aria-grabbed"]:d&&this.state.isDragging&&!this.isDragPrevented,["aria-dropeffect"]:o?"none":"move",tabIndex:u.getTabIndex(n,o),onFocus:this.onItemFocus,onBlur:this.onItemBlur},style:{cursor:o?"auto":"move",MozUserSelect:"none",msUserSelect:"none",WebkitUserSelect:"none",userSelect:"none"}})})},this.renderNoData=()=>{const{emptyItemUI:t}=this.props,s=T.provideLocalizationService(this).toLanguageString(x,X[x]);if(t)return I.createElement(t,{message:s})},this.renderDragCue=()=>{const{itemUI:t}=this.props,{isDragging:e,activeId:s,clientX:n,clientY:a}=this.state,l=this.findItem(s);if(!(!e||!l))return I.createElement(t,{dataItem:l,isDisabled:!1,isActive:!0,isDragged:!0,isDragCue:!0,style:{position:"fixed",top:a+10,left:n+10,width:this.state.dragCueWidth,height:this.state.dragCueHeight},attributes:{}})},this.refAssign=(t,e)=>{t?this.itemRefsMap[e]=t:delete this.itemRefsMap[e]},this.draggableRefAssign=t=>{this.draggableRef=t},u.validatePackage(G)}get container(){return this.draggableRef&&this.draggableRef.element}getSnapshotBeforeUpdate(){const{idField:i,animation:t}=this.props;return this.oldSizesMap={},t&&this.props.data.forEach(e=>{const s=e[i],n=this.itemRefsMap[s],a=_.findDOMNode(n);a&&(this.oldSizesMap[s]=a.getBoundingClientRect())}),null}componentDidUpdate(i){const{idField:t,animation:e}=this.props;this.focusActiveId&&(this.focusActiveId=!1,this.itemRefsMap[this.state.activeId].focus()),!(!e||!this.state.isDragging&&!this.isKeyboardNavigated)&&(this.isKeyboardNavigated=!1,i.data.forEach(s=>{const n=s[t],a=this.itemRefsMap[n];if(!a)return;const l=a.getBoundingClientRect(),c=this.oldSizesMap[n],o=c.left-l.left,d=c.top-l.top;o===0&&d===0||requestAnimationFrame(()=>{this.animatingItemMap[n]=!0,a.style.transform=`translate(${o}px, ${d}px)`,a.style.transition="transform 0s",requestAnimationFrame(()=>{a.style.transform="",a.style.transition=`transform ${P}ms cubic-bezier(0.2, 0, 0, 1) 0s`,window.setTimeout(()=>this.animatingItemMap[n]=!1,P)})})}))}componentDidMount(){this.isRtl=this.container&&getComputedStyle(this.container).direction==="rtl"||!1}componentWillUnmount(){this.isUnmounted=!0}parentOffset(){const i=this.offsetParent;if(i&&i.ownerDocument&&i!==i.ownerDocument.body){const t=i.getBoundingClientRect();return{left:t.left-i.scrollLeft,top:t.top-i.scrollTop}}return{left:0,top:0}}render(){const{data:i,style:t,className:e,itemsWrapUI:s}=this.props,n=s||"div";return I.createElement(u.Draggable,{onDragStart:this.onDragStart,onDrag:this.onDragOver,onDragEnd:this.onDragEnd,ref:this.draggableRefAssign},I.createElement(n,{...$,className:e,style:{touchAction:"none",...t},onKeyDown:this.onKeyDown},i&&i.length?this.renderData():this.renderNoData(),this.renderDragCue()))}}E.defaultProps={navigation:!0,animation:!0,emptyItemUI:r=>I.createElement("div",null,r.message)},E.propTypes={idField:g.string.isRequired,disabledField:g.string,data:g.array.isRequired,tabIndex:g.number,navigation:g.bool,animation:g.bool,itemsWrapUI:g.any,itemUI:g.func.isRequired,emptyItemUI:g.func,style:g.object,className:g.string,onDragStart:g.func,onDragOver:g.func,onDragEnd:g.func,onNavigate:g.func},T.registerForLocalization(E),h.Sortable=E,h.SortableOnDragEndEvent=O,h.SortableOnDragOverEvent=N,h.SortableOnDragStartEvent=R,h.SortableOnNavigateEvent=A,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,13 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ export interface BaseEvent<T extends React.Component> {
9
+ /**
10
+ * An event target.
11
+ */
12
+ target: T;
13
+ }
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  /**
2
6
  * @hidden
3
7
  */
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  import { BaseEvent } from './BaseEvent';
2
6
  import { Sortable } from '../Sortable';
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  import { BaseEvent } from './BaseEvent';
2
6
  import { Sortable } from '../Sortable';
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  import { BaseEvent } from './BaseEvent';
2
6
  import { Sortable } from '../Sortable';
3
7
  import { PreventableEvent } from './PreventableEvent';
@@ -1,3 +1,7 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
1
5
  import { BaseEvent } from './BaseEvent';
2
6
  import { Sortable } from '../Sortable';
3
7
  /**
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Sortable } from './Sortable';
6
+ import { SortableOnDragStartEvent } from './events/SortableOnDragStartEvent';
7
+ import { SortableOnDragOverEvent } from './events/SortableOnDragOverEvent';
8
+ import { SortableOnDragEndEvent } from './events/SortableOnDragEndEvent';
9
+ import { type SortableProps } from './interfaces/SortableProps';
10
+ import { type SortableItemUIProps } from './interfaces/SortableItemUIProps';
11
+ import { type SortableEmptyItemUIProps } from './interfaces/SortableEmptyItemUIProps';
12
+ import { SortableOnNavigateEvent } from './events/SortableOnNavigateEvent';
13
+ export { Sortable, SortableProps, SortableItemUIProps, SortableEmptyItemUIProps, SortableOnDragStartEvent, SortableOnDragOverEvent, SortableOnDragEndEvent, SortableOnNavigateEvent };
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),F=require("react-dom"),K=require("prop-types"),u=require("@progress/kendo-react-common"),N=require("@progress/kendo-react-intl");function R(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const p=R(B),_=R(F),h=R(K);class L{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class T extends L{constructor(i,t,e){super(),this.target=i,this.prevIndex=t,this.element=e}}class O{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}class A{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}class M{constructor(i,t,e,s){this.target=i,this.prevIndex=t,this.nextIndex=e,this.newState=s}}const E="sortable.noData",X={[E]:"No Data"},z=(r,i)=>{for(let t=0;t<r.length;t++)if(i(r[t]))return r[t]},C=(r,i)=>{for(let t=0;t<r.length;t++)if(i(r[t]))return t;return-1},x=r=>String(r).trim().split(" "),Y=(r,i)=>{const t=x(i);return!!x(r.className).find(e=>t.indexOf(e)>=0)},q=/^(?:a|input|select|option|textarea|button|object)$/i,W=r=>{if(r.tagName){const i=r.tagName.toLowerCase(),t=r.getAttribute("tabIndex"),e=t==="-1";let s=t!==null&&!e;return q.test(i)&&(s=!r.disabled&&!e),s}return!1},H=(r,i)=>{for(;r&&!i(r);)r=r.parentNode;return r},j=u.hasRelativeStackingContext(),G=r=>{if(!r||!j)return null;let i=r.parentElement;for(;i;){if(window.getComputedStyle(i).transform!=="none")return i;i=i.parentElement}},$={name:"@progress/kendo-react-sortable",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},w=200,D="data-sortable-id",P="data-sortable-component",V={[P]:!0};class S extends p.Component{constructor(i){super(i),this.state={clientX:0,clientY:0,isDragging:!1,activeId:"",dragCueWidth:0,dragCueHeight:0},this.isRtl=!1,this.itemRefsMap={},this.oldSizesMap={},this.animatingItemMap={},this.draggableRef=null,this.isUnmounted=!1,this.focusActiveId=!1,this.isKeyboardNavigated=!1,this.isDragPrevented=!1,this.swapItems=(t,e,s)=>{let n=t[e];return t[e]=t[s],t[s]=n,e=s,e},this.generateNewState=(t,e)=>{const{data:s}=this.props,n=[...s];if(t>e)for(let l=t-1;l>=e;l--){const c=s[l];this.isItemDisabled(c)||(t=this.swapItems(n,t,l))}else for(let l=t+1;l<=e;l++){const c=s[l];this.isItemDisabled(c)||(t=this.swapItems(n,t,l))}return n},this.closestSortableItem=t=>{let e=t;for(;e;){const s=e.getAttribute(D);if(s&&this.itemRefsMap[s]===e)return{id:s,element:e};e=e.parentElement}return{id:"",element:null}},this.isSortable=t=>!!t.hasAttribute(P),this.closestSortable=t=>{let e=t;for(;e;){if(this.isSortable(e))return e;e=e.parentElement}return null},this.isSameSortable=t=>this.closestSortable(t)===this.container,this.idComparer=(t,e)=>t+""==e+"",this.findItem=t=>{const{data:e,idField:s}=this.props;if(!(t+""))return;const n=u.getter(s);return z(e,a=>this.idComparer(n(a),t))},this.findIndex=t=>{const{data:e,idField:s}=this.props;return t+""?C(e,n=>this.idComparer(n[s],t)):-1},this.isItemDisabled=t=>t&&t[this.props.disabledField||""]===!0,this.shouldResetActive=()=>{const t=u.getActiveElement(document);return t instanceof HTMLElement?!this.closestSortableItem(t).element:!1},this.widgetTarget=t=>{const e=H(t,s=>Y(s,"k-widget")||this.isSortable(s));return e&&!this.isSortable(e)},this.allowDrag=t=>t.hasAttribute(D)||!(W(t)||this.widgetTarget(t)),this.onDragStart=t=>{const{event:e}=t,{onDragStart:s}=this.props,n=document.elementFromPoint(e.clientX,e.clientY),{id:a,element:l}=this.closestSortableItem(n),c=this.findItem(a);if(!a||c&&this.isItemDisabled(c)||!this.allowDrag(n)||!this.isSameSortable(n)){this.isDragPrevented=!0;return}e.isTouch&&e.originalEvent.preventDefault();const o=new T(this,this.findIndex(a),n);s&&s.call(void 0,o),this.isDragPrevented=o.isDefaultPrevented(),this.isDragPrevented?e.originalEvent.preventDefault():(this.offsetParent=G(this.container),this.setState({activeId:a,dragCueWidth:l&&l.clientWidth||0,dragCueHeight:l&&l.clientHeight||0}))},this.onDragOver=t=>{const{event:e}=t,{onDragOver:s,data:n}=this.props;if(this.isDragPrevented)return;e.originalEvent.preventDefault();const a=this.findIndex(this.state.activeId);if(a===-1){this.resetState();return}const l=document.elementFromPoint(e.clientX,e.clientY),c=this.closestSortableItem(l),o=this.findIndex(c.id),d=n[o];if(s&&o>-1&&a!==o&&!this.isItemDisabled(d)&&!this.animatingItemMap[c.id]&&this.shouldReorder(c.element,e.clientX,e.clientY)){const f=new O(this,a,o,this.generateNewState(a,o));s.call(void 0,f)}const g=this.parentOffset();this.setState({clientX:e.clientX-g.left,clientY:e.clientY-g.top,isDragging:!0})},this.onDragEnd=t=>{const{event:e}=t,s=this.shouldResetActive();if(this.isDragPrevented)return;const{onDragEnd:n,data:a}=this.props,l=document.elementFromPoint(e.clientX,e.clientY),c=this.closestSortableItem(l);let o=this.findIndex(c.id),d=this.findIndex(this.state.activeId);const g=this.isItemDisabled(a[o]);if((o===-1||g)&&(o=d),n){let f=this.generateNewState(d,o);if(!g){const m=this.thresholdRect(c.element);if(m&&(e.clientX<m.left||e.clientX>m.right||e.clientY<m.top||e.clientY>m.bottom)){const v=d;d=o,o=v,f=this.props.data.slice()}}const I=new A(this,d,o,f);n.call(void 0,I)}this.resetState(s)},this.shouldReorder=(t,e,s)=>{const n=this.thresholdRect(t);return n&&e>n.left&&e<n.right&&s>n.top&&s<n.bottom},this.thresholdRect=t=>{const e=this.state.activeId,s=this.container,a=(s?Array.from(s.childNodes):[]).find(m=>m instanceof HTMLElement&&m.getAttribute(D)===e);if(!t||!a)return null;const{width:l,height:c}=a.getBoundingClientRect(),o=t.getBoundingClientRect(),d=o.top+o.height/2-c/2,g=o.left+o.width/2-l/2,f=d+c,I=g+l;return{top:d,left:g,bottom:f,right:I}},this.onItemBlur=()=>{window.setTimeout(()=>{this.isUnmounted||this.shouldResetActive()&&!this.state.isDragging&&this.setState({activeId:""})})},this.onItemFocus=t=>{const{id:e,element:s}=this.closestSortableItem(t.currentTarget);!this.idComparer(e,this.state.activeId)&&this.isSameSortable(t.target)&&s===t.target&&this.setState({activeId:e})},this.onKeyDown=t=>{const{data:e,idField:s,onNavigate:n,navigation:a}=this.props,{activeId:l}=this.state;if(!a||!l||!this.isSameSortable(t.target))return;const c=this.isRtl,o=e.filter(b=>!this.isItemDisabled(b)),d=C(o,b=>this.idComparer(b[s],l)),g=o.length-1;let f=d;switch(t.keyCode===u.Keys.left&&(c?t.keyCode=u.Keys.down:t.keyCode=u.Keys.up),t.keyCode===u.Keys.right&&(c?t.keyCode=u.Keys.up:t.keyCode=u.Keys.down),t.keyCode){case u.Keys.up:d>0&&(f=d-1);break;case u.Keys.down:d<g&&(f=d+1);break}if(f===d)return;t.stopPropagation(),t.preventDefault();const I=o[f],m=I?I[s]:"",v=o[d],U=v?v[s]:"";if(t.ctrlKey){if(n){const b=this.findIndex(U),y=this.findIndex(m),k=new M(this,b,y,this.generateNewState(b,y));this.isKeyboardNavigated=!0,n.call(void 0,k)}}else this.focusActiveId=!0,this.setState({activeId:m+""})},this.resetState=t=>{this.isDragPrevented=!1,this.setState({clientX:0,clientY:0,isDragging:!1,dragCueWidth:0,dragCueHeight:0,activeId:t?"":this.state.activeId})},this.renderData=()=>{const{data:t,itemUI:e,idField:s,tabIndex:n}=this.props;return t.map(a=>{const c=u.getter(s)(a),o=this.isItemDisabled(a),d=this.idComparer(this.state.activeId,c);return p.createElement(e,{key:c,forwardRef:g=>this.refAssign(g,c),dataItem:a,isDisabled:o,isActive:d,isDragged:d&&this.state.isDragging,isDragCue:!1,attributes:{[D]:c,["aria-disabled"]:o,["aria-grabbed"]:d&&this.state.isDragging&&!this.isDragPrevented,["aria-dropeffect"]:o?"none":"move",tabIndex:u.getTabIndex(n,o),onFocus:this.onItemFocus,onBlur:this.onItemBlur},style:{cursor:o?"auto":"move",MozUserSelect:"none",msUserSelect:"none",WebkitUserSelect:"none",userSelect:"none"}})})},this.renderNoData=()=>{const{emptyItemUI:t}=this.props,s=N.provideLocalizationService(this).toLanguageString(E,X[E]);if(t)return p.createElement(t,{message:s})},this.renderDragCue=()=>{const{itemUI:t}=this.props,{isDragging:e,activeId:s,clientX:n,clientY:a}=this.state,l=this.findItem(s);if(!(!e||!l))return p.createElement(t,{dataItem:l,isDisabled:!1,isActive:!0,isDragged:!0,isDragCue:!0,style:{position:"fixed",top:a+10,left:n+10,width:this.state.dragCueWidth,height:this.state.dragCueHeight},attributes:{}})},this.refAssign=(t,e)=>{t?this.itemRefsMap[e]=t:delete this.itemRefsMap[e]},this.draggableRefAssign=t=>{this.draggableRef=t},u.validatePackage($)}get container(){return this.draggableRef&&this.draggableRef.element}getSnapshotBeforeUpdate(){const{idField:i,animation:t}=this.props;return this.oldSizesMap={},t&&this.props.data.forEach(e=>{const s=e[i],n=this.itemRefsMap[s],a=_.findDOMNode(n);a&&(this.oldSizesMap[s]=a.getBoundingClientRect())}),null}componentDidUpdate(i){const{idField:t,animation:e}=this.props;this.focusActiveId&&(this.focusActiveId=!1,this.itemRefsMap[this.state.activeId].focus()),!(!e||!this.state.isDragging&&!this.isKeyboardNavigated)&&(this.isKeyboardNavigated=!1,i.data.forEach(s=>{const n=s[t],a=this.itemRefsMap[n];if(!a)return;const l=a.getBoundingClientRect(),c=this.oldSizesMap[n],o=c.left-l.left,d=c.top-l.top;o===0&&d===0||requestAnimationFrame(()=>{this.animatingItemMap[n]=!0,a.style.transform=`translate(${o}px, ${d}px)`,a.style.transition="transform 0s",requestAnimationFrame(()=>{a.style.transform="",a.style.transition=`transform ${w}ms cubic-bezier(0.2, 0, 0, 1) 0s`,window.setTimeout(()=>this.animatingItemMap[n]=!1,w)})})}))}componentDidMount(){this.isRtl=this.container&&getComputedStyle(this.container).direction==="rtl"||!1}componentWillUnmount(){this.isUnmounted=!0}parentOffset(){const i=this.offsetParent;if(i&&i.ownerDocument&&i!==i.ownerDocument.body){const t=i.getBoundingClientRect();return{left:t.left-i.scrollLeft,top:t.top-i.scrollTop}}return{left:0,top:0}}render(){const{data:i,style:t,className:e,itemsWrapUI:s}=this.props,n=s||"div";return p.createElement(u.Draggable,{onDragStart:this.onDragStart,onDrag:this.onDragOver,onDragEnd:this.onDragEnd,ref:this.draggableRefAssign},p.createElement(n,{...V,className:e,style:{touchAction:"none",...t},onKeyDown:this.onKeyDown},i&&i.length?this.renderData():this.renderNoData(),this.renderDragCue()))}}S.defaultProps={navigation:!0,animation:!0,emptyItemUI:r=>p.createElement("div",null,r.message)};S.propTypes={idField:h.string.isRequired,disabledField:h.string,data:h.array.isRequired,tabIndex:h.number,navigation:h.bool,animation:h.bool,itemsWrapUI:h.any,itemUI:h.func.isRequired,emptyItemUI:h.func,style:h.object,className:h.string,onDragStart:h.func,onDragOver:h.func,onDragEnd:h.func,onNavigate:h.func};N.registerForLocalization(S);exports.Sortable=S;exports.SortableOnDragEndEvent=A;exports.SortableOnDragOverEvent=O;exports.SortableOnDragStartEvent=T;exports.SortableOnNavigateEvent=M;