@react-spectrum/table 3.13.2-nightly.4980 → 3.13.2-nightly.5022
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.
|
@@ -905,10 +905,11 @@ function $e39c6de4eb69450d$var$TableRow({ item: item, children: children, layout
|
|
|
905
905
|
isVirtualized: true,
|
|
906
906
|
shouldSelectOnPressUp: isTableDraggable
|
|
907
907
|
}, state, ref);
|
|
908
|
-
let isDisabled =
|
|
908
|
+
let isDisabled = state.selectionManager.isDisabled(item.key);
|
|
909
|
+
let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);
|
|
909
910
|
let isDroppable = isTableDroppable && !isDisabled;
|
|
910
911
|
let { pressProps: pressProps, isPressed: isPressed } = (0, $idLTj$reactariainteractions.usePress)({
|
|
911
|
-
isDisabled:
|
|
912
|
+
isDisabled: !isInteractive
|
|
912
913
|
});
|
|
913
914
|
// The row should show the focus background style when any cell inside it is focused.
|
|
914
915
|
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
@@ -917,7 +918,7 @@ function $e39c6de4eb69450d$var$TableRow({ item: item, children: children, layout
|
|
|
917
918
|
});
|
|
918
919
|
let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $idLTj$reactariafocus.useFocusRing)();
|
|
919
920
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $idLTj$reactariainteractions.useHover)({
|
|
920
|
-
isDisabled:
|
|
921
|
+
isDisabled: !isInteractive
|
|
921
922
|
});
|
|
922
923
|
let isFirstRow = ((_state_collection_rows_find = state.collection.rows.find((row)=>row.level === 1)) === null || _state_collection_rows_find === void 0 ? void 0 : _state_collection_rows_find.key) === item.key;
|
|
923
924
|
let isLastRow = item.nextKey == null;
|
|
@@ -1041,7 +1042,7 @@ function $e39c6de4eb69450d$var$TableHeaderRow({ item: item, children: children,
|
|
|
1041
1042
|
function $e39c6de4eb69450d$var$TableDragCell({ cell: cell }) {
|
|
1042
1043
|
let ref = (0, $idLTj$react.useRef)(undefined);
|
|
1043
1044
|
let { state: state, isTableDraggable: isTableDraggable } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1044
|
-
let isDisabled = state.
|
|
1045
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1045
1046
|
let { gridCellProps: gridCellProps } = (0, $idLTj$reactariatable.useTableCell)({
|
|
1046
1047
|
node: cell,
|
|
1047
1048
|
isVirtualized: true
|
|
@@ -1059,7 +1060,10 @@ function $e39c6de4eb69450d$var$TableDragCell({ cell: cell }) {
|
|
|
1059
1060
|
function $e39c6de4eb69450d$var$TableCheckboxCell({ cell: cell }) {
|
|
1060
1061
|
let ref = (0, $idLTj$react.useRef)(undefined);
|
|
1061
1062
|
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1062
|
-
|
|
1063
|
+
// The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,
|
|
1064
|
+
// but the cell itself should not render its disabled styles if disabledBehavior="selection" because the row might have actions on it.
|
|
1065
|
+
let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1066
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1063
1067
|
let { gridCellProps: gridCellProps } = (0, $idLTj$reactariatable.useTableCell)({
|
|
1064
1068
|
node: cell,
|
|
1065
1069
|
isVirtualized: true
|
|
@@ -1078,7 +1082,7 @@ function $e39c6de4eb69450d$var$TableCheckboxCell({ cell: cell }) {
|
|
|
1078
1082
|
}, state.selectionManager.selectionMode !== 'none' && /*#__PURE__*/ (0, ($parcel$interopDefault($idLTj$react))).createElement((0, $idLTj$reactspectrumcheckbox.Checkbox), {
|
|
1079
1083
|
...checkboxProps,
|
|
1080
1084
|
isEmphasized: true,
|
|
1081
|
-
isDisabled:
|
|
1085
|
+
isDisabled: isSelectionDisabled,
|
|
1082
1086
|
UNSAFE_className: (0, $idLTj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-checkbox')
|
|
1083
1087
|
})));
|
|
1084
1088
|
}
|
|
@@ -1088,7 +1092,7 @@ function $e39c6de4eb69450d$var$TableCell({ cell: cell }) {
|
|
|
1088
1092
|
let isExpandableTable = 'expandedKeys' in state;
|
|
1089
1093
|
let ref = (0, $idLTj$react.useRef)(undefined);
|
|
1090
1094
|
let columnProps = cell.column.props;
|
|
1091
|
-
let isDisabled = state.
|
|
1095
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1092
1096
|
let { gridCellProps: gridCellProps } = (0, $idLTj$reactariatable.useTableCell)({
|
|
1093
1097
|
node: cell,
|
|
1094
1098
|
isVirtualized: true
|
|
@@ -1 +1 @@
|
|
|
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,E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AC,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, RefObject} 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, useLoadMore} 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, 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, 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 let dropTargetKey: Key | null = null;\n if (dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'before' && dropTargetKey !== state.collection.getFirstKey()) {\n // Normalize to the \"after\" drop position since we only render those in the DOM.\n // The exception to this is for the first row in the table, where we also render the \"before\" position.\n dropTargetKey = state.collection.getKeyBefore(dropTargetKey);\n }\n }\n\n let persistedKeys = useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k !== null));\n }, [focusedKey, dropTargetKey]);\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 persistedKeys={persistedKeys}\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 persistedKeys: Set<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, persistedKeys, 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,\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, bodyRef);\n let onVisibleRectChange = useCallback((rect: Rect) => {\n state.setVisibleRect(rect);\n }, [state]);\n\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 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"}
|
|
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;QAsQxF;IArQJ,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,WACF,OAAO,YACP,QAAQ,EACR,eAAe,kBAAkB,EACjC,aAAa,gBAAgB,oBAC7B,gBAAg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B,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, RefObject} 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, useLoadMore} 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, 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, 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 let dropTargetKey: Key | null = null;\n if (dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'before' && dropTargetKey !== state.collection.getFirstKey()) {\n // Normalize to the \"after\" drop position since we only render those in the DOM.\n // The exception to this is for the first row in the table, where we also render the \"before\" position.\n dropTargetKey = state.collection.getKeyBefore(dropTargetKey);\n }\n }\n\n let persistedKeys = useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k !== null));\n }, [focusedKey, dropTargetKey]);\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 persistedKeys={persistedKeys}\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 persistedKeys: Set<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, persistedKeys, 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,\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, bodyRef);\n let onVisibleRectChange = useCallback((rect: Rect) => {\n state.setVisibleRect(rect);\n }, [state]);\n\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 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 = state.selectionManager.isDisabled(item.key);\n let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);\n let isDroppable = isTableDroppable && !isDisabled;\n let {pressProps, isPressed} = usePress({isDisabled: !isInteractive});\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: !isInteractive});\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.selectionManager.isDisabled(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 // The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,\n // but the cell itself should not render its disabled styles if disabledBehavior=\"selection\" because the row might have actions on it.\n let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);\n let isDisabled = state.selectionManager.isDisabled(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={isSelectionDisabled}\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.selectionManager.isDisabled(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"}
|
package/dist/TableViewBase.mjs
CHANGED
|
@@ -897,10 +897,11 @@ function $bd013581c0a4b065$var$TableRow({ item: item, children: children, layout
|
|
|
897
897
|
isVirtualized: true,
|
|
898
898
|
shouldSelectOnPressUp: isTableDraggable
|
|
899
899
|
}, state, ref);
|
|
900
|
-
let isDisabled =
|
|
900
|
+
let isDisabled = state.selectionManager.isDisabled(item.key);
|
|
901
|
+
let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);
|
|
901
902
|
let isDroppable = isTableDroppable && !isDisabled;
|
|
902
903
|
let { pressProps: pressProps, isPressed: isPressed } = (0, $7lS7h$usePress)({
|
|
903
|
-
isDisabled:
|
|
904
|
+
isDisabled: !isInteractive
|
|
904
905
|
});
|
|
905
906
|
// The row should show the focus background style when any cell inside it is focused.
|
|
906
907
|
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
@@ -909,7 +910,7 @@ function $bd013581c0a4b065$var$TableRow({ item: item, children: children, layout
|
|
|
909
910
|
});
|
|
910
911
|
let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $7lS7h$useFocusRing)();
|
|
911
912
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
|
|
912
|
-
isDisabled:
|
|
913
|
+
isDisabled: !isInteractive
|
|
913
914
|
});
|
|
914
915
|
let isFirstRow = ((_state_collection_rows_find = state.collection.rows.find((row)=>row.level === 1)) === null || _state_collection_rows_find === void 0 ? void 0 : _state_collection_rows_find.key) === item.key;
|
|
915
916
|
let isLastRow = item.nextKey == null;
|
|
@@ -1033,7 +1034,7 @@ function $bd013581c0a4b065$var$TableHeaderRow({ item: item, children: children,
|
|
|
1033
1034
|
function $bd013581c0a4b065$var$TableDragCell({ cell: cell }) {
|
|
1034
1035
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1035
1036
|
let { state: state, isTableDraggable: isTableDraggable } = $bd013581c0a4b065$export$3cb274deb6c2d854();
|
|
1036
|
-
let isDisabled = state.
|
|
1037
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1037
1038
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1038
1039
|
node: cell,
|
|
1039
1040
|
isVirtualized: true
|
|
@@ -1051,7 +1052,10 @@ function $bd013581c0a4b065$var$TableDragCell({ cell: cell }) {
|
|
|
1051
1052
|
function $bd013581c0a4b065$var$TableCheckboxCell({ cell: cell }) {
|
|
1052
1053
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1053
1054
|
let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
|
|
1054
|
-
|
|
1055
|
+
// The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,
|
|
1056
|
+
// but the cell itself should not render its disabled styles if disabledBehavior="selection" because the row might have actions on it.
|
|
1057
|
+
let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1058
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1055
1059
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1056
1060
|
node: cell,
|
|
1057
1061
|
isVirtualized: true
|
|
@@ -1070,7 +1074,7 @@ function $bd013581c0a4b065$var$TableCheckboxCell({ cell: cell }) {
|
|
|
1070
1074
|
}, state.selectionManager.selectionMode !== 'none' && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
|
|
1071
1075
|
...checkboxProps,
|
|
1072
1076
|
isEmphasized: true,
|
|
1073
|
-
isDisabled:
|
|
1077
|
+
isDisabled: isSelectionDisabled,
|
|
1074
1078
|
UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-checkbox')
|
|
1075
1079
|
})));
|
|
1076
1080
|
}
|
|
@@ -1080,7 +1084,7 @@ function $bd013581c0a4b065$var$TableCell({ cell: cell }) {
|
|
|
1080
1084
|
let isExpandableTable = 'expandedKeys' in state;
|
|
1081
1085
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1082
1086
|
let columnProps = cell.column.props;
|
|
1083
|
-
let isDisabled = state.
|
|
1087
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1084
1088
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1085
1089
|
node: cell,
|
|
1086
1090
|
isVirtualized: true
|
|
@@ -897,10 +897,11 @@ function $bd013581c0a4b065$var$TableRow({ item: item, children: children, layout
|
|
|
897
897
|
isVirtualized: true,
|
|
898
898
|
shouldSelectOnPressUp: isTableDraggable
|
|
899
899
|
}, state, ref);
|
|
900
|
-
let isDisabled =
|
|
900
|
+
let isDisabled = state.selectionManager.isDisabled(item.key);
|
|
901
|
+
let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);
|
|
901
902
|
let isDroppable = isTableDroppable && !isDisabled;
|
|
902
903
|
let { pressProps: pressProps, isPressed: isPressed } = (0, $7lS7h$usePress)({
|
|
903
|
-
isDisabled:
|
|
904
|
+
isDisabled: !isInteractive
|
|
904
905
|
});
|
|
905
906
|
// The row should show the focus background style when any cell inside it is focused.
|
|
906
907
|
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
@@ -909,7 +910,7 @@ function $bd013581c0a4b065$var$TableRow({ item: item, children: children, layout
|
|
|
909
910
|
});
|
|
910
911
|
let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $7lS7h$useFocusRing)();
|
|
911
912
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
|
|
912
|
-
isDisabled:
|
|
913
|
+
isDisabled: !isInteractive
|
|
913
914
|
});
|
|
914
915
|
let isFirstRow = ((_state_collection_rows_find = state.collection.rows.find((row)=>row.level === 1)) === null || _state_collection_rows_find === void 0 ? void 0 : _state_collection_rows_find.key) === item.key;
|
|
915
916
|
let isLastRow = item.nextKey == null;
|
|
@@ -1033,7 +1034,7 @@ function $bd013581c0a4b065$var$TableHeaderRow({ item: item, children: children,
|
|
|
1033
1034
|
function $bd013581c0a4b065$var$TableDragCell({ cell: cell }) {
|
|
1034
1035
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1035
1036
|
let { state: state, isTableDraggable: isTableDraggable } = $bd013581c0a4b065$export$3cb274deb6c2d854();
|
|
1036
|
-
let isDisabled = state.
|
|
1037
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1037
1038
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1038
1039
|
node: cell,
|
|
1039
1040
|
isVirtualized: true
|
|
@@ -1051,7 +1052,10 @@ function $bd013581c0a4b065$var$TableDragCell({ cell: cell }) {
|
|
|
1051
1052
|
function $bd013581c0a4b065$var$TableCheckboxCell({ cell: cell }) {
|
|
1052
1053
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1053
1054
|
let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
|
|
1054
|
-
|
|
1055
|
+
// The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,
|
|
1056
|
+
// but the cell itself should not render its disabled styles if disabledBehavior="selection" because the row might have actions on it.
|
|
1057
|
+
let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1058
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1055
1059
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1056
1060
|
node: cell,
|
|
1057
1061
|
isVirtualized: true
|
|
@@ -1070,7 +1074,7 @@ function $bd013581c0a4b065$var$TableCheckboxCell({ cell: cell }) {
|
|
|
1070
1074
|
}, state.selectionManager.selectionMode !== 'none' && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
|
|
1071
1075
|
...checkboxProps,
|
|
1072
1076
|
isEmphasized: true,
|
|
1073
|
-
isDisabled:
|
|
1077
|
+
isDisabled: isSelectionDisabled,
|
|
1074
1078
|
UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-checkbox')
|
|
1075
1079
|
})));
|
|
1076
1080
|
}
|
|
@@ -1080,7 +1084,7 @@ function $bd013581c0a4b065$var$TableCell({ cell: cell }) {
|
|
|
1080
1084
|
let isExpandableTable = 'expandedKeys' in state;
|
|
1081
1085
|
let ref = (0, $7lS7h$useRef)(undefined);
|
|
1082
1086
|
let columnProps = cell.column.props;
|
|
1083
|
-
let isDisabled = state.
|
|
1087
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1084
1088
|
let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
|
|
1085
1089
|
node: cell,
|
|
1086
1090
|
isVirtualized: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DD,MAAM,8CAAwB;IAC5B,QAAQ;IACR,OAAO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,MAAK;QAAY,gBAAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;OAChE;AAIT;AAEA,MAAM,0DAAiB,CAAA,GAAA,YAAI,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, RefObject} 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, useLoadMore} 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, 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, 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 let dropTargetKey: Key | null = null;\n if (dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'before' && dropTargetKey !== state.collection.getFirstKey()) {\n // Normalize to the \"after\" drop position since we only render those in the DOM.\n // The exception to this is for the first row in the table, where we also render the \"before\" position.\n dropTargetKey = state.collection.getKeyBefore(dropTargetKey);\n }\n }\n\n let persistedKeys = useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k !== null));\n }, [focusedKey, dropTargetKey]);\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 persistedKeys={persistedKeys}\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 persistedKeys: Set<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, persistedKeys, 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,\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, bodyRef);\n let onVisibleRectChange = useCallback((rect: Rect) => {\n state.setVisibleRect(rect);\n }, [state]);\n\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 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.module.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,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AAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;OAChE;AAIT;AAEA,MAAM,0DAAiB,CAAA,GAAA,YAAI,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, RefObject} 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, useLoadMore} 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, 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, 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 let dropTargetKey: Key | null = null;\n if (dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'before' && dropTargetKey !== state.collection.getFirstKey()) {\n // Normalize to the \"after\" drop position since we only render those in the DOM.\n // The exception to this is for the first row in the table, where we also render the \"before\" position.\n dropTargetKey = state.collection.getKeyBefore(dropTargetKey);\n }\n }\n\n let persistedKeys = useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k !== null));\n }, [focusedKey, dropTargetKey]);\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 persistedKeys={persistedKeys}\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 persistedKeys: Set<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, persistedKeys, 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,\n layoutOptions: useMemo(() => ({\n columnWidths: columnResizeState.columnWidths\n }), [columnResizeState.columnWidths])\n });\n\n useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, bodyRef);\n let onVisibleRectChange = useCallback((rect: Rect) => {\n state.setVisibleRect(rect);\n }, [state]);\n\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 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 = state.selectionManager.isDisabled(item.key);\n let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);\n let isDroppable = isTableDroppable && !isDisabled;\n let {pressProps, isPressed} = usePress({isDisabled: !isInteractive});\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: !isInteractive});\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.selectionManager.isDisabled(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 // The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,\n // but the cell itself should not render its disabled styles if disabledBehavior=\"selection\" because the row might have actions on it.\n let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);\n let isDisabled = state.selectionManager.isDisabled(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={isSelectionDisabled}\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.selectionManager.isDisabled(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.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/table",
|
|
3
|
-
"version": "3.13.2-nightly.
|
|
3
|
+
"version": "3.13.2-nightly.5022+b4093dfef",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "3.0.0-nightly.
|
|
40
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
41
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
42
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
43
|
-
"@react-aria/overlays": "3.0.0-nightly.
|
|
44
|
-
"@react-aria/selection": "3.0.0-nightly.
|
|
45
|
-
"@react-aria/table": "3.15.
|
|
46
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
47
|
-
"@react-aria/virtualizer": "4.0.
|
|
48
|
-
"@react-aria/visually-hidden": "3.0.0-nightly.
|
|
49
|
-
"@react-spectrum/checkbox": "3.0.0-nightly.
|
|
50
|
-
"@react-spectrum/dnd": "3.4.2-nightly.
|
|
51
|
-
"@react-spectrum/layout": "3.6.
|
|
52
|
-
"@react-spectrum/menu": "3.20.
|
|
53
|
-
"@react-spectrum/progress": "3.0.0-nightly.
|
|
54
|
-
"@react-spectrum/tooltip": "3.0.0-nightly.
|
|
55
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
56
|
-
"@react-stately/flags": "3.0.4-nightly.
|
|
57
|
-
"@react-stately/layout": "4.0.
|
|
58
|
-
"@react-stately/table": "3.12.
|
|
59
|
-
"@react-stately/virtualizer": "4.0.
|
|
60
|
-
"@react-types/grid": "3.2.9-nightly.
|
|
61
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
62
|
-
"@react-types/table": "3.10.2-nightly.
|
|
63
|
-
"@spectrum-icons/ui": "3.0.0-nightly.
|
|
39
|
+
"@react-aria/button": "3.0.0-nightly.3094+b4093dfef",
|
|
40
|
+
"@react-aria/focus": "3.0.0-nightly.3094+b4093dfef",
|
|
41
|
+
"@react-aria/i18n": "3.0.0-nightly.3094+b4093dfef",
|
|
42
|
+
"@react-aria/interactions": "3.0.0-nightly.3094+b4093dfef",
|
|
43
|
+
"@react-aria/overlays": "3.0.0-nightly.3094+b4093dfef",
|
|
44
|
+
"@react-aria/selection": "3.0.0-nightly.3094+b4093dfef",
|
|
45
|
+
"@react-aria/table": "3.15.4-nightly.5022+b4093dfef",
|
|
46
|
+
"@react-aria/utils": "3.0.0-nightly.3094+b4093dfef",
|
|
47
|
+
"@react-aria/virtualizer": "4.0.3-nightly.5022+b4093dfef",
|
|
48
|
+
"@react-aria/visually-hidden": "3.0.0-nightly.3094+b4093dfef",
|
|
49
|
+
"@react-spectrum/checkbox": "3.0.0-nightly.3094+b4093dfef",
|
|
50
|
+
"@react-spectrum/dnd": "3.4.2-nightly.5022+b4093dfef",
|
|
51
|
+
"@react-spectrum/layout": "3.6.9-nightly.5022+b4093dfef",
|
|
52
|
+
"@react-spectrum/menu": "3.20.4-nightly.5022+b4093dfef",
|
|
53
|
+
"@react-spectrum/progress": "3.0.0-nightly.3094+b4093dfef",
|
|
54
|
+
"@react-spectrum/tooltip": "3.0.0-nightly.3094+b4093dfef",
|
|
55
|
+
"@react-spectrum/utils": "3.0.0-nightly.3094+b4093dfef",
|
|
56
|
+
"@react-stately/flags": "3.0.4-nightly.5022+b4093dfef",
|
|
57
|
+
"@react-stately/layout": "4.0.3-nightly.5022+b4093dfef",
|
|
58
|
+
"@react-stately/table": "3.12.3-nightly.5022+b4093dfef",
|
|
59
|
+
"@react-stately/virtualizer": "4.0.3-nightly.5022+b4093dfef",
|
|
60
|
+
"@react-types/grid": "3.2.9-nightly.5022+b4093dfef",
|
|
61
|
+
"@react-types/shared": "3.0.0-nightly.3094+b4093dfef",
|
|
62
|
+
"@react-types/table": "3.10.2-nightly.5022+b4093dfef",
|
|
63
|
+
"@spectrum-icons/ui": "3.0.0-nightly.3094+b4093dfef",
|
|
64
64
|
"@swc/helpers": "^0.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
68
|
-
"@react-aria/dnd": "3.7.
|
|
69
|
-
"@react-stately/dnd": "3.4.
|
|
67
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.3094+b4093dfef",
|
|
68
|
+
"@react-aria/dnd": "3.7.3-nightly.5022+b4093dfef",
|
|
69
|
+
"@react-stately/dnd": "3.4.3-nightly.5022+b4093dfef"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "b4093dfef3eff0e5fe60d00c53fe2478b96e662f"
|
|
80
80
|
}
|
package/src/TableViewBase.tsx
CHANGED
|
@@ -1128,9 +1128,10 @@ function TableRow({item, children, layoutInfo, parent, ...otherProps}) {
|
|
|
1128
1128
|
shouldSelectOnPressUp: isTableDraggable
|
|
1129
1129
|
}, state, ref);
|
|
1130
1130
|
|
|
1131
|
-
let isDisabled =
|
|
1131
|
+
let isDisabled = state.selectionManager.isDisabled(item.key);
|
|
1132
|
+
let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);
|
|
1132
1133
|
let isDroppable = isTableDroppable && !isDisabled;
|
|
1133
|
-
let {pressProps, isPressed} = usePress({isDisabled});
|
|
1134
|
+
let {pressProps, isPressed} = usePress({isDisabled: !isInteractive});
|
|
1134
1135
|
|
|
1135
1136
|
// The row should show the focus background style when any cell inside it is focused.
|
|
1136
1137
|
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
@@ -1139,7 +1140,7 @@ function TableRow({item, children, layoutInfo, parent, ...otherProps}) {
|
|
|
1139
1140
|
focusProps: focusWithinProps
|
|
1140
1141
|
} = useFocusRing({within: true});
|
|
1141
1142
|
let {isFocusVisible, focusProps} = useFocusRing();
|
|
1142
|
-
let {hoverProps, isHovered} = useHover({isDisabled});
|
|
1143
|
+
let {hoverProps, isHovered} = useHover({isDisabled: !isInteractive});
|
|
1143
1144
|
let isFirstRow = state.collection.rows.find(row => row.level === 1)?.key === item.key;
|
|
1144
1145
|
let isLastRow = item.nextKey == null;
|
|
1145
1146
|
// Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom
|
|
@@ -1266,7 +1267,7 @@ function TableHeaderRow({item, children, layoutInfo, parent, ...props}) {
|
|
|
1266
1267
|
function TableDragCell({cell}) {
|
|
1267
1268
|
let ref = useRef(undefined);
|
|
1268
1269
|
let {state, isTableDraggable} = useTableContext();
|
|
1269
|
-
let isDisabled = state.
|
|
1270
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1270
1271
|
let {gridCellProps} = useTableCell({
|
|
1271
1272
|
node: cell,
|
|
1272
1273
|
isVirtualized: true
|
|
@@ -1301,7 +1302,10 @@ function TableDragCell({cell}) {
|
|
|
1301
1302
|
function TableCheckboxCell({cell}) {
|
|
1302
1303
|
let ref = useRef(undefined);
|
|
1303
1304
|
let {state} = useTableContext();
|
|
1304
|
-
|
|
1305
|
+
// The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,
|
|
1306
|
+
// but the cell itself should not render its disabled styles if disabledBehavior="selection" because the row might have actions on it.
|
|
1307
|
+
let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1308
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1305
1309
|
let {gridCellProps} = useTableCell({
|
|
1306
1310
|
node: cell,
|
|
1307
1311
|
isVirtualized: true
|
|
@@ -1332,7 +1336,7 @@ function TableCheckboxCell({cell}) {
|
|
|
1332
1336
|
<Checkbox
|
|
1333
1337
|
{...checkboxProps}
|
|
1334
1338
|
isEmphasized
|
|
1335
|
-
isDisabled={
|
|
1339
|
+
isDisabled={isSelectionDisabled}
|
|
1336
1340
|
UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />
|
|
1337
1341
|
}
|
|
1338
1342
|
</div>
|
|
@@ -1346,7 +1350,7 @@ function TableCell({cell}) {
|
|
|
1346
1350
|
let isExpandableTable = 'expandedKeys' in state;
|
|
1347
1351
|
let ref = useRef(undefined);
|
|
1348
1352
|
let columnProps = cell.column.props as SpectrumColumnProps<unknown>;
|
|
1349
|
-
let isDisabled = state.
|
|
1353
|
+
let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
|
|
1350
1354
|
let {gridCellProps} = useTableCell({
|
|
1351
1355
|
node: cell,
|
|
1352
1356
|
isVirtualized: true
|