@progress/kendo-react-treelist 15.2.0-develop.1 → 15.2.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 (38) hide show
  1. package/TreeList.d.ts +10 -121
  2. package/TreeList.js +1 -1
  3. package/TreeList.mjs +840 -526
  4. package/TreeListNoRecords.d.ts +8 -6
  5. package/TreeListNoRecords.js +1 -1
  6. package/TreeListNoRecords.mjs +15 -12
  7. package/cells/EditCells/TreeListBooleanEditor.js +1 -1
  8. package/cells/EditCells/TreeListBooleanEditor.mjs +5 -5
  9. package/cells/EditCells/TreeListDateEditor.js +1 -1
  10. package/cells/EditCells/TreeListDateEditor.mjs +9 -9
  11. package/cells/EditCells/TreeListNumericEditor.js +1 -1
  12. package/cells/EditCells/TreeListNumericEditor.mjs +9 -9
  13. package/cells/EditCells/TreeListTextEditor.js +1 -1
  14. package/cells/EditCells/TreeListTextEditor.mjs +4 -4
  15. package/cells/TreeListCell.js +1 -1
  16. package/cells/TreeListCell.mjs +10 -10
  17. package/cells/TreeListSelectionCell.js +1 -1
  18. package/cells/TreeListSelectionCell.mjs +1 -1
  19. package/dist/cdn/js/kendo-react-treelist.js +1 -1
  20. package/header/TreeListHeaderSelectionCell.d.ts +10 -6
  21. package/header/TreeListHeaderSelectionCell.js +1 -1
  22. package/header/TreeListHeaderSelectionCell.mjs +16 -14
  23. package/index.d.mts +5 -7
  24. package/index.d.ts +5 -7
  25. package/index.js +1 -1
  26. package/index.mjs +49 -50
  27. package/interfaces/events.d.ts +6 -6
  28. package/package-metadata.js +1 -1
  29. package/package-metadata.mjs +2 -2
  30. package/package.json +9 -9
  31. package/rows/TreeListDraggableRow.d.ts +7 -26
  32. package/rows/TreeListDraggableRow.js +1 -1
  33. package/rows/TreeListDraggableRow.mjs +88 -77
  34. package/rows/TreeListRow.js +1 -1
  35. package/rows/TreeListRow.mjs +1 -1
  36. package/TreeListMcpWrapper.d.ts +0 -17
  37. package/TreeListMcpWrapper.js +0 -8
  38. package/TreeListMcpWrapper.mjs +0 -18
@@ -6,19 +6,21 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as e from "react";
9
- import { guid as t } from "@progress/kendo-react-common";
10
- import { HeaderSelectionCell as r } from "@progress/kendo-react-data-tools";
11
- class s extends e.Component {
12
- constructor() {
13
- super(...arguments), this._inputId = t();
14
- }
15
- /**
16
- * @hidden
17
- */
18
- render() {
19
- return /* @__PURE__ */ e.createElement(r, { inputId: this._inputId, ...this.props });
20
- }
21
- }
9
+ import { guid as a } from "@progress/kendo-react-common";
10
+ import { HeaderSelectionCell as i } from "@progress/kendo-react-data-tools";
11
+ const o = e.forwardRef((t, l) => {
12
+ const n = e.useRef(a()), r = e.useRef(null);
13
+ return e.useImperativeHandle(
14
+ r,
15
+ () => ({
16
+ props: t
17
+ })
18
+ ), e.useImperativeHandle(
19
+ l,
20
+ () => r.current
21
+ ), /* @__PURE__ */ e.createElement(i, { inputId: n.current, ...t });
22
+ });
23
+ o.displayName = "KendoReactTreeListHeaderSelectionCell";
22
24
  export {
23
- s as TreeListHeaderSelectionCell
25
+ o as TreeListHeaderSelectionCell
24
26
  };
package/index.d.mts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { TreeList as TreeListClassComponent } from './TreeList.js';
8
+ import { TreeList, TreeListHandle } from './TreeList.js';
9
9
  import { TreeListProps } from './interfaces/TreeListProps';
10
10
  import { TreeListColumnProps } from './interfaces/TreeListColumnProps';
11
11
  import { TreeListCellProps } from './interfaces/TreeListCellProps';
@@ -13,13 +13,13 @@ import { TreeListCell } from './cells/TreeListCell.js';
13
13
  import { TreeListHeaderCell } from './header/TreeListHeaderCell.js';
14
14
  import { TreeListHeaderCellProps } from './interfaces/TreeListHeaderCellProps';
15
15
  import { TreeListSelectionCell, TreeListSelectionCellProps } from './cells/TreeListSelectionCell.js';
16
- import { TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps } from './header/TreeListHeaderSelectionCell.js';
16
+ import { TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListHeaderSelectionCellHandle } from './header/TreeListHeaderSelectionCell.js';
17
17
  import { TreeListRow } from './rows/TreeListRow.js';
18
- import { TreeListDraggableRow } from './rows/TreeListDraggableRow.js';
18
+ import { TreeListDraggableRow, TreeListDraggableRowHandle } from './rows/TreeListDraggableRow.js';
19
19
  import { TreeListRowProps } from './interfaces/TreeListRowProps';
20
20
  import { TreeListToolbar, TreeListToolbarHandle } from './TreeListToolbar.js';
21
21
  import { TreeListToolbarProps } from './interfaces/TreeListToolbarProps';
22
- import { TreeListNoRecords } from './TreeListNoRecords.js';
22
+ import { TreeListNoRecords, TreeListNoRecordsHandle } from './TreeListNoRecords.js';
23
23
  import { TreeListNoRecordsProps } from './interfaces/TreeListNoRecordsProps';
