@deadragdoll/reactnu 0.1.30 → 0.1.52
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.
- package/README.md +2 -0
- package/dist/components/DragDrop/NuDragDropProvider.d.ts +46 -0
- package/dist/components/DragDrop/index.d.ts +1 -0
- package/dist/components/IconGrid/IconGrid.types.d.ts +9 -0
- package/dist/components/IconGrid/NuIconGrid.d.ts +18 -3
- package/dist/components/ListBox/ListBox.d.ts +13 -3
- package/dist/components/ListBox/internals/ListBoxGroupView.d.ts +6 -1
- package/dist/components/ListBox/internals/ListBoxItemView.d.ts +6 -1
- package/dist/components/TreeListView/TreeListView.d.ts +14 -4
- package/dist/components/TreeListView/internals/TreeListViewRow.d.ts +7 -2
- package/dist/index.cjs +1228 -756
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1033 -559
- package/dist/styles.css +87 -19
- package/dist/theme/NuThemeProvider.d.ts +3 -2
- package/dist/theme/themes.d.ts +2 -0
- package/docs/API_REFERENCE.md +9 -0
- package/docs/COMPONENT_INDEX.md +2 -0
- package/docs/GETTING_STARTED.md +2 -1
- package/docs/IconGrid.md +30 -3
- package/docs/ListBox.md +11 -0
- package/docs/NuDragDropProvider.md +43 -0
- package/docs/NuThemeProvider.md +3 -1
- package/docs/TreeListView.md +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,7 @@ This package includes the complete Markdown documentation set:
|
|
|
70
70
|
- [Component Index](./docs/COMPONENT_INDEX.md)
|
|
71
71
|
- [Architecture](./docs/ARCHITECTURE.md)
|
|
72
72
|
- [Theme Provider](./docs/NuThemeProvider.md)
|
|
73
|
+
- [Shared Drag and Drop](./docs/NuDragDropProvider.md)
|
|
73
74
|
- [Window Provider](./docs/NuWindowProvider.md)
|
|
74
75
|
- [Storybook guidance](./docs/STORYBOOK.md)
|
|
75
76
|
|
|
@@ -80,6 +81,7 @@ Each public component has a dedicated page in [`docs/`](./docs/).
|
|
|
80
81
|
### Providers and desktop shell
|
|
81
82
|
|
|
82
83
|
- `NuThemeProvider` — supplies themes, typography, desktop pattern, and theme context.
|
|
84
|
+
- `NuDragDropProvider` — coordinates application-owned transfers among icon grids, lists, and trees.
|
|
83
85
|
- `NuDesktop` — fullscreen desktop shell with workspace and app-bar regions.
|
|
84
86
|
- `NuAppHostProvider` — owns application-level main-menu state.
|
|
85
87
|
- `NuWindowProvider` — manages windows, dialogs, modal state, and window-manager hooks.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { PointerEvent, PropsWithChildren } from "react";
|
|
2
|
+
export type NuDragDropItem<T = unknown> = {
|
|
3
|
+
data: T;
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
export type NuDragDropContext = {
|
|
8
|
+
clientX: number;
|
|
9
|
+
clientY: number;
|
|
10
|
+
source: {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
target: {
|
|
15
|
+
element: HTMLElement;
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type NuDropTargetOptions = {
|
|
20
|
+
accepts?: (item: NuDragDropItem) => boolean;
|
|
21
|
+
onDrop: (item: NuDragDropItem, context: NuDragDropContext) => boolean | void;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
type NuDragDropController = {
|
|
25
|
+
beginDrag: (item: NuDragDropItem, sourceElement: HTMLElement, sourceType: string) => void;
|
|
26
|
+
cancelDrag: () => void;
|
|
27
|
+
dropAt: (clientX: number, clientY: number) => boolean;
|
|
28
|
+
moveDrag: (clientX: number, clientY: number) => void;
|
|
29
|
+
registerTarget: (element: HTMLElement, options: NuDropTargetOptions) => () => void;
|
|
30
|
+
};
|
|
31
|
+
export declare function NuDragDropProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function useNuDragDrop(): NuDragDropController;
|
|
33
|
+
export declare function useNuDropTarget(element: HTMLElement | null, options: NuDropTargetOptions | undefined): void;
|
|
34
|
+
type NuDragSourceOptions = {
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
getItem: () => NuDragDropItem | false;
|
|
37
|
+
onDropAccepted?: () => void;
|
|
38
|
+
sourceType: string;
|
|
39
|
+
};
|
|
40
|
+
export declare function useNuDragSource({ disabled, getItem, onDropAccepted, sourceType }: NuDragSourceOptions): {
|
|
41
|
+
onPointerCancel(event: PointerEvent<HTMLElement>): void;
|
|
42
|
+
onPointerDown(event: PointerEvent<HTMLElement>): void;
|
|
43
|
+
onPointerMove(event: PointerEvent<HTMLElement>): void;
|
|
44
|
+
onPointerUp(event: PointerEvent<HTMLElement>): void;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NuDragDropProvider";
|
|
@@ -16,6 +16,8 @@ export type NuIconDefinition = {
|
|
|
16
16
|
onContextMenu?: MouseEventHandler<HTMLButtonElement>;
|
|
17
17
|
onDoubleClick?: MouseEventHandler<HTMLButtonElement>;
|
|
18
18
|
onPositionChange?: (position: NuIconPosition, icon: NuIconInfo) => void;
|
|
19
|
+
/** Application-defined data preserved when the icon moves to another grid. */
|
|
20
|
+
payload?: unknown;
|
|
19
21
|
position?: NuIconPosition;
|
|
20
22
|
};
|
|
21
23
|
export type NuIconInfo = Omit<NuIconDefinition, "id" | "position"> & {
|
|
@@ -33,3 +35,10 @@ export type NuIconManager = {
|
|
|
33
35
|
updateIcon: (id: string, patch: Partial<Omit<NuIconDefinition, "id">>) => void;
|
|
34
36
|
};
|
|
35
37
|
export type NuIconContextMenuItems = MainMenuNode[] | ((manager: NuIconManager) => MainMenuNode[]);
|
|
38
|
+
export type NuIconDropContext = {
|
|
39
|
+
position: NuIconPosition;
|
|
40
|
+
source: NuIconManager;
|
|
41
|
+
sourceGrid: HTMLElement;
|
|
42
|
+
target: NuIconManager;
|
|
43
|
+
targetGrid: HTMLElement;
|
|
44
|
+
};
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { NuDragDropContext, NuDragDropItem } from "../DragDrop";
|
|
3
|
+
import { NuIconContextMenuItems, NuIconArrangeMode, NuIconDropContext, NuIconInfo } from "./IconGrid.types";
|
|
4
|
+
export type NuIconGridProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "onDrop"> & {
|
|
5
|
+
/** Filters icons accepted from another IconGrid before `onIconDrop` is called. */
|
|
6
|
+
accepts?: (icon: NuIconInfo) => boolean;
|
|
7
|
+
/** Filters non-icon shared drag items accepted by this grid. */
|
|
8
|
+
acceptsDrop?: (item: NuDragDropItem) => boolean;
|
|
4
9
|
contextMenuItems?: NuIconContextMenuItems;
|
|
5
10
|
defaultArrangeMode?: NuIconArrangeMode;
|
|
11
|
+
/** Enables hit testing for a non-interactive grid surface behind other content. */
|
|
12
|
+
dropTarget?: boolean;
|
|
13
|
+
/** Called by the target grid before an icon is transferred. Return false to reject the drop. */
|
|
14
|
+
onIconDrop?: (icon: NuIconInfo, context: NuIconDropContext) => boolean | void;
|
|
15
|
+
/** Called by the source grid after its icon was transferred to another grid. */
|
|
16
|
+
onIconMoveOut?: (icon: NuIconInfo, context: NuIconDropContext) => void;
|
|
17
|
+
/** Called after an icon was accepted by a non-IconGrid shared drop target. */
|
|
18
|
+
onDragOut?: (item: NuDragDropItem<NuIconInfo>) => void;
|
|
19
|
+
/** Receives non-icon shared drag items. Return false to reject the drop. */
|
|
20
|
+
onDrop?: (item: NuDragDropItem, context: NuDragDropContext) => boolean | void;
|
|
6
21
|
};
|
|
7
|
-
export declare function NuIconGrid({ className, contextMenuItems: contextMenuItemsSource, defaultArrangeMode, onContextMenu, onPointerDown, ...props }: NuIconGridProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function NuIconGrid({ accepts, acceptsDrop, className, contextMenuItems: contextMenuItemsSource, defaultArrangeMode, dropTarget, onDragOut, onIconDrop, onIconMoveOut, onDrop, onContextMenu, onPointerDown, ...props }: NuIconGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ForwardedRef, HTMLAttributes, RefAttributes } from "react";
|
|
1
|
+
import { ForwardedRef, HTMLAttributes, MouseEvent, RefAttributes } from "react";
|
|
2
2
|
import { ListBoxGroup, ListBoxItem } from "./internals/types";
|
|
3
|
+
import { NuDragDropContext, NuDragDropItem } from "../DragDrop";
|
|
3
4
|
export type { ListBoxCategory, ListBoxGroup, ListBoxItem, ListBoxLabel } from "./internals/types";
|
|
4
5
|
export type ListBoxHandle = {
|
|
5
6
|
activateItem: (itemId: string) => void;
|
|
@@ -8,16 +9,25 @@ export type ListBoxHandle = {
|
|
|
8
9
|
scrollToItem: (itemId: string) => void;
|
|
9
10
|
toggleItemCheck: (itemId: string) => void;
|
|
10
11
|
};
|
|
11
|
-
export type ListBoxProps = Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
12
|
+
export type ListBoxProps = Omit<HTMLAttributes<HTMLDivElement>, "onDrop" | "onSelect"> & {
|
|
13
|
+
/** Decides whether this list can receive a shared drag item. */
|
|
14
|
+
acceptsDrop?: (item: NuDragDropItem) => boolean;
|
|
12
15
|
data: ListBoxGroup[];
|
|
13
16
|
checkedIds?: string[];
|
|
17
|
+
/** Returns the shared drag item for a row, or false to keep it static. */
|
|
18
|
+
getDragItem?: (item: ListBoxItem, group: ListBoxGroup) => NuDragDropItem | false;
|
|
19
|
+
onPopupMenu?: (event: MouseEvent<HTMLDivElement>, item: ListBoxItem, group: ListBoxGroup) => void;
|
|
14
20
|
emptyText?: string;
|
|
15
21
|
onItemCheckChange?: (item: ListBoxItem, group: ListBoxGroup, checked: boolean) => void;
|
|
16
22
|
onItemDoubleClick?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
23
|
+
/** Called after this list row was accepted by a different shared drop target. */
|
|
24
|
+
onItemDragOut?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
17
25
|
rightCheckBox?: boolean;
|
|
18
26
|
selectedId?: string;
|
|
19
27
|
uncheckedShape?: "box" | "none";
|
|
20
28
|
onItemSelect?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
29
|
+
/** Receives a shared drag item. Return false to reject it. */
|
|
30
|
+
onDrop?: (item: NuDragDropItem, context: NuDragDropContext) => boolean | void;
|
|
21
31
|
};
|
|
22
|
-
declare function ListBoxInner({ className, data, checkedIds, emptyText, onItemCheckChange, onItemDoubleClick, onItemSelect, rightCheckBox, selectedId, uncheckedShape, ...props }: ListBoxProps, ref: ForwardedRef<ListBoxHandle>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function ListBoxInner({ acceptsDrop, className, data, checkedIds, emptyText, getDragItem, onPopupMenu, onItemCheckChange, onItemDoubleClick, onItemDragOut, onItemSelect, onDrop, rightCheckBox, selectedId, uncheckedShape, ...props }: ListBoxProps, ref: ForwardedRef<ListBoxHandle>): import("react/jsx-runtime").JSX.Element;
|
|
23
33
|
export declare const ListBox: (props: ListBoxProps & RefAttributes<ListBoxHandle>) => ReturnType<typeof ListBoxInner>;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { MouseEvent } from "react";
|
|
1
2
|
import { ListBoxGroup, ListBoxItem } from "./types";
|
|
3
|
+
import { NuDragDropItem } from "../../DragDrop";
|
|
2
4
|
type ListBoxGroupViewProps = {
|
|
3
5
|
group: ListBoxGroup;
|
|
4
6
|
groupIndex: number;
|
|
7
|
+
getDragItem?: (item: ListBoxItem, group: ListBoxGroup) => NuDragDropItem | false;
|
|
5
8
|
isItemChecked: (item: ListBoxItem) => boolean;
|
|
6
9
|
listboxId: string;
|
|
7
10
|
onActivateItem: (item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
|
|
8
11
|
onDoubleClickItem?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
12
|
+
onItemDragOut?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
13
|
+
onPopupMenuItem?: (event: MouseEvent<HTMLDivElement>, item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
|
|
9
14
|
onToggleItemCheck: (itemId: string) => void;
|
|
10
15
|
registerItemRef: (itemId: string, node: HTMLDivElement | null) => void;
|
|
11
16
|
resolvedActiveId: string | null;
|
|
@@ -13,5 +18,5 @@ type ListBoxGroupViewProps = {
|
|
|
13
18
|
selectedId?: string;
|
|
14
19
|
uncheckedShape: "box" | "none";
|
|
15
20
|
};
|
|
16
|
-
export declare function ListBoxGroupView({ group, groupIndex, isItemChecked, listboxId, onActivateItem, onDoubleClickItem, onToggleItemCheck, registerItemRef, resolvedActiveId, rightCheckBox, selectedId, uncheckedShape }: ListBoxGroupViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ListBoxGroupView({ group, groupIndex, getDragItem, isItemChecked, listboxId, onActivateItem, onDoubleClickItem, onItemDragOut, onPopupMenuItem, onToggleItemCheck, registerItemRef, resolvedActiveId, rightCheckBox, selectedId, uncheckedShape }: ListBoxGroupViewProps): import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
import { NuDragDropItem } from "../../DragDrop";
|
|
1
3
|
import { ListBoxGroup, ListBoxItem } from "./types";
|
|
2
4
|
type ListBoxItemViewProps = {
|
|
3
5
|
group: ListBoxGroup;
|
|
6
|
+
getDragItem?: (item: ListBoxItem, group: ListBoxGroup) => NuDragDropItem | false;
|
|
4
7
|
isActive: boolean;
|
|
5
8
|
isChecked: boolean;
|
|
6
9
|
isSelected: boolean;
|
|
@@ -8,11 +11,13 @@ type ListBoxItemViewProps = {
|
|
|
8
11
|
itemId: string;
|
|
9
12
|
onActivate: (item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
|
|
10
13
|
onDoubleClick?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
14
|
+
onDragOut?: (item: ListBoxItem, group: ListBoxGroup) => void;
|
|
15
|
+
onPopupMenu?: (event: MouseEvent<HTMLDivElement>, item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
|
|
11
16
|
onToggleCheck: (itemId: string) => void;
|
|
12
17
|
registerItemRef: (itemId: string, node: HTMLDivElement | null) => void;
|
|
13
18
|
rightCheckBox: boolean;
|
|
14
19
|
uncheckedShape: "box" | "none";
|
|
15
20
|
};
|
|
16
|
-
declare function ListBoxItemViewInner({ group, isActive, isChecked, isSelected, item, itemId, onActivate, onDoubleClick, onToggleCheck, registerItemRef, rightCheckBox, uncheckedShape }: ListBoxItemViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ListBoxItemViewInner({ group, getDragItem, isActive, isChecked, isSelected, item, itemId, onActivate, onPopupMenu, onDoubleClick, onDragOut, onToggleCheck, registerItemRef, rightCheckBox, uncheckedShape }: ListBoxItemViewProps): import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
export declare const ListBoxItemView: import("react").MemoExoticComponent<typeof ListBoxItemViewInner>;
|
|
18
23
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ForwardedRef, HTMLAttributes, RefAttributes } from "react";
|
|
2
|
-
import { TreeListColumn, TreeListGetCellContent, TreeListItemBase } from "./internals/types";
|
|
1
|
+
import { ForwardedRef, HTMLAttributes, MouseEvent, RefAttributes } from "react";
|
|
2
|
+
import { TreeListColumn, TreeListCellContext, TreeListGetCellContent, TreeListItemBase } from "./internals/types";
|
|
3
|
+
import { NuDragDropContext, NuDragDropItem } from "../DragDrop";
|
|
3
4
|
export type { TreeListCellContext, TreeListColumn, TreeListGetCellContent, TreeListItemBase } from "./internals/types";
|
|
4
5
|
export type TreeListViewHandle = {
|
|
5
6
|
activateItem: (itemId: string) => void;
|
|
@@ -10,9 +11,12 @@ export type TreeListViewHandle = {
|
|
|
10
11
|
scrollToItem: (itemId: string) => void;
|
|
11
12
|
toggleItemCheck: (itemId: string) => void;
|
|
12
13
|
};
|
|
13
|
-
export type TreeListViewProps<T extends TreeListItemBase<T>> = Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
14
|
+
export type TreeListViewProps<T extends TreeListItemBase<T>> = Omit<HTMLAttributes<HTMLDivElement>, "onDrop" | "onSelect"> & {
|
|
15
|
+
/** Decides whether this tree can receive a shared drag item. */
|
|
16
|
+
acceptsDrop?: (item: NuDragDropItem) => boolean;
|
|
14
17
|
activeItemId?: string;
|
|
15
18
|
checkedIds?: string[];
|
|
19
|
+
onPopupMenu?: (event: MouseEvent<HTMLDivElement>, item: T, context: TreeListCellContext<T>) => void;
|
|
16
20
|
columns: TreeListColumn<T>[];
|
|
17
21
|
data: T[];
|
|
18
22
|
dataVersion?: number;
|
|
@@ -20,14 +24,20 @@ export type TreeListViewProps<T extends TreeListItemBase<T>> = Omit<HTMLAttribut
|
|
|
20
24
|
defaultExpandedIds?: string[];
|
|
21
25
|
emptyText?: string;
|
|
22
26
|
expandedIds?: string[];
|
|
27
|
+
/** Returns the shared drag item for a row, or false to keep it static. */
|
|
28
|
+
getDragItem?: (item: T, context: TreeListCellContext<T>) => NuDragDropItem | false;
|
|
23
29
|
getCellContent?: TreeListGetCellContent<T>;
|
|
24
30
|
onActiveItemChange?: (item: T) => void;
|
|
25
31
|
onExpandedIdsChange?: (expandedIds: string[]) => void;
|
|
26
32
|
onItemCheckChange?: (item: T, checked: boolean) => void;
|
|
27
33
|
onItemDoubleClick?: (item: T) => void;
|
|
34
|
+
/** Called after this tree row was accepted by a different shared drop target. */
|
|
35
|
+
onItemDragOut?: (item: T, context: TreeListCellContext<T>) => void;
|
|
28
36
|
onItemSelect?: (item: T) => void;
|
|
37
|
+
/** Receives a shared drag item. Return false to reject it. */
|
|
38
|
+
onDrop?: (item: NuDragDropItem, context: NuDragDropContext) => boolean | void;
|
|
29
39
|
selectedId?: string;
|
|
30
40
|
uncheckedShape?: "box" | "none";
|
|
31
41
|
};
|
|
32
|
-
declare function TreeListViewInner<T extends TreeListItemBase<T>>({ activeItemId: activeItemIdProp, checkedIds, className, columns, data, dataVersion, defaultActiveItemId, defaultExpandedIds, emptyText, expandedIds, getCellContent, onActiveItemChange, onExpandedIdsChange, onItemCheckChange, onItemDoubleClick, onItemSelect, selectedId, uncheckedShape, ...props }: TreeListViewProps<T>, ref: ForwardedRef<TreeListViewHandle>): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare function TreeListViewInner<T extends TreeListItemBase<T>>({ acceptsDrop, activeItemId: activeItemIdProp, checkedIds, className, columns, onPopupMenu, data, dataVersion, defaultActiveItemId, defaultExpandedIds, emptyText, expandedIds, getDragItem, getCellContent, onActiveItemChange, onExpandedIdsChange, onItemCheckChange, onItemDoubleClick, onItemDragOut, onItemSelect, onDrop, selectedId, uncheckedShape, ...props }: TreeListViewProps<T>, ref: ForwardedRef<TreeListViewHandle>): import("react/jsx-runtime").JSX.Element;
|
|
33
43
|
export declare const TreeListView: <T extends TreeListItemBase<T>>(props: TreeListViewProps<T> & RefAttributes<TreeListViewHandle>) => ReturnType<typeof TreeListViewInner>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
import { NuDragDropItem } from "../../DragDrop";
|
|
3
|
+
import { TreeListCellContext, TreeListColumn, TreeListGetCellContent, TreeListItemBase } from "./types";
|
|
2
4
|
type TreeListViewRowProps<T extends TreeListItemBase<T>> = {
|
|
3
5
|
activeItemId: string | null;
|
|
4
6
|
checkedIds?: string[];
|
|
@@ -6,12 +8,15 @@ type TreeListViewRowProps<T extends TreeListItemBase<T>> = {
|
|
|
6
8
|
depth: number;
|
|
7
9
|
expandedIdSet: Set<string>;
|
|
8
10
|
getCellContent?: TreeListGetCellContent<T>;
|
|
11
|
+
getDragItem?: (item: T, context: TreeListCellContext<T>) => NuDragDropItem | false;
|
|
9
12
|
guideMask: boolean[];
|
|
10
13
|
guideOffsets: number[];
|
|
11
14
|
hasNextSibling: boolean;
|
|
12
15
|
item: T;
|
|
13
16
|
onActivateItem: (item: T, itemId: string) => void;
|
|
14
17
|
onDoubleClickItem?: (item: T) => void;
|
|
18
|
+
onItemDragOut?: (item: T, context: TreeListCellContext<T>) => void;
|
|
19
|
+
onPopupMenuItem?: (event: MouseEvent<HTMLDivElement>, item: T, context: TreeListCellContext<T>) => void;
|
|
15
20
|
onToggleItemCheck?: (item: T, checked: boolean) => void;
|
|
16
21
|
onToggleItemExpanded: (item: T, expanded: boolean) => void;
|
|
17
22
|
originOffset: number;
|
|
@@ -23,6 +28,6 @@ type TreeListViewRowProps<T extends TreeListItemBase<T>> = {
|
|
|
23
28
|
treeId: string;
|
|
24
29
|
uncheckedShape: "box" | "none";
|
|
25
30
|
};
|
|
26
|
-
declare function TreeListViewRowInner<T extends TreeListItemBase<T>>({ activeItemId, checkedIds, columns, depth, expandedIdSet, getCellContent, guideMask, guideOffsets, hasNextSibling, item, onActivateItem, onDoubleClickItem, onToggleItemCheck, onToggleItemExpanded, originOffset, registerItemRef, rowIndexMap, selectedItemId, templateColumns, treeColumnId, treeId, uncheckedShape }: TreeListViewRowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function TreeListViewRowInner<T extends TreeListItemBase<T>>({ activeItemId, checkedIds, columns, depth, expandedIdSet, getCellContent, getDragItem, guideMask, guideOffsets, hasNextSibling, item, onActivateItem, onDoubleClickItem, onItemDragOut, onPopupMenuItem, onToggleItemCheck, onToggleItemExpanded, originOffset, registerItemRef, rowIndexMap, selectedItemId, templateColumns, treeColumnId, treeId, uncheckedShape }: TreeListViewRowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
27
32
|
export declare const TreeListViewRow: typeof TreeListViewRowInner;
|
|
28
33
|
export {};
|