@craftercms/studio-ui
Version:
Services, components, models & utils to build CrafterCMS authoring extensions.
51 lines (49 loc) • 2.14 kB
TypeScript
/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { StateStylingProps } from '../../models/UiConfig';
import { PathNavigatorTreeItemProps } from './PathNavigatorTreeItem';
import LookupTable from '../../models/LookupTable';
import { DetailedItem } from '../../models/Item';
import { SystemIconDescriptor } from '../SystemIcon';
export interface PathNavigatorTreeUIProps
extends Pick<
PathNavigatorTreeItemProps,
'showNavigableAsLinks' | 'showPublishingTarget' | 'showWorkflowState' | 'showItemMenu'
> {
title: string;
icon?: SystemIconDescriptor;
container?: Partial<StateStylingProps>;
rootPath: string;
isRootPathMissing: boolean;
itemsByPath: LookupTable<DetailedItem>;
keywordByPath: LookupTable<string>;
totalByPath: LookupTable<number>;
childrenByParentPath: LookupTable<string[]>;
onIconClick(path: string): void;
onLabelClick(event: React.MouseEvent<Element, MouseEvent>, path: string): void;
onChangeCollapsed(collapsed: boolean): void;
onOpenItemMenu(element: Element, path: string): void;
onHeaderButtonClick(element: Element): void;
onFilterChange(keyword: string, path: string): void;
onMoreClick(path: string): void;
isCollapsed: boolean;
expandedNodes: string[];
classes?: Partial<Record<'root' | 'body' | 'header', string>>;
active?: PathNavigatorTreeItemProps['active'];
}
export declare function PathNavigatorTreeUI(props: PathNavigatorTreeUIProps): JSX.Element;
export default PathNavigatorTreeUI;