@react-spectrum/table 3.12.11-nightly.4691 → 3.12.11-nightly.4694

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.
@@ -442,7 +442,6 @@ function $e39c6de4eb69450d$var$TableVirtualizer(props) {
442
442
  layout: layout,
443
443
  collection: collection,
444
444
  renderView: renderView,
445
- renderWrapper: renderWrapper,
446
445
  onVisibleRectChange (rect) {
447
446
  bodyRef.current.scrollTop = rect.y;
448
447
  (0, $idLTj$reactariavirtualizer.setScrollLeft)(bodyRef.current, direction, rect.x);
@@ -524,6 +523,7 @@ function $e39c6de4eb69450d$var$TableVirtualizer(props) {
524
523
  let firstColumn = collection.columns[0];
525
524
  let scrollPadding = 0;
526
525
  if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);
526
+ let visibleViews = $e39c6de4eb69450d$var$renderChildren(null, state.visibleViews, renderWrapper);
527
527
  return /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement($e39c6de4eb69450d$export$d288a7dd40372bc.Provider, {
528
528
  value: resizingColumn
529
529
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement((0, $idLTj$reactariafocus.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement("div", {
@@ -542,7 +542,7 @@ function $e39c6de4eb69450d$var$TableVirtualizer(props) {
542
542
  ref: headerRef
543
543
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement((0, $2877766f94c67a67$exports.ResizeStateContext).Provider, {
544
544
  value: columnResizeState
545
- }, state.visibleViews[0])), /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement((0, $idLTj$reactariavirtualizer.ScrollView), {
545
+ }, visibleViews[0])), /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement((0, $idLTj$reactariavirtualizer.ScrollView), {
546
546
  className: (0, $idLTj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-body', {
547
547
  'focus-ring': isFocusVisible,
548
548
  'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner
@@ -568,7 +568,7 @@ function $e39c6de4eb69450d$var$TableVirtualizer(props) {
568
568
  onScrollStart: state.startScrolling,
569
569
  onScrollEnd: state.endScrolling,
570
570
  onScroll: onScroll
571
- }, state.visibleViews[1], /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement("div", {
571
+ }, visibleViews[1], /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement("div", {
572
572
  className: (0, $idLTj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-bodyResizeIndicator'),
573
573
  style: {
574
574
  [direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`,
@@ -577,6 +577,11 @@ function $e39c6de4eb69450d$var$TableVirtualizer(props) {
577
577
  }
578
578
  })))));
579
579
  }
580
+ function $e39c6de4eb69450d$var$renderChildren(parent, views, renderWrapper) {
581
+ return views.map((view)=>{
582
+ return renderWrapper(parent, view, view.children ? Array.from(view.children) : [], (childViews)=>$e39c6de4eb69450d$var$renderChildren(view, childViews, renderWrapper));
583
+ });
584
+ }
580
585
  function $e39c6de4eb69450d$var$useStyle(layoutInfo, parent) {
581
586
  let { direction: direction } = (0, $idLTj$reactariai18n.useLocale)();
582
587
  let style = (0, $idLTj$reactariavirtualizer.layoutInfoToStyle)(layoutInfo, direction, parent);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DD,MAAM,8CAAwB;IAC5B,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,uDAAiC;IACrC,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,oCA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,iBAAA;QACA,cAAY,MAAM,UAAU,CAAC,IAAI,GAAG,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,gBAAgB,MAAM,CAAC;;AAG/G;AAEA,SAAS;IACP,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IACpC,IAAI,aAAa,mBAAmB,qBAAqB;IACzD,IAAI,cAAc,MAChB,OAAO;IAGT,qBACE,0DAAC,6CACE;AAGP;AAEA,SAAS,sCAAgB,YAAC,QAAQ,EAAC;IACjC,IAAI,SAAC,KAAK,EAAC,GAAG;IACd,IAAI;IAEJ,IAAI,kBAAkB,OAAO;QAC3B,IAAI,mBAAmB;eAAI,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU;SAAC,CAAC,MAAM;QACzF,WAAW;YACT,cAAc;YACd,iBAAiB,mBAAmB;YACpC,gBAAgB,mBAAmB;QACrC;IACF,OACE,WAAW;QACT,iBAAiB,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,GAAG;IAChF;IAGF,qBACE,0DAAC;QACC,MAAK;QACJ,GAAG,QAAQ;QACZ,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAc,GAAG;qBACvC,0DAAC;QAAI,MAAK;QAAY,gBAAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;OAChE;AAIT;AAEA,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableViewBase.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport ArrowDownSmall from '@spectrum-icons/ui/ArrowDownSmall';\nimport {Checkbox} from '@react-spectrum/checkbox';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {\n classNames,\n useDOMRef,\n useFocusableRef,\n useStyleProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {ColumnSize, SpectrumColumnProps, TableCollection} from '@react-types/table';\nimport {DOMRef, DropTarget, FocusableElement, FocusableRef, Key} from '@react-types/shared';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport type {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd';\nimport type {DraggableItemResult, DropIndicatorAria, DroppableCollectionResult, DroppableItemResult} from '@react-aria/dnd';\nimport {FocusRing, FocusScope, useFocusRing} from '@react-aria/focus';\nimport {getInteractionModality, isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {GridNode} from '@react-types/grid';\nimport {InsertionIndicator} from './InsertionIndicator';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isAndroid, mergeProps, scrollIntoView, scrollIntoViewport} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {LayoutInfo, Rect, ReusableView, useVirtualizerState} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, ScrollView, setScrollLeft, useVirtualizer, VirtualizerItem} from '@react-aria/virtualizer';\nimport ListGripper from '@spectrum-icons/ui/ListGripper';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport {Nubbin} from './Nubbin';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {DOMAttributes, HTMLAttributes, ReactElement, ReactNode, RefObject, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport {Resizer, ResizeStateContext} from './Resizer';\nimport {RootDropIndicator} from './RootDropIndicator';\nimport {DragPreview as SpectrumDragPreview} from './DragPreview';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport stylesOverrides from './table.css';\nimport {TableState, TreeGridState, useTableColumnResizeState} from '@react-stately/table';\nimport {TableViewLayout} from './TableViewLayout';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useButton} from '@react-aria/button';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {\n useTable,\n useTableCell,\n useTableColumnHeader,\n useTableHeaderRow,\n useTableRow,\n useTableRowGroup,\n useTableSelectAllCheckbox,\n useTableSelectionCheckbox\n} from '@react-aria/table';\nimport {useVisuallyHidden, VisuallyHidden} from '@react-aria/visually-hidden';\n\nconst DEFAULT_HEADER_HEIGHT = {\n medium: 34,\n large: 40\n};\n\nconst DEFAULT_HIDE_HEADER_CELL_WIDTH = {\n medium: 38,\n large: 46\n};\n\nconst ROW_HEIGHTS = {\n compact: {\n medium: 32,\n large: 40\n },\n regular: {\n medium: 40,\n large: 50\n },\n spacious: {\n medium: 48,\n large: 60\n }\n};\n\nconst SELECTION_CELL_DEFAULT_WIDTH = {\n medium: 38,\n large: 48\n};\n\nconst DRAG_BUTTON_CELL_DEFAULT_WIDTH = {\n medium: 16,\n large: 20\n};\n\nconst LEVEL_OFFSET_WIDTH = {\n medium: 16,\n large: 20\n};\n\nexport interface TableContextValue<T> {\n state: TableState<T> | TreeGridState<T>,\n dragState: DraggableCollectionState,\n dropState: DroppableCollectionState,\n dragAndDropHooks: DragAndDropHooks['dragAndDropHooks'],\n isTableDraggable: boolean,\n isTableDroppable: boolean,\n layout: TableViewLayout<T>,\n headerRowHovered: boolean,\n isInResizeMode: boolean,\n setIsInResizeMode: (val: boolean) => void,\n isEmpty: boolean,\n onFocusedResizer: () => void,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void,\n headerMenuOpen: boolean,\n setHeaderMenuOpen: (val: boolean) => void,\n renderEmptyState?: () => ReactElement\n}\n\nexport const TableContext = React.createContext<TableContextValue<unknown>>(null);\nexport function useTableContext() {\n return useContext(TableContext);\n}\n\nexport const VirtualizerContext = React.createContext(null);\nexport function useVirtualizerContext() {\n return useContext(VirtualizerContext);\n}\n\ninterface TableBaseProps<T> extends SpectrumTableProps<T> {\n state: TableState<T> | TreeGridState<T>\n}\n\ntype View = ReusableView<GridNode<unknown>, ReactNode>;\n\nfunction TableViewBase<T extends object>(props: TableBaseProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n onAction,\n onResizeStart: propsOnResizeStart,\n onResizeEnd: propsOnResizeEnd,\n dragAndDropHooks,\n state\n } = props;\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isTableDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isTableDraggable);\n let dropHooksProvided = useRef(isTableDroppable);\n useEffect(() => {\n if (dragHooksProvided.current !== isTableDraggable) {\n console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if (dropHooksProvided.current !== isTableDroppable) {\n console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if ('expandedKeys' in state && (isTableDraggable || isTableDroppable)) {\n console.warn('Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.');\n }\n }, [isTableDraggable, isTableDroppable, state]);\n\n let {styleProps} = useStyleProps(props);\n let {scale} = useProvider();\n\n // Starts when the user selects resize from the menu, ends when resizing ends\n // used to control the visibility of the resizer Nubbin\n let [isInResizeMode, setIsInResizeMode] = useState(false);\n // Starts when the resizer is actually moved\n // entering resizing/exiting resizing doesn't trigger a render\n // with table layout, so we need to track it here\n let [, setIsResizing] = useState(false);\n\n let domRef = useDOMRef(ref);\n let headerRef = useRef<HTMLDivElement>(undefined);\n let bodyRef = useRef<HTMLDivElement>(undefined);\n\n let density = props.density || 'regular';\n let layout = useMemo(() => new TableViewLayout({\n // If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.\n rowHeight: props.overflowMode === 'wrap'\n ? null\n : ROW_HEIGHTS[density][scale],\n estimatedRowHeight: props.overflowMode === 'wrap'\n ? ROW_HEIGHTS[density][scale]\n : null,\n headingHeight: props.overflowMode === 'wrap'\n ? null\n : DEFAULT_HEADER_HEIGHT[scale],\n estimatedHeadingHeight: props.overflowMode === 'wrap'\n ? DEFAULT_HEADER_HEIGHT[scale]\n : null\n }),\n // don't recompute when state.collection changes, only used for initial value\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [props.overflowMode, scale, density]\n );\n\n let dragState: DraggableCollectionState;\n let preview = useRef(null);\n if (isTableDraggable) {\n dragState = dragAndDropHooks.useDraggableCollectionState({\n collection: state.collection,\n selectionManager: state.selectionManager,\n preview\n });\n dragAndDropHooks.useDraggableCollection({}, dragState, domRef);\n }\n\n let DragPreview = dragAndDropHooks?.DragPreview;\n let dropState: DroppableCollectionState;\n let droppableCollection: DroppableCollectionResult;\n let isRootDropTarget: boolean;\n if (isTableDroppable) {\n dropState = dragAndDropHooks.useDroppableCollectionState({\n collection: state.collection,\n selectionManager: state.selectionManager\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection({\n keyboardDelegate: new ListKeyboardDelegate({\n collection: state.collection,\n disabledKeys: state.selectionManager.disabledKeys,\n ref: domRef,\n layoutDelegate: layout\n }),\n dropTargetDelegate: layout\n }, dropState, domRef);\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {gridProps} = useTable({\n ...props,\n isVirtualized: true,\n layoutDelegate: layout,\n onRowAction: onAction,\n scrollRef: bodyRef\n }, state, domRef);\n let [headerMenuOpen, setHeaderMenuOpen] = useState(false);\n let [headerRowHovered, setHeaderRowHovered] = useState(false);\n\n // This overrides collection view's renderWrapper to support DOM hierarchy.\n let renderWrapper = useCallback((parent: View, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'rowgroup') {\n return (\n <TableRowGroup\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}\n // Override the default role=\"rowgroup\" with role=\"presentation\",\n // in favor or adding role=\"rowgroup\" to the ScrollView with\n // ref={bodyRef} in the TableVirtualizer below.\n role=\"presentation\">\n {renderChildren(children)}\n </TableRowGroup>\n );\n }\n\n if (reusableView.viewType === 'header') {\n return (\n <TableHeader\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}>\n {renderChildren(children)}\n </TableHeader>\n );\n }\n\n if (reusableView.viewType === 'row') {\n return (\n <TableRow\n key={reusableView.key}\n item={reusableView.content}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}>\n {renderChildren(children)}\n </TableRow>\n );\n }\n\n if (reusableView.viewType === 'headerrow') {\n return (\n <TableHeaderRow\n onHoverChange={setHeaderRowHovered}\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}\n item={reusableView.content}>\n {renderChildren(children)}\n </TableHeaderRow>\n );\n }\n\n return (\n <TableCellWrapper\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n virtualizer={reusableView.virtualizer}\n parent={parent}>\n {reusableView.rendered}\n </TableCellWrapper>\n );\n }, []);\n\n let renderView = useCallback((type: string, item: GridNode<T>) => {\n switch (type) {\n case 'header':\n case 'rowgroup':\n case 'section':\n case 'row':\n case 'headerrow':\n return null;\n case 'cell': {\n if (item.props.isSelectionCell) {\n return <TableCheckboxCell cell={item} />;\n }\n\n if (item.props.isDragButtonCell) {\n return <TableDragCell cell={item} />;\n }\n\n return <TableCell cell={item} />;\n }\n case 'placeholder':\n // TODO: move to react-aria?\n return (\n <div\n role=\"gridcell\"\n aria-colindex={item.index + 1}\n aria-colspan={item.colspan > 1 ? item.colspan : null} />\n );\n case 'column':\n if (item.props.isSelectionCell) {\n return <TableSelectAllCell column={item} />;\n }\n\n if (item.props.isDragButtonCell) {\n return <TableDragHeaderCell column={item} />;\n }\n\n // TODO: consider this case, what if we have hidden headers and a empty table\n if (item.props.hideHeader) {\n return (\n <TooltipTrigger placement=\"top\" trigger=\"focus\">\n <TableColumnHeader column={item} />\n <Tooltip placement=\"top\">{item.rendered}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.props.allowsResizing && !item.hasChildNodes) {\n return <ResizableTableColumnHeader column={item} />;\n }\n\n return (\n <TableColumnHeader column={item} />\n );\n case 'loader':\n return <LoadingState />;\n case 'empty': {\n return <EmptyState />;\n }\n }\n }, []);\n\n let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = useState(false);\n let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = useState(false);\n let viewport = useRef({x: 0, y: 0, width: 0, height: 0});\n let onVisibleRectChange = useCallback((e) => {\n if (viewport.current.width === e.width && viewport.current.height === e.height) {\n return;\n }\n viewport.current = e;\n if (bodyRef.current) {\n setVerticalScollbarVisible(bodyRef.current.clientWidth + 2 < bodyRef.current.offsetWidth);\n setHorizontalScollbarVisible(bodyRef.current.clientHeight + 2 < bodyRef.current.offsetHeight);\n }\n }, []);\n let {isFocusVisible, focusProps} = useFocusRing();\n let isEmpty = state.collection.size === 0;\n\n let onFocusedResizer = () => {\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n };\n\n let onResizeStart = useCallback((widths) => {\n setIsResizing(true);\n propsOnResizeStart?.(widths);\n }, [setIsResizing, propsOnResizeStart]);\n let onResizeEnd = useCallback((widths) => {\n setIsInResizeMode(false);\n setIsResizing(false);\n propsOnResizeEnd?.(widths);\n }, [propsOnResizeEnd, setIsInResizeMode, setIsResizing]);\n\n let focusedKey = state.selectionManager.focusedKey;\n if (dropState?.target?.type === 'item') {\n focusedKey = dropState.target.key;\n }\n\n let mergedProps = mergeProps(\n isTableDroppable && droppableCollection?.collectionProps,\n gridProps,\n focusProps,\n dragAndDropHooks?.isVirtualDragging() && {tabIndex: null}\n );\n\n return (\n <TableContext.Provider\n value={{\n state,\n dragState,\n dropState,\n dragAndDropHooks,\n isTableDraggable,\n isTableDroppable,\n layout,\n onResizeStart,\n onResize: props.onResize,\n onResizeEnd,\n headerRowHovered,\n isInResizeMode,\n setIsInResizeMode,\n isEmpty,\n onFocusedResizer,\n headerMenuOpen,\n setHeaderMenuOpen,\n renderEmptyState: props.renderEmptyState\n }}>\n <TableVirtualizer\n {...mergedProps}\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Table',\n `spectrum-Table--${density}`,\n {\n 'spectrum-Table--quiet': isQuiet,\n 'spectrum-Table--wrap': props.overflowMode === 'wrap',\n 'spectrum-Table--loadingMore': state.collection.body.props.loadingState === 'loadingMore',\n 'spectrum-Table--isVerticalScrollbarVisible': isVerticalScrollbarVisible,\n 'spectrum-Table--isHorizontalScrollbarVisible': isHorizontalScrollbarVisible\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table'\n ),\n styleProps.className\n )\n }\n tableState={state}\n layout={layout}\n collection={state.collection}\n focusedKey={focusedKey}\n renderView={renderView}\n renderWrapper={renderWrapper}\n onVisibleRectChange={onVisibleRectChange}\n domRef={domRef}\n headerRef={headerRef}\n bodyRef={bodyRef}\n isFocusVisible={isFocusVisible}\n isVirtualDragging={dragAndDropHooks?.isVirtualDragging()}\n isRootDropTarget={isRootDropTarget} />\n {DragPreview && isTableDraggable &&\n <DragPreview ref={preview}>\n {() => {\n if (dragAndDropHooks.renderPreview) {\n return dragAndDropHooks.renderPreview(dragState.draggingKeys, dragState.draggedKey);\n }\n let itemCount = dragState.draggingKeys.size;\n let maxWidth = bodyRef.current.getBoundingClientRect().width;\n let height = ROW_HEIGHTS[density][scale];\n let itemText = state.collection.getTextValue(dragState.draggedKey);\n return <SpectrumDragPreview itemText={itemText} itemCount={itemCount} height={height} maxWidth={maxWidth} />;\n }}\n </DragPreview>\n }\n </TableContext.Provider>\n );\n}\n\ninterface TableVirtualizerProps<T> extends HTMLAttributes<HTMLElement> {\n tableState: TableState<T>,\n layout: TableViewLayout<T>,\n collection: TableCollection<T>,\n focusedKey: Key | null,\n renderView: (type: string, content: GridNode<T>) => ReactElement,\n renderWrapper?: (\n parent: View | null,\n reusableView: View,\n children: View[],\n renderChildren: (views: View[]) => ReactElement[]\n ) => ReactElement,\n domRef: RefObject<HTMLDivElement>,\n bodyRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n onVisibleRectChange: (rect: Rect) => void,\n isFocusVisible: boolean,\n isVirtualDragging: boolean,\n isRootDropTarget: boolean\n}\n\n// This is a custom Virtualizer that also has a header that syncs its scroll position with the body.\nfunction TableVirtualizer<T>(props: TableVirtualizerProps<T>) {\n let {tableState, layout, collection, focusedKey, renderView, renderWrapper, domRef, bodyRef, headerRef, onVisibleRectChange: onVisibleRectChangeProp, isFocusVisible, isVirtualDragging, isRootDropTarget, ...otherProps} = props;\n let {direction} = useLocale();\n let loadingState = collection.body.props.loadingState;\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let onLoadMore = collection.body.props.onLoadMore;\n let [tableWidth, setTableWidth] = useState(0);\n let {scale} = useProvider();\n\n const getDefaultWidth = useCallback(({props: {hideHeader, isSelectionCell, showDivider, isDragButtonCell}}: GridNode<T>): ColumnSize | null | undefined => {\n if (hideHeader) {\n let width = DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];\n return showDivider ? width + 1 : width;\n } else if (isSelectionCell) {\n return SELECTION_CELL_DEFAULT_WIDTH[scale];\n } else if (isDragButtonCell) {\n return DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];\n }\n }, [scale]);\n\n const getDefaultMinWidth = useCallback(({props: {hideHeader, isSelectionCell, showDivider, isDragButtonCell}}: GridNode<T>): ColumnSize | null | undefined => {\n if (hideHeader) {\n let width = DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];\n return showDivider ? width + 1 : width;\n } else if (isSelectionCell) {\n return SELECTION_CELL_DEFAULT_WIDTH[scale];\n } else if (isDragButtonCell) {\n return DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];\n }\n return 75;\n }, [scale]);\n\n let columnResizeState = useTableColumnResizeState({\n tableWidth,\n getDefaultWidth,\n getDefaultMinWidth\n }, tableState);\n\n let state = useVirtualizerState<object, ReactNode, ReactNode>({\n layout,\n collection,\n renderView,\n renderWrapper,\n onVisibleRectChange(rect) {\n bodyRef.current.scrollTop = rect.y;\n setScrollLeft(bodyRef.current, direction, rect.x);\n },\n persistedKeys: useMemo(() => focusedKey ? new Set([focusedKey]) : new Set(), [focusedKey]),\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n let memoedVirtualizerProps = useMemo(() => ({\n tabIndex: otherProps.tabIndex,\n focusedKey,\n isLoading,\n onLoadMore\n }), [otherProps.tabIndex, focusedKey, isLoading, onLoadMore]);\n\n let {virtualizerProps, scrollViewProps: {onVisibleRectChange}} = useVirtualizer(memoedVirtualizerProps, state, domRef);\n let onVisibleRectChangeMemo = useCallback(rect => {\n setTableWidth(rect.width);\n onVisibleRectChange(rect);\n onVisibleRectChangeProp(rect);\n }, [onVisibleRectChange, onVisibleRectChangeProp]);\n\n // this effect runs whenever the contentSize changes, it doesn't matter what the content size is\n // only that it changes in a resize, and when that happens, we want to sync the body to the\n // header scroll position\n useEffect(() => {\n if (getInteractionModality() === 'keyboard' && headerRef.current.contains(document.activeElement)) {\n scrollIntoView(headerRef.current, document.activeElement as HTMLElement);\n scrollIntoViewport(document.activeElement, {containingElement: domRef.current});\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n }\n }, [state.contentSize, headerRef, bodyRef, domRef]);\n\n let headerHeight = layout.getLayoutInfo('header')?.rect.height || 0;\n\n // Sync the scroll position from the table body to the header container.\n let onScroll = useCallback(() => {\n headerRef.current.scrollLeft = bodyRef.current.scrollLeft;\n }, [bodyRef, headerRef]);\n\n let resizerPosition = columnResizeState.resizingColumn != null ? layout.getLayoutInfo(columnResizeState.resizingColumn).rect.maxX - 2 : 0;\n\n let resizerAtEdge = resizerPosition > Math.max(state.virtualizer.contentSize.width, state.virtualizer.visibleRect.width) - 3;\n // this should be fine, every movement of the resizer causes a rerender\n // scrolling can cause it to lag for a moment, but it's always updated\n let resizerInVisibleRegion = resizerPosition < state.virtualizer.visibleRect.maxX;\n let shouldHardCornerResizeCorner = resizerAtEdge && resizerInVisibleRegion;\n\n // minimize re-render caused on Resizers by memoing this\n let resizingColumnWidth = columnResizeState.resizingColumn != null ? columnResizeState.getColumnWidth(columnResizeState.resizingColumn) : 0;\n let resizingColumn = useMemo(() => ({\n width: resizingColumnWidth,\n key: columnResizeState.resizingColumn\n }), [resizingColumnWidth, columnResizeState.resizingColumn]);\n let mergedProps = mergeProps(\n otherProps,\n virtualizerProps,\n isVirtualDragging && {tabIndex: null}\n );\n\n let firstColumn = collection.columns[0];\n let scrollPadding = 0;\n if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) {\n scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);\n }\n\n return (\n <VirtualizerContext.Provider value={resizingColumn}>\n <FocusScope>\n <div\n {...mergedProps}\n ref={domRef}>\n <div\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-headWrapper')}\n style={{\n height: headerHeight,\n overflow: 'hidden',\n position: 'relative',\n willChange: state.isScrolling ? 'scroll-position' : undefined,\n scrollPaddingInlineStart: scrollPadding\n }}\n ref={headerRef}>\n <ResizeStateContext.Provider value={columnResizeState}>\n {state.visibleViews[0]}\n </ResizeStateContext.Provider>\n </div>\n <ScrollView\n className={\n classNames(\n styles,\n 'spectrum-Table-body',\n {\n 'focus-ring': isFocusVisible,\n 'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-body',\n {\n 'react-spectrum-Table-body--dropTarget': !!isRootDropTarget\n }\n )\n )\n }\n // Firefox and Chrome make generic elements using CSS overflow 'scroll' or 'auto' tabbable,\n // including them within the accessibility tree, which breaks the table structure in Firefox.\n // Using tabIndex={-1} prevents the ScrollView from being tabbable, and using role=\"rowgroup\"\n // here and role=\"presentation\" on the table body content fixes the table structure.\n role=\"rowgroup\"\n tabIndex={isVirtualDragging ? null : -1}\n style={{\n flex: 1,\n scrollPaddingInlineStart: scrollPadding\n }}\n innerStyle={{overflow: 'visible'}}\n ref={bodyRef}\n contentSize={state.contentSize}\n onVisibleRectChange={onVisibleRectChangeMemo}\n onScrollStart={state.startScrolling}\n onScrollEnd={state.endScrolling}\n onScroll={onScroll}>\n {state.visibleViews[1]}\n <div\n className={classNames(styles, 'spectrum-Table-bodyResizeIndicator')}\n style={{[direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`, height: `${Math.max(state.virtualizer.contentSize.height, state.virtualizer.visibleRect.height)}px`, display: columnResizeState.resizingColumn ? 'block' : 'none'}} />\n </ScrollView>\n </div>\n </FocusScope>\n </VirtualizerContext.Provider>\n );\n}\n\nfunction useStyle(layoutInfo: LayoutInfo, parent: LayoutInfo | null) {\n let {direction} = useLocale();\n let style = layoutInfoToStyle(layoutInfo, direction, parent);\n if (style.overflow === 'hidden') {\n style.overflow = 'visible'; // needed to support position: sticky\n }\n return style;\n}\n\nfunction TableHeader({children, layoutInfo, parent, ...otherProps}) {\n let {rowGroupProps} = useTableRowGroup();\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...rowGroupProps} {...otherProps} className={classNames(styles, 'spectrum-Table-head')} style={style}>\n {children}\n </div>\n );\n}\n\nfunction TableColumnHeader(props) {\n let {column} = props;\n let ref = useRef<HTMLDivElement>(null);\n let {state, isEmpty} = useTableContext();\n let {pressProps, isPressed} = usePress({isDisabled: isEmpty});\n let columnProps = column.props as SpectrumColumnProps<unknown>;\n useEffect(() => {\n if (column.hasChildNodes && columnProps.allowsResizing) {\n console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);\n }\n }, [column.hasChildNodes, column.key, columnProps.allowsResizing]);\n\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {hoverProps, isHovered} = useHover({...props, isDisabled: isEmpty});\n\n const allProps = [columnHeaderProps, hoverProps, pressProps];\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(...allProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n {\n 'is-active': isPressed,\n 'is-sortable': columnProps.allowsSorting,\n 'is-sorted-desc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'descending',\n 'is-sorted-asc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'ascending',\n 'is-hovered': isHovered,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.colspan > 1,\n 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'\n }\n )\n )\n }>\n {columnProps.allowsSorting &&\n <ArrowDownSmall UNSAFE_className={classNames(styles, 'spectrum-Table-sortedIcon')} />\n }\n {columnProps.hideHeader ?\n <VisuallyHidden>{column.rendered}</VisuallyHidden> :\n <div className={classNames(styles, 'spectrum-Table-headCellContents')}>{column.rendered}</div>\n }\n </div>\n </FocusRing>\n );\n}\n\nlet _TableColumnHeaderButton = (props, ref: FocusableRef<HTMLDivElement>) => {\n let {focusProps, alignment, ...otherProps} = props;\n let {isEmpty} = useTableContext();\n let domRef = useFocusableRef(ref);\n let {buttonProps} = useButton({...otherProps, elementType: 'div', isDisabled: isEmpty}, domRef);\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: isEmpty});\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Table-headCellContents',\n {\n 'is-hovered': isHovered\n }\n )\n }\n {...hoverProps}>\n <div\n className={\n classNames(\n styles,\n 'spectrum-Table-headCellButton',\n {\n 'spectrum-Table-headCellButton--alignStart': alignment === 'start',\n 'spectrum-Table-headCellButton--alignCenter': alignment === 'center',\n 'spectrum-Table-headCellButton--alignEnd': alignment === 'end'\n }\n )\n }\n {...mergeProps(buttonProps, focusProps)}\n ref={domRef}>\n {props.children}\n </div>\n </div>\n );\n};\nlet TableColumnHeaderButton = React.forwardRef(_TableColumnHeaderButton);\n\nfunction ResizableTableColumnHeader(props) {\n let {column} = props;\n let ref = useRef(null);\n let triggerRef = useRef(null);\n let resizingRef = useRef(null);\n let {\n state,\n onResizeStart,\n onResize,\n onResizeEnd,\n headerRowHovered,\n setIsInResizeMode,\n isEmpty,\n isInResizeMode,\n headerMenuOpen,\n setHeaderMenuOpen\n } = useTableContext();\n let columnResizeState = useContext(ResizeStateContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {pressProps, isPressed} = usePress({isDisabled: isEmpty});\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {hoverProps, isHovered} = useHover({...props, isDisabled: isEmpty || headerMenuOpen});\n\n const allProps = [columnHeaderProps, pressProps, hoverProps];\n\n let columnProps = column.props as SpectrumColumnProps<unknown>;\n\n let {isFocusVisible, focusProps} = useFocusRing();\n\n const onMenuSelect = (key) => {\n switch (key) {\n case 'sort-asc':\n state.sort(column.key, 'ascending');\n break;\n case 'sort-desc':\n state.sort(column.key, 'descending');\n break;\n case 'resize':\n columnResizeState.startResize(column.key);\n setIsInResizeMode(true);\n state.setKeyboardNavigationDisabled(true);\n break;\n }\n };\n let allowsSorting = column.props?.allowsSorting;\n let items = useMemo(() => {\n let options = [\n allowsSorting ? {\n label: stringFormatter.format('sortAscending'),\n id: 'sort-asc'\n } : undefined,\n allowsSorting ? {\n label: stringFormatter.format('sortDescending'),\n id: 'sort-desc'\n } : undefined,\n {\n label: stringFormatter.format('resizeColumn'),\n id: 'resize'\n }\n ];\n return options;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allowsSorting]);\n\n let resizingColumn = columnResizeState.resizingColumn;\n let showResizer = !isEmpty && ((headerRowHovered && getInteractionModality() !== 'keyboard') || resizingColumn != null);\n let alignment = 'start';\n let menuAlign = 'start' as 'start' | 'end';\n if (columnProps.align === 'center' || column.colspan > 1) {\n alignment = 'center';\n } else if (columnProps.align === 'end') {\n alignment = 'end';\n menuAlign = 'end';\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(...allProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n {\n 'is-active': isPressed,\n 'is-resizable': columnProps.allowsResizing,\n 'is-sortable': columnProps.allowsSorting,\n 'is-sorted-desc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'descending',\n 'is-sorted-asc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'ascending',\n 'is-hovered': isHovered,\n 'focus-ring': isFocusVisible,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignCenter': alignment === 'center',\n 'react-spectrum-Table-cell--alignEnd': alignment === 'end'\n }\n )\n )\n }>\n <MenuTrigger onOpenChange={setHeaderMenuOpen} align={menuAlign}>\n <TableColumnHeaderButton alignment={alignment} ref={triggerRef} focusProps={focusProps}>\n {columnProps.allowsSorting &&\n <ArrowDownSmall UNSAFE_className={classNames(styles, 'spectrum-Table-sortedIcon')} />\n }\n {columnProps.hideHeader ?\n <VisuallyHidden>{column.rendered}</VisuallyHidden> :\n <div className={classNames(styles, 'spectrum-Table-headerCellText')}>{column.rendered}</div>\n }\n {\n columnProps.allowsResizing && <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Table-menuChevron')} />\n }\n </TableColumnHeaderButton>\n <Menu onAction={onMenuSelect} minWidth=\"size-2000\" items={items}>\n {(item) => (\n <Item>\n {item.label}\n </Item>\n )}\n </Menu>\n </MenuTrigger>\n <Resizer\n ref={resizingRef}\n column={column}\n showResizer={showResizer}\n onResizeStart={onResizeStart}\n onResize={onResize}\n onResizeEnd={onResizeEnd}\n triggerRef={useUnwrapDOMRef(triggerRef)} />\n <div\n aria-hidden\n className={classNames(\n styles,\n 'spectrum-Table-colResizeIndicator',\n {\n 'spectrum-Table-colResizeIndicator--visible': resizingColumn != null,\n 'spectrum-Table-colResizeIndicator--resizing': resizingColumn === column.key\n }\n )}>\n <div\n className={classNames(\n styles,\n 'spectrum-Table-colResizeNubbin',\n {\n 'spectrum-Table-colResizeNubbin--visible': isInResizeMode && resizingColumn === column.key\n }\n )}>\n <Nubbin />\n </div>\n </div>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableSelectAllCell({column}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let isSingleSelectionMode = state.selectionManager.selectionMode === 'single';\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {checkboxProps} = useTableSelectAllCheckbox(state);\n let {hoverProps, isHovered} = useHover({});\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(columnHeaderProps, hoverProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n 'spectrum-Table-checkboxCell',\n {\n 'is-hovered': isHovered\n }\n )\n }>\n {\n /*\n In single selection mode, the checkbox will be hidden.\n So to avoid leaving a column header with no accessible content,\n we use a VisuallyHidden component to include the aria-label from the checkbox,\n which for single selection will be \"Select.\"\n */\n isSingleSelectionMode &&\n <VisuallyHidden>{checkboxProps['aria-label']}</VisuallyHidden>\n }\n <Checkbox\n {...checkboxProps}\n isEmphasized\n UNSAFE_style={isSingleSelectionMode ? {visibility: 'hidden'} : undefined}\n UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />\n </div>\n </FocusRing>\n );\n}\n\nfunction TableDragHeaderCell({column}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...columnHeaderProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-headCell',\n 'react-spectrum-Table-dragButtonHeadCell'\n )\n )\n }>\n <VisuallyHidden>{stringFormatter.format('drag')}</VisuallyHidden>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableRowGroup({children, layoutInfo, parent, ...otherProps}) {\n let {rowGroupProps} = useTableRowGroup();\n let {isTableDroppable} = useContext(TableContext);\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...rowGroupProps} style={style} {...otherProps}>\n {isTableDroppable &&\n <RootDropIndicator key=\"root\" />\n }\n {children}\n </div>\n );\n}\n\nfunction DragButton() {\n let {dragButtonProps, dragButtonRef, isFocusVisibleWithin} = useTableRowContext();\n let {visuallyHiddenProps} = useVisuallyHidden();\n return (\n <FocusRing focusRingClass={classNames(stylesOverrides, 'focus-ring')}>\n <div\n {...dragButtonProps as React.HTMLAttributes<HTMLElement>}\n className={\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-dragButton'\n )\n }\n style={!isFocusVisibleWithin ? {...visuallyHiddenProps.style} : {}}\n ref={dragButtonRef}\n draggable=\"true\">\n <ListGripper UNSAFE_className={classNames(stylesOverrides)} />\n </div>\n </FocusRing>\n );\n}\n\ninterface TableRowContextValue {\n dragButtonProps: React.HTMLAttributes<HTMLDivElement>,\n dragButtonRef: React.MutableRefObject<undefined>,\n isFocusVisibleWithin: boolean\n}\n\n\nconst TableRowContext = React.createContext<TableRowContextValue>(null);\nexport function useTableRowContext() {\n return useContext(TableRowContext);\n}\n\nfunction TableRow({item, children, layoutInfo, parent, ...otherProps}) {\n let ref = useRef(undefined);\n let {state, layout, dragAndDropHooks, isTableDraggable, isTableDroppable, dragState, dropState} = useTableContext();\n let isSelected = state.selectionManager.isSelected(item.key);\n let {rowProps, hasAction, allowsSelection} = useTableRow({\n node: item,\n isVirtualized: true,\n shouldSelectOnPressUp: isTableDraggable\n }, state, ref);\n\n let isDisabled = !allowsSelection && !hasAction;\n let isDroppable = isTableDroppable && !isDisabled;\n let {pressProps, isPressed} = usePress({isDisabled});\n\n // The row should show the focus background style when any cell inside it is focused.\n // If the row itself is focused, then it should have a blue focus indicator on the left.\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let {isFocusVisible, focusProps} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled});\n let isFirstRow = state.collection.rows.find(row => row.level === 1)?.key === item.key;\n let isLastRow = item.nextKey == null;\n // Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom\n // border corners of the last row when selected.\n let isFlushWithContainerBottom = false;\n if (isLastRow) {\n if (layout.getContentSize()?.height >= layout.virtualizer?.visibleRect.height) {\n isFlushWithContainerBottom = true;\n }\n }\n\n let draggableItem: DraggableItemResult;\n if (isTableDraggable) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n draggableItem = dragAndDropHooks.useDraggableItem({key: item.key, hasDragButton: true}, dragState);\n if (isDisabled) {\n draggableItem = null;\n }\n }\n let droppableItem: DroppableItemResult;\n let isDropTarget: boolean;\n let dropIndicator: DropIndicatorAria;\n let dropIndicatorRef = useRef(undefined);\n if (isTableDroppable) {\n let target = {type: 'item', key: item.key, dropPosition: 'on'} as DropTarget;\n isDropTarget = dropState.isDropTarget(target);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n dropIndicator = dragAndDropHooks.useDropIndicator({target}, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = React.useRef(undefined);\n let {buttonProps: dragButtonProps} = useButton({\n ...draggableItem?.dragButtonProps,\n elementType: 'div'\n }, dragButtonRef);\n\n let style = useStyle(layoutInfo, parent);\n\n let props = mergeProps(\n rowProps,\n otherProps,\n {style},\n focusWithinProps,\n focusProps,\n hoverProps,\n pressProps,\n draggableItem?.dragProps,\n // Remove tab index from list row if performing a screenreader drag. This prevents TalkBack from focusing the row,\n // allowing for single swipe navigation between row drop indicator\n dragAndDropHooks?.isVirtualDragging() && {tabIndex: null}\n ) as HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>;\n\n let dropProps = isDroppable ? droppableItem?.dropProps : {'aria-hidden': droppableItem?.dropProps['aria-hidden']};\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n return (\n <TableRowContext.Provider value={{dragButtonProps, dragButtonRef, isFocusVisibleWithin}}>\n {isTableDroppable && isFirstRow &&\n <InsertionIndicator\n rowProps={props}\n key={`${item.key}-before`}\n target={{key: item.key, type: 'item', dropPosition: 'before'}} />\n }\n {isTableDroppable && !dropIndicator?.isHidden &&\n <div role=\"row\" {...visuallyHiddenProps}>\n <div role=\"gridcell\">\n <div role=\"button\" {...dropIndicator?.dropIndicatorProps} ref={dropIndicatorRef} />\n </div>\n </div>\n }\n <div\n {...mergeProps(props, dropProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-row',\n {\n 'is-active': isPressed,\n 'is-selected': isSelected,\n 'spectrum-Table-row--highlightSelection': state.selectionManager.selectionBehavior === 'replace',\n 'is-next-selected': state.selectionManager.isSelected(item.nextKey),\n 'is-focused': isFocusVisibleWithin,\n 'focus-ring': isFocusVisible,\n 'is-hovered': isHovered,\n 'is-disabled': isDisabled,\n 'spectrum-Table-row--firstRow': isFirstRow,\n 'spectrum-Table-row--lastRow': isLastRow,\n 'spectrum-Table-row--isFlushBottom': isFlushWithContainerBottom\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-row',\n {'react-spectrum-Table-row--dropTarget': isDropTarget}\n )\n )\n }>\n {children}\n </div>\n {isTableDroppable &&\n <InsertionIndicator\n rowProps={props}\n key={`${item.key}-after`}\n target={{key: item.key, type: 'item', dropPosition: 'after'}} />\n }\n </TableRowContext.Provider>\n );\n}\n\nfunction TableHeaderRow({item, children, layoutInfo, parent, ...props}) {\n let {state, headerMenuOpen} = useTableContext();\n let ref = useRef(undefined);\n let {rowProps} = useTableHeaderRow({node: item, isVirtualized: true}, state, ref);\n let {hoverProps} = useHover({...props, isDisabled: headerMenuOpen});\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...mergeProps(rowProps, hoverProps)} ref={ref} style={style}>\n {children}\n </div>\n );\n}\n\nfunction TableDragCell({cell}) {\n let ref = useRef(undefined);\n let {state, isTableDraggable} = useTableContext();\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...gridCellProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n {\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n 'react-spectrum-Table-dragButtonCell'\n )\n )\n }>\n {isTableDraggable && !isDisabled && <DragButton />}\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCheckboxCell({cell}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n\n let {checkboxProps} = useTableSelectionCheckbox({key: cell.parentKey}, state);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...gridCellProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n 'spectrum-Table-checkboxCell',\n {\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell'\n )\n )\n }>\n {state.selectionManager.selectionMode !== 'none' &&\n <Checkbox\n {...checkboxProps}\n isEmphasized\n isDisabled={isDisabled}\n UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />\n }\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCell({cell}) {\n let {scale} = useProvider();\n let {state} = useTableContext();\n let isExpandableTable = 'expandedKeys' in state;\n let ref = useRef(undefined);\n let columnProps = cell.column.props as SpectrumColumnProps<unknown>;\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n let {id, ...otherGridCellProps} = gridCellProps;\n let isFirstRowHeaderCell = state.collection.rowHeaderColumnKeys.keys().next().value === cell.column.key;\n let isRowExpandable = false;\n let showExpandCollapseButton = false;\n let levelOffset = 0;\n\n if ('expandedKeys' in state) {\n isRowExpandable = state.keyMap.get(cell.parentKey)?.props.UNSTABLE_childItems?.length > 0 || state.keyMap.get(cell.parentKey)?.props?.children?.length > state.userColumnCount;\n showExpandCollapseButton = isFirstRowHeaderCell && isRowExpandable;\n // Offset based on level, and add additional offset if there is no expand/collapse button on a row\n levelOffset = (cell.level - 2) * LEVEL_OFFSET_WIDTH[scale] + (!showExpandCollapseButton ? LEVEL_OFFSET_WIDTH[scale] * 2 : 0);\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...otherGridCellProps}\n aria-labelledby={id}\n ref={ref}\n style={isExpandableTable && isFirstRowHeaderCell ? {paddingInlineStart: levelOffset} : {}}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n {\n 'spectrum-Table-cell--divider': columnProps.showDivider && cell.column.nextKey !== null,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader,\n 'spectrum-Table-cell--hasExpandCollapseButton': showExpandCollapseButton,\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignStart': columnProps.align === 'start',\n 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center',\n 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'\n }\n )\n )\n }>\n {showExpandCollapseButton && <ExpandableRowChevron cell={cell} />}\n <span\n id={id}\n className={\n classNames(\n styles,\n 'spectrum-Table-cellContents'\n )\n }>\n {cell.rendered}\n </span>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCellWrapper({layoutInfo, virtualizer, parent, children}) {\n let {isTableDroppable, dropState} = useContext(TableContext);\n let isDropTarget: boolean;\n let isRootDroptarget: boolean;\n if (isTableDroppable) {\n if (parent.content) {\n isDropTarget = dropState.isDropTarget({type: 'item', dropPosition: 'on', key: parent.content.key});\n }\n isRootDroptarget = dropState.isDropTarget({type: 'root'});\n }\n\n return (\n <VirtualizerItem\n layoutInfo={layoutInfo}\n virtualizer={virtualizer}\n parent={parent?.layoutInfo}\n className={\n useMemo(() => classNames(\n styles,\n 'spectrum-Table-cellWrapper',\n classNames(\n stylesOverrides,\n {\n 'react-spectrum-Table-cellWrapper': !layoutInfo.estimatedSize,\n 'react-spectrum-Table-cellWrapper--dropTarget': isDropTarget || isRootDroptarget\n }\n )\n ), [layoutInfo.estimatedSize, isDropTarget, isRootDroptarget])\n }>\n {children}\n </VirtualizerItem>\n );\n}\n\nfunction ExpandableRowChevron({cell}) {\n // TODO: move some/all of the chevron button setup into a separate hook?\n let {direction} = useLocale();\n let {state} = useTableContext();\n let expandButtonRef = useRef(undefined);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let isExpanded;\n\n if ('expandedKeys' in state) {\n isExpanded = state.expandedKeys === 'all' || state.expandedKeys.has(cell.parentKey);\n }\n\n // Will need to keep the chevron as a button for iOS VO at all times since VO doesn't focus the cell. Also keep as button if cellAction is defined by the user in the future\n let {buttonProps} = useButton({\n // Desktop and mobile both toggle expansion of a native expandable row on mouse/touch up\n onPress: () => {\n (state as TreeGridState<unknown>).toggleKey(cell.parentKey);\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(cell.parentKey);\n }\n },\n elementType: 'span',\n 'aria-label': isExpanded ? stringFormatter.format('collapse') : stringFormatter.format('expand')\n }, expandButtonRef);\n\n return (\n <span\n {...buttonProps}\n ref={expandButtonRef}\n // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually \"focus\" it\n tabIndex={isAndroid() ? -1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Table-expandButton',\n {\n 'is-open': isExpanded\n }\n )\n }>\n {direction === 'ltr' ? <ChevronRightMedium /> : <ChevronLeftMedium />}\n </span>\n );\n}\n\nfunction LoadingState() {\n let {state} = useContext(TableContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n return (\n <CenteredWrapper>\n <ProgressCircle\n isIndeterminate\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')} />\n </CenteredWrapper>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(TableContext);\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <CenteredWrapper>\n {emptyState}\n </CenteredWrapper>\n );\n}\n\nfunction CenteredWrapper({children}) {\n let {state} = useTableContext();\n let rowProps;\n\n if ('expandedKeys' in state) {\n let topLevelRowCount = [...state.keyMap.get(state.collection.body.key).childNodes].length;\n rowProps = {\n 'aria-level': 1,\n 'aria-posinset': topLevelRowCount + 1,\n 'aria-setsize': topLevelRowCount + 1\n };\n } else {\n rowProps = {\n 'aria-rowindex': state.collection.headerRows.length + state.collection.size + 1\n };\n }\n\n return (\n <div\n role=\"row\"\n {...rowProps}\n className={classNames(stylesOverrides, 'react-spectrum-Table-centeredWrapper')}>\n <div role=\"rowheader\" aria-colspan={state.collection.columns.length}>\n {children}\n </div>\n </div>\n );\n}\n\nconst _TableViewBase = React.forwardRef(TableViewBase) as <T>(props: TableBaseProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewBase as TableViewBase};\n"],"names":[],"version":3,"file":"TableViewBase.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DD,MAAM,8CAAwB;IAC5B,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,uDAAiC;IACrC,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,oCAAc;IAClB,SAAS;QACP,QAAQ;QACR,OAAO;IACT;IACA,SAAS;QACP,QAAQ;QACR,OAAO;IACT;IACA,UAAU;QACR,QAAQ;QACR,OAAO;IACT;AACF;AAEA,MAAM,qDAA+B;IACnC,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,uDAAiC;IACrC,QAAQ;IACR,OAAO;AACT;AAEA,MAAM,2CAAqB;IACzB,QAAQ;IACR,OAAO;AACT;AAuBO,MAAM,0DAAe,CAAA,GAAA,sCAAI,EAAE,aAAa,CAA6B;AACrE,SAAS;IACd,OAAO,CAAA,GAAA,uBAAS,EAAE;AACpB;AAEO,MAAM,yDAAqB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAC;AAC/C,SAAS;IACd,OAAO,CAAA,GAAA,uBAAS,EAAE;AACpB;AAQA,SAAS,oCAAgC,KAAwB,EAAE,GAA2B;QAqQxF;IApQJ,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,WACF,OAAO,YACP,QAAQ,EACR,eAAe,kBAAkB,EACjC,aAAa,gBAAgB,oBAC7B,gBAAgB,SAChB,KAAK,EACN,GAAG;IACJ,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,oBAAoB,CAAA,GAAA,mBAAK,EAAE;IAC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AAiB,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,GAAG;IAChF;IAGF,qBACE,0DAAC;QACC,MAAK;QACJ,GAAG,QAAQ;QACZ,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAc,GAAG;qBACvC,0DAAC;QAAI,MAAK;QAAY,gBAAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;OAChE;AAIT;AAEA,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableViewBase.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport ArrowDownSmall from '@spectrum-icons/ui/ArrowDownSmall';\nimport {Checkbox} from '@react-spectrum/checkbox';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {\n classNames,\n useDOMRef,\n useFocusableRef,\n useStyleProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {ColumnSize, SpectrumColumnProps, TableCollection} from '@react-types/table';\nimport {DOMRef, DropTarget, FocusableElement, FocusableRef, Key} from '@react-types/shared';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport type {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd';\nimport type {DraggableItemResult, DropIndicatorAria, DroppableCollectionResult, DroppableItemResult} from '@react-aria/dnd';\nimport {FocusRing, FocusScope, useFocusRing} from '@react-aria/focus';\nimport {getInteractionModality, isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {GridNode} from '@react-types/grid';\nimport {InsertionIndicator} from './InsertionIndicator';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isAndroid, mergeProps, scrollIntoView, scrollIntoViewport} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {LayoutInfo, Rect, ReusableView, useVirtualizerState} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, ScrollView, setScrollLeft, useVirtualizer, VirtualizerItem} from '@react-aria/virtualizer';\nimport ListGripper from '@spectrum-icons/ui/ListGripper';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport {Nubbin} from './Nubbin';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {DOMAttributes, HTMLAttributes, ReactElement, ReactNode, RefObject, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport {Resizer, ResizeStateContext} from './Resizer';\nimport {RootDropIndicator} from './RootDropIndicator';\nimport {DragPreview as SpectrumDragPreview} from './DragPreview';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport stylesOverrides from './table.css';\nimport {TableState, TreeGridState, useTableColumnResizeState} from '@react-stately/table';\nimport {TableViewLayout} from './TableViewLayout';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useButton} from '@react-aria/button';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {\n useTable,\n useTableCell,\n useTableColumnHeader,\n useTableHeaderRow,\n useTableRow,\n useTableRowGroup,\n useTableSelectAllCheckbox,\n useTableSelectionCheckbox\n} from '@react-aria/table';\nimport {useVisuallyHidden, VisuallyHidden} from '@react-aria/visually-hidden';\n\nconst DEFAULT_HEADER_HEIGHT = {\n medium: 34,\n large: 40\n};\n\nconst DEFAULT_HIDE_HEADER_CELL_WIDTH = {\n medium: 38,\n large: 46\n};\n\nconst ROW_HEIGHTS = {\n compact: {\n medium: 32,\n large: 40\n },\n regular: {\n medium: 40,\n large: 50\n },\n spacious: {\n medium: 48,\n large: 60\n }\n};\n\nconst SELECTION_CELL_DEFAULT_WIDTH = {\n medium: 38,\n large: 48\n};\n\nconst DRAG_BUTTON_CELL_DEFAULT_WIDTH = {\n medium: 16,\n large: 20\n};\n\nconst LEVEL_OFFSET_WIDTH = {\n medium: 16,\n large: 20\n};\n\nexport interface TableContextValue<T> {\n state: TableState<T> | TreeGridState<T>,\n dragState: DraggableCollectionState,\n dropState: DroppableCollectionState,\n dragAndDropHooks: DragAndDropHooks['dragAndDropHooks'],\n isTableDraggable: boolean,\n isTableDroppable: boolean,\n layout: TableViewLayout<T>,\n headerRowHovered: boolean,\n isInResizeMode: boolean,\n setIsInResizeMode: (val: boolean) => void,\n isEmpty: boolean,\n onFocusedResizer: () => void,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void,\n headerMenuOpen: boolean,\n setHeaderMenuOpen: (val: boolean) => void,\n renderEmptyState?: () => ReactElement\n}\n\nexport const TableContext = React.createContext<TableContextValue<unknown>>(null);\nexport function useTableContext() {\n return useContext(TableContext);\n}\n\nexport const VirtualizerContext = React.createContext(null);\nexport function useVirtualizerContext() {\n return useContext(VirtualizerContext);\n}\n\ninterface TableBaseProps<T> extends SpectrumTableProps<T> {\n state: TableState<T> | TreeGridState<T>\n}\n\ntype View = ReusableView<GridNode<unknown>, ReactNode>;\n\nfunction TableViewBase<T extends object>(props: TableBaseProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n onAction,\n onResizeStart: propsOnResizeStart,\n onResizeEnd: propsOnResizeEnd,\n dragAndDropHooks,\n state\n } = props;\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isTableDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isTableDraggable);\n let dropHooksProvided = useRef(isTableDroppable);\n useEffect(() => {\n if (dragHooksProvided.current !== isTableDraggable) {\n console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if (dropHooksProvided.current !== isTableDroppable) {\n console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if ('expandedKeys' in state && (isTableDraggable || isTableDroppable)) {\n console.warn('Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.');\n }\n }, [isTableDraggable, isTableDroppable, state]);\n\n let {styleProps} = useStyleProps(props);\n let {scale} = useProvider();\n\n // Starts when the user selects resize from the menu, ends when resizing ends\n // used to control the visibility of the resizer Nubbin\n let [isInResizeMode, setIsInResizeMode] = useState(false);\n // Starts when the resizer is actually moved\n // entering resizing/exiting resizing doesn't trigger a render\n // with table layout, so we need to track it here\n let [, setIsResizing] = useState(false);\n\n let domRef = useDOMRef(ref);\n let headerRef = useRef<HTMLDivElement>(undefined);\n let bodyRef = useRef<HTMLDivElement>(undefined);\n\n let density = props.density || 'regular';\n let layout = useMemo(() => new TableViewLayout({\n // If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.\n rowHeight: props.overflowMode === 'wrap'\n ? null\n : ROW_HEIGHTS[density][scale],\n estimatedRowHeight: props.overflowMode === 'wrap'\n ? ROW_HEIGHTS[density][scale]\n : null,\n headingHeight: props.overflowMode === 'wrap'\n ? null\n : DEFAULT_HEADER_HEIGHT[scale],\n estimatedHeadingHeight: props.overflowMode === 'wrap'\n ? DEFAULT_HEADER_HEIGHT[scale]\n : null\n }),\n // don't recompute when state.collection changes, only used for initial value\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [props.overflowMode, scale, density]\n );\n\n let dragState: DraggableCollectionState;\n let preview = useRef(null);\n if (isTableDraggable) {\n dragState = dragAndDropHooks.useDraggableCollectionState({\n collection: state.collection,\n selectionManager: state.selectionManager,\n preview\n });\n dragAndDropHooks.useDraggableCollection({}, dragState, domRef);\n }\n\n let DragPreview = dragAndDropHooks?.DragPreview;\n let dropState: DroppableCollectionState;\n let droppableCollection: DroppableCollectionResult;\n let isRootDropTarget: boolean;\n if (isTableDroppable) {\n dropState = dragAndDropHooks.useDroppableCollectionState({\n collection: state.collection,\n selectionManager: state.selectionManager\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection({\n keyboardDelegate: new ListKeyboardDelegate({\n collection: state.collection,\n disabledKeys: state.selectionManager.disabledKeys,\n ref: domRef,\n layoutDelegate: layout\n }),\n dropTargetDelegate: layout\n }, dropState, domRef);\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {gridProps} = useTable({\n ...props,\n isVirtualized: true,\n layoutDelegate: layout,\n onRowAction: onAction,\n scrollRef: bodyRef\n }, state, domRef);\n let [headerMenuOpen, setHeaderMenuOpen] = useState(false);\n let [headerRowHovered, setHeaderRowHovered] = useState(false);\n\n // This overrides collection view's renderWrapper to support DOM hierarchy.\n let renderWrapper = useCallback((parent: View, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'rowgroup') {\n return (\n <TableRowGroup\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}\n // Override the default role=\"rowgroup\" with role=\"presentation\",\n // in favor or adding role=\"rowgroup\" to the ScrollView with\n // ref={bodyRef} in the TableVirtualizer below.\n role=\"presentation\">\n {renderChildren(children)}\n </TableRowGroup>\n );\n }\n\n if (reusableView.viewType === 'header') {\n return (\n <TableHeader\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}>\n {renderChildren(children)}\n </TableHeader>\n );\n }\n\n if (reusableView.viewType === 'row') {\n return (\n <TableRow\n key={reusableView.key}\n item={reusableView.content}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}>\n {renderChildren(children)}\n </TableRow>\n );\n }\n\n if (reusableView.viewType === 'headerrow') {\n return (\n <TableHeaderRow\n onHoverChange={setHeaderRowHovered}\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n parent={parent?.layoutInfo}\n item={reusableView.content}>\n {renderChildren(children)}\n </TableHeaderRow>\n );\n }\n\n return (\n <TableCellWrapper\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo}\n virtualizer={reusableView.virtualizer}\n parent={parent}>\n {reusableView.rendered}\n </TableCellWrapper>\n );\n }, []);\n\n let renderView = useCallback((type: string, item: GridNode<T>) => {\n switch (type) {\n case 'header':\n case 'rowgroup':\n case 'section':\n case 'row':\n case 'headerrow':\n return null;\n case 'cell': {\n if (item.props.isSelectionCell) {\n return <TableCheckboxCell cell={item} />;\n }\n\n if (item.props.isDragButtonCell) {\n return <TableDragCell cell={item} />;\n }\n\n return <TableCell cell={item} />;\n }\n case 'placeholder':\n // TODO: move to react-aria?\n return (\n <div\n role=\"gridcell\"\n aria-colindex={item.index + 1}\n aria-colspan={item.colspan > 1 ? item.colspan : null} />\n );\n case 'column':\n if (item.props.isSelectionCell) {\n return <TableSelectAllCell column={item} />;\n }\n\n if (item.props.isDragButtonCell) {\n return <TableDragHeaderCell column={item} />;\n }\n\n // TODO: consider this case, what if we have hidden headers and a empty table\n if (item.props.hideHeader) {\n return (\n <TooltipTrigger placement=\"top\" trigger=\"focus\">\n <TableColumnHeader column={item} />\n <Tooltip placement=\"top\">{item.rendered}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.props.allowsResizing && !item.hasChildNodes) {\n return <ResizableTableColumnHeader column={item} />;\n }\n\n return (\n <TableColumnHeader column={item} />\n );\n case 'loader':\n return <LoadingState />;\n case 'empty': {\n return <EmptyState />;\n }\n }\n }, []);\n\n let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = useState(false);\n let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = useState(false);\n let viewport = useRef({x: 0, y: 0, width: 0, height: 0});\n let onVisibleRectChange = useCallback((e) => {\n if (viewport.current.width === e.width && viewport.current.height === e.height) {\n return;\n }\n viewport.current = e;\n if (bodyRef.current) {\n setVerticalScollbarVisible(bodyRef.current.clientWidth + 2 < bodyRef.current.offsetWidth);\n setHorizontalScollbarVisible(bodyRef.current.clientHeight + 2 < bodyRef.current.offsetHeight);\n }\n }, []);\n let {isFocusVisible, focusProps} = useFocusRing();\n let isEmpty = state.collection.size === 0;\n\n let onFocusedResizer = () => {\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n };\n\n let onResizeStart = useCallback((widths) => {\n setIsResizing(true);\n propsOnResizeStart?.(widths);\n }, [setIsResizing, propsOnResizeStart]);\n let onResizeEnd = useCallback((widths) => {\n setIsInResizeMode(false);\n setIsResizing(false);\n propsOnResizeEnd?.(widths);\n }, [propsOnResizeEnd, setIsInResizeMode, setIsResizing]);\n\n let focusedKey = state.selectionManager.focusedKey;\n if (dropState?.target?.type === 'item') {\n focusedKey = dropState.target.key;\n }\n\n let mergedProps = mergeProps(\n isTableDroppable && droppableCollection?.collectionProps,\n gridProps,\n focusProps,\n dragAndDropHooks?.isVirtualDragging() && {tabIndex: null}\n );\n\n return (\n <TableContext.Provider\n value={{\n state,\n dragState,\n dropState,\n dragAndDropHooks,\n isTableDraggable,\n isTableDroppable,\n layout,\n onResizeStart,\n onResize: props.onResize,\n onResizeEnd,\n headerRowHovered,\n isInResizeMode,\n setIsInResizeMode,\n isEmpty,\n onFocusedResizer,\n headerMenuOpen,\n setHeaderMenuOpen,\n renderEmptyState: props.renderEmptyState\n }}>\n <TableVirtualizer\n {...mergedProps}\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Table',\n `spectrum-Table--${density}`,\n {\n 'spectrum-Table--quiet': isQuiet,\n 'spectrum-Table--wrap': props.overflowMode === 'wrap',\n 'spectrum-Table--loadingMore': state.collection.body.props.loadingState === 'loadingMore',\n 'spectrum-Table--isVerticalScrollbarVisible': isVerticalScrollbarVisible,\n 'spectrum-Table--isHorizontalScrollbarVisible': isHorizontalScrollbarVisible\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table'\n ),\n styleProps.className\n )\n }\n tableState={state}\n layout={layout}\n collection={state.collection}\n focusedKey={focusedKey}\n renderView={renderView}\n renderWrapper={renderWrapper}\n onVisibleRectChange={onVisibleRectChange}\n domRef={domRef}\n headerRef={headerRef}\n bodyRef={bodyRef}\n isFocusVisible={isFocusVisible}\n isVirtualDragging={dragAndDropHooks?.isVirtualDragging()}\n isRootDropTarget={isRootDropTarget} />\n {DragPreview && isTableDraggable &&\n <DragPreview ref={preview}>\n {() => {\n if (dragAndDropHooks.renderPreview) {\n return dragAndDropHooks.renderPreview(dragState.draggingKeys, dragState.draggedKey);\n }\n let itemCount = dragState.draggingKeys.size;\n let maxWidth = bodyRef.current.getBoundingClientRect().width;\n let height = ROW_HEIGHTS[density][scale];\n let itemText = state.collection.getTextValue(dragState.draggedKey);\n return <SpectrumDragPreview itemText={itemText} itemCount={itemCount} height={height} maxWidth={maxWidth} />;\n }}\n </DragPreview>\n }\n </TableContext.Provider>\n );\n}\n\ninterface TableVirtualizerProps<T> extends HTMLAttributes<HTMLElement> {\n tableState: TableState<T>,\n layout: TableViewLayout<T>,\n collection: TableCollection<T>,\n focusedKey: Key | null,\n renderView: (type: string, content: GridNode<T>) => ReactElement,\n renderWrapper?: (\n parent: View | null,\n reusableView: View,\n children: View[],\n renderChildren: (views: View[]) => ReactElement[]\n ) => ReactElement,\n domRef: RefObject<HTMLDivElement>,\n bodyRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n onVisibleRectChange: (rect: Rect) => void,\n isFocusVisible: boolean,\n isVirtualDragging: boolean,\n isRootDropTarget: boolean\n}\n\n// This is a custom Virtualizer that also has a header that syncs its scroll position with the body.\nfunction TableVirtualizer<T>(props: TableVirtualizerProps<T>) {\n let {tableState, layout, collection, focusedKey, renderView, renderWrapper, domRef, bodyRef, headerRef, onVisibleRectChange: onVisibleRectChangeProp, isFocusVisible, isVirtualDragging, isRootDropTarget, ...otherProps} = props;\n let {direction} = useLocale();\n let loadingState = collection.body.props.loadingState;\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let onLoadMore = collection.body.props.onLoadMore;\n let [tableWidth, setTableWidth] = useState(0);\n let {scale} = useProvider();\n\n const getDefaultWidth = useCallback(({props: {hideHeader, isSelectionCell, showDivider, isDragButtonCell}}: GridNode<T>): ColumnSize | null | undefined => {\n if (hideHeader) {\n let width = DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];\n return showDivider ? width + 1 : width;\n } else if (isSelectionCell) {\n return SELECTION_CELL_DEFAULT_WIDTH[scale];\n } else if (isDragButtonCell) {\n return DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];\n }\n }, [scale]);\n\n const getDefaultMinWidth = useCallback(({props: {hideHeader, isSelectionCell, showDivider, isDragButtonCell}}: GridNode<T>): ColumnSize | null | undefined => {\n if (hideHeader) {\n let width = DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];\n return showDivider ? width + 1 : width;\n } else if (isSelectionCell) {\n return SELECTION_CELL_DEFAULT_WIDTH[scale];\n } else if (isDragButtonCell) {\n return DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];\n }\n return 75;\n }, [scale]);\n\n let columnResizeState = useTableColumnResizeState({\n tableWidth,\n getDefaultWidth,\n getDefaultMinWidth\n }, tableState);\n\n let state = useVirtualizerState<GridNode<unknown>, ReactNode>({\n layout,\n collection,\n renderView,\n onVisibleRectChange(rect) {\n bodyRef.current.scrollTop = rect.y;\n setScrollLeft(bodyRef.current, direction, rect.x);\n },\n persistedKeys: useMemo(() => focusedKey ? new Set([focusedKey]) : new Set(), [focusedKey]),\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n let memoedVirtualizerProps = useMemo(() => ({\n tabIndex: otherProps.tabIndex,\n focusedKey,\n isLoading,\n onLoadMore\n }), [otherProps.tabIndex, focusedKey, isLoading, onLoadMore]);\n\n let {virtualizerProps, scrollViewProps: {onVisibleRectChange}} = useVirtualizer(memoedVirtualizerProps, state, domRef);\n let onVisibleRectChangeMemo = useCallback(rect => {\n setTableWidth(rect.width);\n onVisibleRectChange(rect);\n onVisibleRectChangeProp(rect);\n }, [onVisibleRectChange, onVisibleRectChangeProp]);\n\n // this effect runs whenever the contentSize changes, it doesn't matter what the content size is\n // only that it changes in a resize, and when that happens, we want to sync the body to the\n // header scroll position\n useEffect(() => {\n if (getInteractionModality() === 'keyboard' && headerRef.current.contains(document.activeElement)) {\n scrollIntoView(headerRef.current, document.activeElement as HTMLElement);\n scrollIntoViewport(document.activeElement, {containingElement: domRef.current});\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n }\n }, [state.contentSize, headerRef, bodyRef, domRef]);\n\n let headerHeight = layout.getLayoutInfo('header')?.rect.height || 0;\n\n // Sync the scroll position from the table body to the header container.\n let onScroll = useCallback(() => {\n headerRef.current.scrollLeft = bodyRef.current.scrollLeft;\n }, [bodyRef, headerRef]);\n\n let resizerPosition = columnResizeState.resizingColumn != null ? layout.getLayoutInfo(columnResizeState.resizingColumn).rect.maxX - 2 : 0;\n\n let resizerAtEdge = resizerPosition > Math.max(state.virtualizer.contentSize.width, state.virtualizer.visibleRect.width) - 3;\n // this should be fine, every movement of the resizer causes a rerender\n // scrolling can cause it to lag for a moment, but it's always updated\n let resizerInVisibleRegion = resizerPosition < state.virtualizer.visibleRect.maxX;\n let shouldHardCornerResizeCorner = resizerAtEdge && resizerInVisibleRegion;\n\n // minimize re-render caused on Resizers by memoing this\n let resizingColumnWidth = columnResizeState.resizingColumn != null ? columnResizeState.getColumnWidth(columnResizeState.resizingColumn) : 0;\n let resizingColumn = useMemo(() => ({\n width: resizingColumnWidth,\n key: columnResizeState.resizingColumn\n }), [resizingColumnWidth, columnResizeState.resizingColumn]);\n let mergedProps = mergeProps(\n otherProps,\n virtualizerProps,\n isVirtualDragging && {tabIndex: null}\n );\n\n let firstColumn = collection.columns[0];\n let scrollPadding = 0;\n if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) {\n scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);\n }\n\n let visibleViews = renderChildren(null, state.visibleViews, renderWrapper);\n\n return (\n <VirtualizerContext.Provider value={resizingColumn}>\n <FocusScope>\n <div\n {...mergedProps}\n ref={domRef}>\n <div\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-headWrapper')}\n style={{\n height: headerHeight,\n overflow: 'hidden',\n position: 'relative',\n willChange: state.isScrolling ? 'scroll-position' : undefined,\n scrollPaddingInlineStart: scrollPadding\n }}\n ref={headerRef}>\n <ResizeStateContext.Provider value={columnResizeState}>\n {visibleViews[0]}\n </ResizeStateContext.Provider>\n </div>\n <ScrollView\n className={\n classNames(\n styles,\n 'spectrum-Table-body',\n {\n 'focus-ring': isFocusVisible,\n 'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-body',\n {\n 'react-spectrum-Table-body--dropTarget': !!isRootDropTarget\n }\n )\n )\n }\n // Firefox and Chrome make generic elements using CSS overflow 'scroll' or 'auto' tabbable,\n // including them within the accessibility tree, which breaks the table structure in Firefox.\n // Using tabIndex={-1} prevents the ScrollView from being tabbable, and using role=\"rowgroup\"\n // here and role=\"presentation\" on the table body content fixes the table structure.\n role=\"rowgroup\"\n tabIndex={isVirtualDragging ? null : -1}\n style={{\n flex: 1,\n scrollPaddingInlineStart: scrollPadding\n }}\n innerStyle={{overflow: 'visible'}}\n ref={bodyRef}\n contentSize={state.contentSize}\n onVisibleRectChange={onVisibleRectChangeMemo}\n onScrollStart={state.startScrolling}\n onScrollEnd={state.endScrolling}\n onScroll={onScroll}>\n {visibleViews[1]}\n <div\n className={classNames(styles, 'spectrum-Table-bodyResizeIndicator')}\n style={{[direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`, height: `${Math.max(state.virtualizer.contentSize.height, state.virtualizer.visibleRect.height)}px`, display: columnResizeState.resizingColumn ? 'block' : 'none'}} />\n </ScrollView>\n </div>\n </FocusScope>\n </VirtualizerContext.Provider>\n );\n}\n\nfunction renderChildren<T extends object>(parent: View | null, views: View[], renderWrapper: TableVirtualizerProps<T>['renderWrapper']) {\n return views.map(view => {\n return renderWrapper(\n parent,\n view,\n view.children ? Array.from(view.children) : [],\n childViews => renderChildren(view, childViews, renderWrapper)\n );\n });\n}\n\nfunction useStyle(layoutInfo: LayoutInfo, parent: LayoutInfo | null) {\n let {direction} = useLocale();\n let style = layoutInfoToStyle(layoutInfo, direction, parent);\n if (style.overflow === 'hidden') {\n style.overflow = 'visible'; // needed to support position: sticky\n }\n return style;\n}\n\nfunction TableHeader({children, layoutInfo, parent, ...otherProps}) {\n let {rowGroupProps} = useTableRowGroup();\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...rowGroupProps} {...otherProps} className={classNames(styles, 'spectrum-Table-head')} style={style}>\n {children}\n </div>\n );\n}\n\nfunction TableColumnHeader(props) {\n let {column} = props;\n let ref = useRef<HTMLDivElement>(null);\n let {state, isEmpty} = useTableContext();\n let {pressProps, isPressed} = usePress({isDisabled: isEmpty});\n let columnProps = column.props as SpectrumColumnProps<unknown>;\n useEffect(() => {\n if (column.hasChildNodes && columnProps.allowsResizing) {\n console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);\n }\n }, [column.hasChildNodes, column.key, columnProps.allowsResizing]);\n\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {hoverProps, isHovered} = useHover({...props, isDisabled: isEmpty});\n\n const allProps = [columnHeaderProps, hoverProps, pressProps];\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(...allProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n {\n 'is-active': isPressed,\n 'is-sortable': columnProps.allowsSorting,\n 'is-sorted-desc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'descending',\n 'is-sorted-asc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'ascending',\n 'is-hovered': isHovered,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.colspan > 1,\n 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'\n }\n )\n )\n }>\n {columnProps.allowsSorting &&\n <ArrowDownSmall UNSAFE_className={classNames(styles, 'spectrum-Table-sortedIcon')} />\n }\n {columnProps.hideHeader ?\n <VisuallyHidden>{column.rendered}</VisuallyHidden> :\n <div className={classNames(styles, 'spectrum-Table-headCellContents')}>{column.rendered}</div>\n }\n </div>\n </FocusRing>\n );\n}\n\nlet _TableColumnHeaderButton = (props, ref: FocusableRef<HTMLDivElement>) => {\n let {focusProps, alignment, ...otherProps} = props;\n let {isEmpty} = useTableContext();\n let domRef = useFocusableRef(ref);\n let {buttonProps} = useButton({...otherProps, elementType: 'div', isDisabled: isEmpty}, domRef);\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: isEmpty});\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Table-headCellContents',\n {\n 'is-hovered': isHovered\n }\n )\n }\n {...hoverProps}>\n <div\n className={\n classNames(\n styles,\n 'spectrum-Table-headCellButton',\n {\n 'spectrum-Table-headCellButton--alignStart': alignment === 'start',\n 'spectrum-Table-headCellButton--alignCenter': alignment === 'center',\n 'spectrum-Table-headCellButton--alignEnd': alignment === 'end'\n }\n )\n }\n {...mergeProps(buttonProps, focusProps)}\n ref={domRef}>\n {props.children}\n </div>\n </div>\n );\n};\nlet TableColumnHeaderButton = React.forwardRef(_TableColumnHeaderButton);\n\nfunction ResizableTableColumnHeader(props) {\n let {column} = props;\n let ref = useRef(null);\n let triggerRef = useRef(null);\n let resizingRef = useRef(null);\n let {\n state,\n onResizeStart,\n onResize,\n onResizeEnd,\n headerRowHovered,\n setIsInResizeMode,\n isEmpty,\n isInResizeMode,\n headerMenuOpen,\n setHeaderMenuOpen\n } = useTableContext();\n let columnResizeState = useContext(ResizeStateContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {pressProps, isPressed} = usePress({isDisabled: isEmpty});\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {hoverProps, isHovered} = useHover({...props, isDisabled: isEmpty || headerMenuOpen});\n\n const allProps = [columnHeaderProps, pressProps, hoverProps];\n\n let columnProps = column.props as SpectrumColumnProps<unknown>;\n\n let {isFocusVisible, focusProps} = useFocusRing();\n\n const onMenuSelect = (key) => {\n switch (key) {\n case 'sort-asc':\n state.sort(column.key, 'ascending');\n break;\n case 'sort-desc':\n state.sort(column.key, 'descending');\n break;\n case 'resize':\n columnResizeState.startResize(column.key);\n setIsInResizeMode(true);\n state.setKeyboardNavigationDisabled(true);\n break;\n }\n };\n let allowsSorting = column.props?.allowsSorting;\n let items = useMemo(() => {\n let options = [\n allowsSorting ? {\n label: stringFormatter.format('sortAscending'),\n id: 'sort-asc'\n } : undefined,\n allowsSorting ? {\n label: stringFormatter.format('sortDescending'),\n id: 'sort-desc'\n } : undefined,\n {\n label: stringFormatter.format('resizeColumn'),\n id: 'resize'\n }\n ];\n return options;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allowsSorting]);\n\n let resizingColumn = columnResizeState.resizingColumn;\n let showResizer = !isEmpty && ((headerRowHovered && getInteractionModality() !== 'keyboard') || resizingColumn != null);\n let alignment = 'start';\n let menuAlign = 'start' as 'start' | 'end';\n if (columnProps.align === 'center' || column.colspan > 1) {\n alignment = 'center';\n } else if (columnProps.align === 'end') {\n alignment = 'end';\n menuAlign = 'end';\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(...allProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n {\n 'is-active': isPressed,\n 'is-resizable': columnProps.allowsResizing,\n 'is-sortable': columnProps.allowsSorting,\n 'is-sorted-desc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'descending',\n 'is-sorted-asc': state.sortDescriptor?.column === column.key && state.sortDescriptor?.direction === 'ascending',\n 'is-hovered': isHovered,\n 'focus-ring': isFocusVisible,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignCenter': alignment === 'center',\n 'react-spectrum-Table-cell--alignEnd': alignment === 'end'\n }\n )\n )\n }>\n <MenuTrigger onOpenChange={setHeaderMenuOpen} align={menuAlign}>\n <TableColumnHeaderButton alignment={alignment} ref={triggerRef} focusProps={focusProps}>\n {columnProps.allowsSorting &&\n <ArrowDownSmall UNSAFE_className={classNames(styles, 'spectrum-Table-sortedIcon')} />\n }\n {columnProps.hideHeader ?\n <VisuallyHidden>{column.rendered}</VisuallyHidden> :\n <div className={classNames(styles, 'spectrum-Table-headerCellText')}>{column.rendered}</div>\n }\n {\n columnProps.allowsResizing && <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Table-menuChevron')} />\n }\n </TableColumnHeaderButton>\n <Menu onAction={onMenuSelect} minWidth=\"size-2000\" items={items}>\n {(item) => (\n <Item>\n {item.label}\n </Item>\n )}\n </Menu>\n </MenuTrigger>\n <Resizer\n ref={resizingRef}\n column={column}\n showResizer={showResizer}\n onResizeStart={onResizeStart}\n onResize={onResize}\n onResizeEnd={onResizeEnd}\n triggerRef={useUnwrapDOMRef(triggerRef)} />\n <div\n aria-hidden\n className={classNames(\n styles,\n 'spectrum-Table-colResizeIndicator',\n {\n 'spectrum-Table-colResizeIndicator--visible': resizingColumn != null,\n 'spectrum-Table-colResizeIndicator--resizing': resizingColumn === column.key\n }\n )}>\n <div\n className={classNames(\n styles,\n 'spectrum-Table-colResizeNubbin',\n {\n 'spectrum-Table-colResizeNubbin--visible': isInResizeMode && resizingColumn === column.key\n }\n )}>\n <Nubbin />\n </div>\n </div>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableSelectAllCell({column}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let isSingleSelectionMode = state.selectionManager.selectionMode === 'single';\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n\n let {checkboxProps} = useTableSelectAllCheckbox(state);\n let {hoverProps, isHovered} = useHover({});\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(columnHeaderProps, hoverProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n 'spectrum-Table-checkboxCell',\n {\n 'is-hovered': isHovered\n }\n )\n }>\n {\n /*\n In single selection mode, the checkbox will be hidden.\n So to avoid leaving a column header with no accessible content,\n we use a VisuallyHidden component to include the aria-label from the checkbox,\n which for single selection will be \"Select.\"\n */\n isSingleSelectionMode &&\n <VisuallyHidden>{checkboxProps['aria-label']}</VisuallyHidden>\n }\n <Checkbox\n {...checkboxProps}\n isEmphasized\n UNSAFE_style={isSingleSelectionMode ? {visibility: 'hidden'} : undefined}\n UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />\n </div>\n </FocusRing>\n );\n}\n\nfunction TableDragHeaderCell({column}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let {columnHeaderProps} = useTableColumnHeader({\n node: column,\n isVirtualized: true\n }, state, ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...columnHeaderProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-headCell',\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-headCell',\n 'react-spectrum-Table-dragButtonHeadCell'\n )\n )\n }>\n <VisuallyHidden>{stringFormatter.format('drag')}</VisuallyHidden>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableRowGroup({children, layoutInfo, parent, ...otherProps}) {\n let {rowGroupProps} = useTableRowGroup();\n let {isTableDroppable} = useContext(TableContext);\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...rowGroupProps} style={style} {...otherProps}>\n {isTableDroppable &&\n <RootDropIndicator key=\"root\" />\n }\n {children}\n </div>\n );\n}\n\nfunction DragButton() {\n let {dragButtonProps, dragButtonRef, isFocusVisibleWithin} = useTableRowContext();\n let {visuallyHiddenProps} = useVisuallyHidden();\n return (\n <FocusRing focusRingClass={classNames(stylesOverrides, 'focus-ring')}>\n <div\n {...dragButtonProps as React.HTMLAttributes<HTMLElement>}\n className={\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-dragButton'\n )\n }\n style={!isFocusVisibleWithin ? {...visuallyHiddenProps.style} : {}}\n ref={dragButtonRef}\n draggable=\"true\">\n <ListGripper UNSAFE_className={classNames(stylesOverrides)} />\n </div>\n </FocusRing>\n );\n}\n\ninterface TableRowContextValue {\n dragButtonProps: React.HTMLAttributes<HTMLDivElement>,\n dragButtonRef: React.MutableRefObject<undefined>,\n isFocusVisibleWithin: boolean\n}\n\n\nconst TableRowContext = React.createContext<TableRowContextValue>(null);\nexport function useTableRowContext() {\n return useContext(TableRowContext);\n}\n\nfunction TableRow({item, children, layoutInfo, parent, ...otherProps}) {\n let ref = useRef(undefined);\n let {state, layout, dragAndDropHooks, isTableDraggable, isTableDroppable, dragState, dropState} = useTableContext();\n let isSelected = state.selectionManager.isSelected(item.key);\n let {rowProps, hasAction, allowsSelection} = useTableRow({\n node: item,\n isVirtualized: true,\n shouldSelectOnPressUp: isTableDraggable\n }, state, ref);\n\n let isDisabled = !allowsSelection && !hasAction;\n let isDroppable = isTableDroppable && !isDisabled;\n let {pressProps, isPressed} = usePress({isDisabled});\n\n // The row should show the focus background style when any cell inside it is focused.\n // If the row itself is focused, then it should have a blue focus indicator on the left.\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let {isFocusVisible, focusProps} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled});\n let isFirstRow = state.collection.rows.find(row => row.level === 1)?.key === item.key;\n let isLastRow = item.nextKey == null;\n // Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom\n // border corners of the last row when selected.\n let isFlushWithContainerBottom = false;\n if (isLastRow) {\n if (layout.getContentSize()?.height >= layout.virtualizer?.visibleRect.height) {\n isFlushWithContainerBottom = true;\n }\n }\n\n let draggableItem: DraggableItemResult;\n if (isTableDraggable) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n draggableItem = dragAndDropHooks.useDraggableItem({key: item.key, hasDragButton: true}, dragState);\n if (isDisabled) {\n draggableItem = null;\n }\n }\n let droppableItem: DroppableItemResult;\n let isDropTarget: boolean;\n let dropIndicator: DropIndicatorAria;\n let dropIndicatorRef = useRef(undefined);\n if (isTableDroppable) {\n let target = {type: 'item', key: item.key, dropPosition: 'on'} as DropTarget;\n isDropTarget = dropState.isDropTarget(target);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n dropIndicator = dragAndDropHooks.useDropIndicator({target}, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = React.useRef(undefined);\n let {buttonProps: dragButtonProps} = useButton({\n ...draggableItem?.dragButtonProps,\n elementType: 'div'\n }, dragButtonRef);\n\n let style = useStyle(layoutInfo, parent);\n\n let props = mergeProps(\n rowProps,\n otherProps,\n {style},\n focusWithinProps,\n focusProps,\n hoverProps,\n pressProps,\n draggableItem?.dragProps,\n // Remove tab index from list row if performing a screenreader drag. This prevents TalkBack from focusing the row,\n // allowing for single swipe navigation between row drop indicator\n dragAndDropHooks?.isVirtualDragging() && {tabIndex: null}\n ) as HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>;\n\n let dropProps = isDroppable ? droppableItem?.dropProps : {'aria-hidden': droppableItem?.dropProps['aria-hidden']};\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n return (\n <TableRowContext.Provider value={{dragButtonProps, dragButtonRef, isFocusVisibleWithin}}>\n {isTableDroppable && isFirstRow &&\n <InsertionIndicator\n rowProps={props}\n key={`${item.key}-before`}\n target={{key: item.key, type: 'item', dropPosition: 'before'}} />\n }\n {isTableDroppable && !dropIndicator?.isHidden &&\n <div role=\"row\" {...visuallyHiddenProps}>\n <div role=\"gridcell\">\n <div role=\"button\" {...dropIndicator?.dropIndicatorProps} ref={dropIndicatorRef} />\n </div>\n </div>\n }\n <div\n {...mergeProps(props, dropProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-row',\n {\n 'is-active': isPressed,\n 'is-selected': isSelected,\n 'spectrum-Table-row--highlightSelection': state.selectionManager.selectionBehavior === 'replace',\n 'is-next-selected': state.selectionManager.isSelected(item.nextKey),\n 'is-focused': isFocusVisibleWithin,\n 'focus-ring': isFocusVisible,\n 'is-hovered': isHovered,\n 'is-disabled': isDisabled,\n 'spectrum-Table-row--firstRow': isFirstRow,\n 'spectrum-Table-row--lastRow': isLastRow,\n 'spectrum-Table-row--isFlushBottom': isFlushWithContainerBottom\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-row',\n {'react-spectrum-Table-row--dropTarget': isDropTarget}\n )\n )\n }>\n {children}\n </div>\n {isTableDroppable &&\n <InsertionIndicator\n rowProps={props}\n key={`${item.key}-after`}\n target={{key: item.key, type: 'item', dropPosition: 'after'}} />\n }\n </TableRowContext.Provider>\n );\n}\n\nfunction TableHeaderRow({item, children, layoutInfo, parent, ...props}) {\n let {state, headerMenuOpen} = useTableContext();\n let ref = useRef(undefined);\n let {rowProps} = useTableHeaderRow({node: item, isVirtualized: true}, state, ref);\n let {hoverProps} = useHover({...props, isDisabled: headerMenuOpen});\n let style = useStyle(layoutInfo, parent);\n\n return (\n <div {...mergeProps(rowProps, hoverProps)} ref={ref} style={style}>\n {children}\n </div>\n );\n}\n\nfunction TableDragCell({cell}) {\n let ref = useRef(undefined);\n let {state, isTableDraggable} = useTableContext();\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...gridCellProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n {\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n 'react-spectrum-Table-dragButtonCell'\n )\n )\n }>\n {isTableDraggable && !isDisabled && <DragButton />}\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCheckboxCell({cell}) {\n let ref = useRef(undefined);\n let {state} = useTableContext();\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n\n let {checkboxProps} = useTableSelectionCheckbox({key: cell.parentKey}, state);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...gridCellProps}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n 'spectrum-Table-checkboxCell',\n {\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell'\n )\n )\n }>\n {state.selectionManager.selectionMode !== 'none' &&\n <Checkbox\n {...checkboxProps}\n isEmphasized\n isDisabled={isDisabled}\n UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />\n }\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCell({cell}) {\n let {scale} = useProvider();\n let {state} = useTableContext();\n let isExpandableTable = 'expandedKeys' in state;\n let ref = useRef(undefined);\n let columnProps = cell.column.props as SpectrumColumnProps<unknown>;\n let isDisabled = state.disabledKeys.has(cell.parentKey);\n let {gridCellProps} = useTableCell({\n node: cell,\n isVirtualized: true\n }, state, ref);\n let {id, ...otherGridCellProps} = gridCellProps;\n let isFirstRowHeaderCell = state.collection.rowHeaderColumnKeys.keys().next().value === cell.column.key;\n let isRowExpandable = false;\n let showExpandCollapseButton = false;\n let levelOffset = 0;\n\n if ('expandedKeys' in state) {\n isRowExpandable = state.keyMap.get(cell.parentKey)?.props.UNSTABLE_childItems?.length > 0 || state.keyMap.get(cell.parentKey)?.props?.children?.length > state.userColumnCount;\n showExpandCollapseButton = isFirstRowHeaderCell && isRowExpandable;\n // Offset based on level, and add additional offset if there is no expand/collapse button on a row\n levelOffset = (cell.level - 2) * LEVEL_OFFSET_WIDTH[scale] + (!showExpandCollapseButton ? LEVEL_OFFSET_WIDTH[scale] * 2 : 0);\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...otherGridCellProps}\n aria-labelledby={id}\n ref={ref}\n style={isExpandableTable && isFirstRowHeaderCell ? {paddingInlineStart: levelOffset} : {}}\n className={\n classNames(\n styles,\n 'spectrum-Table-cell',\n {\n 'spectrum-Table-cell--divider': columnProps.showDivider && cell.column.nextKey !== null,\n 'spectrum-Table-cell--hideHeader': columnProps.hideHeader,\n 'spectrum-Table-cell--hasExpandCollapseButton': showExpandCollapseButton,\n 'is-disabled': isDisabled\n },\n classNames(\n stylesOverrides,\n 'react-spectrum-Table-cell',\n {\n 'react-spectrum-Table-cell--alignStart': columnProps.align === 'start',\n 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center',\n 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'\n }\n )\n )\n }>\n {showExpandCollapseButton && <ExpandableRowChevron cell={cell} />}\n <span\n id={id}\n className={\n classNames(\n styles,\n 'spectrum-Table-cellContents'\n )\n }>\n {cell.rendered}\n </span>\n </div>\n </FocusRing>\n );\n}\n\nfunction TableCellWrapper({layoutInfo, virtualizer, parent, children}) {\n let {isTableDroppable, dropState} = useContext(TableContext);\n let isDropTarget: boolean;\n let isRootDroptarget: boolean;\n if (isTableDroppable) {\n if (parent.content) {\n isDropTarget = dropState.isDropTarget({type: 'item', dropPosition: 'on', key: parent.content.key});\n }\n isRootDroptarget = dropState.isDropTarget({type: 'root'});\n }\n\n return (\n <VirtualizerItem\n layoutInfo={layoutInfo}\n virtualizer={virtualizer}\n parent={parent?.layoutInfo}\n className={\n useMemo(() => classNames(\n styles,\n 'spectrum-Table-cellWrapper',\n classNames(\n stylesOverrides,\n {\n 'react-spectrum-Table-cellWrapper': !layoutInfo.estimatedSize,\n 'react-spectrum-Table-cellWrapper--dropTarget': isDropTarget || isRootDroptarget\n }\n )\n ), [layoutInfo.estimatedSize, isDropTarget, isRootDroptarget])\n }>\n {children}\n </VirtualizerItem>\n );\n}\n\nfunction ExpandableRowChevron({cell}) {\n // TODO: move some/all of the chevron button setup into a separate hook?\n let {direction} = useLocale();\n let {state} = useTableContext();\n let expandButtonRef = useRef(undefined);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let isExpanded;\n\n if ('expandedKeys' in state) {\n isExpanded = state.expandedKeys === 'all' || state.expandedKeys.has(cell.parentKey);\n }\n\n // Will need to keep the chevron as a button for iOS VO at all times since VO doesn't focus the cell. Also keep as button if cellAction is defined by the user in the future\n let {buttonProps} = useButton({\n // Desktop and mobile both toggle expansion of a native expandable row on mouse/touch up\n onPress: () => {\n (state as TreeGridState<unknown>).toggleKey(cell.parentKey);\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(cell.parentKey);\n }\n },\n elementType: 'span',\n 'aria-label': isExpanded ? stringFormatter.format('collapse') : stringFormatter.format('expand')\n }, expandButtonRef);\n\n return (\n <span\n {...buttonProps}\n ref={expandButtonRef}\n // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually \"focus\" it\n tabIndex={isAndroid() ? -1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Table-expandButton',\n {\n 'is-open': isExpanded\n }\n )\n }>\n {direction === 'ltr' ? <ChevronRightMedium /> : <ChevronLeftMedium />}\n </span>\n );\n}\n\nfunction LoadingState() {\n let {state} = useContext(TableContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n return (\n <CenteredWrapper>\n <ProgressCircle\n isIndeterminate\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')} />\n </CenteredWrapper>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(TableContext);\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <CenteredWrapper>\n {emptyState}\n </CenteredWrapper>\n );\n}\n\nfunction CenteredWrapper({children}) {\n let {state} = useTableContext();\n let rowProps;\n\n if ('expandedKeys' in state) {\n let topLevelRowCount = [...state.keyMap.get(state.collection.body.key).childNodes].length;\n rowProps = {\n 'aria-level': 1,\n 'aria-posinset': topLevelRowCount + 1,\n 'aria-setsize': topLevelRowCount + 1\n };\n } else {\n rowProps = {\n 'aria-rowindex': state.collection.headerRows.length + state.collection.size + 1\n };\n }\n\n return (\n <div\n role=\"row\"\n {...rowProps}\n className={classNames(stylesOverrides, 'react-spectrum-Table-centeredWrapper')}>\n <div role=\"rowheader\" aria-colspan={state.collection.columns.length}>\n {children}\n </div>\n </div>\n );\n}\n\nconst _TableViewBase = React.forwardRef(TableViewBase) as <T>(props: TableBaseProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewBase as TableViewBase};\n"],"names":[],"version":3,"file":"TableViewBase.main.js.map"}
@@ -434,7 +434,6 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
434
434
  layout: layout,
435
435
  collection: collection,
436
436
  renderView: renderView,
437
- renderWrapper: renderWrapper,
438
437
  onVisibleRectChange (rect) {
439
438
  bodyRef.current.scrollTop = rect.y;
440
439
  (0, $7lS7h$setScrollLeft)(bodyRef.current, direction, rect.x);
@@ -516,6 +515,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
516
515
  let firstColumn = collection.columns[0];
517
516
  let scrollPadding = 0;
518
517
  if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);
518
+ let visibleViews = $bd013581c0a4b065$var$renderChildren(null, state.visibleViews, renderWrapper);
519
519
  return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$export$d288a7dd40372bc.Provider, {
520
520
  value: resizingColumn
521
521
  }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusScope), null, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
@@ -534,7 +534,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
534
534
  ref: headerRef
535
535
  }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $fc695d2eafc2b351$export$b517d84d4ad20b24).Provider, {
536
536
  value: columnResizeState
537
- }, state.visibleViews[0])), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ScrollView), {
537
+ }, visibleViews[0])), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ScrollView), {
538
538
  className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-body', {
539
539
  'focus-ring': isFocusVisible,
540
540
  'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner
@@ -560,7 +560,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
560
560
  onScrollStart: state.startScrolling,
561
561
  onScrollEnd: state.endScrolling,
562
562
  onScroll: onScroll
563
- }, state.visibleViews[1], /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
563
+ }, visibleViews[1], /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
564
564
  className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-bodyResizeIndicator'),
565
565
  style: {
566
566
  [direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`,
@@ -569,6 +569,11 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
569
569
  }
570
570
  })))));
571
571
  }
572
+ function $bd013581c0a4b065$var$renderChildren(parent, views, renderWrapper) {
573
+ return views.map((view)=>{
574
+ return renderWrapper(parent, view, view.children ? Array.from(view.children) : [], (childViews)=>$bd013581c0a4b065$var$renderChildren(view, childViews, renderWrapper));
575
+ });
576
+ }
572
577
  function $bd013581c0a4b065$var$useStyle(layoutInfo, parent) {
573
578
  let { direction: direction } = (0, $7lS7h$useLocale)();
574
579
  let style = (0, $7lS7h$layoutInfoToStyle)(layoutInfo, direction, parent);
@@ -434,7 +434,6 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
434
434
  layout: layout,
435
435
  collection: collection,
436
436
  renderView: renderView,
437
- renderWrapper: renderWrapper,
438
437
  onVisibleRectChange (rect) {
439
438
  bodyRef.current.scrollTop = rect.y;
440
439
  (0, $7lS7h$setScrollLeft)(bodyRef.current, direction, rect.x);
@@ -516,6 +515,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
516
515
  let firstColumn = collection.columns[0];
517
516
  let scrollPadding = 0;
518
517
  if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);
518
+ let visibleViews = $bd013581c0a4b065$var$renderChildren(null, state.visibleViews, renderWrapper);
519
519
  return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$export$d288a7dd40372bc.Provider, {
520
520
  value: resizingColumn
521
521
  }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusScope), null, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
@@ -534,7 +534,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
534
534
  ref: headerRef
535
535
  }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $fc695d2eafc2b351$export$b517d84d4ad20b24).Provider, {
536
536
  value: columnResizeState
537
- }, state.visibleViews[0])), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ScrollView), {
537
+ }, visibleViews[0])), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ScrollView), {
538
538
  className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-body', {
539
539
  'focus-ring': isFocusVisible,
540
540
  'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner
@@ -560,7 +560,7 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
560
560
  onScrollStart: state.startScrolling,
561
561
  onScrollEnd: state.endScrolling,
562
562
  onScroll: onScroll
563
- }, state.visibleViews[1], /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
563
+ }, visibleViews[1], /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
564
564
  className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-bodyResizeIndicator'),
565
565
  style: {
566
566
  [direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`,
@@ -569,6 +569,11 @@ function $bd013581c0a4b065$var$TableVirtualizer(props) {
569
569
  }
570
570
  })))));
571
571
  }
572
+ function $bd013581c0a4b065$var$renderChildren(parent, views, renderWrapper) {
573
+ return views.map((view)=>{
574
+ return renderWrapper(parent, view, view.children ? Array.from(view.children) : [], (childViews)=>$bd013581c0a4b065$var$renderChildren(view, childViews, renderWrapper));
575
+ });
576
+ }
572
577
  function $bd013581c0a4b065$var$useStyle(layoutInfo, parent) {
573
578
  let { direction: direction } = (0, $7lS7h$useLocale)();
574
579
  let style = (0, $7lS7h$layoutInfoToStyle)(layoutInfo, direction, parent);