@anymux/ui-kit 0.1.0
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/dist/ExplorerLayout-CSIJd7N4.js +105 -0
- package/dist/ExplorerLayout-CSIJd7N4.js.map +1 -0
- package/dist/FileBrowserContext-B6jixa2j.js +11 -0
- package/dist/FileBrowserContext-B6jixa2j.js.map +1 -0
- package/dist/calendar-DSlrbHoj.js +761 -0
- package/dist/calendar-DSlrbHoj.js.map +1 -0
- package/dist/calendar.d.ts +3 -0
- package/dist/calendar.js +3 -0
- package/dist/contacts-DQXTZzHc.js +539 -0
- package/dist/contacts-DQXTZzHc.js.map +1 -0
- package/dist/contacts.d.ts +3 -0
- package/dist/contacts.js +3 -0
- package/dist/file-browser-m5atC3kF.js +6755 -0
- package/dist/file-browser-m5atC3kF.js.map +1 -0
- package/dist/file-browser.d.ts +11 -0
- package/dist/file-browser.js +9 -0
- package/dist/git-B55e6LL-.js +561 -0
- package/dist/git-B55e6LL-.js.map +1 -0
- package/dist/git.d.ts +2 -0
- package/dist/git.js +3 -0
- package/dist/iconMap-V4B8P-Uh.js +206 -0
- package/dist/iconMap-V4B8P-Uh.js.map +1 -0
- package/dist/icons-CIsIOZXR.js +0 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +4 -0
- package/dist/index-BNmNIWBL.d.ts +71 -0
- package/dist/index-BNmNIWBL.d.ts.map +1 -0
- package/dist/index-Bryv_GCG.d.ts +1481 -0
- package/dist/index-Bryv_GCG.d.ts.map +1 -0
- package/dist/index-CuQIjSXs.d.ts +134 -0
- package/dist/index-CuQIjSXs.d.ts.map +1 -0
- package/dist/index-DSu19mq0.d.ts +153 -0
- package/dist/index-DSu19mq0.d.ts.map +1 -0
- package/dist/index-DmsyeHFr.d.ts +149 -0
- package/dist/index-DmsyeHFr.d.ts.map +1 -0
- package/dist/index-DxnJ8FYM.d.ts +17 -0
- package/dist/index-DxnJ8FYM.d.ts.map +1 -0
- package/dist/index-DzfY1Tok.d.ts +32 -0
- package/dist/index-DzfY1Tok.d.ts.map +1 -0
- package/dist/index-Ml_SgiKa.d.ts +1847 -0
- package/dist/index-Ml_SgiKa.d.ts.map +1 -0
- package/dist/index-kHr9udZD.d.ts +1025 -0
- package/dist/index-kHr9udZD.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +15 -0
- package/dist/layout-Ca_4r8ka.js +89 -0
- package/dist/layout-Ca_4r8ka.js.map +1 -0
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +5 -0
- package/dist/list-CxfT6hix.js +6831 -0
- package/dist/list-CxfT6hix.js.map +1 -0
- package/dist/list.d.ts +2 -0
- package/dist/list.js +5 -0
- package/dist/media-DZ292aKK.js +557 -0
- package/dist/media-DZ292aKK.js.map +1 -0
- package/dist/media.d.ts +3 -0
- package/dist/media.js +3 -0
- package/dist/tree-Dd9Z0Aso.js +3351 -0
- package/dist/tree-Dd9Z0Aso.js.map +1 -0
- package/dist/tree.d.ts +2 -0
- package/dist/tree.js +6 -0
- package/dist/types-common-CB3kRek8.d.ts +26 -0
- package/dist/types-common-CB3kRek8.d.ts.map +1 -0
- package/dist/utils-B4fdKKsy.js +3 -0
- package/package.json +109 -0
- package/src/calendar/AgendaView.tsx +37 -0
- package/src/calendar/CalendarBrowser.tsx +90 -0
- package/src/calendar/CalendarModel.ts +142 -0
- package/src/calendar/CalendarSidebar.tsx +81 -0
- package/src/calendar/DayView.tsx +76 -0
- package/src/calendar/EventCard.tsx +51 -0
- package/src/calendar/MockCalendarProvider.ts +98 -0
- package/src/calendar/MonthView.tsx +77 -0
- package/src/calendar/WeekView.tsx +129 -0
- package/src/calendar/index.ts +18 -0
- package/src/calendar/types.ts +25 -0
- package/src/contacts/ContactAvatar.tsx +35 -0
- package/src/contacts/ContactBrowser.tsx +56 -0
- package/src/contacts/ContactCard.tsx +37 -0
- package/src/contacts/ContactDetail.tsx +63 -0
- package/src/contacts/ContactGroupSidebar.tsx +40 -0
- package/src/contacts/ContactList.tsx +32 -0
- package/src/contacts/ContactListModel.ts +120 -0
- package/src/contacts/MockContactProvider.ts +77 -0
- package/src/contacts/index.ts +17 -0
- package/src/contacts/types.ts +26 -0
- package/src/demos/CalendarBrowserDemo.tsx +15 -0
- package/src/demos/ContactBrowserDemo.tsx +15 -0
- package/src/demos/MediaBrowserDemo.tsx +15 -0
- package/src/file-browser/adapters/DocumentViewerAdapter.ts +371 -0
- package/src/file-browser/adapters/FileSystemBridge.ts +168 -0
- package/src/file-browser/adapters/GitBrowserAdapter.ts +546 -0
- package/src/file-browser/adapters/README.md +504 -0
- package/src/file-browser/adapters/index.ts +27 -0
- package/src/file-browser/adapters/types.ts +70 -0
- package/src/file-browser/architecture.md +645 -0
- package/src/file-browser/components/CreateItemDialog.tsx +71 -0
- package/src/file-browser/components/DeleteConfirmDialog.tsx +58 -0
- package/src/file-browser/components/FileBrowser.tsx +473 -0
- package/src/file-browser/components/FileBrowserContent.tsx +209 -0
- package/src/file-browser/components/FileBrowserHeader.tsx +151 -0
- package/src/file-browser/components/FileBrowserToolbar.tsx +145 -0
- package/src/file-browser/components/LeftPanel/LeftPanel.tsx +103 -0
- package/src/file-browser/components/LeftPanel/LeftPanelTabs.tsx +70 -0
- package/src/file-browser/components/LeftPanel/TreeNavigationView.tsx +256 -0
- package/src/file-browser/components/PreviewPane.tsx +146 -0
- package/src/file-browser/components/RightPanel/FilePreview.tsx +219 -0
- package/src/file-browser/components/RightPanel/RightPanel.tsx +186 -0
- package/src/file-browser/components/RightPanel/RightPanelToolbar.tsx +113 -0
- package/src/file-browser/components/UploadProgress.tsx +123 -0
- package/src/file-browser/components/ViewerHost.tsx +208 -0
- package/src/file-browser/components/mobile/MobileNavigation.tsx +227 -0
- package/src/file-browser/components/navigation/NavigationButtons.tsx +171 -0
- package/src/file-browser/components/shared/ErrorBoundary.tsx +116 -0
- package/src/file-browser/components/shared/FileBrowserItem.tsx +195 -0
- package/src/file-browser/components/shared/FileIcon.tsx +169 -0
- package/src/file-browser/components/toolbar/ViewModeToggle.tsx +200 -0
- package/src/file-browser/components/views/ListView/ListView.tsx +484 -0
- package/src/file-browser/components/views/ThumbnailView/ThumbnailView.tsx +323 -0
- package/src/file-browser/components/views/TreeView/TreeNode.tsx +186 -0
- package/src/file-browser/components/views/TreeView/TreeNodeList.tsx +191 -0
- package/src/file-browser/components/views/TreeView/TreeView.tsx +200 -0
- package/src/file-browser/components/views/TreemapView/TreemapView.tsx +339 -0
- package/src/file-browser/context/FileBrowserContext.tsx +13 -0
- package/src/file-browser/examples/BasicUsage.tsx +20 -0
- package/src/file-browser/index.ts +98 -0
- package/src/file-browser/models/FileBrowserModel.ts +623 -0
- package/src/file-browser/models/LeftPanelManagerModel.ts +105 -0
- package/src/file-browser/models/NavigationManagerModel.ts +312 -0
- package/src/file-browser/models/ResponsiveLayoutManagerModel.ts +437 -0
- package/src/file-browser/models/RightPanelManagerModel.ts +190 -0
- package/src/file-browser/models/SelectionManagerModel.ts +252 -0
- package/src/file-browser/models/ToolbarManagerModel.ts +144 -0
- package/src/file-browser/models/UploadModel.ts +147 -0
- package/src/file-browser/models/ViewModeManagerModel.ts +185 -0
- package/src/file-browser/models/ViewerHostModel.ts +44 -0
- package/src/file-browser/models/ui/ListViewUIModel.ts +265 -0
- package/src/file-browser/models/ui/PreviewUIModel.ts +297 -0
- package/src/file-browser/models/ui/ThumbnailViewUIModel.ts +254 -0
- package/src/file-browser/models/ui/TreeViewUIModel.ts +128 -0
- package/src/file-browser/models/ui/TreemapViewUIModel.ts +350 -0
- package/src/file-browser/providers/FileSystemListProvider.ts +552 -0
- package/src/file-browser/providers/FileSystemProvider.ts +401 -0
- package/src/file-browser/providers/FileSystemTreeProvider.ts +231 -0
- package/src/file-browser/providers/GitProvider.ts +337 -0
- package/src/file-browser/providers/GitRepositoryProvider.ts +376 -0
- package/src/file-browser/providers/IFileBrowserProvider.ts +56 -0
- package/src/file-browser/providers/MemoryProvider.ts +303 -0
- package/src/file-browser/providers/index.ts +4 -0
- package/src/file-browser/registry/ViewerRegistry.ts +551 -0
- package/src/file-browser/registry/types.ts +144 -0
- package/src/file-browser/scripts/performanceBenchmark.ts +553 -0
- package/src/file-browser/services/ThumbnailCacheService.ts +128 -0
- package/src/file-browser/tasks.md +537 -0
- package/src/file-browser/types/FileBrowserTypes.ts +126 -0
- package/src/file-browser/types/ProviderTypes.ts +155 -0
- package/src/file-browser/types/UITypes.ts +235 -0
- package/src/file-browser/types/ViewModeTypes.ts +150 -0
- package/src/file-browser/utils/gestures.ts +327 -0
- package/src/file-browser/utils/performance.ts +563 -0
- package/src/file-browser/viewers/ImageViewer.tsx +163 -0
- package/src/file-browser/viewers/ImageViewerModel.ts +79 -0
- package/src/file-browser/viewers/TextViewer.tsx +95 -0
- package/src/file-browser/viewers/UnsupportedFileViewer.tsx +57 -0
- package/src/file-browser/viewers/index.ts +61 -0
- package/src/git/BranchList.tsx +128 -0
- package/src/git/CommitGraph.tsx +239 -0
- package/src/git/CommitList.tsx +258 -0
- package/src/git/DiffViewer.tsx +219 -0
- package/src/git/index.ts +4 -0
- package/src/icons/iconMap.ts +146 -0
- package/src/icons/index.ts +9 -0
- package/src/index.ts +13 -0
- package/src/layout/README.md +307 -0
- package/src/layout/components/ExplorerLayout/ExplorerLayout.tsx +178 -0
- package/src/layout/examples/SimpleExample.tsx +60 -0
- package/src/layout/index.ts +6 -0
- package/src/lib/utils.ts +1 -0
- package/src/list/README.md +303 -0
- package/src/list/architecture.md +807 -0
- package/src/list/components/CalculatedGridView.tsx +252 -0
- package/src/list/components/DragPreview.tsx +102 -0
- package/src/list/components/ListContextMenu.tsx +274 -0
- package/src/list/components/ListItem.tsx +761 -0
- package/src/list/components/ListItems.tsx +919 -0
- package/src/list/components/MasonryView.tsx +241 -0
- package/src/list/components/SearchFilter.tsx +44 -0
- package/src/list/components/TreemapView.tsx +709 -0
- package/src/list/components/ViewSizeControls.tsx +205 -0
- package/src/list/components/ViewTypeSelector.tsx +312 -0
- package/src/list/components/VirtualizedDetailsView.tsx +231 -0
- package/src/list/components/VirtualizedGrid.tsx +164 -0
- package/src/list/components/VirtualizedList.tsx +154 -0
- package/src/list/components/VirtualizedMasonryView.tsx +344 -0
- package/src/list/components/shared/EmptyState.tsx +103 -0
- package/src/list/components/shared/ErrorBoundary.tsx +123 -0
- package/src/list/components/shared/ErrorDisplay.tsx +100 -0
- package/src/list/components/shared/ListLoader.tsx +146 -0
- package/src/list/components/shared/LoadingIndicator.tsx +80 -0
- package/src/list/index.ts +92 -0
- package/src/list/models/ListItemsModel.ts +1301 -0
- package/src/list/models/TreemapModel.ts +204 -0
- package/src/list/providers/ListItemsProvider.ts +313 -0
- package/src/list/providers/TestListProvider.ts +604 -0
- package/src/list/tasks.md +937 -0
- package/src/list/types/ListTypes.ts +178 -0
- package/src/list/utils/BenchmarkLogger.ts +243 -0
- package/src/list/utils/DragDropManager.ts +320 -0
- package/src/list/utils/GridLayoutCalculator.ts +290 -0
- package/src/list/utils/ListAccessibility.ts +367 -0
- package/src/list/utils/ListKeyboard.ts +414 -0
- package/src/list/utils/MasonryLayoutCalculator.ts +302 -0
- package/src/list/utils/MasonryLayoutEngine.ts +401 -0
- package/src/list/utils/__tests__/MasonryLayoutEngine.test.ts +157 -0
- package/src/list/utils/__tests__/VirtualizedMasonryView.test.tsx +251 -0
- package/src/media/AlbumSidebar.tsx +48 -0
- package/src/media/MediaBrowser.tsx +92 -0
- package/src/media/MediaBrowserModel.ts +138 -0
- package/src/media/MediaGrid.tsx +50 -0
- package/src/media/MediaList.tsx +49 -0
- package/src/media/MediaPreview.tsx +63 -0
- package/src/media/MediaTimeline.tsx +38 -0
- package/src/media/MockMediaProvider.ts +70 -0
- package/src/media/index.ts +18 -0
- package/src/media/types.ts +21 -0
- package/src/styles/variables.css +60 -0
- package/src/tree/DEVELOPMENT_SUMMARY.md +170 -0
- package/src/tree/__tests__/TreeModel.test.ts +16 -0
- package/src/tree/architecture.md +530 -0
- package/src/tree/components/Tree.tsx +283 -0
- package/src/tree/components/TreeCheckbox.tsx +147 -0
- package/src/tree/components/TreeContextMenu.tsx +139 -0
- package/src/tree/components/TreeNodeList.tsx +329 -0
- package/src/tree/components/TreeTable.tsx +382 -0
- package/src/tree/index.ts +58 -0
- package/src/tree/models/TreeModel.ts +839 -0
- package/src/tree/providers/SimpleTreeProvider.ts +463 -0
- package/src/tree/providers/TestTreeProvider.ts +946 -0
- package/src/tree/providers/TreeProvider.ts +308 -0
- package/src/tree/tasks.md +2046 -0
- package/src/tree/types/TreeTypes.ts +279 -0
- package/src/tree/utils/SelectionTheme.ts +150 -0
- package/src/tree/utils/logger.ts +203 -0
- package/src/types-common.ts +21 -0
|
@@ -0,0 +1,1025 @@
|
|
|
1
|
+
import React$1 from "react";
|
|
2
|
+
import * as mobx0 from "mobx";
|
|
3
|
+
import * as mobx1 from "mobx";
|
|
4
|
+
import * as mobx2 from "mobx";
|
|
5
|
+
import * as mobx3 from "mobx";
|
|
6
|
+
import * as mobx4 from "mobx";
|
|
7
|
+
import * as mobx5 from "mobx";
|
|
8
|
+
import * as mobx_dist_internal6 from "mobx/dist/internal";
|
|
9
|
+
import * as mobx_dist_internal7 from "mobx/dist/internal";
|
|
10
|
+
|
|
11
|
+
//#region src/tree/types/TreeTypes.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Core type definitions for TreeComponent
|
|
14
|
+
*
|
|
15
|
+
* These types define the fundamental data structures used throughout
|
|
16
|
+
* the tree component system, including node data, loading results,
|
|
17
|
+
* and configuration options.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Represents a single node in the tree structure
|
|
21
|
+
*
|
|
22
|
+
* This interface defines the core properties that every tree node must have,
|
|
23
|
+
* along with optional properties for enhanced functionality like lazy loading,
|
|
24
|
+
* custom styling, and metadata storage.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Core type definitions for TreeComponent
|
|
28
|
+
*
|
|
29
|
+
* These types define the fundamental data structures used throughout
|
|
30
|
+
* the tree component system, including node data, loading results,
|
|
31
|
+
* and configuration options.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Represents a single node in the tree structure
|
|
35
|
+
*
|
|
36
|
+
* This interface defines the core properties that every tree node must have,
|
|
37
|
+
* along with optional properties for enhanced functionality like lazy loading,
|
|
38
|
+
* custom styling, and metadata storage.
|
|
39
|
+
*/
|
|
40
|
+
interface TreeNodeData {
|
|
41
|
+
/** Unique identifier for the node */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Display name of the node */
|
|
44
|
+
name: string;
|
|
45
|
+
/** Full path or identifier for the node */
|
|
46
|
+
path: string;
|
|
47
|
+
/** Type of node (file, directory, custom types) */
|
|
48
|
+
type: 'file' | 'directory' | string;
|
|
49
|
+
/** Whether this node has children (for lazy loading) */
|
|
50
|
+
hasChildren?: boolean;
|
|
51
|
+
/** Child nodes (if loaded) */
|
|
52
|
+
children?: TreeNodeData[];
|
|
53
|
+
/** Custom metadata for the node */
|
|
54
|
+
metadata?: Record<string, any>;
|
|
55
|
+
/** Size in bytes (for files) */
|
|
56
|
+
size?: number;
|
|
57
|
+
/** Last modified date */
|
|
58
|
+
lastModified?: Date;
|
|
59
|
+
/** Custom icon identifier */
|
|
60
|
+
icon?: string;
|
|
61
|
+
/** Custom CSS class */
|
|
62
|
+
className?: string;
|
|
63
|
+
/** Whether the node is disabled */
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
/** Custom render data for this specific node */
|
|
66
|
+
renderData?: Record<string, any>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Result of loading tree nodes
|
|
70
|
+
*
|
|
71
|
+
* This interface defines what providers return when loading tree data,
|
|
72
|
+
* including the nodes themselves and metadata about the loading operation.
|
|
73
|
+
*/
|
|
74
|
+
interface TreeLoadResult {
|
|
75
|
+
/** The loaded nodes */
|
|
76
|
+
nodes: TreeNodeData[];
|
|
77
|
+
/** Whether there are more nodes to load */
|
|
78
|
+
hasMore?: boolean;
|
|
79
|
+
/** Total count of nodes (for virtual scrolling) */
|
|
80
|
+
totalCount?: number;
|
|
81
|
+
/** Any loading errors */
|
|
82
|
+
error?: Error;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Configuration options for loading tree data
|
|
86
|
+
*/
|
|
87
|
+
interface TreeLoadOptions {
|
|
88
|
+
/**
|
|
89
|
+
* Filter to apply when loading nodes
|
|
90
|
+
*/
|
|
91
|
+
filter?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether to force reload even if data is cached
|
|
94
|
+
*/
|
|
95
|
+
forceReload?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Maximum depth to load initially
|
|
98
|
+
*/
|
|
99
|
+
maxDepth?: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Context menu item definition
|
|
103
|
+
*/
|
|
104
|
+
interface TreeContextMenuItem {
|
|
105
|
+
/**
|
|
106
|
+
* Unique identifier for the menu item
|
|
107
|
+
*/
|
|
108
|
+
id: string;
|
|
109
|
+
/**
|
|
110
|
+
* Display label for the menu item
|
|
111
|
+
*/
|
|
112
|
+
label: string;
|
|
113
|
+
/**
|
|
114
|
+
* Optional icon for the menu item
|
|
115
|
+
*/
|
|
116
|
+
icon?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the menu item is disabled
|
|
119
|
+
*/
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether to show a separator after this item
|
|
123
|
+
*/
|
|
124
|
+
separator?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Type of menu item (for separators)
|
|
127
|
+
*/
|
|
128
|
+
type?: 'separator' | 'item';
|
|
129
|
+
/**
|
|
130
|
+
* Handler function for menu item clicks
|
|
131
|
+
*/
|
|
132
|
+
handler?: (node: TreeNodeData) => void;
|
|
133
|
+
/**
|
|
134
|
+
* Submenu items (for nested menus)
|
|
135
|
+
*/
|
|
136
|
+
submenu?: TreeContextMenuItem[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Context menu event data
|
|
140
|
+
*/
|
|
141
|
+
interface TreeContextMenuEvent {
|
|
142
|
+
/**
|
|
143
|
+
* The menu item that was clicked
|
|
144
|
+
*/
|
|
145
|
+
menuItem: TreeContextMenuItem;
|
|
146
|
+
/**
|
|
147
|
+
* The nodes that the context menu was triggered for
|
|
148
|
+
*/
|
|
149
|
+
nodes: TreeNodeData[];
|
|
150
|
+
/**
|
|
151
|
+
* The mouse event that triggered the menu
|
|
152
|
+
*/
|
|
153
|
+
originalEvent: MouseEvent;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Column configuration for table view display
|
|
157
|
+
*/
|
|
158
|
+
interface TreeTableColumn {
|
|
159
|
+
/** Unique identifier for the column */
|
|
160
|
+
id: string;
|
|
161
|
+
/** Display label for the column header */
|
|
162
|
+
label: string;
|
|
163
|
+
/** Property path in TreeNodeData to display (supports dot notation) */
|
|
164
|
+
dataKey: string;
|
|
165
|
+
/** Column width (CSS value) */
|
|
166
|
+
width?: string;
|
|
167
|
+
/** Minimum width (CSS value) */
|
|
168
|
+
minWidth?: string;
|
|
169
|
+
/** Column alignment */
|
|
170
|
+
align?: 'left' | 'center' | 'right';
|
|
171
|
+
/** Whether column is sortable */
|
|
172
|
+
sortable?: boolean;
|
|
173
|
+
/** Whether column is filterable */
|
|
174
|
+
filterable?: boolean;
|
|
175
|
+
/** Whether this column displays the tree hierarchy */
|
|
176
|
+
isTreeColumn?: boolean;
|
|
177
|
+
/** Custom CSS classes for the column */
|
|
178
|
+
className?: string;
|
|
179
|
+
/** Custom cell renderer function */
|
|
180
|
+
renderCell?: (value: any, node: TreeNodeData) => React.ReactNode;
|
|
181
|
+
/** Custom value formatter */
|
|
182
|
+
formatValue?: (value: any, node: TreeNodeData) => string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Sort configuration for table view
|
|
186
|
+
*/
|
|
187
|
+
interface TreeTableSort {
|
|
188
|
+
/** Column ID to sort by */
|
|
189
|
+
columnId: string;
|
|
190
|
+
/** Sort direction */
|
|
191
|
+
direction: 'asc' | 'desc';
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Export configuration for table view
|
|
195
|
+
*/
|
|
196
|
+
interface TreeTableExportOptions {
|
|
197
|
+
/** Export format */
|
|
198
|
+
format: 'csv' | 'json' | 'tsv';
|
|
199
|
+
/** Column IDs to include (empty = all columns) */
|
|
200
|
+
columns?: string[];
|
|
201
|
+
/** Whether to include hierarchy structure */
|
|
202
|
+
includeHierarchy?: boolean;
|
|
203
|
+
/** Whether to flatten nested data */
|
|
204
|
+
flatten?: boolean;
|
|
205
|
+
/** Custom filename for download */
|
|
206
|
+
filename?: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Selection theme color scheme
|
|
210
|
+
*/
|
|
211
|
+
type SelectionColorScheme = 'primary' | 'secondary' | 'accent' | 'custom';
|
|
212
|
+
/**
|
|
213
|
+
* Selection intensity levels
|
|
214
|
+
*/
|
|
215
|
+
type SelectionIntensity = 'subtle' | 'prominent' | 'high-contrast';
|
|
216
|
+
/**
|
|
217
|
+
* Focus indicator style
|
|
218
|
+
*/
|
|
219
|
+
type FocusIndicatorStyle = 'ring' | 'outline' | 'border' | 'underline';
|
|
220
|
+
/**
|
|
221
|
+
* Enhanced selection theme configuration
|
|
222
|
+
*/
|
|
223
|
+
interface TreeSelectionTheme {
|
|
224
|
+
/** Color scheme for selection highlighting */
|
|
225
|
+
colorScheme: SelectionColorScheme;
|
|
226
|
+
/** Selection intensity level */
|
|
227
|
+
intensity: SelectionIntensity;
|
|
228
|
+
/** Focus indicator style */
|
|
229
|
+
focusStyle: FocusIndicatorStyle;
|
|
230
|
+
/** Custom colors when using 'custom' color scheme */
|
|
231
|
+
customColors?: {
|
|
232
|
+
/** Background color for selected items */
|
|
233
|
+
background: string;
|
|
234
|
+
/** Text color for selected items */
|
|
235
|
+
foreground: string;
|
|
236
|
+
/** Border/focus color */
|
|
237
|
+
accent: string;
|
|
238
|
+
};
|
|
239
|
+
/** Whether to animate selection changes */
|
|
240
|
+
animated?: boolean;
|
|
241
|
+
/** Whether to show selection even when component loses focus */
|
|
242
|
+
persistSelection?: boolean;
|
|
243
|
+
} //#endregion
|
|
244
|
+
//#region src/tree/providers/TreeProvider.d.ts
|
|
245
|
+
|
|
246
|
+
//# sourceMappingURL=TreeTypes.d.ts.map
|
|
247
|
+
interface TreeNodeRenderer {
|
|
248
|
+
/** Render node as string (for non-React environments) */
|
|
249
|
+
renderText?(node: TreeNodeData): string;
|
|
250
|
+
/** Render node icon as string/identifier */
|
|
251
|
+
renderIcon?(node: TreeNodeData): string;
|
|
252
|
+
/** Get node display properties */
|
|
253
|
+
getDisplayProps?(node: TreeNodeData): {
|
|
254
|
+
className?: string;
|
|
255
|
+
style?: Record<string, string>;
|
|
256
|
+
title?: string;
|
|
257
|
+
ariaLabel?: string;
|
|
258
|
+
};
|
|
259
|
+
/** Custom React component for node (if in React environment) */
|
|
260
|
+
renderComponent?: React$1.ComponentType<{
|
|
261
|
+
node: TreeNodeData;
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
}>;
|
|
264
|
+
}
|
|
265
|
+
interface TreeDragDropInfo {
|
|
266
|
+
/** Source node being dragged */
|
|
267
|
+
sourceNode: TreeNodeData;
|
|
268
|
+
/** Target node being dropped on */
|
|
269
|
+
targetNode: TreeNodeData;
|
|
270
|
+
/** Drop position relative to target */
|
|
271
|
+
position: 'before' | 'after' | 'inside';
|
|
272
|
+
/** Additional drag data */
|
|
273
|
+
dragData?: any;
|
|
274
|
+
}
|
|
275
|
+
interface TreeSelectionInfo {
|
|
276
|
+
/** Selected nodes */
|
|
277
|
+
selectedNodes: TreeNodeData[];
|
|
278
|
+
/** Previously selected nodes */
|
|
279
|
+
previousSelection: TreeNodeData[];
|
|
280
|
+
/** Selection type */
|
|
281
|
+
selectionType: 'single' | 'multi' | 'range';
|
|
282
|
+
/** Selection trigger */
|
|
283
|
+
trigger: 'click' | 'keyboard' | 'api';
|
|
284
|
+
}
|
|
285
|
+
interface TreeProvider {
|
|
286
|
+
/** Provider identifier */
|
|
287
|
+
readonly id: string;
|
|
288
|
+
/** Human-readable name */
|
|
289
|
+
readonly name: string;
|
|
290
|
+
/** Provider version */
|
|
291
|
+
readonly version: string;
|
|
292
|
+
/**
|
|
293
|
+
* Whether multi-selection is enabled
|
|
294
|
+
*/
|
|
295
|
+
isMultiSelectEnabled: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Whether drag and drop is enabled
|
|
298
|
+
*/
|
|
299
|
+
readonly isDragDropEnabled: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Whether virtualization is enabled for large trees
|
|
302
|
+
*/
|
|
303
|
+
readonly isVirtualizationEnabled: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Whether to use checkbox-based selection instead of highlight selection
|
|
306
|
+
*/
|
|
307
|
+
readonly useCheckboxSelection?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Whether to allow partial (indeterminate) checkbox selection for parent nodes
|
|
310
|
+
*/
|
|
311
|
+
readonly allowPartialSelection?: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* Whether table view is enabled for this provider
|
|
314
|
+
*/
|
|
315
|
+
readonly isTableViewEnabled?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Get virtualization configuration
|
|
318
|
+
*/
|
|
319
|
+
getVirtualizationConfig?(): {
|
|
320
|
+
itemHeight: number;
|
|
321
|
+
overscan: number;
|
|
322
|
+
threshold: number;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Get table column configuration for table view
|
|
326
|
+
*/
|
|
327
|
+
getTableColumns?(): TreeTableColumn[];
|
|
328
|
+
/**
|
|
329
|
+
* Get default sort configuration for table view
|
|
330
|
+
*/
|
|
331
|
+
getDefaultTableSort?(): TreeTableSort | null;
|
|
332
|
+
/**
|
|
333
|
+
* Get selection theme configuration
|
|
334
|
+
*/
|
|
335
|
+
getSelectionTheme?(): TreeSelectionTheme;
|
|
336
|
+
/**
|
|
337
|
+
* Load tree nodes
|
|
338
|
+
* @param options Loading options
|
|
339
|
+
* @returns Promise resolving to loaded nodes
|
|
340
|
+
*/
|
|
341
|
+
loadNodes(options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
342
|
+
/**
|
|
343
|
+
* Load children for a specific node
|
|
344
|
+
* @param node Parent node
|
|
345
|
+
* @param options Loading options
|
|
346
|
+
* @returns Promise resolving to child nodes
|
|
347
|
+
*/
|
|
348
|
+
loadChildren(node: TreeNodeData, options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
349
|
+
/**
|
|
350
|
+
* Refresh/reload nodes
|
|
351
|
+
* @param path Specific path to refresh (optional)
|
|
352
|
+
* @returns Promise resolving to refreshed nodes
|
|
353
|
+
*/
|
|
354
|
+
refresh(path?: string): Promise<TreeLoadResult>;
|
|
355
|
+
/**
|
|
356
|
+
* Search nodes
|
|
357
|
+
* @param query Search query
|
|
358
|
+
* @param options Search options
|
|
359
|
+
* @returns Promise resolving to search results
|
|
360
|
+
*/
|
|
361
|
+
search?(query: string, options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
362
|
+
/**
|
|
363
|
+
* Get context menu items for a specific node
|
|
364
|
+
* @param node Target node
|
|
365
|
+
* @returns Array of context menu items
|
|
366
|
+
*/
|
|
367
|
+
getNodeContextMenu?(node: TreeNodeData): TreeContextMenuItem[];
|
|
368
|
+
/**
|
|
369
|
+
* Get context menu items for multiple selected nodes
|
|
370
|
+
* @param nodes Selected nodes
|
|
371
|
+
* @returns Array of context menu items
|
|
372
|
+
*/
|
|
373
|
+
getMultiNodeContextMenu?(nodes: TreeNodeData[]): TreeContextMenuItem[];
|
|
374
|
+
/**
|
|
375
|
+
* Get context menu items for empty space (no node)
|
|
376
|
+
* @param parentNode Parent node where right-click occurred
|
|
377
|
+
* @returns Array of context menu items
|
|
378
|
+
*/
|
|
379
|
+
getEmptySpaceContextMenu?(parentNode?: TreeNodeData): TreeContextMenuItem[];
|
|
380
|
+
/**
|
|
381
|
+
* Get custom renderer for a specific node
|
|
382
|
+
* @param node Target node
|
|
383
|
+
* @returns Node renderer or null for default rendering
|
|
384
|
+
*/
|
|
385
|
+
getNodeRenderer?(node: TreeNodeData): TreeNodeRenderer | null;
|
|
386
|
+
/**
|
|
387
|
+
* Get default renderer for all nodes of this provider
|
|
388
|
+
* @returns Default node renderer
|
|
389
|
+
*/
|
|
390
|
+
getDefaultRenderer?(): TreeNodeRenderer;
|
|
391
|
+
/**
|
|
392
|
+
* Get custom icon for a node
|
|
393
|
+
* @param node Target node
|
|
394
|
+
* @returns Icon identifier or component
|
|
395
|
+
*/
|
|
396
|
+
getNodeIcon?(node: TreeNodeData): string | React$1.ComponentType<any>;
|
|
397
|
+
/**
|
|
398
|
+
* Check if a node can be expanded
|
|
399
|
+
* @param node Target node
|
|
400
|
+
* @returns Whether node can be expanded
|
|
401
|
+
*/
|
|
402
|
+
canExpand?(node: TreeNodeData): boolean;
|
|
403
|
+
/**
|
|
404
|
+
* Check if a node can be selected
|
|
405
|
+
* @param node Target node
|
|
406
|
+
* @returns Whether node can be selected
|
|
407
|
+
*/
|
|
408
|
+
canSelect?(node: TreeNodeData): boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Check if nodes can be dragged
|
|
411
|
+
* @param nodes Nodes to check
|
|
412
|
+
* @returns Whether nodes can be dragged
|
|
413
|
+
*/
|
|
414
|
+
canDrag?(nodes: TreeNodeData[]): boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Check if a drop operation is allowed
|
|
417
|
+
* @param dragInfo Drag and drop information
|
|
418
|
+
* @returns Whether drop is allowed
|
|
419
|
+
*/
|
|
420
|
+
canDrop?(dragInfo: TreeDragDropInfo): boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Called when node selection changes
|
|
423
|
+
* @param selectionInfo Selection information
|
|
424
|
+
*/
|
|
425
|
+
onSelectionChange?(selectionInfo: TreeSelectionInfo): void;
|
|
426
|
+
/**
|
|
427
|
+
* Called when a node is expanded or collapsed
|
|
428
|
+
* @param node Target node
|
|
429
|
+
* @param expanded New expansion state
|
|
430
|
+
*/
|
|
431
|
+
onNodeExpansion?(node: TreeNodeData, expanded: boolean): void;
|
|
432
|
+
/**
|
|
433
|
+
* Called when a node is double-clicked
|
|
434
|
+
* @param node Target node
|
|
435
|
+
*/
|
|
436
|
+
onNodeDoubleClick?(node: TreeNodeData): void;
|
|
437
|
+
/**
|
|
438
|
+
* Called when a drag and drop operation completes
|
|
439
|
+
* @param dragInfo Drag and drop information
|
|
440
|
+
* @returns Promise resolving when operation is complete
|
|
441
|
+
*/
|
|
442
|
+
onDragDrop?(dragInfo: TreeDragDropInfo): Promise<void>;
|
|
443
|
+
/**
|
|
444
|
+
* Called when a context menu item is selected
|
|
445
|
+
* @param menuItemId Menu item identifier
|
|
446
|
+
* @param node Target node (or nodes for multi-selection)
|
|
447
|
+
*/
|
|
448
|
+
onContextMenuAction?(menuItemId: string, nodes: TreeNodeData[]): void;
|
|
449
|
+
/**
|
|
450
|
+
* Called when a node is focused
|
|
451
|
+
* @param node Target node or null if focus lost
|
|
452
|
+
*/
|
|
453
|
+
onNodeFocus?(node: TreeNodeData | null): void;
|
|
454
|
+
/**
|
|
455
|
+
* Called when table sort changes
|
|
456
|
+
* @param sort New sort configuration
|
|
457
|
+
*/
|
|
458
|
+
onTableSort?(sort: TreeTableSort | null): void;
|
|
459
|
+
/**
|
|
460
|
+
* Called when table data export is requested
|
|
461
|
+
* @param options Export configuration
|
|
462
|
+
* @returns Promise resolving to exported data or download trigger
|
|
463
|
+
*/
|
|
464
|
+
onTableExport?(options: TreeTableExportOptions): Promise<string | void>;
|
|
465
|
+
/**
|
|
466
|
+
* Initialize the provider
|
|
467
|
+
* @returns Promise resolving when initialization is complete
|
|
468
|
+
*/
|
|
469
|
+
initialize?(): Promise<void>;
|
|
470
|
+
/**
|
|
471
|
+
* Cleanup provider resources
|
|
472
|
+
*/
|
|
473
|
+
dispose?(): void;
|
|
474
|
+
/**
|
|
475
|
+
* Provider-specific configuration
|
|
476
|
+
*/
|
|
477
|
+
readonly config?: Record<string, any>;
|
|
478
|
+
} //#endregion
|
|
479
|
+
//#region src/tree/providers/TestTreeProvider.d.ts
|
|
480
|
+
|
|
481
|
+
//# sourceMappingURL=TreeProvider.d.ts.map
|
|
482
|
+
declare class TestTreeProvider implements TreeProvider {
|
|
483
|
+
readonly id = "test-tree-provider";
|
|
484
|
+
readonly name = "Test Tree Provider";
|
|
485
|
+
readonly version = "1.0.0";
|
|
486
|
+
isMultiSelectEnabled: boolean;
|
|
487
|
+
readonly isDragDropEnabled = false;
|
|
488
|
+
readonly isVirtualizationEnabled = false;
|
|
489
|
+
readonly isTableViewEnabled = true;
|
|
490
|
+
useCheckboxSelection: boolean;
|
|
491
|
+
readonly allowPartialSelection = true;
|
|
492
|
+
readonly config: {};
|
|
493
|
+
selectionTheme: TreeSelectionTheme;
|
|
494
|
+
slowLoading: boolean;
|
|
495
|
+
simulateErrors: boolean;
|
|
496
|
+
maxDepth: number;
|
|
497
|
+
nodesPerLevel: number;
|
|
498
|
+
loadingDelay: number;
|
|
499
|
+
onSelectionChange?: (selectionInfo: TreeSelectionInfo) => void;
|
|
500
|
+
onNodeExpansion?: (node: TreeNodeData, isExpanded: boolean) => void;
|
|
501
|
+
onNodeFocus?: (node: TreeNodeData | null) => void;
|
|
502
|
+
constructor();
|
|
503
|
+
/**
|
|
504
|
+
* Update selection theme reactively
|
|
505
|
+
*/
|
|
506
|
+
updateSelectionTheme: (theme: Partial<TreeSelectionTheme>) => void;
|
|
507
|
+
/**
|
|
508
|
+
* Update multi-select setting
|
|
509
|
+
*/
|
|
510
|
+
setMultiSelectEnabled: (enabled: boolean) => void;
|
|
511
|
+
/**
|
|
512
|
+
* Update checkbox selection setting
|
|
513
|
+
*/
|
|
514
|
+
setCheckboxSelection: (enabled: boolean) => void;
|
|
515
|
+
/**
|
|
516
|
+
* Get selection theme configuration
|
|
517
|
+
*/
|
|
518
|
+
getSelectionTheme(): TreeSelectionTheme;
|
|
519
|
+
/**
|
|
520
|
+
* Load tree nodes
|
|
521
|
+
*/
|
|
522
|
+
loadNodes(options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
523
|
+
/**
|
|
524
|
+
* Load child nodes for a given parent
|
|
525
|
+
*/
|
|
526
|
+
loadChildren(node: TreeNodeData, options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
527
|
+
/**
|
|
528
|
+
* Refresh tree data
|
|
529
|
+
*/
|
|
530
|
+
refresh(path?: string): Promise<TreeLoadResult>;
|
|
531
|
+
canExpand(node: TreeNodeData): boolean;
|
|
532
|
+
canSelect(node: TreeNodeData): boolean;
|
|
533
|
+
getNodeContextMenu(node: TreeNodeData): TreeContextMenuItem[];
|
|
534
|
+
getMultiNodeContextMenu(nodes: TreeNodeData[]): TreeContextMenuItem[];
|
|
535
|
+
onContextMenuAction(menuItemId: string, nodes: TreeNodeData[]): void;
|
|
536
|
+
getTableColumns(): TreeTableColumn[];
|
|
537
|
+
getDefaultTableSort(): TreeTableSort;
|
|
538
|
+
onTableSort(sort: TreeTableSort | null): void;
|
|
539
|
+
onTableExport(options: TreeTableExportOptions): Promise<string | void>;
|
|
540
|
+
private simulateDelay;
|
|
541
|
+
private generateMockNodes;
|
|
542
|
+
private generateFileName;
|
|
543
|
+
private getFolderDescription;
|
|
544
|
+
private getFileCategory;
|
|
545
|
+
private getFileDescription;
|
|
546
|
+
/**
|
|
547
|
+
* Get custom icon for a node based on file type and category
|
|
548
|
+
*/
|
|
549
|
+
getNodeIcon(node: TreeNodeData): string | React$1.ComponentType<any>;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region src/tree/providers/SimpleTreeProvider.d.ts
|
|
554
|
+
//# sourceMappingURL=TestTreeProvider.d.ts.map
|
|
555
|
+
interface SimpleTreeProviderOptions {
|
|
556
|
+
/** Whether to enable multi-select functionality */
|
|
557
|
+
enableMultiSelect?: boolean;
|
|
558
|
+
/** Whether to enable drag and drop */
|
|
559
|
+
enableDragDrop?: boolean;
|
|
560
|
+
/** Static tree data to display */
|
|
561
|
+
data?: TreeNodeData[];
|
|
562
|
+
/** Custom context menu items */
|
|
563
|
+
contextMenuItems?: TreeContextMenuItem[];
|
|
564
|
+
/** Callback when nodes are selected */
|
|
565
|
+
onSelectionChange?: (selectionInfo: TreeSelectionInfo) => void;
|
|
566
|
+
/** Callback when context menu actions are triggered */
|
|
567
|
+
onContextMenuAction?: (actionId: string, nodes: TreeNodeData[]) => void;
|
|
568
|
+
}
|
|
569
|
+
declare class SimpleTreeProvider implements TreeProvider {
|
|
570
|
+
readonly id = "simple-tree-provider";
|
|
571
|
+
readonly name = "Simple Tree Provider";
|
|
572
|
+
readonly version = "1.0.0";
|
|
573
|
+
isMultiSelectEnabled: boolean;
|
|
574
|
+
readonly isDragDropEnabled = false;
|
|
575
|
+
readonly isVirtualizationEnabled = false;
|
|
576
|
+
readonly isTableViewEnabled = false;
|
|
577
|
+
useCheckboxSelection: boolean;
|
|
578
|
+
readonly allowPartialSelection = true;
|
|
579
|
+
readonly config: {};
|
|
580
|
+
selectionTheme: TreeSelectionTheme;
|
|
581
|
+
private nodes;
|
|
582
|
+
private contextMenuItems;
|
|
583
|
+
onSelectionChange?: (selectionInfo: TreeSelectionInfo) => void;
|
|
584
|
+
onNodeExpansion?: (node: TreeNodeData, isExpanded: boolean) => void;
|
|
585
|
+
onNodeFocus?: (node: TreeNodeData | null) => void;
|
|
586
|
+
onContextMenuAction?: (actionId: string, nodes: TreeNodeData[]) => void;
|
|
587
|
+
constructor(options?: SimpleTreeProviderOptions);
|
|
588
|
+
/**
|
|
589
|
+
* Load root nodes
|
|
590
|
+
*/
|
|
591
|
+
loadNodes(options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
592
|
+
/**
|
|
593
|
+
* Load children for a specific node
|
|
594
|
+
*/
|
|
595
|
+
loadChildren(node: TreeNodeData, options?: TreeLoadOptions): Promise<TreeLoadResult>;
|
|
596
|
+
/**
|
|
597
|
+
* Refresh/reload nodes
|
|
598
|
+
*/
|
|
599
|
+
refresh(path?: string): Promise<TreeLoadResult>;
|
|
600
|
+
/**
|
|
601
|
+
* Get context menu for a single node
|
|
602
|
+
*/
|
|
603
|
+
getNodeContextMenu(node: TreeNodeData): TreeContextMenuItem[];
|
|
604
|
+
/**
|
|
605
|
+
* Get context menu for multiple selected nodes
|
|
606
|
+
*/
|
|
607
|
+
getMultiNodeContextMenu(nodes: TreeNodeData[]): TreeContextMenuItem[];
|
|
608
|
+
/**
|
|
609
|
+
* Get selection theme configuration
|
|
610
|
+
*/
|
|
611
|
+
getSelectionTheme(): TreeSelectionTheme;
|
|
612
|
+
/**
|
|
613
|
+
* Update the static data
|
|
614
|
+
*/
|
|
615
|
+
setData(data: TreeNodeData[]): void;
|
|
616
|
+
/**
|
|
617
|
+
* Get current data
|
|
618
|
+
*/
|
|
619
|
+
getData(): TreeNodeData[];
|
|
620
|
+
/**
|
|
621
|
+
* Add a new node to the tree
|
|
622
|
+
*/
|
|
623
|
+
addNode(parentPath: string | null, newNode: TreeNodeData): boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Remove a node from the tree
|
|
626
|
+
*/
|
|
627
|
+
removeNode(nodePath: string): boolean;
|
|
628
|
+
/**
|
|
629
|
+
* Find a node by its path
|
|
630
|
+
*/
|
|
631
|
+
findNodeByPath(path: string): TreeNodeData | null;
|
|
632
|
+
/**
|
|
633
|
+
* Create default sample data
|
|
634
|
+
*/
|
|
635
|
+
private createDefaultData;
|
|
636
|
+
/**
|
|
637
|
+
* Create default context menu items
|
|
638
|
+
*/
|
|
639
|
+
private createDefaultContextMenu;
|
|
640
|
+
/**
|
|
641
|
+
* Helper method to remove node from children recursively
|
|
642
|
+
*/
|
|
643
|
+
private removeNodeFromChildren;
|
|
644
|
+
/**
|
|
645
|
+
* Update selection theme reactively
|
|
646
|
+
*/
|
|
647
|
+
updateSelectionTheme: (theme: Partial<TreeSelectionTheme>) => void;
|
|
648
|
+
/**
|
|
649
|
+
* Update multi-select setting
|
|
650
|
+
*/
|
|
651
|
+
setMultiSelectEnabled: (enabled: boolean) => void;
|
|
652
|
+
/**
|
|
653
|
+
* Update checkbox selection setting
|
|
654
|
+
*/
|
|
655
|
+
setCheckboxSelection: (enabled: boolean) => void;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region src/tree/components/TreeCheckbox.d.ts
|
|
660
|
+
//# sourceMappingURL=SimpleTreeProvider.d.ts.map
|
|
661
|
+
type CheckboxState = 'unchecked' | 'checked' | 'indeterminate';
|
|
662
|
+
interface TreeCheckboxProps {
|
|
663
|
+
/** Current checkbox state */
|
|
664
|
+
state: CheckboxState;
|
|
665
|
+
/** Callback when checkbox is clicked */
|
|
666
|
+
onChange: (newState: CheckboxState) => void;
|
|
667
|
+
/** Whether the checkbox is disabled */
|
|
668
|
+
disabled?: boolean;
|
|
669
|
+
/** Additional CSS classes */
|
|
670
|
+
className?: string;
|
|
671
|
+
/** ARIA label for accessibility */
|
|
672
|
+
ariaLabel?: string;
|
|
673
|
+
/** Size of the checkbox */
|
|
674
|
+
size?: 'sm' | 'md' | 'lg';
|
|
675
|
+
/** Node ID for logging purposes */
|
|
676
|
+
nodeId?: string;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* TreeCheckbox Component - 3-state checkbox for tree selection
|
|
680
|
+
*/
|
|
681
|
+
declare const TreeCheckbox: React$1.FunctionComponent<TreeCheckboxProps>;
|
|
682
|
+
|
|
683
|
+
//#endregion
|
|
684
|
+
//#region src/tree/models/TreeModel.d.ts
|
|
685
|
+
//# sourceMappingURL=TreeCheckbox.d.ts.map
|
|
686
|
+
declare class TreeModel {
|
|
687
|
+
provider: TreeProvider;
|
|
688
|
+
nodes: TreeNodeData[];
|
|
689
|
+
nodeMap: mobx0.ObservableMap<string, TreeNodeData>;
|
|
690
|
+
isLoading: boolean;
|
|
691
|
+
errors: mobx1.ObservableMap<string, Error>;
|
|
692
|
+
selectedNodes: mobx2.ObservableMap<string, TreeNodeData>;
|
|
693
|
+
focusedNode: string | null;
|
|
694
|
+
checkboxStates: mobx3.ObservableMap<string, CheckboxState>;
|
|
695
|
+
expandedNodes: mobx4.ObservableMap<string, boolean>;
|
|
696
|
+
loadingNodes: mobx5.ObservableMap<string, boolean>;
|
|
697
|
+
contextMenuVisible: boolean;
|
|
698
|
+
contextMenuPosition: {
|
|
699
|
+
x: number;
|
|
700
|
+
y: number;
|
|
701
|
+
};
|
|
702
|
+
contextMenuItems: TreeContextMenuItem[];
|
|
703
|
+
contextMenuNodes: TreeNodeData[];
|
|
704
|
+
constructor(provider: TreeProvider);
|
|
705
|
+
/**
|
|
706
|
+
* Whether the tree has any nodes loaded
|
|
707
|
+
*/
|
|
708
|
+
get hasNodes(): boolean;
|
|
709
|
+
/**
|
|
710
|
+
* Total count of nodes currently loaded
|
|
711
|
+
*/
|
|
712
|
+
get nodeCount(): number;
|
|
713
|
+
/**
|
|
714
|
+
* Whether data has been loaded (regardless of success/failure)
|
|
715
|
+
*/
|
|
716
|
+
get isLoaded(): boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Array of currently selected nodes (computed from selectedNodes map)
|
|
719
|
+
*/
|
|
720
|
+
get selectedNodesArray(): TreeNodeData[];
|
|
721
|
+
/**
|
|
722
|
+
* Whether any nodes are currently selected
|
|
723
|
+
*/
|
|
724
|
+
get hasSelection(): boolean;
|
|
725
|
+
/**
|
|
726
|
+
* Check if a specific node is selected
|
|
727
|
+
*/
|
|
728
|
+
isNodeSelected(nodeId: string): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Check if a specific node is expanded
|
|
731
|
+
*/
|
|
732
|
+
isNodeExpanded(nodeId: string): boolean;
|
|
733
|
+
/**
|
|
734
|
+
* Check if a specific node is loading
|
|
735
|
+
*/
|
|
736
|
+
isNodeLoading(nodeId: string): boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Load nodes from the provider
|
|
739
|
+
* Uses MobX flow for proper async action handling
|
|
740
|
+
*/
|
|
741
|
+
loadNodes: (options?: TreeLoadOptions | undefined) => mobx_dist_internal6.CancellablePromise<void>;
|
|
742
|
+
/**
|
|
743
|
+
* Select a specific node
|
|
744
|
+
* @param node Node to select
|
|
745
|
+
*/
|
|
746
|
+
selectNode(node: TreeNodeData): void;
|
|
747
|
+
/**
|
|
748
|
+
* Deselect a specific node
|
|
749
|
+
* @param node Node to deselect
|
|
750
|
+
*/
|
|
751
|
+
deselectNode(node: TreeNodeData): void;
|
|
752
|
+
/**
|
|
753
|
+
* Clear all selected nodes
|
|
754
|
+
*/
|
|
755
|
+
clearSelection(): void;
|
|
756
|
+
/**
|
|
757
|
+
* Select all nodes (only if multi-select is enabled)
|
|
758
|
+
*/
|
|
759
|
+
selectAll(): void;
|
|
760
|
+
/**
|
|
761
|
+
* Get checkbox state for a specific node
|
|
762
|
+
*/
|
|
763
|
+
getCheckboxState(nodeId: string): CheckboxState;
|
|
764
|
+
/**
|
|
765
|
+
* Handle checkbox click for a node
|
|
766
|
+
*/
|
|
767
|
+
handleCheckboxChange(node: TreeNodeData, newState: CheckboxState): void;
|
|
768
|
+
/**
|
|
769
|
+
* Update all child checkboxes when parent state changes
|
|
770
|
+
*/
|
|
771
|
+
private updateChildCheckboxes;
|
|
772
|
+
/**
|
|
773
|
+
* Update parent checkbox state based on children
|
|
774
|
+
*/
|
|
775
|
+
private updateParentCheckboxes;
|
|
776
|
+
/**
|
|
777
|
+
* Find parent node of a given node ID
|
|
778
|
+
*/
|
|
779
|
+
private findParentNode;
|
|
780
|
+
/**
|
|
781
|
+
* Set focus to a specific node
|
|
782
|
+
* @param nodeId ID of node to focus
|
|
783
|
+
*/
|
|
784
|
+
setFocus(nodeId: string): void;
|
|
785
|
+
/**
|
|
786
|
+
* Move focus to next visible node
|
|
787
|
+
*/
|
|
788
|
+
focusNext(): boolean;
|
|
789
|
+
/**
|
|
790
|
+
* Move focus to previous visible node
|
|
791
|
+
*/
|
|
792
|
+
focusPrevious(): boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Move focus to first visible node
|
|
795
|
+
*/
|
|
796
|
+
focusFirst(): boolean;
|
|
797
|
+
/**
|
|
798
|
+
* Move focus to last visible node
|
|
799
|
+
*/
|
|
800
|
+
focusLast(): boolean;
|
|
801
|
+
/**
|
|
802
|
+
* Get flattened list of all currently visible nodes
|
|
803
|
+
* @private
|
|
804
|
+
*/
|
|
805
|
+
private getFlattenedVisibleNodes;
|
|
806
|
+
/**
|
|
807
|
+
* Expand a specific node
|
|
808
|
+
* @param node Node to expand
|
|
809
|
+
*/
|
|
810
|
+
expandNode: (node: TreeNodeData) => mobx_dist_internal7.CancellablePromise<void>;
|
|
811
|
+
/**
|
|
812
|
+
* Collapse a specific node
|
|
813
|
+
* @param node Node to collapse
|
|
814
|
+
*/
|
|
815
|
+
collapseNode(node: TreeNodeData): void;
|
|
816
|
+
/**
|
|
817
|
+
* Toggle expansion state of a specific node
|
|
818
|
+
* @param node Node to toggle
|
|
819
|
+
*/
|
|
820
|
+
toggleExpansion(node: TreeNodeData): void;
|
|
821
|
+
/**
|
|
822
|
+
* Show context menu for a specific node
|
|
823
|
+
* @param node Target node
|
|
824
|
+
* @param event Mouse event
|
|
825
|
+
*/
|
|
826
|
+
showContextMenu(node: TreeNodeData, event: MouseEvent): void;
|
|
827
|
+
/**
|
|
828
|
+
* Show context menu for multiple selected nodes
|
|
829
|
+
* @param nodes Selected nodes
|
|
830
|
+
* @param event Mouse event
|
|
831
|
+
*/
|
|
832
|
+
showMultiNodeContextMenu(nodes: TreeNodeData[], event: MouseEvent): void;
|
|
833
|
+
/**
|
|
834
|
+
* Hide context menu
|
|
835
|
+
*/
|
|
836
|
+
hideContextMenu(): void;
|
|
837
|
+
/**
|
|
838
|
+
* Handle context menu item click
|
|
839
|
+
* @param menuItem Clicked menu item
|
|
840
|
+
*/
|
|
841
|
+
handleContextMenuAction(menuItem: TreeContextMenuItem): void;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region src/tree/components/Tree.d.ts
|
|
846
|
+
//# sourceMappingURL=TreeModel.d.ts.map
|
|
847
|
+
interface TreeProps {
|
|
848
|
+
/** Provider that supplies tree data and operations */
|
|
849
|
+
provider: TreeProvider;
|
|
850
|
+
/** Optional pre-created TreeModel (if provided, component won't create its own) */
|
|
851
|
+
model?: TreeModel;
|
|
852
|
+
/** Optional loading options to pass to the provider */
|
|
853
|
+
loadOptions?: TreeLoadOptions;
|
|
854
|
+
/** Additional CSS classes to apply to the tree container */
|
|
855
|
+
className?: string;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Tree Component - Reactive tree display with loading states
|
|
859
|
+
*
|
|
860
|
+
* This is the main tree component that:
|
|
861
|
+
* - Creates and manages TreeModel
|
|
862
|
+
* - Shows loading/error states
|
|
863
|
+
* - Renders tree nodes
|
|
864
|
+
* - Follows MobX observer pattern for reactivity
|
|
865
|
+
* - Handles keyboard navigation
|
|
866
|
+
*/
|
|
867
|
+
declare const Tree: React$1.FunctionComponent<TreeProps>;
|
|
868
|
+
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region src/tree/components/TreeNodeList.d.ts
|
|
871
|
+
//# sourceMappingURL=Tree.d.ts.map
|
|
872
|
+
interface TreeNodeListProps {
|
|
873
|
+
/** Tree nodes to render */
|
|
874
|
+
nodes: TreeNodeData[];
|
|
875
|
+
/** Tree model instance */
|
|
876
|
+
treeModel: TreeModel;
|
|
877
|
+
/** Current depth level (for indentation) */
|
|
878
|
+
depth?: number;
|
|
879
|
+
/** Additional CSS classes */
|
|
880
|
+
className?: string;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* TreeNodeList component renders a list of tree nodes with proper nesting and interaction
|
|
884
|
+
*/
|
|
885
|
+
declare const TreeNodeList: React$1.FunctionComponent<TreeNodeListProps>;
|
|
886
|
+
|
|
887
|
+
//#endregion
|
|
888
|
+
//#region src/tree/components/TreeContextMenu.d.ts
|
|
889
|
+
//# sourceMappingURL=TreeNodeList.d.ts.map
|
|
890
|
+
/**
|
|
891
|
+
* Props for the TreeContextMenu component
|
|
892
|
+
*/
|
|
893
|
+
interface TreeContextMenuProps {
|
|
894
|
+
/**
|
|
895
|
+
* Menu items to display
|
|
896
|
+
*/
|
|
897
|
+
items: TreeContextMenuItem[];
|
|
898
|
+
/**
|
|
899
|
+
* Position of the context menu
|
|
900
|
+
*/
|
|
901
|
+
position: {
|
|
902
|
+
x: number;
|
|
903
|
+
y: number;
|
|
904
|
+
};
|
|
905
|
+
/**
|
|
906
|
+
* Whether the menu is visible
|
|
907
|
+
*/
|
|
908
|
+
visible: boolean;
|
|
909
|
+
/**
|
|
910
|
+
* Callback when menu is closed
|
|
911
|
+
*/
|
|
912
|
+
onClose: () => void;
|
|
913
|
+
/**
|
|
914
|
+
* Callback when menu item is clicked
|
|
915
|
+
*/
|
|
916
|
+
onItemClick: (menuItem: TreeContextMenuItem) => void;
|
|
917
|
+
/**
|
|
918
|
+
* Additional CSS classes
|
|
919
|
+
*/
|
|
920
|
+
className?: string;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* TreeContextMenu - Context menu component for tree nodes
|
|
924
|
+
*
|
|
925
|
+
* Features:
|
|
926
|
+
* - Renders context menu items with proper styling (no icons)
|
|
927
|
+
* - Handles click outside to close
|
|
928
|
+
* - Supports separators and disabled items
|
|
929
|
+
* - Positioned absolutely at cursor position
|
|
930
|
+
* - Keyboard navigation support
|
|
931
|
+
*/
|
|
932
|
+
declare const TreeContextMenu: React$1.FunctionComponent<TreeContextMenuProps>;
|
|
933
|
+
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/tree/components/TreeTable.d.ts
|
|
936
|
+
interface TreeTableProps {
|
|
937
|
+
/** The tree model managing state */
|
|
938
|
+
treeModel: TreeModel;
|
|
939
|
+
/** Table columns configuration */
|
|
940
|
+
columns?: TreeTableColumn[];
|
|
941
|
+
/** Enable animations for expand/collapse transitions */
|
|
942
|
+
enableAnimations?: boolean;
|
|
943
|
+
/** Additional CSS classes */
|
|
944
|
+
className?: string;
|
|
945
|
+
/** Whether to show export functionality */
|
|
946
|
+
enableExport?: boolean;
|
|
947
|
+
/** Whether to enable filtering */
|
|
948
|
+
enableFiltering?: boolean;
|
|
949
|
+
/** Whether to enable sorting */
|
|
950
|
+
enableSorting?: boolean;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* TreeTable Component - Table view of tree data
|
|
954
|
+
*/
|
|
955
|
+
declare const TreeTable: React$1.FunctionComponent<TreeTableProps>;
|
|
956
|
+
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region src/tree/utils/SelectionTheme.d.ts
|
|
959
|
+
//# sourceMappingURL=TreeTable.d.ts.map
|
|
960
|
+
/**
|
|
961
|
+
* Default selection theme configuration
|
|
962
|
+
*/
|
|
963
|
+
declare const DEFAULT_SELECTION_THEME: TreeSelectionTheme;
|
|
964
|
+
/**
|
|
965
|
+
* Generate selection background classes based on color scheme and intensity
|
|
966
|
+
*/
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Generate complete selection classes for a tree node
|
|
970
|
+
*/
|
|
971
|
+
declare function getSelectionClasses(theme: TreeSelectionTheme, isSelected: boolean, isFocused: boolean, useCheckboxes?: boolean): string;
|
|
972
|
+
/**
|
|
973
|
+
* Generate CSS custom properties for custom color schemes
|
|
974
|
+
* NOTE: This function is now simplified since we handle custom colors with inline styles
|
|
975
|
+
*/
|
|
976
|
+
declare function getCustomColorVariables(theme: TreeSelectionTheme): Record<string, string>;
|
|
977
|
+
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region src/tree/utils/logger.d.ts
|
|
980
|
+
//# sourceMappingURL=SelectionTheme.d.ts.map
|
|
981
|
+
interface LogContext {
|
|
982
|
+
component?: string;
|
|
983
|
+
nodeId?: string;
|
|
984
|
+
operation?: string;
|
|
985
|
+
[key: string]: any;
|
|
986
|
+
}
|
|
987
|
+
interface LogEntry {
|
|
988
|
+
timestamp: string;
|
|
989
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
990
|
+
message: string;
|
|
991
|
+
context?: LogContext;
|
|
992
|
+
data?: any;
|
|
993
|
+
}
|
|
994
|
+
declare class TreeLogger {
|
|
995
|
+
private isEnabled;
|
|
996
|
+
private logs;
|
|
997
|
+
private maxLogs;
|
|
998
|
+
enable(): void;
|
|
999
|
+
disable(): void;
|
|
1000
|
+
private log;
|
|
1001
|
+
private getPrefix;
|
|
1002
|
+
private formatContext;
|
|
1003
|
+
debug(message: string, context?: LogContext, data?: any): void;
|
|
1004
|
+
info(message: string, context?: LogContext, data?: any): void;
|
|
1005
|
+
warn(message: string, context?: LogContext, data?: any): void;
|
|
1006
|
+
error(message: string, context?: LogContext, data?: any): void;
|
|
1007
|
+
selection(operation: string, nodeId: string, data?: any): void;
|
|
1008
|
+
expansion(operation: string, nodeId: string, data?: any): void;
|
|
1009
|
+
interaction(operation: string, nodeId: string, data?: any): void;
|
|
1010
|
+
rendering(component: string, nodeId: string, data?: any): void;
|
|
1011
|
+
cssClasses(nodeId: string, classes: string, selected: boolean, focused: boolean): void;
|
|
1012
|
+
providerCall(method: string, data?: any): void;
|
|
1013
|
+
stateChange(component: string, property: string, oldValue: any, newValue: any): void;
|
|
1014
|
+
getLogs(filter?: {
|
|
1015
|
+
level?: LogEntry['level'];
|
|
1016
|
+
component?: string;
|
|
1017
|
+
}): LogEntry[];
|
|
1018
|
+
clearLogs(): void;
|
|
1019
|
+
exportLogs(): string;
|
|
1020
|
+
}
|
|
1021
|
+
declare const logger: TreeLogger;
|
|
1022
|
+
|
|
1023
|
+
//#endregion
|
|
1024
|
+
export { CheckboxState, DEFAULT_SELECTION_THEME as DEFAULT_SELECTION_THEME$1, FocusIndicatorStyle, SelectionColorScheme, SelectionIntensity, SimpleTreeProvider as SimpleTreeProvider$1, TestTreeProvider as TestTreeProvider$1, Tree as Tree$1, TreeCheckbox as TreeCheckbox$1, TreeContextMenu as TreeContextMenu$1, TreeContextMenuEvent, TreeContextMenuItem, TreeContextMenuProps, TreeDragDropInfo, TreeLoadOptions, TreeLoadResult, TreeModel as TreeModel$1, TreeNodeData, TreeNodeList as TreeNodeList$1, TreeNodeListProps, TreeNodeRenderer, TreeProps, TreeProvider, TreeSelectionInfo, TreeSelectionTheme, TreeTable as TreeTable$1, TreeTableColumn, TreeTableExportOptions, TreeTableProps, TreeTableSort, getCustomColorVariables as getCustomColorVariables$1, getSelectionClasses as getSelectionClasses$1, logger as logger$1 };
|
|
1025
|
+
//# sourceMappingURL=index-kHr9udZD.d.ts.map
|