/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/collections/tree-adapter.ts
30 строк
1 KB
Naji
docs: replace angular.io links with angular.dev (#29734)
19 сен 2024, 13:57
Не верифицирован
19 сен 2024, 13:57
5782834
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {SelectionModel} from './selection-model'; /** * Interface for a class that can flatten hierarchical structured data and re-expand the flattened * data back into its original structure. Should be used in conjunction with the cdk-tree. */ export interface TreeDataNodeFlattener<T> { /** Transforms a set of hierarchical structured data into a flattened data array. */ flattenNodes(structuredData: any[]): T[]; /** * Expands a flattened array of data into its hierarchical form using the provided expansion * model. */ expandFlattenedNodes(nodes: T[], expansionModel: SelectionModel<T>): T[]; /** * Put node descendants of node in array. * If `onlyExpandable` is true, then only process expandable descendants. */ nodeDescendents(node: T, nodes: T[], onlyExpandable: boolean): void; }