@deephaven/file-explorer 0.106.0 → 0.106.2-beta.1

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 +1 @@
1
- {"version":3,"file":"FileList.d.ts","sourceRoot":"","sources":["../src/FileList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAgB,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAI5E,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,gBAAgB,CAAC;IAExB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,aAAa,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IAE/D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,GAAG,CAAC,OAAO,CAAC;IAE7D,sCAAsC;IACtC,SAAS,CAAC,E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AO,CAAC;IAE7D,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAOD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CA6Z1D;AAED,eAAe,QAAQ,CAAC"}
package/dist/FileList.js CHANGED
@@ -124,7 +124,7 @@ export function FileList(props) {
124
124
  }
125
125
  }, [loadedViewport, onSelect, table]);
126
126
  var handleItemDragStart = useCallback((itemIndex, e) => {
127
- var _itemList$current2;
127
+ var _itemList$current2, _getDragPlaceholderTe;
128
128
  log.debug2('handleItemDragStart', itemIndex, selectedRanges);
129
129
  var draggedRanges = selectedRanges;
130
130
  if (!RangeUtils.isSelected(selectedRanges, itemIndex)) {
@@ -136,7 +136,10 @@ export function FileList(props) {
136
136
  // We need to reset reset the mouse state since we steal the drag
137
137
  (_itemList$current2 = itemList.current) === null || _itemList$current2 === void 0 ? void 0 : _itemList$current2.resetMouseState();
138
138
  var newDragPlaceholder = document.createElement('div');
139
- newDragPlaceholder.innerHTML = "<div class=\"dnd-placeholder-content\">".concat(getDragPlaceholderText(), "</div>");
139
+ var dndPlaceholderContent = document.createElement('div');
140
+ dndPlaceholderContent.className = 'dnd-placeholder-content';
141
+ dndPlaceholderContent.innerText = (_getDragPlaceholderTe = getDragPlaceholderText()) !== null && _getDragPlaceholderTe !== void 0 ? _getDragPlaceholderTe : '';
142
+ newDragPlaceholder.appendChild(dndPlaceholderContent);
140
143
  newDragPlaceholder.className = 'file-list-dnd-placeholder';
141
144
  document.body.appendChild(newDragPlaceholder);
142
145
  e.dataTransfer.setDragImage(newDragPlaceholder, 0, 0);
@@ -1 +1 @@
1
- {"version":3,"file":"FileList.js","names":["ItemList","Log","RangeUtils","classNames","React","useCallback","useEffect","useMemo","useRef","useState","isDirectory","DEFAULT_ROW_HEIGHT","getMoveOperation","FileListItem","jsx","_jsx","log","module","DRAG_HOVER_TIMEOUT","ITEM_LIST_CLASS_NAME","FileList","props","isMultiSelect","table","onFocusChange","undefined","onMove","onSelect","onSelectionChange","renderItem","rowHeight","overscanCount","DEFAULT_OVERSCAN","loadedViewport","setLoadedViewport","items","offset","itemCount","viewport","setViewport","top","bottom","dropTargetItem","setDropTargetItem","draggedItems","setDraggedItems","dragPlaceholder","setDragPlaceholder","selectedRanges","setSelectedRanges","focusedIndex","itemList","fileList","getItems","ranges","length","i","range","j","push","getItem","itemIndex","getDragPlaceholderText","count","index","item","filename","concat","dropItems","debug","files","targetPath","_itemList$current","current","focusItem","err","error","handleSelect","event","setExpanded","isExpanded","handleItemDragStart","e","_itemList$current2","debug2","draggedRanges","isSelected","resetMouseState","newDragPlaceholder","document","createElement","innerHTML","className","body","appendChild","dataTransfer","setDragImage","effectAllowed","handleItemDragOver","preventDefault","handleItemDragEnd","remove","handleItemDrop","handleItemDragExit","handleListDragOver","target","Element","classList","contains","type","basename","id","handleListDrop","handleSelectionChange","newSelectedRanges","force","arguments","selectedItems","handleFocusChange","focusIndex","focusedItem","handleViewportChange","isDropTargetValid","focusedPath","collapseAll","updateTableViewport","Math","max","setLoadedViewportAndReturnCleanup","listenerRemover","onUpdate","newViewport","map","_objectSpread","itemName","size","updateFocusAndSelection","expandFolderOnHover","timeout","setTimeout","clearTimeout","renderWrapper","itemProps","isDragInProgress","onDragStart","onDragEnd","onDragOver","onDragExit","onDrop","ref","children","onViewportChange","isDragSelect","isDeselectOnClick"],"sources":["../src/FileList.tsx"],"sourcesContent":["import { ItemList, type Range } from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { RangeUtils } from '@deephaven/utils';\nimport classNames from 'classnames';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n type FileStorageItem,\n type FileStorageTable,\n isDirectory,\n} from './FileStorage';\nimport './FileList.scss';\nimport { DEFAULT_ROW_HEIGHT, getMoveOperation } from './FileListUtils';\nimport { FileListItem, type FileListRenderItemProps } from './FileListItem';\n\nconst log = Log.module('FileList');\n\nexport type LoadedViewport = {\n items: FileStorageItem[];\n offset: number;\n itemCount: number;\n};\n\nexport type ListViewport = {\n top: number;\n bottom: number;\n};\n\nexport interface FileListProps {\n table: FileStorageTable;\n\n isMultiSelect?: boolean;\n focusedPath?: string;\n\n onFocusChange?: (focusedItem?: FileStorageItem) => void;\n onMove?: (files: FileStorageItem[], path: string) => void;\n onSelect: (file: FileStorageItem, event: React.SyntheticEvent) => void;\n onSelectionChange?: (selectedItems: FileStorageItem[]) => void;\n\n renderItem?: (props: FileListRenderItemProps) => JSX.Element;\n\n /** Height of each item in the list */\n rowHeight?: number;\n\n overscanCount?: number;\n}\n\n// How long you need to hover over a directory before it expands\nconst DRAG_HOVER_TIMEOUT = 500;\n\nconst ITEM_LIST_CLASS_NAME = 'item-list-scroll-pane';\n\n/**\n * Component that displays and allows interaction with the file system in the provided FileStorageTable.\n */\nexport function FileList(props: FileListProps): JSX.Element {\n const {\n isMultiSelect = false,\n table,\n onFocusChange = () => undefined,\n onMove,\n onSelect,\n onSelectionChange = () => undefined,\n renderItem = FileListItem,\n rowHeight = DEFAULT_ROW_HEIGHT,\n overscanCount = ItemList.DEFAULT_OVERSCAN,\n } = props;\n const [loadedViewport, setLoadedViewport] = useState<LoadedViewport>(() => ({\n items: [],\n offset: 0,\n itemCount: 0,\n }));\n const [viewport, setViewport] = useState<ListViewport>({\n top: 0,\n bottom: 0,\n });\n\n const [dropTargetItem, setDropTargetItem] = useState<FileStorageItem>();\n const [draggedItems, setDraggedItems] = useState<FileStorageItem[]>();\n const [dragPlaceholder, setDragPlaceholder] = useState<HTMLDivElement>();\n const [selectedRanges, setSelectedRanges] = useState([] as Range[]);\n\n const focusedIndex = useRef<number | null>();\n\n const itemList = useRef<ItemList<FileStorageItem>>(null);\n const fileList = useRef<HTMLDivElement>(null);\n\n const getItems = useCallback(\n (ranges: Range[]): FileStorageItem[] => {\n if (ranges.length === 0 || loadedViewport == null) {\n return [];\n }\n\n const items = [] as FileStorageItem[];\n for (let i = 0; i < ranges.length; i += 1) {\n const range = ranges[i];\n for (let j = range[0]; j <= range[1]; j += 1) {\n if (\n j >= loadedViewport.offset &&\n j < loadedViewport.offset + loadedViewport.items.length\n ) {\n items.push(loadedViewport.items[j - loadedViewport.offset]);\n }\n }\n }\n return items;\n },\n [loadedViewport]\n );\n\n const getItem = useCallback(\n (itemIndex: number): FileStorageItem | undefined => {\n const items = getItems([[itemIndex, itemIndex]]);\n if (items.length > 0) {\n return items[0];\n }\n },\n [getItems]\n );\n\n /**\n * Get the placeholder text to show when a drag operation is in progress\n */\n const getDragPlaceholderText = useCallback(() => {\n const count = RangeUtils.count(selectedRanges);\n if (count === 0) {\n return null;\n }\n\n if (count === 1) {\n const index = selectedRanges[0][0];\n const item = getItem(index);\n if (item != null) {\n return item.filename;\n }\n }\n return `${count} items`;\n }, [getItem, selectedRanges]);\n\n /**\n * Drop the currently dragged items at the currently set drop target.\n * If an itemIndex is provided, focus that index after the drop.\n */\n const dropItems = useCallback(\n (itemIndex?: number) => {\n if (!draggedItems || !dropTargetItem) {\n return;\n }\n\n log.debug('dropItems', draggedItems, 'to', itemIndex);\n\n try {\n const { files, targetPath } = getMoveOperation(\n draggedItems,\n dropTargetItem\n );\n onMove?.(files, targetPath);\n if (itemIndex != null) {\n setSelectedRanges([[itemIndex, itemIndex]]);\n itemList.current?.focusItem(itemIndex);\n }\n } catch (err) {\n log.error('Unable to complete move', err);\n }\n },\n [draggedItems, dropTargetItem, onMove]\n );\n\n const handleSelect = useCallback(\n (itemIndex: number, event: React.SyntheticEvent) => {\n const item = loadedViewport.items[itemIndex - loadedViewport.offset];\n if (item !== undefined) {\n log.debug('handleItemClick', item);\n\n onSelect(item, event);\n if (isDirectory(item)) {\n table?.setExpanded(item.filename, !item.isExpanded);\n }\n }\n },\n [loadedViewport, onSelect, table]\n );\n\n const handleItemDragStart = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n log.debug2('handleItemDragStart', itemIndex, selectedRanges);\n\n let draggedRanges = selectedRanges;\n if (!RangeUtils.isSelected(selectedRanges, itemIndex)) {\n draggedRanges = [[itemIndex, itemIndex]];\n setSelectedRanges(draggedRanges);\n }\n\n setDraggedItems(getItems(draggedRanges));\n\n // We need to reset reset the mouse state since we steal the drag\n itemList.current?.resetMouseState();\n\n const newDragPlaceholder = document.createElement('div');\n newDragPlaceholder.innerHTML = `<div class=\"dnd-placeholder-content\">${getDragPlaceholderText()}</div>`;\n newDragPlaceholder.className = 'file-list-dnd-placeholder';\n document.body.appendChild(newDragPlaceholder);\n e.dataTransfer.setDragImage(newDragPlaceholder, 0, 0);\n e.dataTransfer.effectAllowed = 'move';\n setDragPlaceholder(newDragPlaceholder);\n },\n [getDragPlaceholderText, getItems, selectedRanges]\n );\n\n const handleItemDragOver = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault();\n\n log.debug2('handleItemDragOver', e);\n setDropTargetItem(getItem(itemIndex));\n },\n [getItem]\n );\n\n const handleItemDragEnd = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n log.debug('handleItemDragEnd', itemIndex);\n\n dragPlaceholder?.remove();\n\n // Drag end is triggered after drop\n // Also drop isn't triggered if drag end is outside of the list\n setDraggedItems(undefined);\n setDropTargetItem(undefined);\n setDragPlaceholder(undefined);\n },\n [dragPlaceholder]\n );\n\n const handleItemDrop = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n dropItems(itemIndex);\n },\n [dropItems]\n );\n\n const handleItemDragExit = useCallback(() => {\n log.debug2('handleItemDragExit');\n setDropTargetItem(undefined);\n }, []);\n\n const handleListDragOver = useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n if (\n e.target instanceof Element &&\n e.target.classList.contains(ITEM_LIST_CLASS_NAME)\n ) {\n // Need to prevent default to enable drop\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Drag_operations#droptargets\n e.preventDefault();\n\n log.debug2('handleListDragOver', e);\n setDropTargetItem({\n type: 'directory',\n filename: '/',\n basename: '/',\n id: '/',\n });\n }\n },\n []\n );\n\n const handleListDrop = useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n if (\n e.target instanceof Element &&\n e.target.classList.contains(ITEM_LIST_CLASS_NAME)\n ) {\n log.debug('handleListDrop');\n dropItems();\n }\n },\n [dropItems]\n );\n\n const handleSelectionChange = useCallback(\n (newSelectedRanges, force = false) => {\n log.debug2('handleSelectionChange', newSelectedRanges);\n if (force === true || newSelectedRanges !== selectedRanges) {\n setSelectedRanges(newSelectedRanges);\n const selectedItems = getItems(newSelectedRanges);\n onSelectionChange(selectedItems);\n }\n },\n [getItems, onSelectionChange, selectedRanges]\n );\n\n const handleFocusChange = useCallback(\n focusIndex => {\n log.debug2('handleFocusChange', focusIndex);\n if (focusIndex != null) {\n const [focusedItem] = getItems([[focusIndex, focusIndex]]);\n onFocusChange(focusedItem);\n } else {\n onFocusChange();\n }\n focusedIndex.current = focusIndex;\n },\n [getItems, onFocusChange]\n );\n\n const handleViewportChange = useCallback(\n (top: number, bottom: number) => {\n log.debug('handleViewportChange', top, bottom);\n if (top !== viewport.top || bottom !== viewport.bottom) {\n setViewport({ top, bottom });\n }\n },\n [viewport]\n );\n\n const isDropTargetValid = useMemo(() => {\n if (!draggedItems || !dropTargetItem) {\n return false;\n }\n\n try {\n getMoveOperation(draggedItems, dropTargetItem);\n log.debug('handleValidateDropTarget true');\n return true;\n } catch (e) {\n log.debug('handleValidateDropTarget false');\n return false;\n }\n }, [draggedItems, dropTargetItem]);\n\n const { focusedPath } = props;\n useEffect(() => {\n if (focusedPath !== undefined) {\n if (focusedPath === '/') {\n table.collapseAll();\n } else {\n table.setExpanded(focusedPath, false);\n table.setExpanded(focusedPath, true);\n }\n }\n }, [table, focusedPath]);\n\n useEffect(\n function updateTableViewport() {\n log.debug('updating table viewport', viewport);\n table?.setViewport({\n top: Math.max(0, viewport.top - overscanCount),\n bottom: viewport.bottom + overscanCount,\n });\n },\n [overscanCount, table, viewport]\n );\n\n // Listen for table updates\n useEffect(\n function setLoadedViewportAndReturnCleanup() {\n const listenerRemover = table.onUpdate(newViewport => {\n setLoadedViewport({\n items: newViewport.items.map(item => ({\n ...item,\n itemName: item.basename,\n })),\n offset: newViewport.offset,\n itemCount: table.size,\n });\n });\n return () => {\n listenerRemover();\n };\n },\n [table]\n );\n\n // if the loadedViewport changes, re-fire the focused\n // item and the selected range items as they could have\n // been updated\n useEffect(\n function updateFocusAndSelection() {\n if (focusedIndex.current != null) {\n handleFocusChange(focusedIndex.current);\n }\n if (selectedRanges.length > 0) {\n // force the update, as the selected range may be the same\n // but the selected items may now be different\n handleSelectionChange(selectedRanges, true);\n }\n },\n [loadedViewport, handleFocusChange, handleSelectionChange, selectedRanges]\n );\n\n // Expand a folder if hovering over it\n useEffect(\n function expandFolderOnHover() {\n if (\n dropTargetItem != null &&\n isDirectory(dropTargetItem) &&\n dropTargetItem.filename !== '/'\n ) {\n const timeout = setTimeout(() => {\n if (!dropTargetItem.isExpanded) {\n table?.setExpanded(dropTargetItem.filename, true);\n }\n }, DRAG_HOVER_TIMEOUT);\n return () => clearTimeout(timeout);\n }\n },\n [dropTargetItem, table]\n );\n\n const renderWrapper = useCallback(\n itemProps =>\n renderItem({\n ...itemProps,\n isDragInProgress: draggedItems != null,\n dropTargetItem,\n draggedItems,\n isDropTargetValid,\n onDragStart: handleItemDragStart,\n onDragEnd: handleItemDragEnd,\n onDragOver: handleItemDragOver,\n onDragExit: handleItemDragExit,\n onDrop: handleItemDrop,\n }),\n [\n handleItemDragEnd,\n handleItemDragExit,\n handleItemDragOver,\n handleItemDragStart,\n handleItemDrop,\n draggedItems,\n dropTargetItem,\n isDropTargetValid,\n renderItem,\n ]\n );\n\n return (\n <div\n ref={fileList}\n className={classNames('file-list', {\n 'is-dragging': draggedItems != null,\n })}\n onDragOver={handleListDragOver}\n onDrop={handleListDrop}\n >\n <ItemList\n ref={itemList}\n items={loadedViewport.items}\n itemCount={loadedViewport.itemCount}\n offset={loadedViewport.offset}\n onFocusChange={handleFocusChange}\n onSelect={handleSelect}\n onSelectionChange={handleSelectionChange}\n onViewportChange={handleViewportChange}\n selectedRanges={selectedRanges}\n renderItem={renderWrapper}\n rowHeight={rowHeight}\n isMultiSelect={isMultiSelect}\n isDragSelect={false}\n isDeselectOnClick={false}\n />\n </div>\n );\n}\n\nexport default FileList;\n"],"mappings":";;;;;AAAA,SAASA,QAAQ,QAAoB,uBAAuB;AAC5D,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAAC,SAIbC,WAAW;AAAA;AAAA,SAGJC,kBAAkB,EAAEC,gBAAgB;AAAA,SACpCC,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAErB,IAAMC,GAAG,GAAGf,GAAG,CAACgB,MAAM,CAAC,UAAU,CAAC;AAgClC;AACA,IAAMC,kBAAkB,GAAG,GAAG;AAE9B,IAAMC,oBAAoB,GAAG,uBAAuB;;AAEpD;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,KAAoB,EAAe;EAC1D,IAAM;IACJC,aAAa,GAAG,KAAK;IACrBC,KAAK;IACLC,aAAa,GAAGA,CAAA,KAAMC,SAAS;IAC/BC,MAAM;IACNC,QAAQ;IACRC,iBAAiB,GAAGA,CAAA,KAAMH,SAAS;IACnCI,UAAU,GAAGhB,YAAY;IACzBiB,SAAS,GAAGnB,kBAAkB;IAC9BoB,aAAa,GAAG/B,QAAQ,CAACgC;EAC3B,CAAC,GAAGX,KAAK;EACT,IAAM,CAACY,cAAc,EAAEC,iBAAiB,CAAC,GAAGzB,QAAQ,CAAiB,OAAO;IAC1E0B,KAAK,EAAE,EAA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f,QAAQ;MACPqJ,GAAG,EAAElG,QAAS;MACdhB,KAAK,EAAEF,cAAc,CAACE,KAAM;MAC5BE,SAAS,EAAEJ,cAAc,CAACI,SAAU;MACpCD,MAAM,EAAEH,cAAc,CAACG,MAAO;MAC9BZ,aAAa,EAAE8F,iBAAkB;MACjC3F,QAAQ,EAAEkD,YAAa;MACvBjD,iBAAiB,EAAEqF,qBAAsB;MACzCsC,gBAAgB,EAAE9B,oBAAqB;MACvCzE,cAAc,EAAEA,cAAe;MAC/BnB,UAAU,EAAEgH,aAAc;MAC1B/G,SAAS,EAAEA,SAAU;MACrBR,aAAa,EAAEA,aAAc;MAC7BkI,YAAY,EAAE,KAAM;MACpBC,iBAAiB,EAAE;IAAM,CAC1B;EAAC,CACC,CAAC;AAEV;AAEA,eAAerI,QAAQ"}
1
+ {"version":3,"file":"FileList.js","names":["ItemList","Log","RangeUtils","classNames","React","useCallback","useEffect","useMemo","useRef","useState","isDirectory","DEFAULT_ROW_HEIGHT","getMoveOperation","FileListItem","jsx","_jsx","log","module","DRAG_HOVER_TIMEOUT","ITEM_LIST_CLASS_NAME","FileList","props","isMultiSelect","table","onFocusChange","undefined","onMove","onSelect","onSelectionChange","renderItem","rowHeight","overscanCount","DEFAULT_OVERSCAN","loadedViewport","setLoadedViewport","items","offset","itemCount","viewport","setViewport","top","bottom","dropTargetItem","setDropTargetItem","draggedItems","setDraggedItems","dragPlaceholder","setDragPlaceholder","selectedRanges","setSelectedRanges","focusedIndex","itemList","fileList","getItems","ranges","length","i","range","j","push","getItem","itemIndex","getDragPlaceholderText","count","index","item","filename","concat","dropItems","debug","files","targetPath","_itemList$current","current","focusItem","err","error","handleSelect","event","setExpanded","isExpanded","handleItemDragStart","e","_itemList$current2","_getDragPlaceholderTe","debug2","draggedRanges","isSelected","resetMouseState","newDragPlaceholder","document","createElement","dndPlaceholderContent","className","innerText","appendChild","body","dataTransfer","setDragImage","effectAllowed","handleItemDragOver","preventDefault","handleItemDragEnd","remove","handleItemDrop","handleItemDragExit","handleListDragOver","target","Element","classList","contains","type","basename","id","handleListDrop","handleSelectionChange","newSelectedRanges","force","arguments","selectedItems","handleFocusChange","focusIndex","focusedItem","handleViewportChange","isDropTargetValid","focusedPath","collapseAll","updateTableViewport","Math","max","setLoadedViewportAndReturnCleanup","listenerRemover","onUpdate","newViewport","map","_objectSpread","itemName","size","updateFocusAndSelection","expandFolderOnHover","timeout","setTimeout","clearTimeout","renderWrapper","itemProps","isDragInProgress","onDragStart","onDragEnd","onDragOver","onDragExit","onDrop","ref","children","onViewportChange","isDragSelect","isDeselectOnClick"],"sources":["../src/FileList.tsx"],"sourcesContent":["import { ItemList, type Range } from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { RangeUtils } from '@deephaven/utils';\nimport classNames from 'classnames';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n type FileStorageItem,\n type FileStorageTable,\n isDirectory,\n} from './FileStorage';\nimport './FileList.scss';\nimport { DEFAULT_ROW_HEIGHT, getMoveOperation } from './FileListUtils';\nimport { FileListItem, type FileListRenderItemProps } from './FileListItem';\n\nconst log = Log.module('FileList');\n\nexport type LoadedViewport = {\n items: FileStorageItem[];\n offset: number;\n itemCount: number;\n};\n\nexport type ListViewport = {\n top: number;\n bottom: number;\n};\n\nexport interface FileListProps {\n table: FileStorageTable;\n\n isMultiSelect?: boolean;\n focusedPath?: string;\n\n onFocusChange?: (focusedItem?: FileStorageItem) => void;\n onMove?: (files: FileStorageItem[], path: string) => void;\n onSelect: (file: FileStorageItem, event: React.SyntheticEvent) => void;\n onSelectionChange?: (selectedItems: FileStorageItem[]) => void;\n\n renderItem?: (props: FileListRenderItemProps) => JSX.Element;\n\n /** Height of each item in the list */\n rowHeight?: number;\n\n overscanCount?: number;\n}\n\n// How long you need to hover over a directory before it expands\nconst DRAG_HOVER_TIMEOUT = 500;\n\nconst ITEM_LIST_CLASS_NAME = 'item-list-scroll-pane';\n\n/**\n * Component that displays and allows interaction with the file system in the provided FileStorageTable.\n */\nexport function FileList(props: FileListProps): JSX.Element {\n const {\n isMultiSelect = false,\n table,\n onFocusChange = () => undefined,\n onMove,\n onSelect,\n onSelectionChange = () => undefined,\n renderItem = FileListItem,\n rowHeight = DEFAULT_ROW_HEIGHT,\n overscanCount = ItemList.DEFAULT_OVERSCAN,\n } = props;\n const [loadedViewport, setLoadedViewport] = useState<LoadedViewport>(() => ({\n items: [],\n offset: 0,\n itemCount: 0,\n }));\n const [viewport, setViewport] = useState<ListViewport>({\n top: 0,\n bottom: 0,\n });\n\n const [dropTargetItem, setDropTargetItem] = useState<FileStorageItem>();\n const [draggedItems, setDraggedItems] = useState<FileStorageItem[]>();\n const [dragPlaceholder, setDragPlaceholder] = useState<HTMLDivElement>();\n const [selectedRanges, setSelectedRanges] = useState([] as Range[]);\n\n const focusedIndex = useRef<number | null>();\n\n const itemList = useRef<ItemList<FileStorageItem>>(null);\n const fileList = useRef<HTMLDivElement>(null);\n\n const getItems = useCallback(\n (ranges: Range[]): FileStorageItem[] => {\n if (ranges.length === 0 || loadedViewport == null) {\n return [];\n }\n\n const items = [] as FileStorageItem[];\n for (let i = 0; i < ranges.length; i += 1) {\n const range = ranges[i];\n for (let j = range[0]; j <= range[1]; j += 1) {\n if (\n j >= loadedViewport.offset &&\n j < loadedViewport.offset + loadedViewport.items.length\n ) {\n items.push(loadedViewport.items[j - loadedViewport.offset]);\n }\n }\n }\n return items;\n },\n [loadedViewport]\n );\n\n const getItem = useCallback(\n (itemIndex: number): FileStorageItem | undefined => {\n const items = getItems([[itemIndex, itemIndex]]);\n if (items.length > 0) {\n return items[0];\n }\n },\n [getItems]\n );\n\n /**\n * Get the placeholder text to show when a drag operation is in progress\n */\n const getDragPlaceholderText = useCallback(() => {\n const count = RangeUtils.count(selectedRanges);\n if (count === 0) {\n return null;\n }\n\n if (count === 1) {\n const index = selectedRanges[0][0];\n const item = getItem(index);\n if (item != null) {\n return item.filename;\n }\n }\n return `${count} items`;\n }, [getItem, selectedRanges]);\n\n /**\n * Drop the currently dragged items at the currently set drop target.\n * If an itemIndex is provided, focus that index after the drop.\n */\n const dropItems = useCallback(\n (itemIndex?: number) => {\n if (!draggedItems || !dropTargetItem) {\n return;\n }\n\n log.debug('dropItems', draggedItems, 'to', itemIndex);\n\n try {\n const { files, targetPath } = getMoveOperation(\n draggedItems,\n dropTargetItem\n );\n onMove?.(files, targetPath);\n if (itemIndex != null) {\n setSelectedRanges([[itemIndex, itemIndex]]);\n itemList.current?.focusItem(itemIndex);\n }\n } catch (err) {\n log.error('Unable to complete move', err);\n }\n },\n [draggedItems, dropTargetItem, onMove]\n );\n\n const handleSelect = useCallback(\n (itemIndex: number, event: React.SyntheticEvent) => {\n const item = loadedViewport.items[itemIndex - loadedViewport.offset];\n if (item !== undefined) {\n log.debug('handleItemClick', item);\n\n onSelect(item, event);\n if (isDirectory(item)) {\n table?.setExpanded(item.filename, !item.isExpanded);\n }\n }\n },\n [loadedViewport, onSelect, table]\n );\n\n const handleItemDragStart = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n log.debug2('handleItemDragStart', itemIndex, selectedRanges);\n\n let draggedRanges = selectedRanges;\n if (!RangeUtils.isSelected(selectedRanges, itemIndex)) {\n draggedRanges = [[itemIndex, itemIndex]];\n setSelectedRanges(draggedRanges);\n }\n\n setDraggedItems(getItems(draggedRanges));\n\n // We need to reset reset the mouse state since we steal the drag\n itemList.current?.resetMouseState();\n\n const newDragPlaceholder = document.createElement('div');\n const dndPlaceholderContent = document.createElement('div');\n dndPlaceholderContent.className = 'dnd-placeholder-content';\n dndPlaceholderContent.innerText = getDragPlaceholderText() ?? '';\n newDragPlaceholder.appendChild(dndPlaceholderContent);\n newDragPlaceholder.className = 'file-list-dnd-placeholder';\n document.body.appendChild(newDragPlaceholder);\n e.dataTransfer.setDragImage(newDragPlaceholder, 0, 0);\n e.dataTransfer.effectAllowed = 'move';\n setDragPlaceholder(newDragPlaceholder);\n },\n [getDragPlaceholderText, getItems, selectedRanges]\n );\n\n const handleItemDragOver = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault();\n\n log.debug2('handleItemDragOver', e);\n setDropTargetItem(getItem(itemIndex));\n },\n [getItem]\n );\n\n const handleItemDragEnd = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n log.debug('handleItemDragEnd', itemIndex);\n\n dragPlaceholder?.remove();\n\n // Drag end is triggered after drop\n // Also drop isn't triggered if drag end is outside of the list\n setDraggedItems(undefined);\n setDropTargetItem(undefined);\n setDragPlaceholder(undefined);\n },\n [dragPlaceholder]\n );\n\n const handleItemDrop = useCallback(\n (itemIndex: number, e: React.DragEvent<HTMLDivElement>) => {\n dropItems(itemIndex);\n },\n [dropItems]\n );\n\n const handleItemDragExit = useCallback(() => {\n log.debug2('handleItemDragExit');\n setDropTargetItem(undefined);\n }, []);\n\n const handleListDragOver = useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n if (\n e.target instanceof Element &&\n e.target.classList.contains(ITEM_LIST_CLASS_NAME)\n ) {\n // Need to prevent default to enable drop\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Drag_operations#droptargets\n e.preventDefault();\n\n log.debug2('handleListDragOver', e);\n setDropTargetItem({\n type: 'directory',\n filename: '/',\n basename: '/',\n id: '/',\n });\n }\n },\n []\n );\n\n const handleListDrop = useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n if (\n e.target instanceof Element &&\n e.target.classList.contains(ITEM_LIST_CLASS_NAME)\n ) {\n log.debug('handleListDrop');\n dropItems();\n }\n },\n [dropItems]\n );\n\n const handleSelectionChange = useCallback(\n (newSelectedRanges, force = false) => {\n log.debug2('handleSelectionChange', newSelectedRanges);\n if (force === true || newSelectedRanges !== selectedRanges) {\n setSelectedRanges(newSelectedRanges);\n const selectedItems = getItems(newSelectedRanges);\n onSelectionChange(selectedItems);\n }\n },\n [getItems, onSelectionChange, selectedRanges]\n );\n\n const handleFocusChange = useCallback(\n focusIndex => {\n log.debug2('handleFocusChange', focusIndex);\n if (focusIndex != null) {\n const [focusedItem] = getItems([[focusIndex, focusIndex]]);\n onFocusChange(focusedItem);\n } else {\n onFocusChange();\n }\n focusedIndex.current = focusIndex;\n },\n [getItems, onFocusChange]\n );\n\n const handleViewportChange = useCallback(\n (top: number, bottom: number) => {\n log.debug('handleViewportChange', top, bottom);\n if (top !== viewport.top || bottom !== viewport.bottom) {\n setViewport({ top, bottom });\n }\n },\n [viewport]\n );\n\n const isDropTargetValid = useMemo(() => {\n if (!draggedItems || !dropTargetItem) {\n return false;\n }\n\n try {\n getMoveOperation(draggedItems, dropTargetItem);\n log.debug('handleValidateDropTarget true');\n return true;\n } catch (e) {\n log.debug('handleValidateDropTarget false');\n return false;\n }\n }, [draggedItems, dropTargetItem]);\n\n const { focusedPath } = props;\n useEffect(() => {\n if (focusedPath !== undefined) {\n if (focusedPath === '/') {\n table.collapseAll();\n } else {\n table.setExpanded(focusedPath, false);\n table.setExpanded(focusedPath, true);\n }\n }\n }, [table, focusedPath]);\n\n useEffect(\n function updateTableViewport() {\n log.debug('updating table viewport', viewport);\n table?.setViewport({\n top: Math.max(0, viewport.top - overscanCount),\n bottom: viewport.bottom + overscanCount,\n });\n },\n [overscanCount, table, viewport]\n );\n\n // Listen for table updates\n useEffect(\n function setLoadedViewportAndReturnCleanup() {\n const listenerRemover = table.onUpdate(newViewport => {\n setLoadedViewport({\n items: newViewport.items.map(item => ({\n ...item,\n itemName: item.basename,\n })),\n offset: newViewport.offset,\n itemCount: table.size,\n });\n });\n return () => {\n listenerRemover();\n };\n },\n [table]\n );\n\n // if the loadedViewport changes, re-fire the focused\n // item and the selected range items as they could have\n // been updated\n useEffect(\n function updateFocusAndSelection() {\n if (focusedIndex.current != null) {\n handleFocusChange(focusedIndex.current);\n }\n if (selectedRanges.length > 0) {\n // force the update, as the selected range may be the same\n // but the selected items may now be different\n handleSelectionChange(selectedRanges, true);\n }\n },\n [loadedViewport, handleFocusChange, handleSelectionChange, selectedRanges]\n );\n\n // Expand a folder if hovering over it\n useEffect(\n function expandFolderOnHover() {\n if (\n dropTargetItem != null &&\n isDirectory(dropTargetItem) &&\n dropTargetItem.filename !== '/'\n ) {\n const timeout = setTimeout(() => {\n if (!dropTargetItem.isExpanded) {\n table?.setExpanded(dropTargetItem.filename, true);\n }\n }, DRAG_HOVER_TIMEOUT);\n return () => clearTimeout(timeout);\n }\n },\n [dropTargetItem, table]\n );\n\n const renderWrapper = useCallback(\n itemProps =>\n renderItem({\n ...itemProps,\n isDragInProgress: draggedItems != null,\n dropTargetItem,\n draggedItems,\n isDropTargetValid,\n onDragStart: handleItemDragStart,\n onDragEnd: handleItemDragEnd,\n onDragOver: handleItemDragOver,\n onDragExit: handleItemDragExit,\n onDrop: handleItemDrop,\n }),\n [\n handleItemDragEnd,\n handleItemDragExit,\n handleItemDragOver,\n handleItemDragStart,\n handleItemDrop,\n draggedItems,\n dropTargetItem,\n isDropTargetValid,\n renderItem,\n ]\n );\n\n return (\n <div\n ref={fileList}\n className={classNames('file-list', {\n 'is-dragging': draggedItems != null,\n })}\n onDragOver={handleListDragOver}\n onDrop={handleListDrop}\n >\n <ItemList\n ref={itemList}\n items={loadedViewport.items}\n itemCount={loadedViewport.itemCount}\n offset={loadedViewport.offset}\n onFocusChange={handleFocusChange}\n onSelect={handleSelect}\n onSelectionChange={handleSelectionChange}\n onViewportChange={handleViewportChange}\n selectedRanges={selectedRanges}\n renderItem={renderWrapper}\n rowHeight={rowHeight}\n isMultiSelect={isMultiSelect}\n isDragSelect={false}\n isDeselectOnClick={false}\n />\n </div>\n );\n}\n\nexport default FileList;\n"],"mappings":";;;;;AAAA,SAASA,QAAQ,QAAoB,uBAAuB;AAC5D,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IACVC,WAAW,E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B,EAAE9B,oBAAqB;MACvC3E,cAAc,EAAEA,cAAe;MAC/BnB,UAAU,EAAEkH,aAAc;MAC1BjH,SAAS,EAAEA,SAAU;MACrBR,aAAa,EAAEA,aAAc;MAC7BoI,YAAY,EAAE,KAAM;MACpBC,iBAAiB,EAAE;IAAM,CAC1B;EAAC,CACC,CAAC;AAEV;AAEA,eAAevI,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/file-explorer",
3
- "version": "0.106.0",
3
+ "version": "0.106.2-beta.1+d44370b1",
4
4
  "description": "Deephaven File Explorer React component",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,11 +22,11 @@
22
22
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^0.106.0",
26
- "@deephaven/icons": "^0.106.0",
27
- "@deephaven/log": "^0.106.0",
28
- "@deephaven/storage": "^0.106.0",
29
- "@deephaven/utils": "^0.106.0",
25
+ "@deephaven/components": "^0.106.2-beta.1+d44370b1",
26
+ "@deephaven/icons": "^0.106.2-beta.1+d44370b1",
27
+ "@deephaven/log": "^0.106.2-beta.1+d44370b1",
28
+ "@deephaven/storage": "^0.106.2-beta.1+d44370b1",
29
+ "@deephaven/utils": "^0.106.2-beta.1+d44370b1",
30
30
  "@fortawesome/fontawesome-svg-core": "^6.2.1",
31
31
  "@fortawesome/react-fontawesome": "^0.2.0",
32
32
  "classnames": "^2.3.1",
@@ -37,8 +37,8 @@
37
37
  "react": ">=16.8.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@deephaven/mocks": "^0.106.0",
41
- "@deephaven/test-utils": "^0.106.0"
40
+ "@deephaven/mocks": "^0.106.2-beta.1+d44370b1",
41
+ "@deephaven/test-utils": "^0.106.2-beta.1+d44370b1"
42
42
  },
43
43
  "files": [
44
44
  "dist"
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "b1787c8c249bead877fd6795802f098ab44573a8"
52
+ "gitHead": "d44370b18b16f153403eaf95094e29755d673d4e"
53
53
  }