/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { OrgChartOperationDescriptors } from './OrgChartOperationDescriptors.js'; /** * A helper function which applies the specified operation descriptors to the data. * * [Expanding and collapsing items](https://www.telerik.com/kendo-react-ui/components/treeview/expansion/update-expanded-items#toc-using-a-helper-function) * * [Selecting and deselecting items](https://www.telerik.com/kendo-react-ui/components/treeview/selection/update-selected-items#toc-using-a-helper-function) * * [Checking and unchecking items](https://www.telerik.com/kendo-react-ui/components/treeview/checkboxes/helper-functions) * * @param data - The data that will be processed. * @param operations - The operation descriptors that will be applied to the data. * @returns - The processed copy of the input data. * * @example * ```jsx * const App = () => { * const [items, setItems] = React.useState(tree); * const [expand, setExpand] = React.useState([]); * const [select, setSelect] = React.useState([]); * const [check, setCheck] = React.useState([]); * * const onExpandChange = (event) => { * let newExpand = expand.slice(); * const index = newExpand.indexOf(event.itemHierarchicalIndex); * index === -1 ? newExpand.push(event.itemHierarchicalIndex) : newExpand.splice(index, 1); * setExpand(newExpand); * } * * return ( * setCheck([event.itemHierarchicalIndex])} * onItemClick={event => setSelect([event.itemHierarchicalIndex])} * /> * ); * } * * const tree = [{ * text: 'Item1', * items: [ * { text: 'Item1.1' }, * { text: 'Item1.2' }, * { text: 'Item1.3', items: [{ text: 'Item1.3.1' }] }] * }, { * text: 'Item2', disabled: true, * items: [{ text: 'Item2.1' }, { text: 'Item2.2' }, { text: 'Item2.3' }] * }, { * text: 'Item3' * }]; * ``` */ export declare function processOrgChartItems(data: any[] | null | undefined, operations: OrgChartOperationDescriptors): any[];