@banyan_cloud/roots 2.0.21 → 2.0.22

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.
@@ -1,16 +1,23 @@
1
- export default HierarchyBrowser;
2
- declare function HierarchyBrowser(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace HierarchyBrowser {
4
- namespace propTypes {
5
- let className: any;
6
- let metadata: any;
7
- let onItemClick: any;
8
- let onItemDoubleClick: any;
9
- let borderSize: any;
10
- let minWidth: any;
11
- let maxWidth: any;
12
- let resizable: any;
13
- let setItemProps: any;
14
- let title: any;
15
- }
1
+ import type { ReactElement } from 'react';
2
+ interface Item {
3
+ id?: string;
4
+ title?: string;
5
+ count?: number;
6
+ list?: Item[] | boolean;
7
+ [key: string]: any;
8
+ }
9
+ interface HierarchyBrowserProps {
10
+ className?: string;
11
+ metadata?: Item[];
12
+ onItemClick?: (item: Item, pathString: string, open?: boolean) => void;
13
+ onItemDoubleClick?: (item: Item, pathString: string, open?: boolean) => void;
14
+ minWidth?: number;
15
+ maxWidth?: number;
16
+ borderSize?: number;
17
+ resizable?: boolean;
18
+ setItemProps?: (item: Item, pathString: string) => Record<string, any>;
19
+ title?: string;
20
+ count?: string;
16
21
  }
22
+ declare const HierarchyBrowser: ({ className, metadata, onItemClick, onItemDoubleClick, minWidth, maxWidth, borderSize, resizable, setItemProps, title, }: HierarchyBrowserProps) => ReactElement;
23
+ export default HierarchyBrowser;
@@ -1,11 +1,23 @@
1
- export default HierarchyItem;
2
- declare function HierarchyItem(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace HierarchyItem {
4
- namespace propTypes {
5
- let iconPlacement: any;
6
- let title: any;
7
- let defaultOpen: any;
8
- let onClick: any;
9
- let active: any;
10
- }
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ type IconPlacement = 'left' | 'right' | 'none';
3
+ interface HierarchyItemProps {
4
+ defaultOpen?: boolean;
5
+ iconPlacement?: IconPlacement;
6
+ title: ReactNode;
7
+ count?: string;
8
+ children: ReactNode;
9
+ onClick?: (state: boolean) => void;
10
+ onDoubleClick?: (state: boolean) => void;
11
+ active?: boolean;
12
+ isLastItem?: boolean;
13
+ isSingleItem?: boolean;
14
+ leftComponent: ReactNode;
15
+ name: string;
16
+ onSearchSubmit?: (text: string, path: string) => void;
17
+ pathString: string;
18
+ lastActive?: boolean;
19
+ isSearching: boolean;
20
+ onSearchStart?: () => void;
11
21
  }
22
+ declare const HierarchyItem: (props: HierarchyItemProps) => ReactElement;
23
+ export default HierarchyItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banyan_cloud/roots",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Design System Library which drives the Banyan Cloud products",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",