24
24
  import { TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListColumnMenuFilterChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent } from './interfaces/events';
25
25
  import { TreeListSortSettings, TreeListColumnSortSettings } from './interfaces/TreeListSortSettings';
@@ -37,6 +37,4 @@ import { DataItemWrapper } from './interfaces/DataItemWrapper';
37
37
  import { setHeaderRowsTop, tableRowsVirtualization } from './utils/index.js';
38
38
  import { TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT } from './constants/index.js';
39
39
  import { TreeListSelectableMode, TreeListSelectableSettings } from './interfaces/TreeListSelectableSettings';
40
- declare const TreeList: import('react').ForwardRefExoticComponent<TreeListProps & import('react').RefAttributes<TreeListClassComponent>>;
41
- type TreeList = TreeListClassComponent;
42
- export { TreeList, TreeListProps, TreeListColumnProps, TreeListCell, TreeListCellProps, TreeListRow, TreeListDraggableRow, TreeListRowProps, TreeListHeaderCell, TreeListHeaderCellProps, TreeListSelectionCell, TreeListSelectionCellProps, TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListToolbar, TreeListToolbarProps, TreeListToolbarHandle, TreeListNoRecords, TreeListNoRecordsProps, TreeListSortSettings, TreeListColumnSortSettings, TreeListTextFilter, TreeListTextFilterProps, TreeListNumericFilter, TreeListNumericFilterProps, TreeListDateFilter, TreeListDateFilterProps, TreeListBooleanFilter, TreeListBooleanFilterProps, TreeListTextEditor, TreeListTextEditorProps, TreeListNumericEditor, TreeListNumericEditorProps, TreeListBooleanEditor, TreeListBooleanEditorProps, TreeListDateEditor, TreeListDateEditorProps, TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListColumnMenuFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent, orderBy, filterBy, mapTree, createDataTree, extendDataItem, mapTreeItem, moveTreeItem, getItemPath, removeItems, modifySubItems, treeToFlat, DataItemWrapper, flatData, getNestedValue, getAbsoluteVirtualRowIndex, setHeaderRowsTop, tableRowsVirtualization, TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, TreeListSelectableSettings, TreeListSelectableMode };
40
+ export { TreeList, TreeListHandle, TreeListProps, TreeListColumnProps, TreeListCell, TreeListCellProps, TreeListRow, TreeListDraggableRow, TreeListDraggableRowHandle, TreeListRowProps, TreeListHeaderCell, TreeListHeaderCellProps, TreeListSelectionCell, TreeListSelectionCellProps, TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListHeaderSelectionCellHandle, TreeListToolbar, TreeListToolbarProps, TreeListToolbarHandle, TreeListNoRecords, TreeListNoRecordsHandle, TreeListNoRecordsProps, TreeListSortSettings, TreeListColumnSortSettings, TreeListTextFilter, TreeListTextFilterProps, TreeListNumericFilter, TreeListNumericFilterProps, TreeListDateFilter, TreeListDateFilterProps, TreeListBooleanFilter, TreeListBooleanFilterProps, TreeListTextEditor, TreeListTextEditorProps, TreeListNumericEditor, TreeListNumericEditorProps, TreeListBooleanEditor, TreeListBooleanEditorProps, TreeListDateEditor, TreeListDateEditorProps, TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListColumnMenuFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent, orderBy, filterBy, mapTree, createDataTree, extendDataItem, mapTreeItem, moveTreeItem, getItemPath, removeItems, modifySubItems, treeToFlat, DataItemWrapper, flatData, getNestedValue, getAbsoluteVirtualRowIndex, setHeaderRowsTop, tableRowsVirtualization, TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, TreeListSelectableSettings, TreeListSelectableMode };
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { TreeList as TreeListClassComponent } from './TreeList.js';
8
+ import { TreeList, TreeListHandle } from './TreeList.js';
9
9
  import { TreeListProps } from './interfaces/TreeListProps';
10
10
  import { TreeListColumnProps } from './interfaces/TreeListColumnProps';
11
11
  import { TreeListCellProps } from './interfaces/TreeListCellProps';
@@ -13,13 +13,13 @@ import { TreeListCell } from './cells/TreeListCell.js';
13
13
  import { TreeListHeaderCell } from './header/TreeListHeaderCell.js';
14
14
  import { TreeListHeaderCellProps } from './interfaces/TreeListHeaderCellProps';
15
15
  import { TreeListSelectionCell, TreeListSelectionCellProps } from './cells/TreeListSelectionCell.js';
16
- import { TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps } from './header/TreeListHeaderSelectionCell.js';
16
+ import { TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListHeaderSelectionCellHandle } from './header/TreeListHeaderSelectionCell.js';
17
17
  import { TreeListRow } from './rows/TreeListRow.js';
18
- import { TreeListDraggableRow } from './rows/TreeListDraggableRow.js';
18
+ import { TreeListDraggableRow, TreeListDraggableRowHandle } from './rows/TreeListDraggableRow.js';
19
19
  import { TreeListRowProps } from './interfaces/TreeListRowProps';
20
20
  import { TreeListToolbar, TreeListToolbarHandle } from './TreeListToolbar.js';
21
21
  import { TreeListToolbarProps } from './interfaces/TreeListToolbarProps';
22
- import { TreeListNoRecords } from './TreeListNoRecords.js';
22
+ import { TreeListNoRecords, TreeListNoRecordsHandle } from './TreeListNoRecords.js';
23
23
  import { TreeListNoRecordsProps } from './interfaces/TreeListNoRecordsProps';
