@elliemae/ds-data-table 3.70.0-next.54 → 3.70.0-next.59
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/cjs/configs/constants.js +0 -5
- package/dist/cjs/configs/constants.js.map +2 -2
- package/dist/cjs/configs/useStore/useStore.js +19 -0
- package/dist/cjs/configs/useStore/useStore.js.map +2 -2
- package/dist/cjs/exported-related/FilterPopover/FilterPopoverV2.js +12 -1
- package/dist/cjs/exported-related/FilterPopover/FilterPopoverV2.js.map +2 -2
- package/dist/cjs/exported-related/FilterPopover/index.js +28 -1
- package/dist/cjs/exported-related/FilterPopover/index.js.map +2 -2
- package/dist/cjs/package.json +1 -4
- package/dist/cjs/parts/Headers/HeaderResizer.js +30 -32
- package/dist/cjs/parts/Headers/HeaderResizer.js.map +2 -2
- package/dist/cjs/parts/Headers/useHeaderCellHandlers.js +11 -1
- package/dist/cjs/parts/Headers/useHeaderCellHandlers.js.map +2 -2
- package/dist/cjs/parts/Headers/useHeaderResizer.js +3 -1
- package/dist/cjs/parts/Headers/useHeaderResizer.js.map +2 -2
- package/dist/cjs/parts/HoC/withDnDSortableColumnContext.js +3 -1
- package/dist/cjs/parts/HoC/withDnDSortableColumnContext.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +0 -4
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +75 -52
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/configs/constants.js +0 -5
- package/dist/esm/configs/constants.js.map +2 -2
- package/dist/esm/configs/useStore/useStore.js +19 -0
- package/dist/esm/configs/useStore/useStore.js.map +2 -2
- package/dist/esm/exported-related/FilterPopover/FilterPopoverV2.js +12 -1
- package/dist/esm/exported-related/FilterPopover/FilterPopoverV2.js.map +2 -2
- package/dist/esm/exported-related/FilterPopover/index.js +28 -1
- package/dist/esm/exported-related/FilterPopover/index.js.map +2 -2
- package/dist/esm/package.json +1 -4
- package/dist/esm/parts/Headers/HeaderResizer.js +32 -34
- package/dist/esm/parts/Headers/HeaderResizer.js.map +2 -2
- package/dist/esm/parts/Headers/useHeaderCellHandlers.js +11 -1
- package/dist/esm/parts/Headers/useHeaderCellHandlers.js.map +2 -2
- package/dist/esm/parts/Headers/useHeaderResizer.js +4 -2
- package/dist/esm/parts/Headers/useHeaderResizer.js.map +2 -2
- package/dist/esm/parts/HoC/withDnDSortableColumnContext.js +3 -1
- package/dist/esm/parts/HoC/withDnDSortableColumnContext.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +1 -5
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +33 -10
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/TruncatedTooltipText.d.ts +1 -1
- package/dist/types/configs/constants.d.ts +0 -4
- package/dist/types/exported-related/Skeleton/SkeletonCell.d.ts +2 -1
- package/dist/types/exported-related/Skeleton/SkeletonHeaderCell.d.ts +2 -1
- package/dist/types/parts/Headers/HeaderCellGroup.d.ts +1 -1
- package/dist/types/parts/Headers/HeaderResizer.d.ts +1 -1
- package/dist/types/parts/Headers/useHeaderCellHandlers.d.ts +1 -1
- package/dist/types/parts/Headers/useHeaderResizer.d.ts +1 -1
- package/dist/types/parts/HoC/withConditionalDnDSortableContext.d.ts +1 -1
- package/dist/types/parts/HoC/withDnDSortableColumnContext.d.ts +1 -1
- package/dist/types/parts/HoC/withDnDSortableRowContext.d.ts +1 -1
- package/dist/types/parts/Loader.d.ts +1 -1
- package/dist/types/parts/Row.d.ts +1 -1
- package/dist/types/parts/SkeletonTable.d.ts +1 -1
- package/dist/types/parts/TableContent.d.ts +2 -1
- package/dist/types/parts/VirtualRowsList.d.ts +2 -1
- package/dist/types/react-desc-prop-types.d.ts +3 -3
- package/dist/types/styled.d.ts +2 -2
- package/package.json +33 -33
- package/skills/ds-data-table-slots/SKILL.md +9 -6
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { Grid } from '@elliemae/ds-grid';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { DSDataTableName, DSDataTableSlots } from './constants/index.js';\nimport { ColsLayoutStyle } from './configs/constants.js';\nimport { ZIndexDataTable } from './configs/zIndexInternalConfig.js';\nimport { cellPadding, columnPadding, sizeToCss } from './helpers/index.js';\nimport type { DSDataTableT } from './react-desc-prop-types.js';\n\ninterface WidthAndHeight {\n width?: string | number;\n height?: string | number;\n}\n\nconst styledFocusCss = ({ theme }: { theme: Theme }, color?: string) => `\n&:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${color ?? theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n}`;\n\nexport const StyledFocusWithin = styled(Grid)<{ hideFocus?: boolean }>`\n :focus-within {\n ${(props) => (props.hideFocus ? '' : styledFocusCss(props))}\n }\n svg {\n fill: ${(props) => props.theme.colors.brand['800']};\n }\n`;\n\nexport const StyledDataTableWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.ROOT,\n})<WidthAndHeight>`\n width: ${(props) => sizeToCss(props.width ?? ' 100%')};\n height: ${(props) => sizeToCss(props.height ?? ' 100%')};\n`;\n\nexport const StyledDataTableContentWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.CONTENT_WRAPPER,\n})<{ noSelectionAllowed: boolean }>`\n user-select: ${({ noSelectionAllowed }) => (noSelectionAllowed ? 'none' : 'auto')};\n width: 100%;\n`;\n\nexport const StyledTableWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.TABLE_WRAPPER,\n})<WidthAndHeight>`\n display: inline-block;\n border-spacing: 0;\n z-index: 0;\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledPaginationWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.PAGINATION_WRAPPER,\n})`\n width: 100%;\n`;\n\nexport const StyledTableContentWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.TABLE_CONTENT_WRAPPER,\n})<{ height?: string | number }>`\n position: relative;\n ${({ height = 'auto' }) => `\n height: ${sizeToCss(height) as string};\n `}\n width: var(--total-width);\n`;\n\nexport const StyledVirtualListWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.VIRTUAL_LIST_WRAPPER,\n})<{ gridLayout: string[]; totalColumnsWidth: string | number; headerHeightPx: number }>`\n overflow: auto;\n height: 100%;\n /**\n * PUI-18626: reserve the sticky header's height as scroll-padding so the browser-native\n * focus scroll (fired when keyboard navigation focuses a row) lands the focused row below\n * the sticky header instead of behind it. Honored by scrollIntoView / native focus scroll;\n * orthogonal to react-virtual's paddingStart, which only affects scrollToIndex offsets.\n */\n scroll-padding-top: ${(props) => props.headerHeightPx}px;\n --grid-layout: ${(props) => props.gridLayout.map((col) => `minmax(0, ${col})`).join(' ')};\n --total-width: ${(props) => sizeToCss(props.totalColumnsWidth)};\n`;\n\nexport const StyledHeadWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_WRAPPER,\n})<{\n colsLayoutStyle: string;\n}>`\n position: sticky;\n top: 0;\n z-index: 4;\n background: white;\n width: 100%;\n`;\n\nexport const StyledHeadTr = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_TR,\n})<{\n isExpandable: boolean;\n colsLayoutStyle: DSDataTableT.ColsLayoutStyleValues;\n}>`\n ${(props) => (props.colsLayoutStyle === ColsLayoutStyle.Auto ? 'width:100%' : '')};\n grid-template-columns: var(--grid-layout);\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['080']};\n grid-auto-flow: column;\n`;\n\nexport const StyledHeadTh = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_TH,\n})<{\n isDraggingActive?: boolean;\n column: DSDataTableT.InternalColumn;\n shouldShowDnD?: boolean;\n}>`\n min-height: 24px;\n line-height: normal;\n font-weight: 600;\n text-transform: uppercase;\n font-size: 0.923rem;\n text-align: left;\n ${columnPadding}\n color: #353c46;\n min-height: 1.84615rem;\n position: sticky;\n z-index: ${ZIndexDataTable.HEADER_ROW};\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n outline: none;\n ${(props) =>\n props.isDraggingActive\n ? ''\n : `:hover {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid ${props.theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n }\n cursor: pointer;\n }`}\n\n :focus {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n }\n }\n`;\n\nexport const StyledHeaderRightIconsWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_RIGHT_ICONS_WRAPPER,\n})`\n display: flex;\n align-items: center;\n align-self: flex-start;\n padding-top: 2px;\n`;\n\n// Column resize handle \u2014 a plain div narrowed to a 4px grab strip, exposed as role=\"separator\" (or\n// \"slider\", see resizerA11yMode) with a bounded aria-valuenow/min/max/text (PUI-17784). Not a native\n// <button>: \"separator\" is not in <button>'s ARIA-allowed-role-transformation list, and a button's\n// implicit Enter/Space activation is the wrong fit for a value-bearing separator.\nexport const StyledResizer = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.RESIZER,\n})`\n width: 4px;\n height: 100%;\n min-width: unset;\n min-height: unset;\n padding: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 0;\n cursor: col-resize;\n // prevents from scrolling while dragging on touch devices\n touch-action: none;\n\n border: none;\n outline: none;\n background: transparent;\n\n &:hover,\n &:focus,\n &:focus-visible {\n border: none;\n outline: none;\n }\n\n &:focus-visible {\n background: brand-700;\n }\n`;\n\n// CELL ***********************************************************************/\nexport const StyledActionCell = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.ACTION_CELL,\n})`\n position: sticky;\n display: inline-block;\n right: 0;\n /* border-bottom: 1px solid #ebedf0; */\n background: white;\n`;\n\nexport const StyledCell = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL,\n})`\n ${cellPadding}\n display: flex;\n align-items: center;\n width: 100%;\n position: relative;\n`;\n\nexport const StyledCellContent = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL_CONTENT,\n})`\n display: grid;\n justify-self: flex-end;\n flex: 1 1 auto;\n width: 100%;\n height: 100%;\n align-items: center;\n`;\n\nexport const StyledPencilIcon = styled(EditPencil, {\n name: DSDataTableName,\n slot: DSDataTableSlots.PENCIL_ICON,\n})``;\n\nexport const StyledEditableContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.EDITABLE_CONTAINER,\n})<{ shouldDisplayEditIcon?: boolean }>`\n width: 100%;\n height: 100%;\n align-items: center;\n & ${StyledPencilIcon} {\n display: ${({ shouldDisplayEditIcon }) => (shouldDisplayEditIcon ? 'block' : 'none')};\n }\n &:hover {\n ${StyledPencilIcon} {\n display: block;\n }\n }\n &:focus {\n ${styledFocusCss}\n ${StyledPencilIcon} {\n display: block;\n }\n }\n outline: none;\n`;\n\n// ROW ************************************************************************/\nexport const StyledFullsizeGrid = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.FULLSIZE_GRID,\n})<{ minHeight: string }>`\n position: relative;\n z-index: ${ZIndexDataTable.ROW};\n\n min-height: ${(props) => props.minHeight || '36px'};\n height: ${(props) => props.height || 'auto'};\n`;\n\nexport const GroupHeaderContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.GROUP_HEADER_CONTAINER,\n})<{ paddingLeft: string }>`\n position: relative;\n background-color: ${({ theme }) => theme.colors.brand[200]};\n align-items: center;\n padding-left: ${(props) => props.paddingLeft};\n border-top: 1px solid ${({ theme }) => theme.colors.brand[300]};\n`;\n\nexport const GroupHeaderTitle = styled('span', {\n name: DSDataTableName,\n slot: DSDataTableSlots.GROUP_HEADER_TITLE,\n})`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[700]};\n`;\n\nexport const StyledCellContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL_CONTAINER,\n})<{\n backgroundColor?: string;\n isDragOverlay?: boolean;\n isDragging?: boolean;\n isDisabled?: boolean;\n isDropValid?: boolean;\n shouldDisplayHover?: boolean;\n isDropIndicatorPositionInside?: boolean;\n minHeight?: string;\n gridTemplateColumns?: string;\n}>`\n position: relative;\n z-index: 2;\n\n min-height: ${(props) => props.minHeight || '36px'};\n height: ${(props) => props.height || 'auto'};\n\n width: 100%;\n ${(props) => (props.isDragOverlay ? 'width: fit-content;' : '')};\n\n grid-template-columns: ${(props) =>\n props.isDragOverlay ? `minmax(0, 24px) minmax(0, auto)` : (props.gridTemplateColumns ?? `var(--grid-layout)`)};\n\n background-color: ${({ backgroundColor, isDragging, theme }) =>\n isDragging ? theme.colors.neutral[100] : backgroundColor || 'white'};\n\n outline: none;\n\n :focus {\n ${(props) => (props.isDragOverlay ? '' : styledFocusCss(props))}\n }\n\n ${({ isDropIndicatorPositionInside, isDropValid, theme }) => {\n if (!isDropIndicatorPositionInside) return '';\n return styledFocusCss({ theme }, isDropValid ? theme.colors.brand[700] : theme.colors.danger[900]);\n }}\n\n ${({ shouldDisplayHover, theme, isDisabled }) =>\n shouldDisplayHover && !isDisabled\n ? `:hover {\n background-color: ${theme.colors.brand[200]};\n }`\n : ''}\n\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n\n ${(props) =>\n !props.selected\n ? ''\n : `\n background-color: ${props.theme.colors.brand[200]};\n border: 1px solid ${props.theme.colors.brand[500]};\n `}\n\n ${GroupHeaderTitle} {\n color: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : props.theme.colors.neutral['700'])};\n }\n color: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : '#333333')};\n\n svg {\n fill: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : props.theme.colors.brand['800'])};\n }\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAqB;AACrB,sBAA2B;AAC3B,uBAAmC;AACnC,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { ColsLayoutStyle } from './configs/constants.js';\nimport { ZIndexDataTable } from './configs/zIndexInternalConfig.js';\nimport { DSDataTableName, DSDataTableSlots } from './constants/index.js';\nimport { cellPadding, columnPadding, sizeToCss } from './helpers/index.js';\nimport type { DSDataTableT } from './react-desc-prop-types.js';\n\ninterface WidthAndHeight {\n width?: string | number;\n height?: string | number;\n}\n\nconst styledFocusCss = ({ theme }: { theme: Theme }, color?: string) => `\n&:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${color ?? theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n}`;\n\nexport const StyledFocusWithin = styled(Grid)<{ hideFocus?: boolean }>`\n :focus-within {\n ${(props) => (props.hideFocus ? '' : styledFocusCss(props))}\n }\n svg {\n fill: ${(props) => props.theme.colors.brand['800']};\n }\n`;\n\nexport const StyledDataTableWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.ROOT,\n})<WidthAndHeight>`\n width: ${(props) => sizeToCss(props.width ?? ' 100%')};\n height: ${(props) => sizeToCss(props.height ?? ' 100%')};\n`;\n\nexport const StyledDataTableContentWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.CONTENT_WRAPPER,\n})<{ noSelectionAllowed: boolean }>`\n user-select: ${({ noSelectionAllowed }) => (noSelectionAllowed ? 'none' : 'auto')};\n width: 100%;\n`;\n\nexport const StyledTableWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.TABLE_WRAPPER,\n})<WidthAndHeight>`\n display: inline-block;\n border-spacing: 0;\n z-index: 0;\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledPaginationWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.PAGINATION_WRAPPER,\n})`\n width: 100%;\n`;\n\nexport const StyledTableContentWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.TABLE_CONTENT_WRAPPER,\n})<{ height?: string | number }>`\n position: relative;\n ${({ height = 'auto' }) => `\n height: ${sizeToCss(height) as string};\n `}\n width: var(--total-width);\n`;\n\nexport const StyledVirtualListWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.VIRTUAL_LIST_WRAPPER,\n})<{ gridLayout: string[]; totalColumnsWidth: string | number; headerHeightPx: number }>`\n overflow: auto;\n height: 100%;\n /**\n * PUI-18626: reserve the sticky header's height as scroll-padding so the browser-native\n * focus scroll (fired when keyboard navigation focuses a row) lands the focused row below\n * the sticky header instead of behind it. Honored by scrollIntoView / native focus scroll;\n * orthogonal to react-virtual's paddingStart, which only affects scrollToIndex offsets.\n */\n scroll-padding-top: ${(props) => props.headerHeightPx}px;\n --grid-layout: ${(props) => props.gridLayout.map((col) => `minmax(0, ${col})`).join(' ')};\n --total-width: ${(props) => sizeToCss(props.totalColumnsWidth)};\n`;\n\nexport const StyledHeadWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_WRAPPER,\n})<{\n colsLayoutStyle: string;\n}>`\n position: sticky;\n top: 0;\n z-index: 4;\n background: white;\n width: 100%;\n`;\n\nexport const StyledHeadTr = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_TR,\n})<{\n isExpandable: boolean;\n colsLayoutStyle: DSDataTableT.ColsLayoutStyleValues;\n}>`\n ${(props) => (props.colsLayoutStyle === ColsLayoutStyle.Auto ? 'width:100%' : '')};\n grid-template-columns: var(--grid-layout);\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['080']};\n grid-auto-flow: column;\n`;\n\nexport const StyledHeadTh = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_TH,\n})<{\n isDraggingActive?: boolean;\n column: DSDataTableT.InternalColumn;\n shouldShowDnD?: boolean;\n}>`\n min-height: 24px;\n line-height: normal;\n font-weight: 600;\n text-transform: uppercase;\n font-size: 0.923rem;\n text-align: left;\n ${columnPadding}\n color: #353c46;\n min-height: 1.84615rem;\n position: sticky;\n z-index: ${ZIndexDataTable.HEADER_ROW};\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n outline: none;\n ${(props) =>\n props.isDraggingActive\n ? ''\n : `:hover {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid ${props.theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n }\n cursor: pointer;\n }`}\n\n :focus {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n pointer-events: none;\n z-index: ${ZIndexDataTable.FOCUS_BORDER};\n }\n }\n`;\n\nexport const StyledHeaderRightIconsWrapper = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.HEAD_RIGHT_ICONS_WRAPPER,\n})`\n display: flex;\n align-items: center;\n align-self: flex-start;\n padding-top: 2px;\n`;\n\nexport const StyledResizer = styled(DSInputText, {\n name: DSDataTableName,\n slot: DSDataTableSlots.RESIZER,\n})`\n width: 4px;\n height: 100%;\n\n position: absolute;\n right: 0;\n top: 0;\n z-index: 0;\n min-height: unset;\n // prevents from scrolling while dragging on touch devices\n touch-action: none;\n\n border: none;\n outline: none;\n\n\n &:hover,\n &:focus,\n &:focus-visible {\n border: none;\n outline: none;\n }\n\n input {\n appearance: none;\n cursor: col-resize;\n background-image: transparent;\n padding: 0;\n border-radius: 0;\n &:focus::-webkit-slider-runnable-track {\n background: transparent;\n }\n &:focus-visible {\n background: brand-700;\n ::-webkit-slider-runnable-track {\n background: transparent;\n }\n }\n &::-webkit-slider-runnable-track {\n background: transparent;\n }\n &::-webkit-slider-thumb {\n appearance: none;\n background: transparent;\n }\n &::-moz-range-thumb {\n appearance: none;\n background: transparent;\n border: none;\n }\n`;\n\n// CELL ***********************************************************************/\nexport const StyledActionCell = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.ACTION_CELL,\n})`\n position: sticky;\n display: inline-block;\n right: 0;\n /* border-bottom: 1px solid #ebedf0; */\n background: white;\n`;\n\nexport const StyledCell = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL,\n})`\n ${cellPadding}\n display: flex;\n align-items: center;\n width: 100%;\n position: relative;\n`;\n\nexport const StyledCellContent = styled('div', {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL_CONTENT,\n})`\n display: grid;\n justify-self: flex-end;\n flex: 1 1 auto;\n width: 100%;\n height: 100%;\n align-items: center;\n`;\n\nexport const StyledPencilIcon = styled(EditPencil, {\n name: DSDataTableName,\n slot: DSDataTableSlots.PENCIL_ICON,\n})``;\n\nexport const StyledEditableContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.EDITABLE_CONTAINER,\n})<{ shouldDisplayEditIcon?: boolean }>`\n width: 100%;\n height: 100%;\n align-items: center;\n & ${StyledPencilIcon} {\n display: ${({ shouldDisplayEditIcon }) => (shouldDisplayEditIcon ? 'block' : 'none')};\n }\n &:hover {\n ${StyledPencilIcon} {\n display: block;\n }\n }\n &:focus {\n ${styledFocusCss}\n ${StyledPencilIcon} {\n display: block;\n }\n }\n outline: none;\n`;\n\n// ROW ************************************************************************/\nexport const StyledFullsizeGrid = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.FULLSIZE_GRID,\n})<{ minHeight: string }>`\n position: relative;\n z-index: ${ZIndexDataTable.ROW};\n\n min-height: ${(props) => props.minHeight || '36px'};\n height: ${(props) => props.height || 'auto'};\n`;\n\nexport const GroupHeaderContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.GROUP_HEADER_CONTAINER,\n})<{ paddingLeft: string }>`\n position: relative;\n background-color: ${({ theme }) => theme.colors.brand[200]};\n align-items: center;\n padding-left: ${(props) => props.paddingLeft};\n border-top: 1px solid ${({ theme }) => theme.colors.brand[300]};\n`;\n\nexport const GroupHeaderTitle = styled('span', {\n name: DSDataTableName,\n slot: DSDataTableSlots.GROUP_HEADER_TITLE,\n})`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[700]};\n`;\n\nexport const StyledCellContainer = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.CELL_CONTAINER,\n})<{\n backgroundColor?: string;\n isDragOverlay?: boolean;\n isDragging?: boolean;\n isDisabled?: boolean;\n isDropValid?: boolean;\n shouldDisplayHover?: boolean;\n isDropIndicatorPositionInside?: boolean;\n minHeight?: string;\n gridTemplateColumns?: string;\n}>`\n position: relative;\n z-index: 2;\n\n min-height: ${(props) => props.minHeight || '36px'};\n height: ${(props) => props.height || 'auto'};\n\n width: 100%;\n ${(props) => (props.isDragOverlay ? 'width: fit-content;' : '')};\n\n grid-template-columns: ${(props) =>\n props.isDragOverlay ? `minmax(0, 24px) minmax(0, auto)` : (props.gridTemplateColumns ?? `var(--grid-layout)`)};\n\n background-color: ${({ backgroundColor, isDragging, theme }) =>\n isDragging ? theme.colors.neutral[100] : backgroundColor || 'white'};\n\n outline: none;\n\n :focus {\n ${(props) => (props.isDragOverlay ? '' : styledFocusCss(props))}\n }\n\n ${({ isDropIndicatorPositionInside, isDropValid, theme }) => {\n if (!isDropIndicatorPositionInside) return '';\n return styledFocusCss({ theme }, isDropValid ? theme.colors.brand[700] : theme.colors.danger[900]);\n }}\n\n ${({ shouldDisplayHover, theme, isDisabled }) =>\n shouldDisplayHover && !isDisabled\n ? `:hover {\n background-color: ${theme.colors.brand[200]};\n }`\n : ''}\n\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n\n ${(props) =>\n !props.selected\n ? ''\n : `\n background-color: ${props.theme.colors.brand[200]};\n border: 1px solid ${props.theme.colors.brand[500]};\n `}\n\n ${GroupHeaderTitle} {\n color: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : props.theme.colors.neutral['700'])};\n }\n color: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : '#333333')};\n\n svg {\n fill: ${(props) => (props.isDisabled ? props.theme.colors.neutral['200'] : props.theme.colors.brand['800'])};\n }\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,gCAA4B;AAC5B,qBAAqB;AACrB,sBAA2B;AAC3B,uBAAmC;AACnC,uBAAgC;AAChC,kCAAgC;AAChC,IAAAA,oBAAkD;AAClD,qBAAsD;AAQtD,MAAM,iBAAiB,CAAC,EAAE,MAAM,GAAqB,UAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBASlD,SAAS,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA,aAEzC,4CAAgB,YAAY;AAAA;AAGlC,MAAM,wBAAoB,yBAAO,mBAAI;AAAA;AAAA,MAEtC,CAAC,UAAW,MAAM,YAAY,KAAK,eAAe,KAAK,CAAE;AAAA;AAAA;AAAA,YAGnD,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA;AAAA;AAI/C,MAAM,6BAAyB,yBAAO,qBAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,mCAAiB;AACzB,CAAC;AAAA,WACU,CAAC,cAAU,0BAAU,MAAM,SAAS,OAAO,CAAC;AAAA,YAC3C,CAAC,cAAU,0BAAU,MAAM,UAAU,OAAO,CAAC;AAAA;AAGlD,MAAM,oCAAgC,yBAAO,qBAAM;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,mCAAiB;AACzB,CAAC;AAAA,iBACgB,CAAC,EAAE,mBAAmB,MAAO,qBAAqB,SAAS,MAAO;AAA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;AAAA;AAAA,IAED,gBAAgB;AAAA,aACP,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA;AAAA,WAEvG,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,SAAU;AAAA;AAAA;AAAA,YAG5E,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,MAAM,KAAK,CAAE;AAAA;AAAA;AAIxG,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": ["import_constants"]
|
|
7
7
|
}
|
|
@@ -10,10 +10,6 @@ const DropIndicatorPosition = {
|
|
|
10
10
|
After: "after",
|
|
11
11
|
Inside: "inside"
|
|
12
12
|
};
|
|
13
|
-
const ResizerA11yMode = {
|
|
14
|
-
Separator: "separator",
|
|
15
|
-
Slider: "slider"
|
|
16
|
-
};
|
|
17
13
|
const DEFAULT_MIN_COLUMN_WIDTH = 30;
|
|
18
14
|
const DEFAULT_MAX_COLUMN_WIDTH = 600;
|
|
19
15
|
const DATA_TESTID = {
|
|
@@ -63,7 +59,6 @@ export {
|
|
|
63
59
|
DEFAULT_MIN_COLUMN_WIDTH,
|
|
64
60
|
DropIndicatorPosition,
|
|
65
61
|
EMPTY_FILTER,
|
|
66
|
-
ResizerA11yMode,
|
|
67
62
|
momentFormat
|
|
68
63
|
};
|
|
69
64
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/constants.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const momentFormat = 'MM/DD/YYYY';\nexport const ColsLayoutStyle = {\n Fixed: 'fixed',\n Auto: 'auto',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n\n//
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const momentFormat = 'MM/DD/YYYY';\nexport const ColsLayoutStyle = {\n Fixed: 'fixed',\n Auto: 'auto',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n\n// Shared resize-clamp bounds \u2014 single source of truth for both the mouse/keyboard resize clamp\n// (useHeaderResizer.ts) and the resizer's aria-valuemin/aria-valuemax so they never drift.\n// PUI-17784 briefly raised DEFAULT_MIN_COLUMN_WIDTH to a measured worst-case icon-cluster width (70px),\n// but that only protects against overlap for columns that happen to match the worst-case icon\n// combination the constant was measured against \u2014 any column with a longer header title, or with a\n// narrower icon-cluster paired with a wide title, could still overlap. PUI-12696 reverts to the\n// historical 30px floor and moves the real protection to the consumer: `minWidth` is a controlled-IoC\n// prop (see .github/memories/project_philosophy.md), so Dimsum does not try to infer a safe default\n// from a column's content \u2014 the app that knows its own header text and enabled affordances is\n// responsible for passing a `minWidth` that actually fits them. See KNOWN_INTENTIONAL_DEVIATIONS.md #2.\nexport const DEFAULT_MIN_COLUMN_WIDTH = 30;\nexport const DEFAULT_MAX_COLUMN_WIDTH = 600;\n\nexport const DATA_TESTID = {\n DATA_TABLE_WRAPPER: 'data-table-wrapper',\n DATA_TABLE_GLOBAL_EXPAND_CELL: 'data-table-global-expand-cell',\n DATA_TABLE_ICON_ARROW_DOWN: 'ic-arrow-head-down',\n DATA_TABLE_ICON_ARROW_RIGHT: 'ic-arrow-head-right',\n DATA_TABLE_ICON_ARROW_MIXED: 'ic-arrow-head-mixed',\n DATA_TABLE_ICON_CHILD: 'ic-arrow-child',\n DATA_TABLE_GLOBAL_CHECKBOX: 'data-table-global-checkbox',\n DATA_TABLE_CHECKBOX: 'data-table-checkbox',\n DATA_TABLE_RADIO: 'data-table-radio',\n DATA_TABLE_DATE_RANGE_CONTROLLER: 'data-table-date-range',\n DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER: 'data-table-date-range-checkbox-switcher-container',\n DATA_TABLE_SINGLE_DATE_CONTROLLER: 'data-table-single-date',\n DATA_TABLE_NUMBER_RANGE_CONTROLLER: 'data-table-number-range',\n DATA_TABLE_CURRENCY_RANGE_CONTROLLER: 'data-table-currency-range',\n DATA_TABLE_SELECT_MENU_ITEM: 'data-table-filter-menu-list-item',\n DATA_TABLE_MULTISELECT_CONTROLLER: 'data-table-multi-select',\n DATA_TABLE_SINGLESELECT_CONTROLLER: 'data-table-single-select',\n DATA_TABLE_FILTER_BUTTON: 'data-table-filter-menu-button',\n DATA_TABLE_FILTER_BUTTON_ELEMENT: 'ds-button', // TODO 'data-table-filter-menu-button-element',\n DATA_TABLE_FILTER_MENU_CONTENT: 'data-table-filter-menu-content',\n DATA_TABLE_FILTER_FREE_TEXT_SEARCH: 'data-table-filter-free-text-search',\n DATA_TABLE_ROW_CONTENT: 'data-table-row-content',\n DATA_TABLE_ROW: 'data-table-row',\n DATA_TABLE_TOOLBAR_TRIGGER: 'data-table-toolbar-trigger',\n DATA_TABLE_CELL: 'data-table-cell',\n DATA_TABLE_DRAG_HANDLE: 'data-table-drag-handle',\n DATA_TABLE_CONTENT_WRAPPER: 'data-table-content-wrapper',\n DATA_TABLE_TABLE: 'data-table-table',\n DATA_TABLE_SCROLLABLE_CONTAINER: 'data-table-scrollable-container',\n DATA_TABLE_HEADER: 'data-table-header',\n DATA_TABLE_ROW_HEADER_CONTENT: 'data-table-row-header-content',\n DATA_TABLE_ROW_GROUP_HEADER: 'data-table-row-group-header',\n DATA_TABLE_COLUMN_DRAG_OVERLAY: 'data-table-drag-column-drag-overlay',\n DATA_TABLE_HEADER_CELL_TITLE: 'header-cell-title',\n DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON: 'filter-bar-ddmenu-button',\n DATA_TABLE_SORT_BUTTON: 'data-table-sort-button',\n} as const;\n\nexport const EMPTY_FILTER = 'ds-empty-filter';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;AAYO,MAAM,2BAA2B;AACjC,MAAM,2BAA2B;AAEjC,MAAM,cAAc;AAAA,EACzB,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,6BAA6B;AAAA,EAC7B,uBAAuB;AAAA,EACvB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,kCAAkC;AAAA,EAClC,oDAAoD;AAAA,EACpD,mCAAmC;AAAA,EACnC,oCAAoC;AAAA,EACpC,sCAAsC;AAAA,EACtC,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,oCAAoC;AAAA,EACpC,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA;AAAA,EAClC,gCAAgC;AAAA,EAChC,oCAAoC;AAAA,EACpC,wBAAwB;AAAA,EACxB,gBAAgB;AAAA,EAChB,4BAA4B;AAAA,EAC5B,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,kBAAkB;AAAA,EAClB,iCAAiC;AAAA,EACjC,mBAAmB;AAAA,EACnB,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,wBAAwB;AAC1B;AAEO,MAAM,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,6 +28,25 @@ const reducers = (get, set) => ({
|
|
|
28
28
|
}
|
|
29
29
|
}));
|
|
30
30
|
},
|
|
31
|
+
/**
|
|
32
|
+
* PUI-18785: shared "close this column's own filter menu" primitive. The header click, the
|
|
33
|
+
* drag handle, and the resize handle all sit inside FilterPopover's floating reference element
|
|
34
|
+
* (the whole header cell), so ds-floating-context's outside-click detection never sees any of
|
|
35
|
+
* those three interactions as "outside" and never closes the menu on its own — each of their
|
|
36
|
+
* handlers calls this instead. Unlike patchHeaderFilterButtonAndMenu (used for genuine outside
|
|
37
|
+
* clicks), only hideFilterMenu is touched — hideFilterButton is left alone, since these
|
|
38
|
+
* interactions also focus/hover the header cell, which should keep the trigger visible rather
|
|
39
|
+
* than hide it.
|
|
40
|
+
*/
|
|
41
|
+
closeFilterMenuIfOpen: (headerId) => {
|
|
42
|
+
if (get().reduxHeaders[headerId]?.hideFilterMenu !== false) return;
|
|
43
|
+
set((state) => ({
|
|
44
|
+
reduxHeaders: {
|
|
45
|
+
...state.reduxHeaders,
|
|
46
|
+
[headerId]: { ...state.reduxHeaders[headerId], hideFilterMenu: true }
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
},
|
|
31
50
|
// PUI-15154: a column's own onBlur is supposed to hide its DnD handle/sort caret once focus
|
|
32
51
|
// truly leaves it, but that reset doesn't reliably land when focus moves directly from one
|
|
33
52
|
// column's drag handle to another's (both share the same dnd-kit DndContext/PointerSensor).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/configs/useStore/useStore.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { defaultProps, type DSDataTableT } from '../../react-desc-prop-types.js';\nimport { useAutoCalculated } from '../useAutocalculated/index.js';\nimport { InternalProvider, PropsProvider, useInternalStore, usePropsStore } from './createInternalAndPropsContext.js';\n\nconst internalAtomDefaultValues: DSDataTableT.InternalAtoms = {\n drilldownRowId: null,\n focusedRowId: null,\n isShiftPressed: false,\n reduxHeaders: {},\n hoveredColumnId: null,\n isHeaderCellDragging: false,\n};\n\nconst selectors: ZustandT.SelectorObject<DSDataTableT.ShuttleInternalStore, DSDataTableT.Selectors> = () => ({});\n\nconst reducers: ZustandT.ReducerObject<DSDataTableT.ShuttleInternalStore, DSDataTableT.Reducers> = (get, set) => ({\n patchHeader: (headerId, newHeader) => {\n set((state) => ({\n reduxHeaders: {\n ...state.reduxHeaders,\n [headerId]: { ...(state.reduxHeaders?.[headerId] ?? {}), ...newHeader },\n },\n }));\n },\n patchHeaderFilterButtonAndMenu: (headerId, value) => {\n set((state) => ({\n reduxHeaders: {\n ...state.reduxHeaders,\n [headerId]: { ...(state.reduxHeaders?.[headerId] ?? {}), hideFilterMenu: value, hideFilterButton: value },\n },\n }));\n },\n // PUI-15154: a column's own onBlur is supposed to hide its DnD handle/sort caret once focus\n // truly leaves it, but that reset doesn't reliably land when focus moves directly from one\n // column's drag handle to another's (both share the same dnd-kit DndContext/PointerSensor).\n // Rather than depend on every column's blur firing correctly, whichever column newly gains\n // focus proactively clears every other column's focus-derived visibility itself. It must skip\n // state.hoveredColumnId though \u2014 hover and focus are independent (a different column can be\n // legitimately hovered by the mouse while this one gains keyboard/click focus), so clearing it\n // here would hide an icon that's still correctly visible under the pointer.\n resetAllHeadersExcept: (exceptHeaderId) => {\n set((state) => {\n const nextReduxHeaders = { ...state.reduxHeaders };\n Object.keys(nextReduxHeaders).forEach((headerId) => {\n if (headerId === exceptHeaderId) return;\n if (headerId === state.hoveredColumnId) return;\n nextReduxHeaders[headerId] = {\n ...nextReduxHeaders[headerId],\n hideFilterMenu: true,\n hideFilterButton: true,\n showDnDHandle: false,\n showSortCaret: false,\n withTabStops: false,\n };\n });\n return { reduxHeaders: nextReduxHeaders };\n });\n },\n});\n\nconst subscribers: ZustandT.Subscribers<DSDataTableT.ShuttleInternalStore> = () => {};\n\nexport const useWholeStore = (): DSDataTableT.Context => {\n const {\n columnHeaderRef,\n virtualListRef,\n flattenedData,\n allDataFlattened,\n isEmptyContent,\n firstFocuseableColumnHeaderId,\n visibleColumns,\n virtualListHelpers,\n layoutHelpers,\n paginationHelpers,\n lastSelected,\n ...tableProps\n } = usePropsStore((state) => state);\n\n const internalStore = useInternalStore((state) => state);\n return {\n tableProps,\n columnHeaderRef,\n virtualListRef,\n flattenedData,\n allDataFlattened,\n isEmptyContent,\n firstFocuseableColumnHeaderId,\n visibleColumns,\n virtualListHelpers,\n layoutHelpers,\n paginationHelpers,\n lastSelected,\n ...internalStore,\n };\n};\n\nexport const config = {\n defaultProps: defaultProps as () => DSDataTableT.InternalProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,oBAAuC;AAChD,SAAS,yBAAyB;AAClC,SAAS,kBAAkB,eAAe,kBAAkB,qBAAqB;AAEjF,MAAM,4BAAwD;AAAA,EAC5D,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,sBAAsB;AACxB;AAEA,MAAM,YAAgG,OAAO,CAAC;AAE9G,MAAM,WAA6F,CAAC,KAAK,SAAS;AAAA,EAChH,aAAa,CAAC,UAAU,cAAc;AACpC,QAAI,CAAC,WAAW;AAAA,MACd,cAAc;AAAA,QACZ,GAAG,MAAM;AAAA,QACT,CAAC,QAAQ,GAAG,EAAE,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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AACF;AAEO,MAAM,SAAS;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { defaultProps, type DSDataTableT } from '../../react-desc-prop-types.js';\nimport { useAutoCalculated } from '../useAutocalculated/index.js';\nimport { InternalProvider, PropsProvider, useInternalStore, usePropsStore } from './createInternalAndPropsContext.js';\n\nconst internalAtomDefaultValues: DSDataTableT.InternalAtoms = {\n drilldownRowId: null,\n focusedRowId: null,\n isShiftPressed: false,\n reduxHeaders: {},\n hoveredColumnId: null,\n isHeaderCellDragging: false,\n};\n\nconst selectors: ZustandT.SelectorObject<DSDataTableT.ShuttleInternalStore, DSDataTableT.Selectors> = () => ({});\n\nconst reducers: ZustandT.ReducerObject<DSDataTableT.ShuttleInternalStore, DSDataTableT.Reducers> = (get, set) => ({\n patchHeader: (headerId, newHeader) => {\n set((state) => ({\n reduxHeaders: {\n ...state.reduxHeaders,\n [headerId]: { ...(state.reduxHeaders?.[headerId] ?? {}), ...newHeader },\n },\n }));\n },\n patchHeaderFilterButtonAndMenu: (headerId, value) => {\n set((state) => ({\n reduxHeaders: {\n ...state.reduxHeaders,\n [headerId]: { ...(state.reduxHeaders?.[headerId] ?? {}), hideFilterMenu: value, hideFilterButton: value },\n },\n }));\n },\n /**\n * PUI-18785: shared \"close this column's own filter menu\" primitive. The header click, the\n * drag handle, and the resize handle all sit inside FilterPopover's floating reference element\n * (the whole header cell), so ds-floating-context's outside-click detection never sees any of\n * those three interactions as \"outside\" and never closes the menu on its own \u2014 each of their\n * handlers calls this instead. Unlike patchHeaderFilterButtonAndMenu (used for genuine outside\n * clicks), only hideFilterMenu is touched \u2014 hideFilterButton is left alone, since these\n * interactions also focus/hover the header cell, which should keep the trigger visible rather\n * than hide it.\n */\n closeFilterMenuIfOpen: (headerId) => {\n if (get().reduxHeaders[headerId]?.hideFilterMenu !== false) return;\n set((state) => ({\n reduxHeaders: {\n ...state.reduxHeaders,\n [headerId]: { ...state.reduxHeaders[headerId], hideFilterMenu: true },\n },\n }));\n },\n // PUI-15154: a column's own onBlur is supposed to hide its DnD handle/sort caret once focus\n // truly leaves it, but that reset doesn't reliably land when focus moves directly from one\n // column's drag handle to another's (both share the same dnd-kit DndContext/PointerSensor).\n // Rather than depend on every column's blur firing correctly, whichever column newly gains\n // focus proactively clears every other column's focus-derived visibility itself. It must skip\n // state.hoveredColumnId though \u2014 hover and focus are independent (a different column can be\n // legitimately hovered by the mouse while this one gains keyboard/click focus), so clearing it\n // here would hide an icon that's still correctly visible under the pointer.\n resetAllHeadersExcept: (exceptHeaderId) => {\n set((state) => {\n const nextReduxHeaders = { ...state.reduxHeaders };\n Object.keys(nextReduxHeaders).forEach((headerId) => {\n if (headerId === exceptHeaderId) return;\n if (headerId === state.hoveredColumnId) return;\n nextReduxHeaders[headerId] = {\n ...nextReduxHeaders[headerId],\n hideFilterMenu: true,\n hideFilterButton: true,\n showDnDHandle: false,\n showSortCaret: false,\n withTabStops: false,\n };\n });\n return { reduxHeaders: nextReduxHeaders };\n });\n },\n});\n\nconst subscribers: ZustandT.Subscribers<DSDataTableT.ShuttleInternalStore> = () => {};\n\nexport const useWholeStore = (): DSDataTableT.Context => {\n const {\n columnHeaderRef,\n virtualListRef,\n flattenedData,\n allDataFlattened,\n isEmptyContent,\n firstFocuseableColumnHeaderId,\n visibleColumns,\n virtualListHelpers,\n layoutHelpers,\n paginationHelpers,\n lastSelected,\n ...tableProps\n } = usePropsStore((state) => state);\n\n const internalStore = useInternalStore((state) => state);\n return {\n tableProps,\n columnHeaderRef,\n virtualListRef,\n flattenedData,\n allDataFlattened,\n isEmptyContent,\n firstFocuseableColumnHeaderId,\n visibleColumns,\n virtualListHelpers,\n layoutHelpers,\n paginationHelpers,\n lastSelected,\n ...internalStore,\n };\n};\n\nexport const config = {\n defaultProps: defaultProps as () => DSDataTableT.InternalProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,oBAAuC;AAChD,SAAS,yBAAyB;AAClC,SAAS,kBAAkB,eAAe,kBAAkB,qBAAqB;AAEjF,MAAM,4BAAwD;AAAA,EAC5D,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,sBAAsB;AACxB;AAEA,MAAM,YAAgG,OAAO,CAAC;AAE9G,MAAM,WAA6F,CAAC,KAAK,SAAS;AAAA,EAChH,aAAa,CAAC,UAAU,cAAc;AACpC,QAAI,CAAC,WAAW;AAAA,MACd,cAAc;AAAA,QACZ,GAAG,MAAM;AAAA,QACT,CAAC,QAAQ,GAAG,EAAE,GAAI,MAAM,eAAe,QAAQ,KAAK,CAAC,GAAI,GAAG,UAAU;AAAA,MACxE;AAAA,IACF,EAAE;AAAA,EACJ;AAAA,EACA,gCAAgC,CAAC,UAAU,UAAU;AACnD,QAAI,CAAC,WAAW;AAAA,MACd,cAAc;AAAA,QACZ,GAAG,MAAM;AAAA,QACT,CAAC,QAAQ,GAAG,EAAE,GAAI,MAAM,eAAe,QAAQ,KAAK,CAAC,GAAI,gBAAgB,OAAO,kBAAkB,MAAM;AAAA,MAC1G;AAAA,IACF,EAAE;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,uBAAuB,CAAC,aAAa;AACnC,QAAI,IAAI,EAAE,aAAa,QAAQ,GAAG,mBAAmB,MAAO;AA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AAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,6 +25,7 @@ const FilterPopoverV2 = (props) => {
|
|
|
25
25
|
onFilterReset
|
|
26
26
|
} = props;
|
|
27
27
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
28
|
+
const virtualListRef = usePropsStore((state) => state.virtualListRef);
|
|
28
29
|
const getOwnerPropsArguments = useCallback(
|
|
29
30
|
() => ({
|
|
30
31
|
columnId: column.id
|
|
@@ -48,7 +49,17 @@ const FilterPopoverV2 = (props) => {
|
|
|
48
49
|
placement: "bottom-end",
|
|
49
50
|
withoutAnimation: true,
|
|
50
51
|
customOffset: [0, 0],
|
|
51
|
-
onClickOutside: handleClickOutsideMenu
|
|
52
|
+
onClickOutside: handleClickOutsideMenu,
|
|
53
|
+
/**
|
|
54
|
+
* PUI-17187: same fix as FilterPopover/index.tsx (V1) — see the full rationale there,
|
|
55
|
+
* including why `withoutPortal: true` was tried and rejected (breaks any filter whose
|
|
56
|
+
* content is larger than the table, e.g. DateRangeFilter's calendar, because withoutPortal
|
|
57
|
+
* makes the popover a literal DOM descendant of the table's overflow:auto container, which
|
|
58
|
+
* unconditionally CSS-clips oversized content — position math cannot override that).
|
|
59
|
+
* boundaryElement keeps the portal and only changes the clipping math, with a per-axis
|
|
60
|
+
* fallback to the viewport when the content doesn't fit the boundary.
|
|
61
|
+
*/
|
|
62
|
+
boundaryElement: virtualListRef.current
|
|
52
63
|
});
|
|
53
64
|
const handleOnKeyDown = useFocusTrap({
|
|
54
65
|
firstElementRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/FilterPopover/FilterPopoverV2.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\n\nimport { useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useFocusTrap } from '@elliemae/ds-hooks-focus-trap';\n\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport { DATA_TABLE_DATA_TESTID } from '../../constants/index.js';\nimport type { FilterPopoverV2Props } from './types.js';\nimport { useGetFilterHandlers } from './useGetFilterHandlers.js';\nimport { useGetFilterVisibility } from './useGetFilterVisibility.js';\nimport { FilterButton, PopperContent, StyledDSDialogFooter, StyledFloatingWrapper } from './styled.js';\n\nexport const FilterPopoverV2: React.ComponentType<FilterPopoverV2Props> = (props: FilterPopoverV2Props) => {\n const {\n column,\n customStyles,\n reduxHeader,\n menuContent,\n ariaLabel,\n triggerIcon,\n innerRef,\n columnReference,\n firstElementRef,\n onFilterSubmit,\n onFilterReset,\n } = props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: column.id,\n }),\n [column.id],\n );\n\n const [buttonReference, setButtonReference] = useState<HTMLButtonElement | null>(null);\n\n const [isButtonFocused, setIsButtonFocused] = useState(false);\n const { isIconVisible, isMenuOpen } = useGetFilterVisibility(reduxHeader);\n\n const { handleTriggerClick, handleClickOutsideMenu, handleMenuOnKeyDown, handleTriggerOnFocus, handleTriggerOnBlur } =\n useGetFilterHandlers(props, isMenuOpen, buttonReference, setIsButtonFocused);\n\n const lastElementRef = useRef<HTMLButtonElement>(null);\n const boundaryRef = useRef<HTMLDivElement | null>(null);\n\n const {\n floatingStyles,\n isOpen: isFloatingOpen,\n refs,\n context,\n } = useFloatingContext({\n externallyControlledIsOpen: isMenuOpen,\n externalReferenceElement: columnReference,\n placement: 'bottom-end',\n withoutAnimation: true,\n customOffset: [0, 0],\n onClickOutside: handleClickOutsideMenu,\n });\n const handleOnKeyDown = useFocusTrap({\n firstElementRef,\n lastElementRef,\n });\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n // This is here to prevent propagation, and not trigger the sort functionality\n onClick={(e) => e.stopPropagation()}\n onKeyDown={handleMenuOnKeyDown}\n >\n <FilterButton\n hide={!isIconVisible}\n data-testid={DATA_TABLE_DATA_TESTID.FILTER_POPOVER_BUTTON}\n getOwnerProps={getOwnerProps}\n >\n <DSButtonV3\n buttonType=\"icon\"\n size=\"s\"\n onClick={handleTriggerClick}\n onKeyDown={handleMenuOnKeyDown}\n onFocus={handleTriggerOnFocus}\n onBlur={handleTriggerOnBlur}\n innerRef={mergeRefs(isIconVisible && setButtonReference, innerRef)}\n tabIndex={reduxHeader?.withTabStops ? 0 : -1}\n aria-label={ariaLabel}\n aria-hidden={!isButtonFocused}\n data-testid={DATA_TABLE_DATA_TESTID.DATA_TABLE_FILTER_BUTTON_ELEMENT}\n >\n {triggerIcon}\n </DSButtonV3>\n </FilterButton>\n {refs.reference && (\n <StyledFloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={{\n ...floatingStyles,\n ...customStyles,\n minWidth: 'min-content',\n }}\n context={context}\n data-testid={DATA_TABLE_DATA_TESTID.DATA_TABLE_FILTER_MENU_CONTENT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n aria-label={`Filter by ${column.Header as string}`}\n role=\"dialog\"\n >\n <PopperContent getOwnerProps={getOwnerProps} onKeyDown={handleOnKeyDown} innerRef={boundaryRef}>\n <form onSubmit={onFilterSubmit}>\n {menuContent}\n <StyledDSDialogFooter>\n <DSButtonV3 onClick={onFilterReset} buttonType=\"outline\" size=\"s\">\n Reset\n </DSButtonV3>\n <DSButtonV3 type=\"submit\" innerRef={lastElementRef} size=\"s\">\n Apply\n </DSButtonV3>\n </StyledDSDialogFooter>\n </form>\n </PopperContent>\n </StyledFloatingWrapper>\n )}\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\n\nimport { useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useFocusTrap } from '@elliemae/ds-hooks-focus-trap';\n\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport { DATA_TABLE_DATA_TESTID } from '../../constants/index.js';\nimport type { FilterPopoverV2Props } from './types.js';\nimport { useGetFilterHandlers } from './useGetFilterHandlers.js';\nimport { useGetFilterVisibility } from './useGetFilterVisibility.js';\nimport { FilterButton, PopperContent, StyledDSDialogFooter, StyledFloatingWrapper } from './styled.js';\n\nexport const FilterPopoverV2: React.ComponentType<FilterPopoverV2Props> = (props: FilterPopoverV2Props) => {\n const {\n column,\n customStyles,\n reduxHeader,\n menuContent,\n ariaLabel,\n triggerIcon,\n innerRef,\n columnReference,\n firstElementRef,\n onFilterSubmit,\n onFilterReset,\n } = props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const virtualListRef = usePropsStore((state) => state.virtualListRef);\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: column.id,\n }),\n [column.id],\n );\n\n const [buttonReference, setButtonReference] = useState<HTMLButtonElement | null>(null);\n\n const [isButtonFocused, setIsButtonFocused] = useState(false);\n const { isIconVisible, isMenuOpen } = useGetFilterVisibility(reduxHeader);\n\n const { handleTriggerClick, handleClickOutsideMenu, handleMenuOnKeyDown, handleTriggerOnFocus, handleTriggerOnBlur } =\n useGetFilterHandlers(props, isMenuOpen, buttonReference, setIsButtonFocused);\n\n const lastElementRef = useRef<HTMLButtonElement>(null);\n const boundaryRef = useRef<HTMLDivElement | null>(null);\n\n const {\n floatingStyles,\n isOpen: isFloatingOpen,\n refs,\n context,\n } = useFloatingContext({\n externallyControlledIsOpen: isMenuOpen,\n externalReferenceElement: columnReference,\n placement: 'bottom-end',\n withoutAnimation: true,\n customOffset: [0, 0],\n onClickOutside: handleClickOutsideMenu,\n /**\n * PUI-17187: same fix as FilterPopover/index.tsx (V1) \u2014 see the full rationale there,\n * including why `withoutPortal: true` was tried and rejected (breaks any filter whose\n * content is larger than the table, e.g. DateRangeFilter's calendar, because withoutPortal\n * makes the popover a literal DOM descendant of the table's overflow:auto container, which\n * unconditionally CSS-clips oversized content \u2014 position math cannot override that).\n * boundaryElement keeps the portal and only changes the clipping math, with a per-axis\n * fallback to the viewport when the content doesn't fit the boundary.\n */\n boundaryElement: virtualListRef.current,\n });\n const handleOnKeyDown = useFocusTrap({\n firstElementRef,\n lastElementRef,\n });\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n // This is here to prevent propagation, and not trigger the sort functionality\n onClick={(e) => e.stopPropagation()}\n onKeyDown={handleMenuOnKeyDown}\n >\n <FilterButton\n hide={!isIconVisible}\n data-testid={DATA_TABLE_DATA_TESTID.FILTER_POPOVER_BUTTON}\n getOwnerProps={getOwnerProps}\n >\n <DSButtonV3\n buttonType=\"icon\"\n size=\"s\"\n onClick={handleTriggerClick}\n onKeyDown={handleMenuOnKeyDown}\n onFocus={handleTriggerOnFocus}\n onBlur={handleTriggerOnBlur}\n innerRef={mergeRefs(isIconVisible && setButtonReference, innerRef)}\n tabIndex={reduxHeader?.withTabStops ? 0 : -1}\n aria-label={ariaLabel}\n aria-hidden={!isButtonFocused}\n data-testid={DATA_TABLE_DATA_TESTID.DATA_TABLE_FILTER_BUTTON_ELEMENT}\n >\n {triggerIcon}\n </DSButtonV3>\n </FilterButton>\n {refs.reference && (\n <StyledFloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={{\n ...floatingStyles,\n ...customStyles,\n minWidth: 'min-content',\n }}\n context={context}\n data-testid={DATA_TABLE_DATA_TESTID.DATA_TABLE_FILTER_MENU_CONTENT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n aria-label={`Filter by ${column.Header as string}`}\n role=\"dialog\"\n >\n <PopperContent getOwnerProps={getOwnerProps} onKeyDown={handleOnKeyDown} innerRef={boundaryRef}>\n <form onSubmit={onFilterSubmit}>\n {menuContent}\n <StyledDSDialogFooter>\n <DSButtonV3 onClick={onFilterReset} buttonType=\"outline\" size=\"s\">\n Reset\n </DSButtonV3>\n <DSButtonV3 type=\"submit\" innerRef={lastElementRef} size=\"s\">\n Apply\n </DSButtonV3>\n </StyledDSDialogFooter>\n </form>\n </PopperContent>\n </StyledFloatingWrapper>\n )}\n </div>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2Ff,cAmCM,YAnCN;AA3FR,SAAS,kBAAkB;AAE3B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB;AAC1B,SAAgB,aAAa,QAAQ,gBAAgB;AAErD,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAEvC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,cAAc,eAAe,sBAAsB,6BAA6B;AAElF,MAAM,kBAA6D,CAAC,UAAgC;AACzG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,iBAAiB,cAAc,CAAC,UAAU,MAAM,cAAc;AAEpE,QAAM,yBAAyB;AAAA,IAC7B,OAAO;AAAA,MACL,UAAU,OAAO;AAAA,IACnB;AAAA,IACA,CAAC,OAAO,EAAE;AAAA,EACZ;AAEA,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAmC,IAAI;AAErF,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAS,KAAK;AAC5D,QAAM,EAAE,eAAe,WAAW,IAAI,u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d,GAAG;AAAA,gBACH,GAAG;AAAA,gBACH,UAAU;AAAA,cACZ;AAAA,cACA;AAAA,cACA,eAAa,uBAAuB;AAAA,cACpC;AAAA,cACA;AAAA,cACA,cAAY,aAAa,OAAO,MAAgB;AAAA,cAChD,MAAK;AAAA,cAEL,8BAAC,iBAAc,eAA8B,WAAW,iBAAiB,UAAU,aACjF,+BAAC,UAAK,UAAU,gBACb;AAAA;AAAA,gBACD,qBAAC,wBACC;AAAA,sCAAC,cAAW,SAAS,eAAe,YAAW,WAAU,MAAK,KAAI,mBAElE;AAAA,kBACA,oBAAC,cAAW,MAAK,UAAS,UAAU,gBAAgB,MAAK,KAAI,mBAE7D;AAAA,mBACF;AAAA,iBACF,GACF;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,6 +25,7 @@ const FilterPopover = (props) => {
|
|
|
25
25
|
} = props;
|
|
26
26
|
const filters = usePropsStore((state) => state.filters);
|
|
27
27
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
28
|
+
const virtualListRef = usePropsStore((state) => state.virtualListRef);
|
|
28
29
|
const getOwnerPropsArguments = useCallback(
|
|
29
30
|
() => ({
|
|
30
31
|
columnId: column.id
|
|
@@ -50,7 +51,33 @@ const FilterPopover = (props) => {
|
|
|
50
51
|
customOffset: floatingOffset,
|
|
51
52
|
withoutAnimation: true,
|
|
52
53
|
placementOrderPreference: ["bottom-end", "top-end"],
|
|
53
|
-
onClickOutside: handleClickOutsideMenu
|
|
54
|
+
onClickOutside: handleClickOutsideMenu,
|
|
55
|
+
/**
|
|
56
|
+
* PUI-17187: the filter trigger lives inside DataTable's own horizontally-scrollable
|
|
57
|
+
* container (virtualListRef, overflow: auto). Without a boundary, computePosition only
|
|
58
|
+
* clips against the browser viewport, so once the column scrolls near the table's own edge
|
|
59
|
+
* the popover keeps tracking the trigger's raw (partially clipped) screen position and
|
|
60
|
+
* spills past the table's visible bounds, into the rest of the page.
|
|
61
|
+
*
|
|
62
|
+
* Why not `withoutPortal: true` instead (it also derives a clipping boundary — see
|
|
63
|
+
* getClippingParent — which would resolve to this same scroll container automatically, no
|
|
64
|
+
* explicit boundaryElement needed): withoutPortal renders the popover as a literal DOM
|
|
65
|
+
* descendant of that overflow:auto container instead of portaling it to <body>. The browser
|
|
66
|
+
* then clips ANY content exceeding the container's bounds unconditionally — CSS overflow
|
|
67
|
+
* clipping is not something position math can override. That breaks any filter whose content
|
|
68
|
+
* is taller/wider than the table itself: confirmed regression via this exact change during
|
|
69
|
+
* development — DateRangeFilter's dual-calendar popover (in a 300px-tall table) got its
|
|
70
|
+
* inputs pushed outside the actual browser viewport entirely, failing the existing
|
|
71
|
+
* `DSDataTable - FilterPopover focus trap` Playwright CT tests (clicks on
|
|
72
|
+
* ds-controlled-date-time-picker-month-input timed out as "outside of the viewport").
|
|
73
|
+
*
|
|
74
|
+
* boundaryElement keeps the portal (so oversized content still escapes fully into the page,
|
|
75
|
+
* unclipped, exactly as before) and only changes computePosition's clipping *math*, with a
|
|
76
|
+
* per-axis fallback to the plain viewport when the floating content doesn't fit the boundary
|
|
77
|
+
* on that axis (see getBoundaryConstrainedRect) — small popovers (this one) get clamped to
|
|
78
|
+
* the table; oversized ones (DateRangeFilter's calendar) are unaffected.
|
|
79
|
+
*/
|
|
80
|
+
boundaryElement: virtualListRef.current
|
|
54
81
|
});
|
|
55
82
|
useEffect(() => {
|
|
56
83
|
void forceUpdatePosition();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/FilterPopover/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-cycle */\n/* eslint-disable no-void */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { useFocusTrap } from '@elliemae/ds-hooks-focus-trap';\nimport { useFloatingContext } from '@elliemae/ds-floating-context';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { DATA_TESTID } from '../../configs/constants.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport type { FilterPopoverProps } from './types.js';\nimport { useGetFilterHandlers } from './useGetFilterHandlers.js';\nimport { useGetFilterVisibility } from './useGetFilterVisibility.js';\nimport { FilterButton, PopperContent, StyledFloatingWrapper } from './styled.js';\n\nexport const FilterPopover: React.ComponentType<FilterPopoverProps> = (props: FilterPopoverProps) => {\n const {\n column,\n customStyles,\n reduxHeader,\n menuContent,\n ariaLabel,\n triggerIcon,\n innerRef,\n columnReference,\n firstElementRef,\n lastElementRef,\n } = props;\n\n const filters = usePropsStore((state) => state.filters);\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: column.id,\n }),\n [column.id],\n );\n\n const { isIconVisible, isMenuOpen } = useGetFilterVisibility(reduxHeader);\n\n const [buttonReference, setButtonReference] = useState<HTMLButtonElement | null>(null);\n const [isButtonFocused, setIsButtonFocused] = useState(false);\n\n const { handleTriggerClick, handleClickOutsideMenu, handleMenuOnKeyDown, handleTriggerOnFocus, handleTriggerOnBlur } =\n useGetFilterHandlers(props, isMenuOpen, buttonReference, setIsButtonFocused);\n\n const floatingOffset = useMemo<[number, number]>(() => (columnReference ? [0, 1] : [5, 4]), [columnReference]);\n\n const externalReferenceElement = columnReference || buttonReference;\n\n const {\n refs,\n floatingStyles,\n context,\n isOpen: isFloatingOpen,\n forceUpdatePosition,\n } = useFloatingContext({\n externallyControlledIsOpen: isMenuOpen,\n externalReferenceElement,\n placement: 'bottom-end',\n customOffset: floatingOffset,\n withoutAnimation: true,\n placementOrderPreference: ['bottom-end', 'top-end'],\n onClickOutside: handleClickOutsideMenu,\n });\n\n // When the filter bar changes height, re-compute the floating position\n useEffect(() => {\n void forceUpdatePosition();\n }, [filters, forceUpdatePosition]);\n\n const popoverContentRef = useRef<HTMLDivElement>(null);\n const handleOnKeyDown = useFocusTrap({\n firstElementRef,\n lastElementRef,\n });\n\n return (\n <div\n // This is here to prevent propagation, and not trigger the sort functionality\n onClick={(e) => e.stopPropagation()}\n onKeyDown={handleMenuOnKeyDown}\n >\n <FilterButton\n hide={!isIconVisible}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BUTTON}\n getOwnerProps={getOwnerProps}\n >\n <DSButtonV2\n buttonType=\"icon\"\n size=\"s\"\n onClick={handleTriggerClick}\n onFocus={handleTriggerOnFocus}\n onBlur={handleTriggerOnBlur}\n innerRef={mergeRefs(isIconVisible && setButtonReference, innerRef)}\n tabIndex={reduxHeader?.withTabStops ? 0 : -1}\n aria-label={ariaLabel}\n aria-hidden={!isButtonFocused}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BUTTON_ELEMENT}\n >\n {triggerIcon}\n </DSButtonV2>\n </FilterButton>\n {(columnReference || buttonReference) && (\n <StyledFloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={{\n ...floatingStyles,\n ...customStyles,\n minWidth: column.ref?.current?.offsetWidth ?? '0px',\n }}\n context={context}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_MENU_CONTENT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n role=\"dialog\"\n aria-label={`Filter by ${column.Header as string}`}\n >\n <PopperContent getOwnerProps={getOwnerProps} innerRef={popoverContentRef} onKeyDown={handleOnKeyDown}>\n {menuContent}\n </PopperContent>\n </StyledFloatingWrapper>\n )}\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-cycle */\n/* eslint-disable no-void */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { useFocusTrap } from '@elliemae/ds-hooks-focus-trap';\nimport { useFloatingContext } from '@elliemae/ds-floating-context';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { DATA_TESTID } from '../../configs/constants.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport type { FilterPopoverProps } from './types.js';\nimport { useGetFilterHandlers } from './useGetFilterHandlers.js';\nimport { useGetFilterVisibility } from './useGetFilterVisibility.js';\nimport { FilterButton, PopperContent, StyledFloatingWrapper } from './styled.js';\n\nexport const FilterPopover: React.ComponentType<FilterPopoverProps> = (props: FilterPopoverProps) => {\n const {\n column,\n customStyles,\n reduxHeader,\n menuContent,\n ariaLabel,\n triggerIcon,\n innerRef,\n columnReference,\n firstElementRef,\n lastElementRef,\n } = props;\n\n const filters = usePropsStore((state) => state.filters);\n const getOwnerProps = usePropsStore((store) => store.get);\n const virtualListRef = usePropsStore((state) => state.virtualListRef);\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: column.id,\n }),\n [column.id],\n );\n\n const { isIconVisible, isMenuOpen } = useGetFilterVisibility(reduxHeader);\n\n const [buttonReference, setButtonReference] = useState<HTMLButtonElement | null>(null);\n const [isButtonFocused, setIsButtonFocused] = useState(false);\n\n const { handleTriggerClick, handleClickOutsideMenu, handleMenuOnKeyDown, handleTriggerOnFocus, handleTriggerOnBlur } =\n useGetFilterHandlers(props, isMenuOpen, buttonReference, setIsButtonFocused);\n\n const floatingOffset = useMemo<[number, number]>(() => (columnReference ? [0, 1] : [5, 4]), [columnReference]);\n\n const externalReferenceElement = columnReference || buttonReference;\n\n const {\n refs,\n floatingStyles,\n context,\n isOpen: isFloatingOpen,\n forceUpdatePosition,\n } = useFloatingContext({\n externallyControlledIsOpen: isMenuOpen,\n externalReferenceElement,\n placement: 'bottom-end',\n customOffset: floatingOffset,\n withoutAnimation: true,\n placementOrderPreference: ['bottom-end', 'top-end'],\n onClickOutside: handleClickOutsideMenu,\n /**\n * PUI-17187: the filter trigger lives inside DataTable's own horizontally-scrollable\n * container (virtualListRef, overflow: auto). Without a boundary, computePosition only\n * clips against the browser viewport, so once the column scrolls near the table's own edge\n * the popover keeps tracking the trigger's raw (partially clipped) screen position and\n * spills past the table's visible bounds, into the rest of the page.\n *\n * Why not `withoutPortal: true` instead (it also derives a clipping boundary \u2014 see\n * getClippingParent \u2014 which would resolve to this same scroll container automatically, no\n * explicit boundaryElement needed): withoutPortal renders the popover as a literal DOM\n * descendant of that overflow:auto container instead of portaling it to <body>. The browser\n * then clips ANY content exceeding the container's bounds unconditionally \u2014 CSS overflow\n * clipping is not something position math can override. That breaks any filter whose content\n * is taller/wider than the table itself: confirmed regression via this exact change during\n * development \u2014 DateRangeFilter's dual-calendar popover (in a 300px-tall table) got its\n * inputs pushed outside the actual browser viewport entirely, failing the existing\n * `DSDataTable - FilterPopover focus trap` Playwright CT tests (clicks on\n * ds-controlled-date-time-picker-month-input timed out as \"outside of the viewport\").\n *\n * boundaryElement keeps the portal (so oversized content still escapes fully into the page,\n * unclipped, exactly as before) and only changes computePosition's clipping *math*, with a\n * per-axis fallback to the plain viewport when the floating content doesn't fit the boundary\n * on that axis (see getBoundaryConstrainedRect) \u2014 small popovers (this one) get clamped to\n * the table; oversized ones (DateRangeFilter's calendar) are unaffected.\n */\n boundaryElement: virtualListRef.current,\n });\n\n // When the filter bar changes height, re-compute the floating position\n useEffect(() => {\n void forceUpdatePosition();\n }, [filters, forceUpdatePosition]);\n\n const popoverContentRef = useRef<HTMLDivElement>(null);\n const handleOnKeyDown = useFocusTrap({\n firstElementRef,\n lastElementRef,\n });\n\n return (\n <div\n // This is here to prevent propagation, and not trigger the sort functionality\n onClick={(e) => e.stopPropagation()}\n onKeyDown={handleMenuOnKeyDown}\n >\n <FilterButton\n hide={!isIconVisible}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BUTTON}\n getOwnerProps={getOwnerProps}\n >\n <DSButtonV2\n buttonType=\"icon\"\n size=\"s\"\n onClick={handleTriggerClick}\n onFocus={handleTriggerOnFocus}\n onBlur={handleTriggerOnBlur}\n innerRef={mergeRefs(isIconVisible && setButtonReference, innerRef)}\n tabIndex={reduxHeader?.withTabStops ? 0 : -1}\n aria-label={ariaLabel}\n aria-hidden={!isButtonFocused}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BUTTON_ELEMENT}\n >\n {triggerIcon}\n </DSButtonV2>\n </FilterButton>\n {(columnReference || buttonReference) && (\n <StyledFloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={{\n ...floatingStyles,\n ...customStyles,\n minWidth: column.ref?.current?.offsetWidth ?? '0px',\n }}\n context={context}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_MENU_CONTENT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n role=\"dialog\"\n aria-label={`Filter by ${column.Header as string}`}\n >\n <PopperContent getOwnerProps={getOwnerProps} innerRef={popoverContentRef} onKeyDown={handleOnKeyDown}>\n {menuContent}\n </PopperContent>\n </StyledFloatingWrapper>\n )}\n </div>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0GnB,SAUI,KAVJ;AAvGJ,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAgB,aAAa,WAAW,SAAS,QAAQ,gBAAgB;AACzE,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,cAAc,eAAe,6BAA6B;AAE5D,MAAM,gBAAyD,CAAC,UAA8B;AACnG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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oBAAoB,OAAuB,IAAI;AACrD,QAAM,kBAAkB,aAAa;AAAA,IACnC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAClC,WAAW;AAAA,MAEX;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,CAAC;AAAA,YACP,eAAa,YAAY;AAAA,YACzB;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,YAAW;AAAA,gBACX,MAAK;AAAA,gBACL,SAAS;AAAA,gBACT,SAAS;AAAA,gBACT,QAAQ;AAAA,gBACR,UAAU,UAAU,iBAAiB,oBAAoB,QAAQ;AAAA,gBACjE,UAAU,aAAa,eAAe,IAAI;AAAA,gBAC1C,cAAY;AAAA,gBACZ,eAAa,CAAC;AAAA,gBACd,eAAa,YAAY;AAAA,gBAExB;AAAA;AAAA,YACH;AAAA;AAAA,QACF;AAAA,SACE,mBAAmB,oBACnB;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ;AAAA,YACR,gBAAgB;AAAA,cACd,GAAG;AAAA,cACH,GAAG;AAAA,cACH,UAAU,OAAO,KAAK,SAAS,eAAe;AAAA,YAChD;AAAA,YACA;AAAA,YACA,eAAa,YAAY;AAAA,YACzB;AAAA,YACA;AAAA,YACA,MAAK;AAAA,YACL,cAAY,aAAa,OAAO,MAAgB;AAAA,YAEhD,8BAAC,iBAAc,eAA8B,UAAU,mBAAmB,WAAW,iBAClF,uBACH;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { StyledResizer } from "../../styled.js";
|
|
5
5
|
import { useHeaderResizer } from "./useHeaderResizer.js";
|
|
6
6
|
import { usePropsStore } from "../../configs/useStore/createInternalAndPropsContext.js";
|
|
7
|
-
import { DEFAULT_MAX_COLUMN_WIDTH, DEFAULT_MIN_COLUMN_WIDTH
|
|
7
|
+
import { DEFAULT_MAX_COLUMN_WIDTH, DEFAULT_MIN_COLUMN_WIDTH } from "../../configs/constants.js";
|
|
8
8
|
const stopPropagation = (e) => e.stopPropagation();
|
|
9
9
|
const HIDDEN_STYLE = { display: "none" };
|
|
10
10
|
const RESIZE_INSTRUCTION = "Use the left and right arrow keys to increase or decrease the column width.";
|
|
@@ -15,15 +15,11 @@ const HeaderResizer = ({ column, innerRef, isReachable }) => {
|
|
|
15
15
|
innerRef
|
|
16
16
|
});
|
|
17
17
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
18
|
-
const resizerA11yMode = usePropsStore((state) => state.resizerA11yMode);
|
|
19
18
|
const resizeLabel = typeof column.Header === "string" ? `Resize ${column.Header} column` : "Resize column";
|
|
20
|
-
const nameId = `resize-name-${column.id}`.replace(/ /g, "");
|
|
21
19
|
const instructionId = `resize-instr-${column.id}`.replace(/ /g, "");
|
|
22
|
-
const isSlider = resizerA11yMode === ResizerA11yMode.Slider;
|
|
23
|
-
const role = isSlider ? "slider" : "separator";
|
|
24
|
-
const orientation = isSlider ? "horizontal" : "vertical";
|
|
25
20
|
const valueMin = bracketBound(column.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH, columnWidth, Math.min);
|
|
26
21
|
const valueMax = bracketBound(column.maxWidth ?? DEFAULT_MAX_COLUMN_WIDTH, columnWidth, Math.max);
|
|
22
|
+
const sliderValue = columnWidth ?? valueMin;
|
|
27
23
|
const valueText = columnWidth === void 0 ? void 0 : `${columnWidth} pixels`;
|
|
28
24
|
useEffect(() => {
|
|
29
25
|
const addEvents = () => {
|
|
@@ -42,33 +38,35 @@ const HeaderResizer = ({ column, innerRef, isReachable }) => {
|
|
|
42
38
|
else removeEvents();
|
|
43
39
|
return removeEvents;
|
|
44
40
|
}, [isResizing, onResizeHandler, onResizeEnd]);
|
|
45
|
-
return /* @__PURE__ */ jsxs(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
41
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
StyledResizer,
|
|
44
|
+
{
|
|
45
|
+
type: "range",
|
|
46
|
+
min: valueMin,
|
|
47
|
+
max: valueMax,
|
|
48
|
+
value: sliderValue,
|
|
49
|
+
"aria-valuenow": columnWidth,
|
|
50
|
+
"aria-valuemin": valueMin,
|
|
51
|
+
"aria-valuemax": valueMax,
|
|
52
|
+
"aria-valuetext": valueText,
|
|
53
|
+
"aria-label": resizeLabel,
|
|
54
|
+
"aria-describedby": instructionId,
|
|
55
|
+
"aria-hidden": isReachable ? void 0 : true,
|
|
56
|
+
tabIndex: isReachable ? 0 : -1,
|
|
57
|
+
innerRef,
|
|
58
|
+
draggable: false,
|
|
59
|
+
onMouseDown: onResizeStart,
|
|
60
|
+
onTouchStart: onResizeStart,
|
|
61
|
+
onMouseUp: onResizeEnd,
|
|
62
|
+
onTouchEnd: onResizeEnd,
|
|
63
|
+
onClick: stopPropagation,
|
|
64
|
+
onKeyDown: handleKeyboardResize,
|
|
65
|
+
getOwnerProps
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx("span", { id: instructionId, style: HIDDEN_STYLE, children: RESIZE_INSTRUCTION })
|
|
69
|
+
] });
|
|
72
70
|
};
|
|
73
71
|
export {
|
|
74
72
|
HeaderResizer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Headers/HeaderResizer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect } from 'react';\nimport { StyledResizer } from '../../styled.js';\nimport type { DSDataTableT } from '../../react-desc-prop-types.js';\nimport { useHeaderResizer } from './useHeaderResizer.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport { DEFAULT_MAX_COLUMN_WIDTH, DEFAULT_MIN_COLUMN_WIDTH
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect } from 'react';\nimport { StyledResizer } from '../../styled.js';\nimport type { DSDataTableT } from '../../react-desc-prop-types.js';\nimport { useHeaderResizer } from './useHeaderResizer.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport { DEFAULT_MAX_COLUMN_WIDTH, DEFAULT_MIN_COLUMN_WIDTH } from '../../configs/constants.js';\n\nconst stopPropagation = (e: React.MouseEvent | React.KeyboardEvent) => e.stopPropagation();\n\n/** Instruction node \u2014 referenced via aria-describedby, never rendered visually. */\nconst HIDDEN_STYLE: React.CSSProperties = { display: 'none' };\nconst RESIZE_INSTRUCTION = 'Use the left and right arrow keys to increase or decrease the column width.';\n\n/**\n * PUI-17784: brackets the announced bounds around the actual current width, not just the configured\n * ones. The resize clamp (narrow() in useHeaderResizer.ts) only bounds INTERACTIVE resizing \u2014 an\n * explicit column.width set outside [minWidth, maxWidth] renders as-is on first paint (pre-existing,\n * unrelated to this ticket), so columnWidth can start below configuredMin or above configuredMax.\n * Reporting aria-valuenow outside [aria-valuemin, aria-valuemax] is an internally-inconsistent ARIA\n * value \u2014 exactly the class of meaningless-value problem this ticket exists to fix, just in a\n * narrower corner. Widening the bound to include the real value (rather than clamping the value to a\n * bound the column isn't actually honoring) keeps the announcement accurate; it self-corrects to the\n * configured bound on the first interactive resize, since narrow() clamps from then on.\n */\nconst bracketBound = (configuredBound: number, columnWidth: number | undefined, pickWider: typeof Math.min) =>\n pickWider(configuredBound, columnWidth ?? configuredBound);\n\nexport const HeaderResizer: React.ComponentType<{\n column: DSDataTableT.InternalColumn;\n innerRef: React.MutableRefObject<HTMLInputElement | null>;\n isReachable: boolean;\n}> = ({ column, innerRef, isReachable }) => {\n const { isResizing, columnWidth, onResizeStart, onResizeEnd, onResizeHandler, handleKeyboardResize } =\n useHeaderResizer({\n columnId: column.id,\n innerRef,\n });\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const resizeLabel = typeof column.Header === 'string' ? `Resize ${column.Header} column` : 'Resize column';\n const instructionId = `resize-instr-${column.id}`.replace(/ /g, '');\n\n const valueMin = bracketBound(column.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH, columnWidth, Math.min);\n const valueMax = bracketBound(column.maxWidth ?? DEFAULT_MAX_COLUMN_WIDTH, columnWidth, Math.max);\n const sliderValue = columnWidth ?? valueMin;\n const valueText = columnWidth === undefined ? undefined : `${columnWidth} pixels`;\n\n // This setups the event listeners for the resize (only for mouse)\n // It reacts to the isResizing state change\n useEffect(() => {\n const addEvents = () => {\n document.addEventListener('mousemove', onResizeHandler);\n document.addEventListener('touchmove', onResizeHandler);\n document.addEventListener('mouseup', onResizeEnd);\n document.addEventListener('touchend', onResizeEnd);\n };\n const removeEvents = () => {\n document.removeEventListener('mousemove', onResizeHandler);\n document.removeEventListener('touchmove', onResizeHandler);\n document.removeEventListener('mouseup', onResizeEnd);\n document.removeEventListener('touchend', onResizeEnd);\n };\n\n if (isResizing) addEvents();\n else removeEvents();\n\n // just in case the component is unmounted\n return removeEvents;\n }, [isResizing, onResizeHandler, onResizeEnd]);\n\n return (\n <>\n <StyledResizer\n type=\"range\"\n min={valueMin}\n max={valueMax}\n value={sliderValue}\n aria-valuenow={columnWidth}\n aria-valuemin={valueMin}\n aria-valuemax={valueMax}\n aria-valuetext={valueText}\n aria-label={resizeLabel}\n aria-describedby={instructionId}\n aria-hidden={isReachable ? undefined : true}\n tabIndex={isReachable ? 0 : -1}\n innerRef={innerRef}\n draggable={false}\n onMouseDown={onResizeStart}\n onTouchStart={onResizeStart}\n onMouseUp={onResizeEnd}\n onTouchEnd={onResizeEnd}\n onClick={stopPropagation}\n onKeyDown={handleKeyboardResize}\n getOwnerProps={getOwnerProps}\n />\n <span id={instructionId} style={HIDDEN_STYLE}>\n {RESIZE_INSTRUCTION}\n </span>\n </>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuEnB,mBACE,KADF;AAvEJ,SAAgB,iBAAiB;AACjC,SAAS,qBAAqB;AAE9B,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B,gCAAgC;AAEnE,MAAM,kBAAkB,CAAC,MAA8C,EAAE,gBAAgB;AAGzF,MAAM,eAAoC,EAAE,SAAS,OAAO;AAC5D,MAAM,qBAAqB;AAa3B,MAAM,eAAe,CAAC,iBAAyB,aAAiC,cAC9E,UAAU,iBAAiB,eAAe,eAAe;AAEpD,MAAM,gBAIR,CAAC,EAAE,QAAQ,UAAU,YAAY,MAAM;AAC1C,QAAM,EAAE,YAAY,aAAa,eAAe,aAAa,iBAAiB,qBAAqB,IACjG,iBAAiB;AAAA,IACf,UAAU,OAAO;AAAA,IACjB;AAAA,EACF,CAAC;AACH,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AAExD,QAAM,cAAc,OAAO,OAAO,WAAW,WAAW,UAAU,OAAO,MAAM,YAAY;AAC3F,QAAM,gBAAgB,gBAAgB,OAAO,EAAE,GAAG,QAAQ,MAAM,EAAE;AAElE,QAAM,WAAW,aAAa,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42
|
const visibleColumns = usePropsStore((state) => state.visibleColumns);
|
|
43
43
|
const setFocusedRowId = useInternalStore((state) => state.setFocusedRowId);
|
|
44
44
|
const patchHeader = useInternalStore((state) => state.patchHeader);
|
|
45
|
+
const closeFilterMenuIfOpen = useInternalStore((state) => state.closeFilterMenuIfOpen);
|
|
45
46
|
const resetAllHeadersExcept = useInternalStore((state) => state.resetAllHeadersExcept);
|
|
46
47
|
const hoveredColumnId = useInternalStore((state) => state.hoveredColumnId);
|
|
47
48
|
const setHoveredColumnId = useInternalStore((state) => state.setHoveredColumnId);
|
|
@@ -61,6 +62,7 @@ const useHeaderCellHandlers = ({
|
|
|
61
62
|
}
|
|
62
63
|
}, [column.id, hasDnD, hasFilter, headerRef, patchHeader, reduxHeader, setHoveredColumnId]);
|
|
63
64
|
const handleSort = useCallback(() => {
|
|
65
|
+
closeFilterMenuIfOpen(column.id);
|
|
64
66
|
if (column.canSort) {
|
|
65
67
|
onColumnSortChange?.({
|
|
66
68
|
column: column.id,
|
|
@@ -72,7 +74,15 @@ const useHeaderCellHandlers = ({
|
|
|
72
74
|
column.isSortedDesc ? "ASC" : "DESC"
|
|
73
75
|
);
|
|
74
76
|
}
|
|
75
|
-
}, [
|
|
77
|
+
}, [
|
|
78
|
+
column.canSort,
|
|
79
|
+
column.id,
|
|
80
|
+
column.isSortedDesc,
|
|
81
|
+
onColumnSort,
|
|
82
|
+
onColumnSortChange,
|
|
83
|
+
visibleColumns,
|
|
84
|
+
closeFilterMenuIfOpen
|
|
85
|
+
]);
|
|
76
86
|
const isActive = draggableProps && draggableProps.active;
|
|
77
87
|
const onKeyDown = useCallback(
|
|
78
88
|
(e) => {
|