@react-spectrum/table 3.16.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DragPreview.main.js +1 -1
- package/dist/DragPreview.main.js.map +1 -1
- package/dist/DragPreview.mjs +1 -1
- package/dist/DragPreview.module.js +1 -1
- package/dist/DragPreview.module.js.map +1 -1
- package/dist/InsertionIndicator.main.js.map +1 -1
- package/dist/InsertionIndicator.module.js.map +1 -1
- package/dist/Nubbin.main.js.map +1 -1
- package/dist/Nubbin.module.js.map +1 -1
- package/dist/Resizer.main.js +2 -2
- package/dist/Resizer.main.js.map +1 -1
- package/dist/Resizer.mjs +3 -3
- package/dist/Resizer.module.js +3 -3
- package/dist/Resizer.module.js.map +1 -1
- package/dist/RootDropIndicator.main.js.map +1 -1
- package/dist/RootDropIndicator.module.js.map +1 -1
- package/dist/TableViewBase.main.js +4 -2
- package/dist/TableViewBase.main.js.map +1 -1
- package/dist/TableViewBase.mjs +4 -2
- package/dist/TableViewBase.module.js +4 -2
- package/dist/TableViewBase.module.js.map +1 -1
- package/dist/TableViewLayout.main.js +2 -1
- package/dist/TableViewLayout.main.js.map +1 -1
- package/dist/TableViewLayout.mjs +2 -1
- package/dist/TableViewLayout.module.js +2 -1
- package/dist/TableViewLayout.module.js.map +1 -1
- package/dist/es-ES.main.js +2 -2
- package/dist/es-ES.main.js.map +1 -1
- package/dist/es-ES.mjs +2 -2
- package/dist/es-ES.module.js +2 -2
- package/dist/es-ES.module.js.map +1 -1
- package/dist/{vars.27f08d5f.css → table.0cdc494a.css} +1 -1
- package/dist/{vars.27f08d5f.css.map → table.0cdc494a.css.map} +1 -1
- package/package.json +27 -27
- package/src/DragPreview.tsx +2 -2
- package/src/InsertionIndicator.tsx +2 -2
- package/src/Nubbin.tsx +2 -2
- package/src/Resizer.tsx +3 -3
- package/src/RootDropIndicator.tsx +2 -2
- package/src/TableViewBase.tsx +11 -4
- package/src/TableViewLayout.ts +2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AC,KAAK,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IACzB,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,qBACE,0DAAC,2DACC,0DAAC,CAAA,GAAA,2CAAa;QACZ,iBAAA;QACA,cAAY,MAAM,UAAU,CAAC,IAAI,GAAG,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,gBAAgB,MAAM,CAAC;;AAG/G;AAEA,SAAS;IACP,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IACpC,IAAI,aAAa,mBAAmB,qBAAqB;IACzD,IAAI,cAAc,MAChB,OAAO;IAGT,qBACE,0DAAC,6CACE;AAGP;AAEA,SAAS,sCAAgB,YAAC,QAAQ,EAAC;IACjC,IAAI,SAAC,KAAK,EAAC,GAAG;IACd,IAAI;IAEJ,IAAI,kBAAkB,OAAO;QAC3B,IAAI,mBAAmB;eAAI,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU;SAAC,CAAC,MAAM;QACnE,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,0DAAuB,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} from '@react-aria/dnd';\nimport {FocusRing, FocusScope, useFocusRing} from '@react-aria/focus';\nimport {getInteractionModality, HoverProps, 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 | null,\n dropState: DroppableCollectionState | null,\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>(null);\nexport function useTableContext() {\n return useContext(TableContext)!;\n}\n\nexport const VirtualizerContext = React.createContext<{width: number, key: Key | null} | null>(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 | null>(null);\n let bodyRef = useRef<HTMLDivElement | null>(null);\n\n let density = props.density || 'regular';\n let layout = useMemo(() => new TableViewLayout<T>({\n // If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.\n rowHeight: props.overflowMode === 'wrap'\n ? undefined\n : ROW_HEIGHTS[density][scale],\n estimatedRowHeight: props.overflowMode === 'wrap'\n ? ROW_HEIGHTS[density][scale]\n : undefined,\n headingHeight: props.overflowMode === 'wrap'\n ? undefined\n : DEFAULT_HEADER_HEIGHT[scale],\n estimatedHeadingHeight: props.overflowMode === 'wrap'\n ? DEFAULT_HEADER_HEIGHT[scale]\n : undefined\n }),\n // don't recompute when state.collection changes, only used for initial value\n\n [props.overflowMode, scale, density]\n );\n\n let dragState: DraggableCollectionState | null = null;\n let preview = useRef(null);\n if (isTableDraggable && dragAndDropHooks) {\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 | null = null;\n let droppableCollection: DroppableCollectionResult | null = null;\n let isRootDropTarget = false;\n if (isTableDroppable && dragAndDropHooks) {\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 | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]): ReactElement => {\n if (reusableView.viewType === 'rowgroup') {\n return (\n <TableRowGroup\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n parent={parent?.layoutInfo ?? null}\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 ?? null}>\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 ?? null}>\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 ?? null}\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 != null && item.colSpan > 1 ? item.colSpan : undefined} />\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 return null;\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 if (bodyRef.current && headerRef.current) {\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n }\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 : null,\n gridProps,\n focusProps\n );\n\n if (dragAndDropHooks?.isVirtualDragging?.()) {\n mergedProps.tabIndex = undefined;\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?.() || false}\n isRootDropTarget={isRootDropTarget} />\n {DragPreview && isTableDraggable && dragAndDropHooks && dragState &&\n <DragPreview ref={preview}>\n {() => {\n if (dragState.draggedKey == null) {\n return null;\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 | null,\n renderWrapper: (\n parent: View | null,\n reusableView: View,\n children: View[],\n renderChildren: (views: View[]) => ReactElement[]\n ) => ReactElement | null,\n domRef: RefObject<HTMLDivElement | null>,\n bodyRef: RefObject<HTMLDivElement | null>,\n headerRef: RefObject<HTMLDivElement | null>,\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 if (bodyRef.current) {\n bodyRef.current.scrollTop = rect.y;\n setScrollLeft(bodyRef.current, direction, rect.x);\n }\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) && bodyRef.current) {\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 if (headerRef.current && bodyRef.current) {\n headerRef.current.scrollLeft = bodyRef.current.scrollLeft;\n }\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\n if (isVirtualDragging) {\n otherProps.tabIndex = undefined;\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 {...otherProps}\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 ? undefined : -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: NonNullable<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}: {children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null}) {\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 ForwardTableColumnHeaderButton = (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(ForwardTableColumnHeaderButton);\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: {label: string, id: string}[] = [];\n if (allowsSorting) {\n options.push({\n label: stringFormatter.format('sortAscending'),\n id: 'sort-asc'\n });\n options.push({\n label: stringFormatter.format('sortDescending'),\n id: 'sort-desc'\n });\n }\n options.push({\n label: stringFormatter.format('resizeColumn'),\n id: 'resize'\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<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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}: {children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null, role: string}) {\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.RefObject<HTMLDivElement | null>,\n isFocusVisibleWithin: boolean\n}\n\n\nconst TableRowContext = React.createContext<TableRowContextValue | null>(null);\nexport function useTableRowContext() {\n return useContext(TableRowContext)!;\n}\n\nfunction TableRow({item, children, layoutInfo, parent, ...otherProps}: {item: GridNode<unknown>, children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null}) {\n let ref = useRef<HTMLDivElement | null>(null);\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 {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 ?? 0)) {\n isFlushWithContainerBottom = true;\n }\n }\n\n let draggableItem: DraggableItemResult | null = null;\n if (isTableDraggable && dragAndDropHooks && dragState) {\n draggableItem = dragAndDropHooks.useDraggableItem!({key: item.key, hasDragButton: true}, dragState);\n if (isDisabled) {\n draggableItem = null;\n }\n }\n let isDropTarget = false;\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement | null>(null);\n if (isTableDroppable && dragAndDropHooks && dropState) {\n let target = {type: 'item', key: item.key, dropPosition: 'on'} as DropTarget;\n isDropTarget = dropState.isDropTarget(target);\n\n dropIndicator = dragAndDropHooks.useDropIndicator!({target}, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = React.useRef<HTMLDivElement | null>(null);\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} : null\n ) as HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>;\n\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 {...props}\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': item.nextKey != null && 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}: {item: GridNode<unknown>, children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null} & HoverProps) {\n let {state, headerMenuOpen} = useTableContext();\n let ref = useRef<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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}: {layoutInfo: LayoutInfo, virtualizer: any, parent: ReusableView<any, any>, children: ReactNode}) {\n let {isTableDroppable, dropState} = useContext(TableContext)!;\n let isDropTarget = false;\n let isRootDroptarget = false;\n if (isTableDroppable && dropState) {\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<HTMLSpanElement | null>(null);\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.collection.body.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 ForwardTableViewBase = React.forwardRef(TableViewBase) as <T>(props: TableBaseProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {ForwardTableViewBase 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,CAAoC;AAC5E,SAAS;IACd,OAAO,CAAA,GAAA,uBAAS,EAAE;AACpB;AAEO,MAAM,yDAAqB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAA0C;AACxF,SAAS;IAId,OAAO,CAAA,GAAA,uBAAS,EAAE;AACpB;AAQA,SAAS,oCAAgC,KAAwB,EAAE,GAA2B;QA4QxF,mBAmBA,qCA2DqB;IAzVzB,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,WACF,OAAO,YACP,QAAQ,EACR,eAAe,kBAAkB,EACjC,aAAa,gBAAgB,oBAC7B,gBAAgB,SAChB,KAAK,EACN,GAAG;IACJ,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,mBAAmB,CAAC,EAAC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M,UAAU,CAAC,OAAO,CAAC,MAAM;OAChE;AAIT;AAEA,MAAM,0DAAuB,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} from '@react-aria/dnd';\nimport {FocusRing, FocusScope, useFocusRing} from '@react-aria/focus';\nimport {getInteractionModality, HoverProps, 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 | null,\n dropState: DroppableCollectionState | null,\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>(null);\nexport function useTableContext(): TableContextValue<unknown> {\n return useContext(TableContext)!;\n}\n\nexport const VirtualizerContext = React.createContext<{width: number, key: Key | null} | null>(null);\nexport function useVirtualizerContext(): {\n width: number,\n key: Key | null\n} | null {\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 (process.env.NODE_ENV === 'production') {\n return;\n }\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 | null>(null);\n let bodyRef = useRef<HTMLDivElement | null>(null);\n\n let density = props.density || 'regular';\n let layout = useMemo(() => new TableViewLayout<T>({\n // If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.\n rowHeight: props.overflowMode === 'wrap'\n ? undefined\n : ROW_HEIGHTS[density][scale],\n estimatedRowHeight: props.overflowMode === 'wrap'\n ? ROW_HEIGHTS[density][scale]\n : undefined,\n headingHeight: props.overflowMode === 'wrap'\n ? undefined\n : DEFAULT_HEADER_HEIGHT[scale],\n estimatedHeadingHeight: props.overflowMode === 'wrap'\n ? DEFAULT_HEADER_HEIGHT[scale]\n : undefined\n }),\n // don't recompute when state.collection changes, only used for initial value\n\n [props.overflowMode, scale, density]\n );\n\n let dragState: DraggableCollectionState | null = null;\n let preview = useRef(null);\n if (isTableDraggable && dragAndDropHooks) {\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 | null = null;\n let droppableCollection: DroppableCollectionResult | null = null;\n let isRootDropTarget = false;\n if (isTableDroppable && dragAndDropHooks) {\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 | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]): ReactElement => {\n if (reusableView.viewType === 'rowgroup') {\n return (\n <TableRowGroup\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n parent={parent?.layoutInfo ?? null}\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 ?? null}>\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 ?? null}>\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 ?? null}\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 != null && item.colSpan > 1 ? item.colSpan : undefined} />\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 return null;\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 if (bodyRef.current && headerRef.current) {\n bodyRef.current.scrollLeft = headerRef.current.scrollLeft;\n }\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 : null,\n gridProps,\n focusProps\n );\n\n if (dragAndDropHooks?.isVirtualDragging?.()) {\n mergedProps.tabIndex = undefined;\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?.() || false}\n isRootDropTarget={isRootDropTarget} />\n {DragPreview && isTableDraggable && dragAndDropHooks && dragState &&\n <DragPreview ref={preview}>\n {() => {\n if (dragState.draggedKey == null) {\n return null;\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 | null,\n renderWrapper: (\n parent: View | null,\n reusableView: View,\n children: View[],\n renderChildren: (views: View[]) => ReactElement[]\n ) => ReactElement | null,\n domRef: RefObject<HTMLDivElement | null>,\n bodyRef: RefObject<HTMLDivElement | null>,\n headerRef: RefObject<HTMLDivElement | null>,\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 if (bodyRef.current) {\n bodyRef.current.scrollTop = rect.y;\n setScrollLeft(bodyRef.current, direction, rect.x);\n }\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) && bodyRef.current) {\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 if (headerRef.current && bodyRef.current) {\n headerRef.current.scrollLeft = bodyRef.current.scrollLeft;\n }\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\n if (isVirtualDragging) {\n otherProps.tabIndex = undefined;\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 {...otherProps}\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 ? undefined : -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: NonNullable<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}: {children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null}) {\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 && process.env.NODE_ENV !== 'production') {\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 ForwardTableColumnHeaderButton = (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(ForwardTableColumnHeaderButton);\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: {label: string, id: string}[] = [];\n if (allowsSorting) {\n options.push({\n label: stringFormatter.format('sortAscending'),\n id: 'sort-asc'\n });\n options.push({\n label: stringFormatter.format('sortDescending'),\n id: 'sort-desc'\n });\n }\n options.push({\n label: stringFormatter.format('resizeColumn'),\n id: 'resize'\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<HTMLDivElement | null>(null);\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 data-testid=\"selectAll\"\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<HTMLDivElement | null>(null);\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}: {children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null, role: string}) {\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.RefObject<HTMLDivElement | null>,\n isFocusVisibleWithin: boolean\n}\n\n\nconst TableRowContext = React.createContext<TableRowContextValue | null>(null);\nexport function useTableRowContext(): TableRowContextValue {\n return useContext(TableRowContext)!;\n}\n\nfunction TableRow({item, children, layoutInfo, parent, ...otherProps}: {item: GridNode<unknown>, children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null}) {\n let ref = useRef<HTMLDivElement | null>(null);\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 {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 ?? 0)) {\n isFlushWithContainerBottom = true;\n }\n }\n\n let draggableItem: DraggableItemResult | null = null;\n if (isTableDraggable && dragAndDropHooks && dragState) {\n draggableItem = dragAndDropHooks.useDraggableItem!({key: item.key, hasDragButton: true}, dragState);\n if (isDisabled) {\n draggableItem = null;\n }\n }\n let isDropTarget = false;\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement | null>(null);\n if (isTableDroppable && dragAndDropHooks && dropState) {\n let target = {type: 'item', key: item.key, dropPosition: 'on'} as DropTarget;\n isDropTarget = dropState.isDropTarget(target);\n\n dropIndicator = dragAndDropHooks.useDropIndicator!({target}, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = React.useRef<HTMLDivElement | null>(null);\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} : null\n ) as HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>;\n\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 {...props}\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': item.nextKey != null && 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}: {item: GridNode<unknown>, children: ReactNode, layoutInfo: LayoutInfo, parent: LayoutInfo | null} & HoverProps) {\n let {state, headerMenuOpen} = useTableContext();\n let ref = useRef<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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<HTMLDivElement | null>(null);\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}: {layoutInfo: LayoutInfo, virtualizer: any, parent: ReusableView<any, any>, children: ReactNode}) {\n let {isTableDroppable, dropState} = useContext(TableContext)!;\n let isDropTarget = false;\n let isRootDroptarget = false;\n if (isTableDroppable && dropState) {\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<HTMLSpanElement | null>(null);\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.collection.body.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 ForwardTableViewBase = React.forwardRef(TableViewBase) as <T>(props: TableBaseProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {ForwardTableViewBase as TableViewBase};\n"],"names":[],"version":3,"file":"TableViewBase.main.js.map"}
|
package/dist/TableViewBase.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.mjs";
|
|
|
4
4
|
import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.mjs";
|
|
5
5
|
import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.mjs";
|
|
6
6
|
import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.mjs";
|
|
7
|
-
import "./
|
|
7
|
+
import "./table.0cdc494a.css";
|
|
8
8
|
import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.mjs";
|
|
9
9
|
import "./table.11fc8462.css";
|
|
10
10
|
import $7lS7h$table_cssmodulejs from "./table_css.mjs";
|
|
@@ -130,6 +130,7 @@ function $bd013581c0a4b065$var$TableViewBase(props, ref) {
|
|
|
130
130
|
let dragHooksProvided = (0, $7lS7h$useRef)(isTableDraggable);
|
|
131
131
|
let dropHooksProvided = (0, $7lS7h$useRef)(isTableDroppable);
|
|
132
132
|
(0, $7lS7h$useEffect)(()=>{
|
|
133
|
+
if (process.env.NODE_ENV === 'production') return;
|
|
133
134
|
if (dragHooksProvided.current !== isTableDraggable) console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
134
135
|
if (dropHooksProvided.current !== isTableDroppable) console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
135
136
|
if ('expandedKeys' in state && (isTableDraggable || isTableDroppable)) console.warn('Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.');
|
|
@@ -614,7 +615,7 @@ function $bd013581c0a4b065$var$TableColumnHeader(props) {
|
|
|
614
615
|
});
|
|
615
616
|
let columnProps = column.props;
|
|
616
617
|
(0, $7lS7h$useEffect)(()=>{
|
|
617
|
-
if (column.hasChildNodes && columnProps.allowsResizing) console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
|
|
618
|
+
if (column.hasChildNodes && columnProps.allowsResizing && process.env.NODE_ENV !== 'production') console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
|
|
618
619
|
}, [
|
|
619
620
|
column.hasChildNodes,
|
|
620
621
|
column.key,
|
|
@@ -837,6 +838,7 @@ function $bd013581c0a4b065$var$TableSelectAllCell({ column: column }) {
|
|
|
837
838
|
which for single selection will be "Select."
|
|
838
839
|
*/ isSingleSelectionMode && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, checkboxProps['aria-label']), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
|
|
839
840
|
...checkboxProps,
|
|
841
|
+
"data-testid": "selectAll",
|
|
840
842
|
isEmphasized: true,
|
|
841
843
|
UNSAFE_style: isSingleSelectionMode ? {
|
|
842
844
|
visibility: 'hidden'
|
|
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.modul
|
|
|
4
4
|
import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.module.js";
|
|
5
5
|
import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.module.js";
|
|
6
6
|
import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.module.js";
|
|
7
|
-
import "./
|
|
7
|
+
import "./table.0cdc494a.css";
|
|
8
8
|
import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.module.js";
|
|
9
9
|
import "./table.11fc8462.css";
|
|
10
10
|
import $7lS7h$table_cssmodulejs from "./table_css.module.js";
|
|
@@ -130,6 +130,7 @@ function $bd013581c0a4b065$var$TableViewBase(props, ref) {
|
|
|
130
130
|
let dragHooksProvided = (0, $7lS7h$useRef)(isTableDraggable);
|
|
131
131
|
let dropHooksProvided = (0, $7lS7h$useRef)(isTableDroppable);
|
|
132
132
|
(0, $7lS7h$useEffect)(()=>{
|
|
133
|
+
if (process.env.NODE_ENV === 'production') return;
|
|
133
134
|
if (dragHooksProvided.current !== isTableDraggable) console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
134
135
|
if (dropHooksProvided.current !== isTableDroppable) console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
135
136
|
if ('expandedKeys' in state && (isTableDraggable || isTableDroppable)) console.warn('Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.');
|
|
@@ -614,7 +615,7 @@ function $bd013581c0a4b065$var$TableColumnHeader(props) {
|
|
|
614
615
|
});
|
|
615
616
|
let columnProps = column.props;
|
|
616
617
|
(0, $7lS7h$useEffect)(()=>{
|
|
617
|
-
if (column.hasChildNodes && columnProps.allowsResizing) console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
|
|
618
|
+
if (column.hasChildNodes && columnProps.allowsResizing && process.env.NODE_ENV !== 'production') console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
|
|
618
619
|
}, [
|
|
619
620
|
column.hasChildNodes,
|
|
620
621
|
column.key,
|
|
@@ -837,6 +838,7 @@ function $bd013581c0a4b065$var$TableSelectAllCell({ column: column }) {
|
|
|
837
838
|
which for single selection will be "Select."
|
|
838
839
|
*/ isSingleSelectionMode && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, checkboxProps['aria-label']), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
|
|
839
840
|
...checkboxProps,
|
|
841
|
+
"data-testid": "selectAll",
|
|
840
842
|
isEmphasized: true,
|
|
841
843
|
UNSAFE_style: isSingleSelectionMode ? {
|
|
842
844
|
visibility: 'hidden'
|