24
24
  import { TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListColumnMenuFilterChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent } from './interfaces/events';
25
25
  import { TreeListSortSettings, TreeListColumnSortSettings } from './interfaces/TreeListSortSettings';
@@ -37,6 +37,4 @@ import { DataItemWrapper } from './interfaces/DataItemWrapper';
37
37
  import { setHeaderRowsTop, tableRowsVirtualization } from './utils/index.js';
38
38
  import { TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT } from './constants/index.js';
39
39
  import { TreeListSelectableMode, TreeListSelectableSettings } from './interfaces/TreeListSelectableSettings';
40
- declare const TreeList: import('react').ForwardRefExoticComponent<TreeListProps & import('react').RefAttributes<TreeListClassComponent>>;
41
- type TreeList = TreeListClassComponent;
42
- export { TreeList, TreeListProps, TreeListColumnProps, TreeListCell, TreeListCellProps, TreeListRow, TreeListDraggableRow, TreeListRowProps, TreeListHeaderCell, TreeListHeaderCellProps, TreeListSelectionCell, TreeListSelectionCellProps, TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListToolbar, TreeListToolbarProps, TreeListToolbarHandle, TreeListNoRecords, TreeListNoRecordsProps, TreeListSortSettings, TreeListColumnSortSettings, TreeListTextFilter, TreeListTextFilterProps, TreeListNumericFilter, TreeListNumericFilterProps, TreeListDateFilter, TreeListDateFilterProps, TreeListBooleanFilter, TreeListBooleanFilterProps, TreeListTextEditor, TreeListTextEditorProps, TreeListNumericEditor, TreeListNumericEditorProps, TreeListBooleanEditor, TreeListBooleanEditorProps, TreeListDateEditor, TreeListDateEditorProps, TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListColumnMenuFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent, orderBy, filterBy, mapTree, createDataTree, extendDataItem, mapTreeItem, moveTreeItem, getItemPath, removeItems, modifySubItems, treeToFlat, DataItemWrapper, flatData, getNestedValue, getAbsoluteVirtualRowIndex, setHeaderRowsTop, tableRowsVirtualization, TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, TreeListSelectableSettings, TreeListSelectableMode };
40
+ export { TreeList, TreeListHandle, TreeListProps, TreeListColumnProps, TreeListCell, TreeListCellProps, TreeListRow, TreeListDraggableRow, TreeListDraggableRowHandle, TreeListRowProps, TreeListHeaderCell, TreeListHeaderCellProps, TreeListSelectionCell, TreeListSelectionCellProps, TreeListHeaderSelectionCell, TreeListHeaderSelectionCellProps, TreeListHeaderSelectionCellHandle, TreeListToolbar, TreeListToolbarProps, TreeListToolbarHandle, TreeListNoRecords, TreeListNoRecordsHandle, TreeListNoRecordsProps, TreeListSortSettings, TreeListColumnSortSettings, TreeListTextFilter, TreeListTextFilterProps, TreeListNumericFilter, TreeListNumericFilterProps, TreeListDateFilter, TreeListDateFilterProps, TreeListBooleanFilter, TreeListBooleanFilterProps, TreeListTextEditor, TreeListTextEditorProps, TreeListNumericEditor, TreeListNumericEditorProps, TreeListBooleanEditor, TreeListBooleanEditorProps, TreeListDateEditor, TreeListDateEditorProps, TreeListDataStateChangeEvent, TreeListFilterChangeEvent, TreeListColumnMenuFilterChangeEvent, TreeListSortChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListItemChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListDragSelectionReleaseEvent, TreeListKeyDownEvent, orderBy, filterBy, mapTree, createDataTree, extendDataItem, mapTreeItem, moveTreeItem, getItemPath, removeItems, modifySubItems, treeToFlat, DataItemWrapper, flatData, getNestedValue, getAbsoluteVirtualRowIndex, setHeaderRowsTop, tableRowsVirtualization, TREELIST_COL_INDEX_ATTRIBUTE, TREELIST_ROW_INDEX_ATTRIBUTE, TREELIST_PREVENT_SELECTION_ELEMENT, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, TreeListSelectableSettings, TreeListSelectableMode };
package/index.js CHANGED
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./TreeListMcpWrapper.js"),T=require("./cells/TreeListCell.js"),l=require("./header/TreeListHeaderCell.js"),s=require("./cells/TreeListSelectionCell.js"),a=require("./header/TreeListHeaderSelectionCell.js"),n=require("./rows/TreeListRow.js"),u=require("./rows/TreeListDraggableRow.js"),c=require("./TreeListToolbar.js"),L=require("./TreeListNoRecords.js"),d=require("./cells/FilterCells/TreeListTextFilter.js"),m=require("./cells/FilterCells/TreeListNumericFilter.js"),b=require("./cells/FilterCells/TreeListDateFilter.js"),E=require("./cells/FilterCells/TreeListBooleanFilter.js"),g=require("./cells/EditCells/TreeListTextEditor.js"),R=require("./cells/EditCells/TreeListNumericEditor.js"),I=require("./cells/EditCells/TreeListBooleanEditor.js"),S=require("./cells/EditCells/TreeListDateEditor.js"),t=require("@progress/kendo-react-common"),e=require("@progress/kendo-react-data-tools"),i=require("./utils/index.js"),r=require("./constants/index.js"),p=o.TreeListWrapper;exports.TreeListCell=T.TreeListCell;exports.TreeListHeaderCell=l.TreeListHeaderCell;exports.TreeListSelectionCell=s.TreeListSelectionCell;exports.TreeListHeaderSelectionCell=a.TreeListHeaderSelectionCell;exports.TreeListRow=n.TreeListRow;exports.TreeListDraggableRow=u.TreeListDraggableRow;exports.TreeListToolbar=c.TreeListToolbar;exports.TreeListNoRecords=L.TreeListNoRecords;exports.TreeListTextFilter=d.TreeListTextFilter;exports.TreeListNumericFilter=m.TreeListNumericFilter;exports.TreeListDateFilter=b.TreeListDateFilter;exports.TreeListBooleanFilter=E.TreeListBooleanFilter;exports.TreeListTextEditor=g.TreeListTextEditor;exports.TreeListNumericEditor=R.TreeListNumericEditor;exports.TreeListBooleanEditor=I.TreeListBooleanEditor;exports.TreeListDateEditor=S.TreeListDateEditor;Object.defineProperty(exports,"getAbsoluteVirtualRowIndex",{enumerable:!0,get:()=>t.getAbsoluteVirtualRowIndex});Object.defineProperty(exports,"getNestedValue",{enumerable:!0,get:()=>t.getNestedValue});Object.defineProperty(exports,"mapTree",{enumerable:!0,get:()=>t.mapTree});Object.defineProperty(exports,"mapTreeItem",{enumerable:!0,get:()=>t.mapTreeItem});Object.defineProperty(exports,"createDataTree",{enumerable:!0,get:()=>e.createDataTree});Object.defineProperty(exports,"extendDataItem",{enumerable:!0,get:()=>e.extendDataItem});Object.defineProperty(exports,"filterBy",{enumerable:!0,get:()=>e.filterBy});Object.defineProperty(exports,"flatData",{enumerable:!0,get:()=>e.flatData});Object.defineProperty(exports,"getItemPath",{enumerable:!0,get:()=>e.getItemPath});Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>e.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>e.getSelectedStateFromKeyDown});Object.defineProperty(exports,"modifySubItems",{enumerable:!0,get:()=>e.modifySubItems});Object.defineProperty(exports,"moveTreeItem",{enumerable:!0,get:()=>e.moveTreeItem});Object.defineProperty(exports,"orderBy",{enumerable:!0,get:()=>e.orderBy});Object.defineProperty(exports,"removeItems",{enumerable:!0,get:()=>e.removeItems});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>e.setSelectedState});Object.defineProperty(exports,"treeToFlat",{enumerable:!0,get:()=>e.treeToFlat});exports.setHeaderRowsTop=i.setHeaderRowsTop;exports.tableRowsVirtualization=i.tableRowsVirtualization;exports.TREELIST_COL_INDEX_ATTRIBUTE=r.TREELIST_COL_INDEX_ATTRIBUTE;exports.TREELIST_PREVENT_SELECTION_ELEMENT=r.TREELIST_PREVENT_SELECTION_ELEMENT;exports.TREELIST_ROW_INDEX_ATTRIBUTE=r.TREELIST_ROW_INDEX_ATTRIBUTE;exports.TreeList=p;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./TreeList.js"),T=require("./cells/TreeListCell.js"),l=require("./header/TreeListHeaderCell.js"),s=require("./cells/TreeListSelectionCell.js"),a=require("./header/TreeListHeaderSelectionCell.js"),n=require("./rows/TreeListRow.js"),u=require("./rows/TreeListDraggableRow.js"),c=require("./TreeListToolbar.js"),L=require("./TreeListNoRecords.js"),d=require("./cells/FilterCells/TreeListTextFilter.js"),m=require("./cells/FilterCells/TreeListNumericFilter.js"),b=require("./cells/FilterCells/TreeListDateFilter.js"),E=require("./cells/FilterCells/TreeListBooleanFilter.js"),g=require("./cells/EditCells/TreeListTextEditor.js"),R=require("./cells/EditCells/TreeListNumericEditor.js"),I=require("./cells/EditCells/TreeListBooleanEditor.js"),S=require("./cells/EditCells/TreeListDateEditor.js"),t=require("@progress/kendo-react-common"),e=require("@progress/kendo-react-data-tools"),i=require("./utils/index.js"),r=require("./constants/index.js");exports.TreeList=o.TreeList;exports.TreeListCell=T.TreeListCell;exports.TreeListHeaderCell=l.TreeListHeaderCell;exports.TreeListSelectionCell=s.TreeListSelectionCell;exports.TreeListHeaderSelectionCell=a.TreeListHeaderSelectionCell;exports.TreeListRow=n.TreeListRow;exports.TreeListDraggableRow=u.TreeListDraggableRow;exports.TreeListToolbar=c.TreeListToolbar;exports.TreeListNoRecords=L.TreeListNoRecords;exports.TreeListTextFilter=d.TreeListTextFilter;exports.TreeListNumericFilter=m.TreeListNumericFilter;exports.TreeListDateFilter=b.TreeListDateFilter;exports.TreeListBooleanFilter=E.TreeListBooleanFilter;exports.TreeListTextEditor=g.TreeListTextEditor;exports.TreeListNumericEditor=R.TreeListNumericEditor;exports.TreeListBooleanEditor=I.TreeListBooleanEditor;exports.TreeListDateEditor=S.TreeListDateEditor;Object.defineProperty(exports,"getAbsoluteVirtualRowIndex",{enumerable:!0,get:()=>t.getAbsoluteVirtualRowIndex});Object.defineProperty(exports,"getNestedValue",{enumerable:!0,get:()=>t.getNestedValue});Object.defineProperty(exports,"mapTree",{enumerable:!0,get:()=>t.mapTree});Object.defineProperty(exports,"mapTreeItem",{enumerable:!0,get:()=>t.mapTreeItem});Object.defineProperty(exports,"createDataTree",{enumerable:!0,get:()=>e.createDataTree});Object.defineProperty(exports,"extendDataItem",{enumerable:!0,get:()=>e.extendDataItem});Object.defineProperty(exports,"filterBy",{enumerable:!0,get:()=>e.filterBy});Object.defineProperty(exports,"flatData",{enumerable:!0,get:()=>e.flatData});Object.defineProperty(exports,"getItemPath",{enumerable:!0,get:()=>e.getItemPath});Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>e.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>e.getSelectedStateFromKeyDown});Object.defineProperty(exports,"modifySubItems",{enumerable:!0,get:()=>e.modifySubItems});Object.defineProperty(exports,"moveTreeItem",{enumerable:!0,get:()=>e.moveTreeItem});Object.defineProperty(exports,"orderBy",{enumerable:!0,get:()=>e.orderBy});Object.defineProperty(exports,"removeItems",{enumerable:!0,get:()=>e.removeItems});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>e.setSelectedState});Object.defineProperty(exports,"treeToFlat",{enumerable:!0,get:()=>e.treeToFlat});exports.setHeaderRowsTop=i.setHeaderRowsTop;exports.tableRowsVirtualization=i.tableRowsVirtualization;exports.TREELIST_COL_INDEX_ATTRIBUTE=r.TREELIST_COL_INDEX_ATTRIBUTE;exports.TREELIST_PREVENT_SELECTION_ELEMENT=r.TREELIST_PREVENT_SELECTION_ELEMENT;exports.TREELIST_ROW_INDEX_ATTRIBUTE=r.TREELIST_ROW_INDEX_ATTRIBUTE;
package/index.mjs CHANGED
@@ -6,66 +6,65 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { TreeListWrapper as e } from "./TreeListMcpWrapper.mjs";
10
- import { TreeListCell as i } from "./cells/TreeListCell.mjs";
11
- import { TreeListHeaderCell as a } from "./header/TreeListHeaderCell.mjs";
12
- import { TreeListSelectionCell as s } from "./cells/TreeListSelectionCell.mjs";
9
+ import { TreeList as r } from "./TreeList.mjs";
10
+ import { TreeListCell as T } from "./cells/TreeListCell.mjs";
11
+ import { TreeListHeaderCell as m } from "./header/TreeListHeaderCell.mjs";
12
+ import { TreeListSelectionCell as l } from "./cells/TreeListSelectionCell.mjs";
13
13
  import { TreeListHeaderSelectionCell as x } from "./header/TreeListHeaderSelectionCell.mjs";
