UNPKG

@craftercms/studio-ui

Version:

Services, components, models & utils to build CrafterCMS authoring extensions.

44 lines (42 loc) 1.89 kB
/* * 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 { DetailedItem } from '../../models/Item'; import LookupTable from '../../models/LookupTable'; import { PathNavigatorTreeStateProps } from './PathNavigatorTree'; export interface PathNavigatorTreeItemProps extends Pick<PathNavigatorTreeStateProps, 'keywordByPath' | 'totalByPath' | 'childrenByParentPath' | 'errorByPath'> { path: string; itemsByPath: LookupTable<DetailedItem>; active?: Record<string, boolean>; classes?: Partial<Record<PathNavigatorTreeBreadcrumbsClassKey, string>>; showNavigableAsLinks?: boolean; showPublishingTarget?: boolean; showWorkflowState?: boolean; showItemMenu?: boolean; onLabelClick(event: React.MouseEvent<Element, MouseEvent>, path: string): void; onIconClick(path: string): void; onOpenItemMenu?(element: Element, path: string): void; onFilterChange(keyword: string, path: string): void; onMoreClick(path: string): void; } export type PathNavigatorTreeBreadcrumbsClassKey = | 'searchRoot' | 'searchInput' | 'searchCleanButton' | 'searchCloseButton'; export declare function PathNavigatorTreeItem(props: PathNavigatorTreeItemProps): React.JSX.Element; export default PathNavigatorTreeItem;