14
- import { TreeListRow as L } from "./rows/TreeListRow.mjs";
15
- import { TreeListDraggableRow as d } from "./rows/TreeListDraggableRow.mjs";
16
- import { TreeListToolbar as R } from "./TreeListToolbar.mjs";
17
- import { TreeListNoRecords as c } from "./TreeListNoRecords.mjs";
14
+ import { TreeListRow as p } from "./rows/TreeListRow.mjs";
15
+ import { TreeListDraggableRow as E } from "./rows/TreeListDraggableRow.mjs";
16
+ import { TreeListToolbar as I } from "./TreeListToolbar.mjs";
17
+ import { TreeListNoRecords as S } from "./TreeListNoRecords.mjs";
18
18
  import { TreeListTextFilter as D } from "./cells/FilterCells/TreeListTextFilter.mjs";
19
19
  import { TreeListNumericFilter as _ } from "./cells/FilterCells/TreeListNumericFilter.mjs";
20
- import { TreeListDateFilter as u } from "./cells/FilterCells/TreeListDateFilter.mjs";
21
- import { TreeListBooleanFilter as B } from "./cells/FilterCells/TreeListBooleanFilter.mjs";
22
- import { TreeListTextEditor as F } from "./cells/EditCells/TreeListTextEditor.mjs";
23
- import { TreeListNumericEditor as y } from "./cells/EditCells/TreeListNumericEditor.mjs";
24
- import { TreeListBooleanEditor as A } from "./cells/EditCells/TreeListBooleanEditor.mjs";
25
- import { TreeListDateEditor as O } from "./cells/EditCells/TreeListDateEditor.mjs";
26
- import { getAbsoluteVirtualRowIndex as P, getNestedValue as U, mapTree as W, mapTreeItem as X } from "@progress/kendo-react-common";
27
- import { createDataTree as z, extendDataItem as K, filterBy as M, flatData as j, getItemPath as k, getSelectedState as q, getSelectedStateFromKeyDown as G, modifySubItems as J, moveTreeItem as Q, orderBy as Y, removeItems as Z, setSelectedState as $, treeToFlat as ee } from "@progress/kendo-react-data-tools";
28
- import { setHeaderRowsTop as re, tableRowsVirtualization as oe } from "./utils/index.mjs";
29
- import { TREELIST_COL_INDEX_ATTRIBUTE as ie, TREELIST_PREVENT_SELECTION_ELEMENT as me, TREELIST_ROW_INDEX_ATTRIBUTE as ae } from "./constants/index.mjs";
30
- const r = e;
20
+ import { TreeListDateFilter as g } from "./cells/FilterCells/TreeListDateFilter.mjs";
21
+ import { TreeListBooleanFilter as w } from "./cells/FilterCells/TreeListBooleanFilter.mjs";
22
+ import { TreeListTextEditor as C } from "./cells/EditCells/TreeListTextEditor.mjs";
23
+ import { TreeListNumericEditor as b } from "./cells/EditCells/TreeListNumericEditor.mjs";
24
+ import { TreeListBooleanEditor as V } from "./cells/EditCells/TreeListBooleanEditor.mjs";
25
+ import { TreeListDateEditor as H } from "./cells/EditCells/TreeListDateEditor.mjs";
26
+ import { getAbsoluteVirtualRowIndex as v, getNestedValue as P, mapTree as U, mapTreeItem as X } from "@progress/kendo-react-common";
27
+ import { createDataTree as z, extendDataItem as K, filterBy as M, flatData as W, getItemPath as j, getSelectedState as k, getSelectedStateFromKeyDown as q, modifySubItems as G, moveTreeItem as J, orderBy as Q, removeItems as Y, setSelectedState as Z, treeToFlat as $ } from "@progress/kendo-react-data-tools";
28
+ import { setHeaderRowsTop as te, tableRowsVirtualization as re } from "./utils/index.mjs";
29
+ import { TREELIST_COL_INDEX_ATTRIBUTE as Te, TREELIST_PREVENT_SELECTION_ELEMENT as ie, TREELIST_ROW_INDEX_ATTRIBUTE as me } from "./constants/index.mjs";
31
30
  export {
32
- ie as TREELIST_COL_INDEX_ATTRIBUTE,
33
- me as TREELIST_PREVENT_SELECTION_ELEMENT,
34
- ae as TREELIST_ROW_INDEX_ATTRIBUTE,
31
+ Te as TREELIST_COL_INDEX_ATTRIBUTE,
32
+ ie as TREELIST_PREVENT_SELECTION_ELEMENT,
33
+ me as TREELIST_ROW_INDEX_ATTRIBUTE,
35
34
  r as TreeList,
36
- A as TreeListBooleanEditor,
37
- B as TreeListBooleanFilter,
38
- i as TreeListCell,
39
- O as TreeListDateEditor,
40
- u as TreeListDateFilter,
41
- d as TreeListDraggableRow,
42
- a as TreeListHeaderCell,
35
+ V as TreeListBooleanEditor,
36
+ w as TreeListBooleanFilter,
37
+ T as TreeListCell,
38
+ H as TreeListDateEditor,
39
+ g as TreeListDateFilter,
40
+ E as TreeListDraggableRow,
41
+ m as TreeListHeaderCell,
43
42
  x as TreeListHeaderSelectionCell,
44
- c as TreeListNoRecords,
45
- y as TreeListNumericEditor,
43
+ S as TreeListNoRecords,
44
+ b as TreeListNumericEditor,
46
45
  _ as TreeListNumericFilter,
47
- L as TreeListRow,
48
- s as TreeListSelectionCell,
49
- F as TreeListTextEditor,
46
+ p as TreeListRow,
47
+ l as TreeListSelectionCell,
48
+ C as TreeListTextEditor,
50
49
  D as TreeListTextFilter,
51
- R as TreeListToolbar,
50
+ I as TreeListToolbar,
52
51
  z as createDataTree,
53
52
  K as extendDataItem,
54
53
  M as filterBy,
55
- j as flatData,
56
- P as getAbsoluteVirtualRowIndex,
57
- k as getItemPath,
58
- U as getNestedValue,
59
- q as getSelectedState,
60
- G as getSelectedStateFromKeyDown,
61
- W as mapTree,
54
+ W as flatData,
55
+ v as getAbsoluteVirtualRowIndex,
56
+ j as getItemPath,
57
+ P as getNestedValue,
58
+ k as getSelectedState,
59
+ q as getSelectedStateFromKeyDown,
60
+ U as mapTree,
62
61
  X as mapTreeItem,
63
- J as modifySubItems,
64
- Q as moveTreeItem,
65
- Y as orderBy,
66
- Z as removeItems,
67
- re as setHeaderRowsTop,
68
- $ as setSelectedState,
69
- oe as tableRowsVirtualization,
70
- ee as treeToFlat
62
+ G as modifySubItems,
63
+ J as moveTreeItem,
64
+ Q as orderBy,
65
+ Y as removeItems,
66
+ te as setHeaderRowsTop,
67
+ Z as setSelectedState,
68
+ re as tableRowsVirtualization,
69
+ $ as treeToFlat
71
70
  };
@@ -6,14 +6,14 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { SortDescriptor, FilterDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query';
9
- import { TreeList } from '../TreeList.js';
9
+ import { TreeListHandle } from '../TreeList.js';
10
10
  import { TreeListColumnProps } from './TreeListColumnProps';
11
11
  import { BaseEvent } from '@progress/kendo-react-common';
12
12
  import { TableDragSelectionReleaseEvent, TableKeyDownEvent, TableSelectionChangeEvent } from '@progress/kendo-react-data-tools';
13
13
  /**
14
14
  * Represents the base event object of the TreeList.
15
15
  */
16
- export interface TreeListEvent extends BaseEvent<TreeList> {
16
+ export interface TreeListEvent extends BaseEvent<TreeListHandle> {
17
17
  }
18
18
  /**
19
19
  * Represents the object of the `onDataStateChange` TreeList event.
@@ -98,7 +98,7 @@ export interface TreeListExpandChangeEvent extends TreeListEvent {
98
98
  /**
99
99
  * Represents the object of the `onSelectionChange` TreeList event.
100
100
  */
101
- export interface TreeListSelectionChangeEvent extends TreeListEvent, TableSelectionChangeEvent<TreeList> {
101
+ export interface TreeListSelectionChangeEvent extends TreeListEvent, TableSelectionChangeEvent<TreeListHandle> {
102
102
  /**
103
103
  * An array of indexes of each parent and current item in the data tree.
104
104
  */
@@ -107,7 +107,7 @@ export interface TreeListSelectionChangeEvent extends TreeListEvent, TableSelect
107
107
  /**
108
108
  * Represents the object of the `onKeyDownEvent` TreeList event.
109
109
  */
110
- export interface TreeListKeyDownEvent extends TreeListEvent, TableKeyDownEvent<TreeList> {
110
+ export interface TreeListKeyDownEvent extends TreeListEvent, TableKeyDownEvent<TreeListHandle> {
111
111
  }
112
112
  /** @hidden */
113
113
  export interface TreeListDragSelectionReleaseEvent extends TableDragSelectionReleaseEvent {
@@ -189,7 +189,7 @@ interface ColumnDragEvent {
189
189
  /**
190
190
  * An event target.
191
191
  */
192
- target: TreeList;
192
+ target: TreeListHandle;
193
193
  /**
194
194
  * A native DOM event.
195
195
  */
@@ -253,7 +253,7 @@ export interface TreeListRowDragEvent {
253
253
  /**
254
254
  * An event target.
255
255
  */
256
- target: TreeList;
256
+ target: TreeListHandle;
257
257
  /**
258
258
  * The level of the dragged row.
259
259
  * The level represents an array of indexes of each parent and current item in the data tree.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-treelist",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1784273587,version:"15.2.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-treelist",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1785412192,version:"15.2.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1784273587,
11
- version: '15.2.0-develop.1',
10
+ publishDate: 1785412192,
11
+ version: '15.2.0-develop.2',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-treelist",
3
- "version": "15.2.0-develop.1",
3
+ "version": "15.2.0-develop.2",
4
4
  "description": "React TreeList enables the display of self-referencing tabular data. KendoReact TreeList package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -29,13 +29,13 @@
29
29
  "@progress/kendo-date-math": "^1.4.1",
30
30
  "@progress/kendo-drawing": "^1.21.2",
31
31
  "@progress/kendo-licensing": "^1.7.2",
32
- "@progress/kendo-react-common": "15.2.0-develop.1",
33
- "@progress/kendo-react-data-tools": "15.2.0-develop.1",
34
- "@progress/kendo-react-dateinputs": "15.2.0-develop.1",
35
- "@progress/kendo-react-dialogs": "15.2.0-develop.1",
36
- "@progress/kendo-react-dropdowns": "15.2.0-develop.1",
37
- "@progress/kendo-react-inputs": "15.2.0-develop.1",
38
- "@progress/kendo-react-intl": "15.2.0-develop.1",
32
+ "@progress/kendo-react-common": "15.2.0-develop.2",
33
+ "@progress/kendo-react-data-tools": "15.2.0-develop.2",
34
+ "@progress/kendo-react-dateinputs": "15.2.0-develop.2",
35
+ "@progress/kendo-react-dialogs": "15.2.0-develop.2",
36
+ "@progress/kendo-react-dropdowns": "15.2.0-develop.2",
37
+ "@progress/kendo-react-inputs": "15.2.0-develop.2",
38
+ "@progress/kendo-react-intl": "15.2.0-develop.2",
39
39
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
40
40
  "react": "^18.0.0 || ^19.0.0",
41
41
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -76,7 +76,7 @@
76
76
  "package": {
77
77
  "productName": "KendoReact",
78
78
  "productCode": "KENDOUIREACT",
79
- "publishDate": 1784273587,
79
+ "publishDate": 1785412192,
80
80
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
81
81
  }
82
82
  },
@@ -7,33 +7,14 @@
7
7
  */
8
8
  import { TreeListRowProps } from '../interfaces/TreeListRowProps';
9
9
  import * as React from 'react';
10
- interface RowDragClueProps {
11
- visible: boolean;
12
- top: number;
13
- left: number;
14
- text: string;
15
- allowDrop: boolean;
16
- }
17
- interface TreeListRowState {
18
- clueProps: RowDragClueProps;
10
+ /**
11
+ * Represent the `ref` of the TreeListDraggableRow component.
12
+ */
13
+ export interface TreeListDraggableRowHandle {
14
+ /** The props of the TreeListDraggableRow component. */
15
+ readonly props: Readonly<TreeListRowProps>;
19
16
  }
20
17
  /**
21
18
  * The TreeList draggable row component.
22
19
  */
23
- export declare class TreeListDraggableRow extends React.Component<TreeListRowProps, TreeListRowState> {
24
- /**
25
- * @hidden
26
- */
27
- readonly state: TreeListRowState;
28
- private draggable;
29
- private dragged;
30
- private draggedOver;
31
- /**
32
- * @hidden
33
- */
34
- render(): React.JSX.Element;
35
- private onPress;
36
- private onDrag;
37
- private onRelease;
38
- }
39
- export {};
20
+ export declare const TreeListDraggableRow: React.ForwardRefExoticComponent<TreeListRowProps & React.RefAttributes<TreeListDraggableRowHandle>>;
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),v=require("react-dom"),i=require("@progress/kendo-react-common"),D=require("./TreeListRow.js"),c=require("@progress/kendo-svg-icons");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=d(m),b=d(v),w=e=>e.visible&&i.canUseDOM?b.createPortal(a.createElement("div",{className:"k-header k-drag-clue",style:{display:"block",position:"absolute",zIndex:2e4,padding:"8px 12px",top:e.top+"px",left:e.left+"px"}},a.createElement(i.IconWrap,{className:i.classNames("k-drag-status"),name:e.allowDrop?"plus":"cancel",icon:e.allowDrop?c.plusIcon:c.cancelIcon}),e.text),document.body):null;function O(e,r,t){if(!e.originalEvent)return-1;const n=u(e,"tr",t);if(n){const o=r?r.childNodes:[];for(let s=0;s<o.length;s++)if(o[s]===n)return s}return-1}function u(e,r,t){const n=t?t.elementFromPoint(e.clientX,e.clientY):null;return r&&n?n.closest(r):null}const R="k-grid",g={visible:!1,top:0,left:0,text:"",allowDrop:!1};class E extends a.Component{constructor(){super(...arguments),this.state={clueProps:{...g}},this.draggable=a.createRef(),this.dragged=null,this.draggedOver=null,this.onPress=()=>this.dragged=this.props.level,this.onDrag=r=>{if(!i.canUseDOM)return;const t=this.draggable.current&&this.draggable.current.element,n=t?t.ownerDocument:document;if(!n)return;const o=r.event,s=this.dragged;if(t&&s){!o.isTouch&&o.type!=="scroll"&&o.originalEvent.preventDefault();const l=this.props.levels[O(o,t.parentNode,n)];this.draggedOver=l;const p=l?!s.every((h,f)=>h===l[f]):!!u(o,R,n);this.setState({clueProps:{visible:!0,top:o.pageY+10,left:o.pageX,text:t.innerText,allowDrop:p}}),this.props.onDrag&&this.props.onDrag.call(void 0,{nativeEvent:o.originalEvent,dragged:s,draggedOver:l,draggedItem:this.props.dataItem})}},this.onRelease=r=>{const t=r.event;if(this.dragged){const n=[...this.dragged],o=this.draggedOver&&[...this.draggedOver],s=this.state.clueProps.allowDrop;this.dragged=null,this.draggedOver=null,this.setState({clueProps:{...g}});const l=this.props.dataItem;s&&this.props.onDrop&&this.props.onDrop.call(void 0,{nativeEvent:t.originalEvent,dragged:n,draggedOver:o,draggedItem:l})}}}render(){const{clueProps:r}=this.state;return a.createElement(a.Fragment,null,a.createElement(i.Draggable,{ref:this.draggable,onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},a.createElement(D.TreeListRow,{...this.props})),a.createElement(w,{...r}))}}exports.TreeListDraggableRow=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),M=require("react-dom"),m=require("@progress/kendo-react-common"),h=require("./TreeListRow.js"),w=require("@progress/kendo-svg-icons");function O(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const t=O(L),j=O(M),q=e=>e.visible&&m.canUseDOM?j.createPortal(t.createElement("div",{className:"k-header k-drag-clue",style:{display:"block",position:"absolute",zIndex:2e4,padding:"8px 12px",top:e.top+"px",left:e.left+"px"}},t.createElement(m.IconWrap,{className:m.classNames("k-drag-status"),name:e.allowDrop?"plus":"cancel",icon:e.allowDrop?w.plusIcon:w.cancelIcon}),e.text),document.body):null;function _(e,n,r){if(!e.originalEvent)return-1;const c=I(e,"tr",r);if(c){const i=n?n.childNodes:[];for(let o=0;o<i.length;o++)if(i[o]===c)return o}return-1}function I(e,n,r){const c=r?r.elementFromPoint(e.clientX,e.clientY):null;return n&&c?c.closest(n):null}const E="k-grid",y={visible:!1,top:0,left:0,text:"",allowDrop:!1},k=t.forwardRef((e,n)=>{const[r,c]=t.useState({...y}),i=t.useRef(null),o=t.useRef(null),R=t.useRef(null),u=t.useRef(null),D=t.useRef(r);D.current=r;const s=t.useRef(e);s.current=e;const b=t.useRef(null);t.useImperativeHandle(b,()=>({props:e})),t.useImperativeHandle(n,()=>b.current),t.useEffect(()=>()=>{u.current&&(u.current.style.userSelect="",u.current=null)},[]);const x=t.useCallback(()=>{var l;o.current=s.current.level;const g=(l=i.current)==null?void 0:l.element;g&&(u.current=g.closest("."+E),u.current&&(u.current.style.userSelect="none"))},[i]),S=t.useCallback(g=>{var v;if(!m.canUseDOM)return;const l=(v=i.current)==null?void 0:v.element,d=(l==null?void 0:l.ownerDocument)||document;if(!d)return;const a=g.event,f=o.current;if(l&&f){!a.isTouch&&a.type!=="scroll"&&a.originalEvent.preventDefault();const p=s.current.levels[_(a,l.parentNode,d)];R.current=p;const T=p?!f.every((C,N)=>C===p[N]):!!I(a,E,d);c({visible:!0,top:a.pageY+10,left:a.pageX,text:l.innerText,allowDrop:T}),s.current.onDrag&&s.current.onDrag({nativeEvent:a.originalEvent,dragged:f,draggedOver:p,draggedItem:s.current.dataItem})}},[i]),P=t.useCallback(g=>{u.current&&(u.current.style.userSelect="",u.current=null);const l=g.event;if(o.current){const d=[...o.current],a=R.current&&[...R.current],f=D.current.allowDrop;o.current=null,R.current=null,c({...y});const v=s.current.dataItem;f&&s.current.onDrop&&s.current.onDrop({nativeEvent:l.originalEvent,dragged:d,draggedOver:a,draggedItem:v})}},[]);return t.createElement(t.Fragment,null,t.createElement(m.Draggable,{ref:i,onPress:x,onDrag:S,onRelease:P},t.createElement(h.TreeListRow,{...e})),t.createElement(q,{...r}))});k.displayName="KendoReactTreeListDraggableRow";exports.TreeListDraggableRow=k;