@pega/lists-react 9.0.0-build.19.11 → 9.0.0-build.19.12
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/lib/Core/Components/Virtualise/VirtualizeInfinite.js +1 -1
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js +22 -18
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.js +2 -2
- package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
- package/package.json +7 -7
|
@@ -117,7 +117,7 @@ const VirtualizeInfinite = forwardRef(({ id, viewHeight, viewWidth, itemHeight,
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
callback({ ...vi.pInfo.view, id });
|
|
120
|
+
callback({ ...vi.pInfo.view, id }, { takeLatestAction: true });
|
|
121
121
|
}
|
|
122
122
|
else if (resetIsFetchingWhenNoNewIndexes) {
|
|
123
123
|
setLoadingIndicatorInfo({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizeInfinite.js","sourceRoot":"","sources":["../../../../Core/Components/Virtualise/VirtualizeInfinite.jsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,IAAI,EACJ,SAAS,EACT,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,O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,EAAE,SAAS,CAAC,MAAM;KAC3B,CAAC;IACF,gBAAgB,EAAE,SAAS,CAAC,MAAM;IAClC,aAAa,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxE,oBAAoB,EAAE,SAAS,CAAC,IAAI;IACpC,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,mBAAmB,EAAE,SAAS,CAAC,IAAI;IACnC,kBAAkB,EAAE,SAAS,CAAC,IAAI;CACnC,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG;IAChC,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,EAAE;IACrB,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,SAAS;IAChB,aAAa,EAAE,SAAS;IACxB,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE,KAAK;IACjB,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC7B,kBAAkB,EAAE,IAAI;CACzB,CAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,eAAe,IAAI,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import {\n forwardRef,\n memo,\n useEffect,\n useRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useLayoutEffect,\n useState\n} from 'react';\nimport Styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport { defaultThemeProp, Progress } from '@pega/cosmos-react-core';\nimport { isEmpty } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport { StyledSkeletonRow } from '../../Views/Table/SkeletonRows';\n\nimport getPaginationInfo from './Pagination';\nimport useScroll from './UseScroll';\nimport {\n getCurrentEstimation,\n getRecordCountForLayoutPaint,\n getValueWithUnit,\n getMaxHeight,\n isViewNotFilled,\n setAttributesOnItems,\n updateRowContainerTop\n} from './utility';\nimport useResizeObserver from './UseResizeObserver';\n\nfunction getBContainerMinHeight(props) {\n return props.$style.renderFooter ? `calc(100% - ${2 * props.$style.itemHeight + 1}px) ` : '0';\n}\n\nconst StyledPContainer = Styled.div`\n position: relative;\n overflow: auto;\n max-height: ${props => props.$style.maxHeight};\n width: ${props => props.$style.width};\n height: ${props => props.$style.height};\n min-height: ${props => props.$style.minHeight};\n border-radius: inherit;\n\n &:has(${StyledSkeletonRow}) {\n overflow: hidden;\n }\n\n .bContainer {\n position: relative;\n min-height: ${props => getBContainerMinHeight(props)};\n border-radius: inherit;\n }\n`;\n\nStyledPContainer.defaultProps = defaultThemeProp;\n\nconst StyledLoader = Styled.div`\n display: flex;\n justify-content: center;\n padding: 0.5rem;\n position: absolute;\n width: 100%;\n top: ${props => props.$style.top};\n bottom: ${props => props.$style.bottom};\n`;\n\nconst PAGINATION_TRIGGER_RATIOS = {\n down: 0.9,\n up: 0.1\n};\n\nconst VirtualizeInfinite = forwardRef(\n (\n {\n id,\n viewHeight,\n viewWidth,\n itemHeight,\n callback,\n rowContainerClass,\n children,\n renderHeader,\n renderFooter,\n state,\n bufferMultiplier,\n viewMaxHeight,\n showLoadingIndicator,\n resetCount,\n countUpdateCallback,\n isFetching,\n hasMoreResults,\n renderEmptyRecords\n },\n inputRef\n ) => {\n const rowBuffer = 5;\n\n const [rContainerDimensionUpdate, setRContainerDimensionUpdate] = useState();\n const [loadingIndicatorInfo, setLoadingIndicatorInfo] = useState({});\n const [translate] = useTranslate();\n\n // Create ref to store virtualize related data.\n const vi = useRef({\n itemHeight,\n bufferMultiplier,\n pInfo: {},\n totalRowsLoaded: undefined,\n isInitialized: false\n }).current;\n\n // tracking both state and pInfo.view to identify the initialization as in case of fullscreen, state will be available but pInfo.view won't\n const isInitialized = state && !!Object.keys(vi.pInfo.view ?? {}).length;\n\n const getTotalRowsIncludingBuffer = useCallback(() => {\n if (isEmpty(vi.totalRowsLoaded)) return;\n return hasMoreResults ? vi.totalRowsLoaded + rowBuffer : vi.totalRowsLoaded;\n }, [vi.totalRowsLoaded, hasMoreResults]);\n\n const getRowContainer = useCallback(() => vi.rContainer, [vi.rContainer]);\n const getPContainer = useCallback(() => vi.pContainer, [vi.pContainer]);\n const getBContainer = useCallback(() => vi.bContainer, [vi.bContainer]);\n\n // API used when user want to scroll to top programmatically.\n // Though component auto scroll to top if no element is in view.\n // But calling this API upfront might save one extra call to Fetch API.\n const scrollToTop = useCallback(() => {\n if (!isInitialized) return;\n getPContainer().scrollTop = 0;\n vi.pInfo = getPaginationInfo(\n getPContainer(),\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n false,\n true\n );\n callback({ ...vi.pInfo.view, id }, { takeLatestAction: true });\n }, [id, vi, getPContainer, callback, isInitialized]);\n\n // expose APIs and properties here to help client to communicate.\n useImperativeHandle(inputRef, () => ({\n getParentContainer: getPContainer,\n scrollToTop,\n vi,\n id\n }));\n\n const { width, height } = useMemo(\n () => ({\n width: getValueWithUnit(viewWidth, '100%'),\n height: getValueWithUnit(viewHeight, 'auto')\n }),\n [viewWidth, viewHeight]\n );\n\n const maxHeight = useMemo(() => getMaxHeight(viewMaxHeight), [viewMaxHeight]);\n\n // Calculate the pagination indexes and notify callback.\n // resetIsFetchingWhenNoNewIndexes - flag specific for isViewNotFilled\n // If view is not filled, we want to call this but resting isFetch to false\n // goes to this method when callback is note fired.\n const getPagination = useCallback(\n (isRefresh = false, resetIsFetchingWhenNoNewIndexes = false) => {\n if (!isFetching || resetIsFetchingWhenNoNewIndexes) {\n const pInfo = getPaginationInfo(\n getPContainer(),\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n isRefresh,\n true\n );\n const { startIndex, endIndex } = pInfo.view;\n // if new indexes are subset of existing state indexes, no need to update the consumer.\n if (\n isRefresh ||\n !state ||\n !(startIndex >= state.startIndex && endIndex <= state.endIndex)\n ) {\n vi.pInfo = pInfo;\n if (state) {\n const { startIndex: oldStartIndex, endIndex: oldEndIndex } = state;\n if (startIndex < oldStartIndex) {\n setLoadingIndicatorInfo(info => {\n return { ...info, isScrollingUp: true };\n });\n }\n if (endIndex > oldEndIndex) {\n setLoadingIndicatorInfo(info => {\n return { ...info, isScrollingDown: true };\n });\n }\n }\n\n callback({ ...vi.pInfo.view, id });\n } else if (resetIsFetchingWhenNoNewIndexes) {\n setLoadingIndicatorInfo({});\n }\n }\n },\n [isFetching, getPContainer, getTotalRowsIncludingBuffer, vi, state, callback, id]\n );\n\n // update average stats for next calculation.\n const updateAvarageInVirtualizeInstance = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight, averageNumberOfItemsInARow, averageRowHeight } =\n currentEstimation;\n Object.assign(vi, {\n itemCount: (itemCount + vi.itemCount || itemCount) / 2,\n rowContainerHeight:\n (rowContainerHeight + vi.rowContainerHeight || rowContainerHeight) / 2,\n averageNumberOfItemsInARow:\n (averageNumberOfItemsInARow + vi.averageNumberOfItemsInARow ||\n averageNumberOfItemsInARow) / 2,\n averageRowHeight: (averageRowHeight + vi.averageRowHeight || averageRowHeight) / 2\n });\n },\n [vi]\n );\n\n const getBufferHeight = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight } = currentEstimation;\n let h = 0;\n if (itemCount > 0)\n h =\n (getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()) / itemCount) *\n rowContainerHeight;\n return h;\n },\n [getTotalRowsIncludingBuffer]\n );\n\n const getScrollTop = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight } = currentEstimation;\n let scrollTop = 0;\n if (itemCount > 0) {\n const scrollNodeTopChange =\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.bufferNewCords?.top - vi.pInfo?.bufferOldCords?.top || 0;\n scrollTop = (vi.pInfo.topRowIndex / itemCount) * rowContainerHeight - scrollNodeTopChange;\n }\n return scrollTop;\n },\n [vi]\n );\n\n const onRowContainerDimensionChange = useCallback(() => {\n const { height: rowContainerHeight, width: rowContainerWidth } =\n getRowContainer()?.getBoundingClientRect() ?? {};\n // trigger virtualizer operations only when row container has some height and width\n if (rowContainerHeight && rowContainerWidth) setRContainerDimensionUpdate({});\n }, [getRowContainer]);\n\n useResizeObserver(getRowContainer, onRowContainerDimensionChange);\n\n const [updateScrollTop] = useScroll(\n getPagination,\n getPContainer,\n vi,\n getTotalRowsIncludingBuffer(),\n renderHeader,\n isFetching,\n viewHeight,\n PAGINATION_TRIGGER_RATIOS\n );\n\n useLayoutEffect(() => {\n const rContainer = getRowContainer();\n if (state && state.startIndex >= 0 && vi && rContainer) {\n setAttributesOnItems(state, rContainer);\n }\n });\n\n useLayoutEffect(() => {\n if (isFetching || !isInitialized) return;\n\n const rowElements = Array.from(getRowContainer().children || []).filter(a =>\n a.hasAttribute('data-key')\n );\n if (!rowElements.length) {\n vi.totalRowsLoaded = 0;\n return;\n }\n\n const lastRow = rowElements[rowElements.length - 1];\n const lastRowDataIndex = parseInt(lastRow.getAttribute('data-index'), 10);\n const newCount = hasMoreResults ? lastRowDataIndex + 1 + rowBuffer : lastRowDataIndex + 1;\n\n // if user is scrolling up/down within the already encountered records, the record count shouldn't update\n if (newCount < getTotalRowsIncludingBuffer() && !resetCount) return;\n\n vi.totalRowsLoaded = lastRowDataIndex + 1;\n countUpdateCallback(vi.totalRowsLoaded);\n }, [children, isFetching]);\n\n // Get estimate and update buffer height\n useLayoutEffect(() => {\n if (!isInitialized) return;\n\n vi.currentEstimation = getCurrentEstimation(getRowContainer(), true);\n updateAvarageInVirtualizeInstance(vi.currentEstimation);\n const h = getBufferHeight(vi.currentEstimation);\n getBContainer().style.height = `${h}px`;\n }, [\n vi,\n children,\n rContainerDimensionUpdate,\n getBContainer,\n getBufferHeight,\n getRowContainer,\n getTotalRowsIncludingBuffer,\n updateAvarageInVirtualizeInstance\n ]);\n\n useLayoutEffect(() => {\n if (isFetching || !isInitialized) return;\n\n const pContainer = getPContainer();\n const scrollTop = getScrollTop(vi.currentEstimation);\n if (vi.pInfo.view.startIndex !== 0) pContainer.scrollTop = scrollTop;\n\n // Setting scrollTop from pContainer.scrollTop as getScrollTop can return value with higher decimal accuracy.\n // but scrollTop attribute from HTML element will round it automatically.\n updateScrollTop(pContainer.scrollTop);\n updateRowContainerTop(\n vi,\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n state,\n pContainer,\n pContainer.scrollTop\n );\n }, [\n vi,\n state,\n isFetching,\n getScrollTop,\n getPContainer,\n updateScrollTop,\n getTotalRowsIncludingBuffer\n ]);\n\n // On mount that means state is not initialized yet, trigger pagination.\n // or whenever count changes or width /height of view port changes, if view is not filled with data, get indexes again.\n useEffect(() => {\n if (isFetching) return;\n\n if (!isInitialized) {\n getPagination(true);\n return;\n }\n\n if (\n isViewNotFilled(\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n getPContainer(),\n renderHeader\n )\n ) {\n getPagination(false, true);\n } else {\n setLoadingIndicatorInfo({});\n }\n }, [\n vi,\n isFetching,\n children,\n viewWidth,\n viewHeight,\n renderHeader,\n rContainerDimensionUpdate,\n getPagination,\n getPContainer,\n getTotalRowsIncludingBuffer\n ]);\n\n return (\n <StyledPContainer\n $style={{\n maxHeight,\n minHeight: !vi.totalRowsLoaded ? '100px' : 'auto',\n renderFooter,\n itemHeight,\n height,\n width\n }}\n data-total-records={vi.totalRowsLoaded}\n className='pContainer'\n ref={c => {\n vi.pContainer = c;\n }}\n >\n {renderHeader && renderHeader()}\n <div\n className='bContainer'\n ref={c => {\n vi.bContainer = c;\n }}\n >\n <div\n className={`${rowContainerClass} row-container`}\n ref={c => {\n vi.rContainer = c;\n }}\n role='rowgroup'\n >\n {/* Show loader only when there are some rows otherwise the parent spinner on RS should appear.\n Since in case of infinite table, totalRowsLoaded is derived from the rows only, using totalRowsLoaded here. */}\n {vi.totalRowsLoaded >= 0 &&\n showLoadingIndicator &&\n isFetching &&\n loadingIndicatorInfo.isScrollingUp && (\n <StyledLoader $style={{ bottom: '100%' }}>\n <Progress\n className='above-loader'\n placement='block'\n tabIndex={0}\n aria-label={translate('Loading more results')}\n />\n </StyledLoader>\n )}\n {children}\n {vi.totalRowsLoaded >= 0 &&\n showLoadingIndicator &&\n isFetching &&\n loadingIndicatorInfo.isScrollingDown && (\n <StyledLoader $style={{ top: '100%' }}>\n <Progress\n className='below-loader'\n placement='block'\n tabIndex={0}\n aria-label={translate('Loading more results')}\n />\n </StyledLoader>\n )}\n </div>\n </div>\n {vi.totalRowsLoaded === 0 && !isFetching\n ? renderEmptyRecords && renderEmptyRecords()\n : null}\n {renderFooter && renderFooter()}\n </StyledPContainer>\n );\n }\n);\n\nVirtualizeInfinite.propTypes = {\n id: PropTypes.string.isRequired,\n viewHeight: PropTypes.number,\n viewWidth: PropTypes.number,\n itemHeight: PropTypes.number,\n callback: PropTypes.func,\n isFetching: PropTypes.bool,\n hasMoreResults: PropTypes.bool,\n rowContainerClass: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,\n renderHeader: PropTypes.func,\n renderFooter: PropTypes.func,\n state: PropTypes.shape({\n startIndex: PropTypes.number,\n endIndex: PropTypes.number\n }),\n bufferMultiplier: PropTypes.number,\n viewMaxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n showLoadingIndicator: PropTypes.bool,\n resetCount: PropTypes.bool,\n countUpdateCallback: PropTypes.func,\n renderEmptyRecords: PropTypes.func\n};\n\nVirtualizeInfinite.defaultProps = {\n bufferMultiplier: 2,\n callback: () => {},\n isFetching: false,\n hasMoreResults: false,\n rowContainerClass: '',\n viewWidth: 0,\n itemHeight: 40,\n renderHeader: null,\n renderFooter: null,\n state: undefined,\n viewMaxHeight: undefined,\n showLoadingIndicator: false,\n resetCount: false,\n countUpdateCallback: () => {},\n renderEmptyRecords: null\n};\n\nVirtualizeInfinite.displayName = 'VirtualizeInfinite';\n\nexport default memo(VirtualizeInfinite);\n"]}
|
|
1
|
+
{"version":3,"file":"VirtualizeInfinite.js","sourceRoot":"","sources":["../../../../Core/Components/Virtualise/VirtualizeInfinite.jsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,IAAI,EACJ,SAAS,EACT,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,iBAAiB,MAAM,cAAc,CAAC;AAC7C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,SAAS,sBAAsB,CAAC,KAAK;IACnC,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AAChG,CAAC;AAED,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;wBAGX,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS;mBACpC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;oBAC1B,KAAK,CAAC,EAAE,CAAC,KAAK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KAAK;IACjB,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC7B,kBAAkB,EAAE,IAAI;CACzB,CAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,eAAe,IAAI,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import {\n forwardRef,\n memo,\n useEffect,\n useRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useLayoutEffect,\n useState\n} from 'react';\nimport Styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport { defaultThemeProp, Progress } from '@pega/cosmos-react-core';\nimport { isEmpty } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport { StyledSkeletonRow } from '../../Views/Table/SkeletonRows';\n\nimport getPaginationInfo from './Pagination';\nimport useScroll from './UseScroll';\nimport {\n getCurrentEstimation,\n getRecordCountForLayoutPaint,\n getValueWithUnit,\n getMaxHeight,\n isViewNotFilled,\n setAttributesOnItems,\n updateRowContainerTop\n} from './utility';\nimport useResizeObserver from './UseResizeObserver';\n\nfunction getBContainerMinHeight(props) {\n return props.$style.renderFooter ? `calc(100% - ${2 * props.$style.itemHeight + 1}px) ` : '0';\n}\n\nconst StyledPContainer = Styled.div`\n position: relative;\n overflow: auto;\n max-height: ${props => props.$style.maxHeight};\n width: ${props => props.$style.width};\n height: ${props => props.$style.height};\n min-height: ${props => props.$style.minHeight};\n border-radius: inherit;\n\n &:has(${StyledSkeletonRow}) {\n overflow: hidden;\n }\n\n .bContainer {\n position: relative;\n min-height: ${props => getBContainerMinHeight(props)};\n border-radius: inherit;\n }\n`;\n\nStyledPContainer.defaultProps = defaultThemeProp;\n\nconst StyledLoader = Styled.div`\n display: flex;\n justify-content: center;\n padding: 0.5rem;\n position: absolute;\n width: 100%;\n top: ${props => props.$style.top};\n bottom: ${props => props.$style.bottom};\n`;\n\nconst PAGINATION_TRIGGER_RATIOS = {\n down: 0.9,\n up: 0.1\n};\n\nconst VirtualizeInfinite = forwardRef(\n (\n {\n id,\n viewHeight,\n viewWidth,\n itemHeight,\n callback,\n rowContainerClass,\n children,\n renderHeader,\n renderFooter,\n state,\n bufferMultiplier,\n viewMaxHeight,\n showLoadingIndicator,\n resetCount,\n countUpdateCallback,\n isFetching,\n hasMoreResults,\n renderEmptyRecords\n },\n inputRef\n ) => {\n const rowBuffer = 5;\n\n const [rContainerDimensionUpdate, setRContainerDimensionUpdate] = useState();\n const [loadingIndicatorInfo, setLoadingIndicatorInfo] = useState({});\n const [translate] = useTranslate();\n\n // Create ref to store virtualize related data.\n const vi = useRef({\n itemHeight,\n bufferMultiplier,\n pInfo: {},\n totalRowsLoaded: undefined,\n isInitialized: false\n }).current;\n\n // tracking both state and pInfo.view to identify the initialization as in case of fullscreen, state will be available but pInfo.view won't\n const isInitialized = state && !!Object.keys(vi.pInfo.view ?? {}).length;\n\n const getTotalRowsIncludingBuffer = useCallback(() => {\n if (isEmpty(vi.totalRowsLoaded)) return;\n return hasMoreResults ? vi.totalRowsLoaded + rowBuffer : vi.totalRowsLoaded;\n }, [vi.totalRowsLoaded, hasMoreResults]);\n\n const getRowContainer = useCallback(() => vi.rContainer, [vi.rContainer]);\n const getPContainer = useCallback(() => vi.pContainer, [vi.pContainer]);\n const getBContainer = useCallback(() => vi.bContainer, [vi.bContainer]);\n\n // API used when user want to scroll to top programmatically.\n // Though component auto scroll to top if no element is in view.\n // But calling this API upfront might save one extra call to Fetch API.\n const scrollToTop = useCallback(() => {\n if (!isInitialized) return;\n getPContainer().scrollTop = 0;\n vi.pInfo = getPaginationInfo(\n getPContainer(),\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n false,\n true\n );\n callback({ ...vi.pInfo.view, id }, { takeLatestAction: true });\n }, [id, vi, getPContainer, callback, isInitialized]);\n\n // expose APIs and properties here to help client to communicate.\n useImperativeHandle(inputRef, () => ({\n getParentContainer: getPContainer,\n scrollToTop,\n vi,\n id\n }));\n\n const { width, height } = useMemo(\n () => ({\n width: getValueWithUnit(viewWidth, '100%'),\n height: getValueWithUnit(viewHeight, 'auto')\n }),\n [viewWidth, viewHeight]\n );\n\n const maxHeight = useMemo(() => getMaxHeight(viewMaxHeight), [viewMaxHeight]);\n\n // Calculate the pagination indexes and notify callback.\n // resetIsFetchingWhenNoNewIndexes - flag specific for isViewNotFilled\n // If view is not filled, we want to call this but resting isFetch to false\n // goes to this method when callback is note fired.\n const getPagination = useCallback(\n (isRefresh = false, resetIsFetchingWhenNoNewIndexes = false) => {\n if (!isFetching || resetIsFetchingWhenNoNewIndexes) {\n const pInfo = getPaginationInfo(\n getPContainer(),\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n isRefresh,\n true\n );\n const { startIndex, endIndex } = pInfo.view;\n // if new indexes are subset of existing state indexes, no need to update the consumer.\n if (\n isRefresh ||\n !state ||\n !(startIndex >= state.startIndex && endIndex <= state.endIndex)\n ) {\n vi.pInfo = pInfo;\n if (state) {\n const { startIndex: oldStartIndex, endIndex: oldEndIndex } = state;\n if (startIndex < oldStartIndex) {\n setLoadingIndicatorInfo(info => {\n return { ...info, isScrollingUp: true };\n });\n }\n if (endIndex > oldEndIndex) {\n setLoadingIndicatorInfo(info => {\n return { ...info, isScrollingDown: true };\n });\n }\n }\n\n callback({ ...vi.pInfo.view, id }, { takeLatestAction: true });\n } else if (resetIsFetchingWhenNoNewIndexes) {\n setLoadingIndicatorInfo({});\n }\n }\n },\n [isFetching, getPContainer, getTotalRowsIncludingBuffer, vi, state, callback, id]\n );\n\n // update average stats for next calculation.\n const updateAvarageInVirtualizeInstance = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight, averageNumberOfItemsInARow, averageRowHeight } =\n currentEstimation;\n Object.assign(vi, {\n itemCount: (itemCount + vi.itemCount || itemCount) / 2,\n rowContainerHeight:\n (rowContainerHeight + vi.rowContainerHeight || rowContainerHeight) / 2,\n averageNumberOfItemsInARow:\n (averageNumberOfItemsInARow + vi.averageNumberOfItemsInARow ||\n averageNumberOfItemsInARow) / 2,\n averageRowHeight: (averageRowHeight + vi.averageRowHeight || averageRowHeight) / 2\n });\n },\n [vi]\n );\n\n const getBufferHeight = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight } = currentEstimation;\n let h = 0;\n if (itemCount > 0)\n h =\n (getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()) / itemCount) *\n rowContainerHeight;\n return h;\n },\n [getTotalRowsIncludingBuffer]\n );\n\n const getScrollTop = useCallback(\n currentEstimation => {\n const { itemCount, rowContainerHeight } = currentEstimation;\n let scrollTop = 0;\n if (itemCount > 0) {\n const scrollNodeTopChange =\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.bufferNewCords?.top - vi.pInfo?.bufferOldCords?.top || 0;\n scrollTop = (vi.pInfo.topRowIndex / itemCount) * rowContainerHeight - scrollNodeTopChange;\n }\n return scrollTop;\n },\n [vi]\n );\n\n const onRowContainerDimensionChange = useCallback(() => {\n const { height: rowContainerHeight, width: rowContainerWidth } =\n getRowContainer()?.getBoundingClientRect() ?? {};\n // trigger virtualizer operations only when row container has some height and width\n if (rowContainerHeight && rowContainerWidth) setRContainerDimensionUpdate({});\n }, [getRowContainer]);\n\n useResizeObserver(getRowContainer, onRowContainerDimensionChange);\n\n const [updateScrollTop] = useScroll(\n getPagination,\n getPContainer,\n vi,\n getTotalRowsIncludingBuffer(),\n renderHeader,\n isFetching,\n viewHeight,\n PAGINATION_TRIGGER_RATIOS\n );\n\n useLayoutEffect(() => {\n const rContainer = getRowContainer();\n if (state && state.startIndex >= 0 && vi && rContainer) {\n setAttributesOnItems(state, rContainer);\n }\n });\n\n useLayoutEffect(() => {\n if (isFetching || !isInitialized) return;\n\n const rowElements = Array.from(getRowContainer().children || []).filter(a =>\n a.hasAttribute('data-key')\n );\n if (!rowElements.length) {\n vi.totalRowsLoaded = 0;\n return;\n }\n\n const lastRow = rowElements[rowElements.length - 1];\n const lastRowDataIndex = parseInt(lastRow.getAttribute('data-index'), 10);\n const newCount = hasMoreResults ? lastRowDataIndex + 1 + rowBuffer : lastRowDataIndex + 1;\n\n // if user is scrolling up/down within the already encountered records, the record count shouldn't update\n if (newCount < getTotalRowsIncludingBuffer() && !resetCount) return;\n\n vi.totalRowsLoaded = lastRowDataIndex + 1;\n countUpdateCallback(vi.totalRowsLoaded);\n }, [children, isFetching]);\n\n // Get estimate and update buffer height\n useLayoutEffect(() => {\n if (!isInitialized) return;\n\n vi.currentEstimation = getCurrentEstimation(getRowContainer(), true);\n updateAvarageInVirtualizeInstance(vi.currentEstimation);\n const h = getBufferHeight(vi.currentEstimation);\n getBContainer().style.height = `${h}px`;\n }, [\n vi,\n children,\n rContainerDimensionUpdate,\n getBContainer,\n getBufferHeight,\n getRowContainer,\n getTotalRowsIncludingBuffer,\n updateAvarageInVirtualizeInstance\n ]);\n\n useLayoutEffect(() => {\n if (isFetching || !isInitialized) return;\n\n const pContainer = getPContainer();\n const scrollTop = getScrollTop(vi.currentEstimation);\n if (vi.pInfo.view.startIndex !== 0) pContainer.scrollTop = scrollTop;\n\n // Setting scrollTop from pContainer.scrollTop as getScrollTop can return value with higher decimal accuracy.\n // but scrollTop attribute from HTML element will round it automatically.\n updateScrollTop(pContainer.scrollTop);\n updateRowContainerTop(\n vi,\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n state,\n pContainer,\n pContainer.scrollTop\n );\n }, [\n vi,\n state,\n isFetching,\n getScrollTop,\n getPContainer,\n updateScrollTop,\n getTotalRowsIncludingBuffer\n ]);\n\n // On mount that means state is not initialized yet, trigger pagination.\n // or whenever count changes or width /height of view port changes, if view is not filled with data, get indexes again.\n useEffect(() => {\n if (isFetching) return;\n\n if (!isInitialized) {\n getPagination(true);\n return;\n }\n\n if (\n isViewNotFilled(\n getRecordCountForLayoutPaint(getTotalRowsIncludingBuffer()),\n vi,\n getPContainer(),\n renderHeader\n )\n ) {\n getPagination(false, true);\n } else {\n setLoadingIndicatorInfo({});\n }\n }, [\n vi,\n isFetching,\n children,\n viewWidth,\n viewHeight,\n renderHeader,\n rContainerDimensionUpdate,\n getPagination,\n getPContainer,\n getTotalRowsIncludingBuffer\n ]);\n\n return (\n <StyledPContainer\n $style={{\n maxHeight,\n minHeight: !vi.totalRowsLoaded ? '100px' : 'auto',\n renderFooter,\n itemHeight,\n height,\n width\n }}\n data-total-records={vi.totalRowsLoaded}\n className='pContainer'\n ref={c => {\n vi.pContainer = c;\n }}\n >\n {renderHeader && renderHeader()}\n <div\n className='bContainer'\n ref={c => {\n vi.bContainer = c;\n }}\n >\n <div\n className={`${rowContainerClass} row-container`}\n ref={c => {\n vi.rContainer = c;\n }}\n role='rowgroup'\n >\n {/* Show loader only when there are some rows otherwise the parent spinner on RS should appear.\n Since in case of infinite table, totalRowsLoaded is derived from the rows only, using totalRowsLoaded here. */}\n {vi.totalRowsLoaded >= 0 &&\n showLoadingIndicator &&\n isFetching &&\n loadingIndicatorInfo.isScrollingUp && (\n <StyledLoader $style={{ bottom: '100%' }}>\n <Progress\n className='above-loader'\n placement='block'\n tabIndex={0}\n aria-label={translate('Loading more results')}\n />\n </StyledLoader>\n )}\n {children}\n {vi.totalRowsLoaded >= 0 &&\n showLoadingIndicator &&\n isFetching &&\n loadingIndicatorInfo.isScrollingDown && (\n <StyledLoader $style={{ top: '100%' }}>\n <Progress\n className='below-loader'\n placement='block'\n tabIndex={0}\n aria-label={translate('Loading more results')}\n />\n </StyledLoader>\n )}\n </div>\n </div>\n {vi.totalRowsLoaded === 0 && !isFetching\n ? renderEmptyRecords && renderEmptyRecords()\n : null}\n {renderFooter && renderFooter()}\n </StyledPContainer>\n );\n }\n);\n\nVirtualizeInfinite.propTypes = {\n id: PropTypes.string.isRequired,\n viewHeight: PropTypes.number,\n viewWidth: PropTypes.number,\n itemHeight: PropTypes.number,\n callback: PropTypes.func,\n isFetching: PropTypes.bool,\n hasMoreResults: PropTypes.bool,\n rowContainerClass: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,\n renderHeader: PropTypes.func,\n renderFooter: PropTypes.func,\n state: PropTypes.shape({\n startIndex: PropTypes.number,\n endIndex: PropTypes.number\n }),\n bufferMultiplier: PropTypes.number,\n viewMaxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n showLoadingIndicator: PropTypes.bool,\n resetCount: PropTypes.bool,\n countUpdateCallback: PropTypes.func,\n renderEmptyRecords: PropTypes.func\n};\n\nVirtualizeInfinite.defaultProps = {\n bufferMultiplier: 2,\n callback: () => {},\n isFetching: false,\n hasMoreResults: false,\n rowContainerClass: '',\n viewWidth: 0,\n itemHeight: 40,\n renderHeader: null,\n renderFooter: null,\n state: undefined,\n viewMaxHeight: undefined,\n showLoadingIndicator: false,\n resetCount: false,\n countUpdateCallback: () => {},\n renderEmptyRecords: null\n};\n\nVirtualizeInfinite.displayName = 'VirtualizeInfinite';\n\nexport default memo(VirtualizeInfinite);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAyBA,
|
|
1
|
+
{"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAyBA,oNAkhCG"}
|
|
@@ -719,10 +719,6 @@ const StyledTableContainer = styled(forwardRef((props, ref) => _jsx("div", { ref
|
|
|
719
719
|
&:not(.wrap-content-height) > .row:not(.group-header-row) {
|
|
720
720
|
height: var(--data-row-height);
|
|
721
721
|
}
|
|
722
|
-
|
|
723
|
-
& > .row:not(.group-header-row) {
|
|
724
|
-
min-width: 100%;
|
|
725
|
-
}
|
|
726
722
|
border-end-start-radius: inherit;
|
|
727
723
|
border-end-end-radius: inherit;
|
|
728
724
|
|
|
@@ -753,26 +749,34 @@ const StyledTableContainer = styled(forwardRef((props, ref) => _jsx("div", { ref
|
|
|
753
749
|
flex-grow: unset;
|
|
754
750
|
}
|
|
755
751
|
}
|
|
752
|
+
}
|
|
756
753
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
&,
|
|
761
|
-
& > span,
|
|
762
|
-
& ${StyledStatus} {
|
|
763
|
-
block-size: 100%;
|
|
764
|
-
}
|
|
754
|
+
& > .row:not(.group-header-row) {
|
|
755
|
+
min-width: 100%;
|
|
765
756
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
757
|
+
.cell-content {
|
|
758
|
+
&:not(:has(.combined-cell)):not(.combined-cell-content):has(${StyledStatus}) {
|
|
759
|
+
padding: unset;
|
|
760
|
+
|
|
761
|
+
&,
|
|
762
|
+
& > span,
|
|
763
|
+
& ${StyledStatus} {
|
|
764
|
+
block-size: 100%;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
${StyledStatus} {
|
|
768
|
+
display: flex;
|
|
769
|
+
align-items: center;
|
|
770
|
+
justify-content: space-evenly;
|
|
771
|
+
border-radius: 0;
|
|
772
|
+
}
|
|
771
773
|
}
|
|
772
774
|
}
|
|
773
775
|
}
|
|
774
776
|
|
|
775
|
-
&.wrap-content-height
|
|
777
|
+
&.wrap-content-height
|
|
778
|
+
> .row:not(.group-header-row)
|
|
779
|
+
.cell:not(:has(.combined-cell)):has(${StyledStatus}) {
|
|
776
780
|
padding: 0;
|
|
777
781
|
}
|
|
778
782
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTableContainer.js","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,GAAG,EACH,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,EAA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C,uBAAuB;;;;;;;;;;;;;;;;mBAgBd,QAAQ;;;;;;;;;;;;;;YAcf,QAAQ;;;;;;;;;;;;;;;;;;;;mBAoBD,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;4BAqBD,gBAAgB;;;;;8BAKd,gBAAgB;;;;4BAIlB,cAAc;;;;;;;;8BAQZ,cAAc;;;;;wBAKpB,cAAc;;;;;;;;;;uBAUf,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;uBAMlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDtC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport {\n getLuminance,\n meetsContrastGuidelines,\n mix,\n readableColor,\n transparentize\n} from 'polished';\n\nimport { StyledStatus } from '@pega/cosmos-react-core/lib/components/Badges/Status';\nimport { StyledRadioCheck } from '@pega/cosmos-react-core/lib/components/RadioCheck/RadioCheck';\nimport {\n StyledLabel,\n StyledProgressBackdrop,\n calculateFontSize,\n tryCatch,\n isSameColor\n} from '@pega/cosmos-react-core';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport { CellIcon } from './CellWrapper';\n\nconst StyledTableContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(({\n theme,\n view,\n isFullscreen\n}) => {\n let colIdToFillRemainingSpace;\n let isAggregationApplied = false;\n\n (view.columns ?? [])\n .filter(c => !c.hidden)\n .forEach(c => {\n if (!colIdToFillRemainingSpace && c.field.fillAvailableSpace) {\n colIdToFillRemainingSpace = c.field.id;\n }\n if (c.aggregated) {\n isAggregationApplied = true;\n }\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const showFreezeLine =\n view.state.responsive?.sm &&\n !(view.hasNoRecords || view.hasNoFrozenColumns || view.bHideFreezeLine);\n const selectedRowColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n const lightGreyColor = theme.base.colors.gray['extra-light'];\n const freezeLineShadowTransparent = transparentize(\n getLuminance(theme.components.table.header['foreground-color']) < 0.5 ? 0.9 : 0.75,\n theme.components.table.header['foreground-color']\n );\n\n const headerBackground = theme.components.table.header['background-color'];\n const bodyPrimaryBackground = theme.components.table.body['background-color'];\n const bodySecondaryBackground = theme.components.table.body['secondary-background-color'];\n const secondaryBackgroundForEvenRow = isSameColor(headerBackground, bodyPrimaryBackground);\n\n /* Calculating usable striped row background and foreground colors */\n const stripedRowBackground =\n getLuminance(bodySecondaryBackground) > 0.5\n ? bodySecondaryBackground\n : mix(0.75, bodyPrimaryBackground, bodySecondaryBackground);\n\n const stripedRowContrast = meetsContrastGuidelines(\n theme.components.table.body['foreground-color'],\n stripedRowBackground\n ).AA;\n const useableStripedRowForeground = stripedRowContrast\n ? theme.components.table.body['foreground-color']\n : readableColor(theme.components.table.body['foreground-color'], stripedRowBackground);\n\n /* Calculating even row and odd row background and foreground colors */\n const evenRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodySecondaryBackground\n : bodyPrimaryBackground;\n\n const useableEvenRowForeground = secondaryBackgroundForEvenRow\n ? useableStripedRowForeground\n : theme.components.table.body['foreground-color'];\n\n /* Calculating usable odd row background and foreground colors */\n const oddRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodyPrimaryBackground\n : bodySecondaryBackground;\n\n const useableOddRowForeground = secondaryBackgroundForEvenRow\n ? theme.components.table.body['foreground-color']\n : useableStripedRowForeground;\n\n const headerForegroundContrast = meetsContrastGuidelines(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color']\n ).AA;\n const usableHeaderForeground = headerForegroundContrast\n ? theme.components.table.header['foreground-color']\n : readableColor(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color']\n );\n\n const borderVerticalInner = theme.components.table.border['vertical-inner'];\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner =\n theme.components.table.border['horizontal-inner'] && !theme.components.table['striped-rows'];\n const borderHorizontalOuter = theme.components.table.border['horizontal-outer'];\n\n const showBorderOnLastStripedRow =\n theme.components.table.border['horizontal-inner'] && theme.components.table['striped-rows'];\n\n return css`\n --forground-color: ${theme.base.palette['foreground-color']};\n --interactive: ${theme.base.palette.interactive};\n --medium-blue: ${theme.base.colors.blue.medium};\n --border-color: ${theme.base.palette['border-line']};\n --border-color-freeze: #a5a5a5;\n --border-width: 0.062rem;\n --border-style: var(--border-width) solid var(--border-color);\n --font-stretch: ${theme.components.table.typography['font-stretch']};\n --letter-spacing: ${theme.components.table.typography['letter-spacing']};\n --cell-padding: ${theme.base.spacing};\n --cell-vertical-padding: calc(${theme.base.spacing} * 0.5);\n --header-cell-padding: 0 0.44rem 0 var(--cell-padding);\n --header-bg-color: ${theme.components.table.header['background-color']};\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\n --group-bg-color: ${theme.components.table.body['secondary-background-color']};\n --box-sizing: content-box;\n --animation-ease: ${theme.base.animation.timing.ease};\n --font-weight-semi-bold: ${theme.base['font-weight']['semi-bold']};\n --row-height-multiplier: 1.125;\n --cell-fixed-position: sticky;\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n\n .small-screen-table {\n --cell-fixed-position: static;\n }\n\n .container {\n ${() => generateRSDataContainerHeightStyles()};\n ${borderHorizontalOuter &&\n css`\n border-top: var(--border-style);\n border-bottom: var(--border-style);\n `}\n ${borderVerticalOuter &&\n css`\n border-left: var(--border-style);\n border-right: var(--border-style);\n `}\n ${borderVerticalOuter &&\n borderHorizontalOuter &&\n css`\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n `}\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\n ${StyledTabPanel} & ${StyledProgressBackdrop} {\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n\n .hide-rows-till-ready .row[aria-rowindex] {\n visibility: hidden;\n }\n\n .table-drag-proxy {\n background: rgba(0, 0, 0, 0.21);\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .table-drag-line {\n background: #999999;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 0.12rem;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .cell-fixed {\n z-index: 1;\n }\n\n .group-wrapper {\n overflow: hidden;\n display: inline-flex;\n line-height: var(--group-header-height);\n\n .group-context-count {\n display: inline-flex;\n overflow: hidden;\n }\n }\n\n /* In review mode(Ex: Tabs) cosmos components are rendered and mark up is not compatible with\n group-wrapper cell. Overridden css in group-header when dl exists inside that class which indicates\n mark up is generated from cosmos which differentiates from normal table cell markup */\n .group-wrapper .group-context-count dl {\n grid-template-columns: auto;\n }\n\n .cell {\n /* preventing cell from shrinking during autosize calculations */\n flex-shrink: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n /* Maintaining action button aspect ratio of 1:1 with 24*24px width and height */\n min-width: 1.5rem;\n }\n\n &.custom-item {\n width: 10em;\n }\n }\n\n .cell:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n outline: none;\n }\n\n .row {\n display: inline-flex;\n height: var(--row-height);\n outline: none 0;\n transition: transform 0.5s var(--animation-ease);\n box-sizing: var(--box-sizing);\n position: relative;\n\n > .row-select-handle {\n display: flex;\n justify-content: center;\n &:active {\n outline: none;\n }\n\n > .header-lable-container {\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: 20px;\n }\n /* stylelint-disable selector-max-class */\n &.cell-fixed > .cell-content {\n flex-grow: unset;\n }\n }\n\n > .cell,\n .group-header-aggregation-row > .cell {\n position: relative;\n transition: transform 0.5s var(--animation-ease);\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n ${borderHorizontalInner &&\n css`\n border-bottom: var(--border-style);\n `}\n display: flex;\n align-items: center;\n\n &::after {\n opacity: 1;\n transition: opacity 0.1s var(--animation-ease);\n }\n\n .row-action-menu {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.cell-action {\n position: sticky;\n z-index: 4;\n right: 0;\n border-right: 0;\n justify-content: center;\n ${borderVerticalInner &&\n css`\n border-left: var(--border-style);\n `}\n\n /* The below styles are needed to avoid ellipses in safari when no text is present\n and to hide the 'Actions' label */\n\n /* stylelint-disable max-nesting-depth */\n\n div.header-label {\n text-overflow: unset;\n }\n }\n &.aggregateCell {\n background-color: var(--group-bg-color);\n }\n }\n\n /** Adds bottom border to the last row of a group, when striped-rows are enabled */\n &:has(+ .group-header-row) > .cell {\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n &.header > .cell {\n border-bottom: var(--border-style);\n }\n .group-header-aggregation-row {\n > .cell.cell-action {\n overflow: initial;\n\n /* extending border on the top left of row action cell as we need to show border for at the end group label value when row actions are present */\n &::before {\n content: '';\n position: absolute;\n inline-size: 0;\n inset-inline-start: calc(var(--border-width) * -1);\n inset-block-start: calc(var(--group-header-height) * -1);\n block-size: var(--group-header-height);\n ${borderVerticalInner &&\n css`\n border-inline-start: var(--border-style);\n `}\n }\n }\n }\n\n > .cell-action {\n background-color: ${bodyPrimaryBackground};\n }\n\n > .row-reorder-handle {\n padding: 0;\n border-right: 0 !important;\n justify-content: center;\n cursor: move;\n }\n\n .aggregateCell.cell {\n border-right: none;\n }\n\n > .cell.cell-fixed,\n .group-header-aggregation-row > .cell-fixed {\n position: var(--cell-fixed-position);\n z-index: 4;\n\n ${showFreezeLine &&\n css`\n &.cell-last-frozen {\n border-right: solid var(--border-width) var(--border-color-freeze);\n filter: drop-shadow(\n calc(${theme.base.spacing} * 0.25) 0 0 ${freezeLineShadowTransparent}\n );\n transition: 0.5s;\n }\n `}\n\n /* As the row select column and row dragDrop column always have to be frozen */\n &[data-col-id='RowSelect'],\n &[data-col-id='RowDragDrop'],\n &[data-col-id='RowError'] {\n position: sticky;\n flex-shrink: 0;\n z-index: 5;\n }\n }\n\n > .cell.cell-fixed:focus-within,\n .group-header-aggregation-row > .cell-fixed {\n z-index: 6;\n }\n\n &.click {\n cursor: pointer;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n > .cell {\n &:first-child {\n border-end-start-radius: inherit;\n }\n\n &:last-child {\n border-end-end-radius: inherit;\n }\n\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n }\n }\n .row:not(.row-error):not(.group-header-row):not(.header) {\n .cell-fixed {\n background: ${bodyPrimaryBackground};\n }\n .cell-fixed.aggregateCell {\n background: var(--group-bg-color);\n }\n }\n ${theme.components.table['striped-rows'] &&\n css`\n /* Targets rows with an odd data-index attribute, excluding group header rows */\n .row[data-index$='1']:not(.group-header-row):not(.header),\n .row[data-index$='3']:not(.group-header-row):not(.header),\n .row[data-index$='5']:not(.group-header-row):not(.header),\n .row[data-index$='7']:not(.group-header-row):not(.header),\n .row[data-index$='9']:not(.group-header-row):not(.header) {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n .cell-fixed {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n }\n > .cell-action {\n background: ${oddRowBackgroundColor};\n }\n }\n .row[data-index$='0']:not(.group-header-row):not(.header),\n .row[data-index$='2']:not(.group-header-row):not(.header),\n .row[data-index$='4']:not(.group-header-row):not(.header),\n .row[data-index$='6']:not(.group-header-row):not(.header),\n .row[data-index$='8']:not(.group-header-row):not(.header) {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n\n ${borderVerticalOuter &&\n css`\n .cell-fixed {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n }\n > .cell-action {\n background: ${evenRowBackgroundColor};\n }\n `}\n\n /* Apply border radius if vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n\n .cell-fixed {\n color: ${useableEvenRowForeground};\n }\n\n /* Avoid the non-frozen column's background to come behind the first cell's empty area in corner due to border-radius.\n Let the first cell-fixed take full rectangale width, add a pseudo element with the background and border radius of same size as the element */\n .cell-fixed:not(.cell-first) {\n background: ${evenRowBackgroundColor};\n }\n .cell-fixed.cell-first::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-left-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n\n > .cell-action::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-right-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n `}\n }\n\n .row[data-index='0']:not(.group-header-row):not(.header) {\n ${!borderVerticalOuter &&\n css`\n border-radius: 0 0 min(${props => props.theme.base['border-radius']}, 0.25rem)\n min(${props => props.theme.base['border-radius']}, 0.25rem);\n `}\n }\n `}\n\n .row-error {\n background: ${mix(\n 0.1,\n theme.components['form-field'].error['status-color'],\n theme.base.palette['primary-background']\n )};\n\n /* stylelint-disable no-descending-specificity */\n .cell-fixed,\n .cell-action {\n background: inherit;\n }\n\n > .cell:not(.cell-fixed):not(.cell-action) {\n background: none;\n }\n }\n\n .sort-info-container {\n .sort-sequence {\n font-size: 0.625rem;\n color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n\n .filter-info-container {\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n /* stylelint-disable-next-line unit-allowed-list */\n width: 14px;\n /* stylelint-disable-next-line unit-allowed-list */\n height: 14px;\n }\n }\n\n .cell.row-error-column {\n padding: 0;\n border-right: 0;\n text-align: right;\n outline: none;\n\n /* Focus handling will be done as part of interation 2: EPIC-88751 */\n\n svg {\n color: ${theme.base.colors.red.medium};\n }\n }\n\n .cell-right-align .filter-info-container svg {\n margin: 0 0.312rem 0 0;\n }\n\n &.show-expand-collapse-all {\n .row > .cell-first {\n padding-left: calc(var(--expand-collapse-all-width) + var(--cell-padding) + 0.25rem);\n &.row-reorder-handle,\n &.row-error-column {\n padding: 0;\n }\n &.row-select-handle {\n padding-inline-start: var(--expand-collapse-all-width);\n }\n }\n\n .row-container .row > .cell-first {\n &.row-select-handle {\n /* Offset padding of 0.5rem added to SelectAllCheckbox in grouped views(getting pushed by margin),\n ensuring row select checkboxes align vertically in header and data rows */\n padding-inline-start: calc(\n var(--expand-collapse-all-width) - var(--cell-padding) + 0.5rem\n );\n }\n }\n\n /* stylelint-enable selector-max-class */\n .expand-collapse-all {\n position: absolute;\n width: var(--expand-collapse-all-width);\n z-index: 10;\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n padding-inline-start: 0.125rem;\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: -0.25rem;\n width: 0.25rem;\n height: 100%;\n background-color: var(--header-bg-color);\n z-index: 12;\n }\n\n > button {\n color: var(--forground-color);\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n }\n .no-border-right {\n border-right: 0;\n }\n }\n\n /* stylelint-disable selector-max-class */\n\n .scroll-end {\n &.row-container > .row:last-child {\n & > .cell,\n & .group-header-aggregation-row > .cell {\n border-bottom: 0;\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n .header {\n font-weight: var(--font-weight-semi-bold);\n position: relative; /* This is required to position .border-fix element */\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n > .cell.row-error-column {\n border-right: 0;\n }\n > .cell {\n display: flex;\n justify-content: space-between;\n align-items: center;\n z-index: 2;\n position: relative;\n cursor: pointer;\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n font-weight: ${theme.base['font-weight'].bold};\n font-size: ${fontSize.xxs};\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n padding: var(--header-cell-padding);\n\n &:first-child {\n border-start-start-radius: inherit;\n }\n\n &:last-child {\n border-start-end-radius: inherit;\n }\n\n .header-lable-container {\n display: inline-flex;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ${fontSize.xs};\n font-weight: var(--font-weight-semi-bold);\n align-items: center;\n gap: 0.125rem;\n }\n\n .header-label {\n overflow: hidden;\n text-overflow: ellipsis;\n\n /* To avoid browser tooltip when we get ellipsis in safari */\n &::after {\n content: '';\n display: block;\n }\n\n /* To utilize smart tooltip making it as a non-box element */\n /* stylelint-disable selector-max-class */\n .cell-content {\n display: contents;\n }\n }\n }\n\n > .row-reorder-handle {\n padding: 0;\n }\n\n > .row-select-handle {\n /* Nullifying padding applied from .header > .cell */\n padding: 0;\n justify-content: center;\n }\n .row {\n border-bottom: none;\n }\n }\n\n .sticky-header {\n display: grid;\n position: sticky;\n top: 0;\n z-index: 6;\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n ${!borderVerticalInner &&\n css`\n & .row .cell:not(.cell-last-frozen):not(.cell-last):has(.column-resizer) {\n &::after {\n content: '';\n position: absolute;\n right: 0.2rem;\n top: 0.5rem;\n bottom: 0.5rem;\n width: 0.062rem;\n background-color: ${theme.base.palette['border-line']};\n }\n }\n `}\n }\n\n /* 4 selectors required as aggregateCell of only footer need this effect */\n\n .pContainer:not(.pContainerScroll) .footer .aggregateCell.cell {\n border-bottom: none;\n }\n\n .row .cell.cell-last {\n border-right: 0;\n }\n\n ${!colIdToFillRemainingSpace\n ? css`\n .row .cell.cell-last {\n flex-grow: 1;\n }\n `\n : css`\n .row .cell[data-col-id='${colIdToFillRemainingSpace}'] {\n flex-grow: 1;\n }\n `}\n\n /* Disable the flex layout size changes when measuring for content based size to get correct width */\n\n [data-content-size-measuring] & .row .cell {\n flex-grow: 0 !important;\n }\n\n .row-container {\n --data-row-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding)\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--data-row-height)'};\n &:not(.wrap-content-height) > .row:not(.group-header-row) {\n height: var(--data-row-height);\n }\n\n & > .row:not(.group-header-row) {\n min-width: 100%;\n }\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n & > .row .cell-content {\n /*\n * Using box sizing content-box so that the padding is not considered for the alignment of the cell content.\n * Vertical alignment is done using flex and max-height below even though the .cell-content might overflow due to padding + content size.\n */\n box-sizing: content-box;\n flex-grow: 1;\n\n /* Adding padding on .cell-content so that focus rings can appear properly and doesn't clip due to overflow: hidden */\n padding: var(--cell-vertical-padding) var(--cell-padding);\n\n /* setting max-height so that the elements with more height like RTL, align with the row density height */\n max-height: var(--data-row-height);\n\n /* hiding scroll bar in case the cell render introduces scrollbar based on its implementation */\n & * {\n scrollbar-width: none;\n }\n\n /* in case of combine columns, removing padding from parent cell-content as children already have the padding */\n &:has(.combined-cell) {\n padding: 0;\n\n .cell-content {\n flex-grow: unset;\n }\n }\n\n &:not(:has(.combined-cell)):not(.combined-cell-content):has(${StyledStatus}) {\n padding: unset;\n\n &,\n & > span,\n & ${StyledStatus} {\n block-size: 100%;\n }\n\n ${StyledStatus} {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 0;\n }\n }\n }\n\n &.wrap-content-height > .row .cell:not(:has(.combined-cell)):has(${StyledStatus}) {\n padding: 0;\n }\n\n & > .row .cell:not(.column-type-action) .cell-content {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\n }\n }\n\n .row .aggregateCell .cell-content {\n line-height: initial;\n padding: 0;\n }\n\n .short-height,\n .medium-height {\n ${StyledStatus} {\n white-space: nowrap;\n }\n }\n\n .short-height {\n ${StyledRadioCheck} ${StyledLabel} {\n min-height: auto;\n }\n }\n\n .medium-height {\n --row-height-multiplier: 4 / 3;\n }\n\n .tall-height {\n --row-height-multiplier: calc(4 / 3 + 0.5);\n > .row:not(.group-header-row) {\n > .cell {\n display: inline-grid;\n align-items: start;\n white-space: normal;\n word-break: break-all;\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .wrap-content-height {\n --row-height-multiplier: 4 / 3;\n --row-min-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding) * 2\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--row-min-height)'};\n\n > .row:not(.group-header-row) {\n height: auto;\n min-height: var(--row-min-height);\n > .cell {\n white-space: normal;\n\n /* -- For BUG-625508 -- */\n word-break: break-word;\n display: inline-grid;\n align-items: start;\n padding-top: var(--cell-vertical-padding);\n padding-bottom: var(--cell-vertical-padding);\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n /* for full-content, the row cells should adjust according to content */\n max-height: none;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .footer {\n .row {\n .cell {\n padding: 0;\n }\n }\n }\n\n /* stylelint-disable no-duplicate-selectors */\n .row-container {\n position: absolute;\n display: grid;\n width: 100%;\n font-size: ${fontSize.s};\n\n > .group-header-row,\n .hierarchical-group-footer-row {\n height: var(--group-header-height);\n .cell {\n padding: 0;\n border-right-width: 0;\n }\n }\n\n > .hierarchical-group-header-row {\n height: var(--group-header-height);\n }\n input.checkbox-on-hover + label {\n opacity: 0;\n }\n input.checkbox-on-hover:checked + label {\n opacity: 1;\n }\n .row.selected-row {\n background-color: ${selectedRowColor};\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${selectedRowColor};\n }\n }\n .row-on-hover:hover {\n background-color: ${lightGreyColor};\n input.checkbox-on-hover + label {\n opacity: 1;\n }\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${lightGreyColor};\n }\n }\n .row.hierarchical-group-footer-row {\n .cell-fixed {\n background: ${lightGreyColor};\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n\n .toolbar-button-applied {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .column-resizer {\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 3;\n width: 0.25rem;\n height: 100%;\n }\n\n .column-resizer:hover,\n .column-resizer:active {\n background: var(--interactive);\n }\n\n .align-right {\n justify-content: right;\n\n .cell-content {\n text-align: right;\n }\n }\n\n .align-left {\n justify-content: left;\n\n .cell-content {\n text-align: left;\n }\n }\n\n .align-center {\n justify-content: center;\n\n .cell-content {\n text-align: center;\n }\n }\n\n .popper {\n div.row {\n display: flex;\n vertical-align: middle;\n line-height: unset;\n border-bottom: none;\n outline: none 0;\n height: auto;\n }\n }\n `;\n});\n\nexport default StyledTableContainer;\n"]}
|
|
1
|
+
{"version":3,"file":"StyledTableContainer.js","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAA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;;;;;QAmBlD,YAAY;;;;;;QAMZ,gBAAgB,IAAI,WAAW;;;;;;;;;;;;;;;;;;;mBAmBpB,QAAQ;;;;;;;;;;;;;;;YAef,QAAQ;;;;;;;;;;;;+BAYW,oBAAoB;QAC3C,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,uBAAuB;;;;;;;;;;;;;;;;mBAgBd,QAAQ;;;;;;;;;;;;;;YAcf,QAAQ;;;;;;;;;;;;;;;;;;;;mBAoBD,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;4BAqBD,gBAAgB;;;;;8BAKd,gBAAgB;;;;4BAIlB,cAAc;;;;;;;;8BAQZ,cAAc;;;;;wBAKpB,cAAc;;;;;;;;;;uBAUf,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;uBAMlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDtC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport {\n getLuminance,\n meetsContrastGuidelines,\n mix,\n readableColor,\n transparentize\n} from 'polished';\n\nimport { StyledStatus } from '@pega/cosmos-react-core/lib/components/Badges/Status';\nimport { StyledRadioCheck } from '@pega/cosmos-react-core/lib/components/RadioCheck/RadioCheck';\nimport {\n StyledLabel,\n StyledProgressBackdrop,\n calculateFontSize,\n tryCatch,\n isSameColor\n} from '@pega/cosmos-react-core';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport { CellIcon } from './CellWrapper';\n\nconst StyledTableContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(({\n theme,\n view,\n isFullscreen\n}) => {\n let colIdToFillRemainingSpace;\n let isAggregationApplied = false;\n\n (view.columns ?? [])\n .filter(c => !c.hidden)\n .forEach(c => {\n if (!colIdToFillRemainingSpace && c.field.fillAvailableSpace) {\n colIdToFillRemainingSpace = c.field.id;\n }\n if (c.aggregated) {\n isAggregationApplied = true;\n }\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const showFreezeLine =\n view.state.responsive?.sm &&\n !(view.hasNoRecords || view.hasNoFrozenColumns || view.bHideFreezeLine);\n const selectedRowColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n const lightGreyColor = theme.base.colors.gray['extra-light'];\n const freezeLineShadowTransparent = transparentize(\n getLuminance(theme.components.table.header['foreground-color']) < 0.5 ? 0.9 : 0.75,\n theme.components.table.header['foreground-color']\n );\n\n const headerBackground = theme.components.table.header['background-color'];\n const bodyPrimaryBackground = theme.components.table.body['background-color'];\n const bodySecondaryBackground = theme.components.table.body['secondary-background-color'];\n const secondaryBackgroundForEvenRow = isSameColor(headerBackground, bodyPrimaryBackground);\n\n /* Calculating usable striped row background and foreground colors */\n const stripedRowBackground =\n getLuminance(bodySecondaryBackground) > 0.5\n ? bodySecondaryBackground\n : mix(0.75, bodyPrimaryBackground, bodySecondaryBackground);\n\n const stripedRowContrast = meetsContrastGuidelines(\n theme.components.table.body['foreground-color'],\n stripedRowBackground\n ).AA;\n const useableStripedRowForeground = stripedRowContrast\n ? theme.components.table.body['foreground-color']\n : readableColor(theme.components.table.body['foreground-color'], stripedRowBackground);\n\n /* Calculating even row and odd row background and foreground colors */\n const evenRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodySecondaryBackground\n : bodyPrimaryBackground;\n\n const useableEvenRowForeground = secondaryBackgroundForEvenRow\n ? useableStripedRowForeground\n : theme.components.table.body['foreground-color'];\n\n /* Calculating usable odd row background and foreground colors */\n const oddRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodyPrimaryBackground\n : bodySecondaryBackground;\n\n const useableOddRowForeground = secondaryBackgroundForEvenRow\n ? theme.components.table.body['foreground-color']\n : useableStripedRowForeground;\n\n const headerForegroundContrast = meetsContrastGuidelines(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color']\n ).AA;\n const usableHeaderForeground = headerForegroundContrast\n ? theme.components.table.header['foreground-color']\n : readableColor(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color']\n );\n\n const borderVerticalInner = theme.components.table.border['vertical-inner'];\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner =\n theme.components.table.border['horizontal-inner'] && !theme.components.table['striped-rows'];\n const borderHorizontalOuter = theme.components.table.border['horizontal-outer'];\n\n const showBorderOnLastStripedRow =\n theme.components.table.border['horizontal-inner'] && theme.components.table['striped-rows'];\n\n return css`\n --forground-color: ${theme.base.palette['foreground-color']};\n --interactive: ${theme.base.palette.interactive};\n --medium-blue: ${theme.base.colors.blue.medium};\n --border-color: ${theme.base.palette['border-line']};\n --border-color-freeze: #a5a5a5;\n --border-width: 0.062rem;\n --border-style: var(--border-width) solid var(--border-color);\n --font-stretch: ${theme.components.table.typography['font-stretch']};\n --letter-spacing: ${theme.components.table.typography['letter-spacing']};\n --cell-padding: ${theme.base.spacing};\n --cell-vertical-padding: calc(${theme.base.spacing} * 0.5);\n --header-cell-padding: 0 0.44rem 0 var(--cell-padding);\n --header-bg-color: ${theme.components.table.header['background-color']};\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\n --group-bg-color: ${theme.components.table.body['secondary-background-color']};\n --box-sizing: content-box;\n --animation-ease: ${theme.base.animation.timing.ease};\n --font-weight-semi-bold: ${theme.base['font-weight']['semi-bold']};\n --row-height-multiplier: 1.125;\n --cell-fixed-position: sticky;\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n\n .small-screen-table {\n --cell-fixed-position: static;\n }\n\n .container {\n ${() => generateRSDataContainerHeightStyles()};\n ${borderHorizontalOuter &&\n css`\n border-top: var(--border-style);\n border-bottom: var(--border-style);\n `}\n ${borderVerticalOuter &&\n css`\n border-left: var(--border-style);\n border-right: var(--border-style);\n `}\n ${borderVerticalOuter &&\n borderHorizontalOuter &&\n css`\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n `}\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\n ${StyledTabPanel} & ${StyledProgressBackdrop} {\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n\n .hide-rows-till-ready .row[aria-rowindex] {\n visibility: hidden;\n }\n\n .table-drag-proxy {\n background: rgba(0, 0, 0, 0.21);\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .table-drag-line {\n background: #999999;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 0.12rem;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .cell-fixed {\n z-index: 1;\n }\n\n .group-wrapper {\n overflow: hidden;\n display: inline-flex;\n line-height: var(--group-header-height);\n\n .group-context-count {\n display: inline-flex;\n overflow: hidden;\n }\n }\n\n /* In review mode(Ex: Tabs) cosmos components are rendered and mark up is not compatible with\n group-wrapper cell. Overridden css in group-header when dl exists inside that class which indicates\n mark up is generated from cosmos which differentiates from normal table cell markup */\n .group-wrapper .group-context-count dl {\n grid-template-columns: auto;\n }\n\n .cell {\n /* preventing cell from shrinking during autosize calculations */\n flex-shrink: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n /* Maintaining action button aspect ratio of 1:1 with 24*24px width and height */\n min-width: 1.5rem;\n }\n\n &.custom-item {\n width: 10em;\n }\n }\n\n .cell:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n outline: none;\n }\n\n .row {\n display: inline-flex;\n height: var(--row-height);\n outline: none 0;\n transition: transform 0.5s var(--animation-ease);\n box-sizing: var(--box-sizing);\n position: relative;\n\n > .row-select-handle {\n display: flex;\n justify-content: center;\n &:active {\n outline: none;\n }\n\n > .header-lable-container {\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: 20px;\n }\n /* stylelint-disable selector-max-class */\n &.cell-fixed > .cell-content {\n flex-grow: unset;\n }\n }\n\n > .cell,\n .group-header-aggregation-row > .cell {\n position: relative;\n transition: transform 0.5s var(--animation-ease);\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n ${borderHorizontalInner &&\n css`\n border-bottom: var(--border-style);\n `}\n display: flex;\n align-items: center;\n\n &::after {\n opacity: 1;\n transition: opacity 0.1s var(--animation-ease);\n }\n\n .row-action-menu {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.cell-action {\n position: sticky;\n z-index: 4;\n right: 0;\n border-right: 0;\n justify-content: center;\n ${borderVerticalInner &&\n css`\n border-left: var(--border-style);\n `}\n\n /* The below styles are needed to avoid ellipses in safari when no text is present\n and to hide the 'Actions' label */\n\n /* stylelint-disable max-nesting-depth */\n\n div.header-label {\n text-overflow: unset;\n }\n }\n &.aggregateCell {\n background-color: var(--group-bg-color);\n }\n }\n\n /** Adds bottom border to the last row of a group, when striped-rows are enabled */\n &:has(+ .group-header-row) > .cell {\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n &.header > .cell {\n border-bottom: var(--border-style);\n }\n .group-header-aggregation-row {\n > .cell.cell-action {\n overflow: initial;\n\n /* extending border on the top left of row action cell as we need to show border for at the end group label value when row actions are present */\n &::before {\n content: '';\n position: absolute;\n inline-size: 0;\n inset-inline-start: calc(var(--border-width) * -1);\n inset-block-start: calc(var(--group-header-height) * -1);\n block-size: var(--group-header-height);\n ${borderVerticalInner &&\n css`\n border-inline-start: var(--border-style);\n `}\n }\n }\n }\n\n > .cell-action {\n background-color: ${bodyPrimaryBackground};\n }\n\n > .row-reorder-handle {\n padding: 0;\n border-right: 0 !important;\n justify-content: center;\n cursor: move;\n }\n\n .aggregateCell.cell {\n border-right: none;\n }\n\n > .cell.cell-fixed,\n .group-header-aggregation-row > .cell-fixed {\n position: var(--cell-fixed-position);\n z-index: 4;\n\n ${showFreezeLine &&\n css`\n &.cell-last-frozen {\n border-right: solid var(--border-width) var(--border-color-freeze);\n filter: drop-shadow(\n calc(${theme.base.spacing} * 0.25) 0 0 ${freezeLineShadowTransparent}\n );\n transition: 0.5s;\n }\n `}\n\n /* As the row select column and row dragDrop column always have to be frozen */\n &[data-col-id='RowSelect'],\n &[data-col-id='RowDragDrop'],\n &[data-col-id='RowError'] {\n position: sticky;\n flex-shrink: 0;\n z-index: 5;\n }\n }\n\n > .cell.cell-fixed:focus-within,\n .group-header-aggregation-row > .cell-fixed {\n z-index: 6;\n }\n\n &.click {\n cursor: pointer;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n > .cell {\n &:first-child {\n border-end-start-radius: inherit;\n }\n\n &:last-child {\n border-end-end-radius: inherit;\n }\n\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n }\n }\n .row:not(.row-error):not(.group-header-row):not(.header) {\n .cell-fixed {\n background: ${bodyPrimaryBackground};\n }\n .cell-fixed.aggregateCell {\n background: var(--group-bg-color);\n }\n }\n ${theme.components.table['striped-rows'] &&\n css`\n /* Targets rows with an odd data-index attribute, excluding group header rows */\n .row[data-index$='1']:not(.group-header-row):not(.header),\n .row[data-index$='3']:not(.group-header-row):not(.header),\n .row[data-index$='5']:not(.group-header-row):not(.header),\n .row[data-index$='7']:not(.group-header-row):not(.header),\n .row[data-index$='9']:not(.group-header-row):not(.header) {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n .cell-fixed {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n }\n > .cell-action {\n background: ${oddRowBackgroundColor};\n }\n }\n .row[data-index$='0']:not(.group-header-row):not(.header),\n .row[data-index$='2']:not(.group-header-row):not(.header),\n .row[data-index$='4']:not(.group-header-row):not(.header),\n .row[data-index$='6']:not(.group-header-row):not(.header),\n .row[data-index$='8']:not(.group-header-row):not(.header) {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n\n ${borderVerticalOuter &&\n css`\n .cell-fixed {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n }\n > .cell-action {\n background: ${evenRowBackgroundColor};\n }\n `}\n\n /* Apply border radius if vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n\n .cell-fixed {\n color: ${useableEvenRowForeground};\n }\n\n /* Avoid the non-frozen column's background to come behind the first cell's empty area in corner due to border-radius.\n Let the first cell-fixed take full rectangale width, add a pseudo element with the background and border radius of same size as the element */\n .cell-fixed:not(.cell-first) {\n background: ${evenRowBackgroundColor};\n }\n .cell-fixed.cell-first::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-left-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n\n > .cell-action::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-right-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n `}\n }\n\n .row[data-index='0']:not(.group-header-row):not(.header) {\n ${!borderVerticalOuter &&\n css`\n border-radius: 0 0 min(${props => props.theme.base['border-radius']}, 0.25rem)\n min(${props => props.theme.base['border-radius']}, 0.25rem);\n `}\n }\n `}\n\n .row-error {\n background: ${mix(\n 0.1,\n theme.components['form-field'].error['status-color'],\n theme.base.palette['primary-background']\n )};\n\n /* stylelint-disable no-descending-specificity */\n .cell-fixed,\n .cell-action {\n background: inherit;\n }\n\n > .cell:not(.cell-fixed):not(.cell-action) {\n background: none;\n }\n }\n\n .sort-info-container {\n .sort-sequence {\n font-size: 0.625rem;\n color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n\n .filter-info-container {\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n /* stylelint-disable-next-line unit-allowed-list */\n width: 14px;\n /* stylelint-disable-next-line unit-allowed-list */\n height: 14px;\n }\n }\n\n .cell.row-error-column {\n padding: 0;\n border-right: 0;\n text-align: right;\n outline: none;\n\n /* Focus handling will be done as part of interation 2: EPIC-88751 */\n\n svg {\n color: ${theme.base.colors.red.medium};\n }\n }\n\n .cell-right-align .filter-info-container svg {\n margin: 0 0.312rem 0 0;\n }\n\n &.show-expand-collapse-all {\n .row > .cell-first {\n padding-left: calc(var(--expand-collapse-all-width) + var(--cell-padding) + 0.25rem);\n &.row-reorder-handle,\n &.row-error-column {\n padding: 0;\n }\n &.row-select-handle {\n padding-inline-start: var(--expand-collapse-all-width);\n }\n }\n\n .row-container .row > .cell-first {\n &.row-select-handle {\n /* Offset padding of 0.5rem added to SelectAllCheckbox in grouped views(getting pushed by margin),\n ensuring row select checkboxes align vertically in header and data rows */\n padding-inline-start: calc(\n var(--expand-collapse-all-width) - var(--cell-padding) + 0.5rem\n );\n }\n }\n\n /* stylelint-enable selector-max-class */\n .expand-collapse-all {\n position: absolute;\n width: var(--expand-collapse-all-width);\n z-index: 10;\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n padding-inline-start: 0.125rem;\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: -0.25rem;\n width: 0.25rem;\n height: 100%;\n background-color: var(--header-bg-color);\n z-index: 12;\n }\n\n > button {\n color: var(--forground-color);\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n }\n .no-border-right {\n border-right: 0;\n }\n }\n\n /* stylelint-disable selector-max-class */\n\n .scroll-end {\n &.row-container > .row:last-child {\n & > .cell,\n & .group-header-aggregation-row > .cell {\n border-bottom: 0;\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n .header {\n font-weight: var(--font-weight-semi-bold);\n position: relative; /* This is required to position .border-fix element */\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n > .cell.row-error-column {\n border-right: 0;\n }\n > .cell {\n display: flex;\n justify-content: space-between;\n align-items: center;\n z-index: 2;\n position: relative;\n cursor: pointer;\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n font-weight: ${theme.base['font-weight'].bold};\n font-size: ${fontSize.xxs};\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n padding: var(--header-cell-padding);\n\n &:first-child {\n border-start-start-radius: inherit;\n }\n\n &:last-child {\n border-start-end-radius: inherit;\n }\n\n .header-lable-container {\n display: inline-flex;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ${fontSize.xs};\n font-weight: var(--font-weight-semi-bold);\n align-items: center;\n gap: 0.125rem;\n }\n\n .header-label {\n overflow: hidden;\n text-overflow: ellipsis;\n\n /* To avoid browser tooltip when we get ellipsis in safari */\n &::after {\n content: '';\n display: block;\n }\n\n /* To utilize smart tooltip making it as a non-box element */\n /* stylelint-disable selector-max-class */\n .cell-content {\n display: contents;\n }\n }\n }\n\n > .row-reorder-handle {\n padding: 0;\n }\n\n > .row-select-handle {\n /* Nullifying padding applied from .header > .cell */\n padding: 0;\n justify-content: center;\n }\n .row {\n border-bottom: none;\n }\n }\n\n .sticky-header {\n display: grid;\n position: sticky;\n top: 0;\n z-index: 6;\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n ${!borderVerticalInner &&\n css`\n & .row .cell:not(.cell-last-frozen):not(.cell-last):has(.column-resizer) {\n &::after {\n content: '';\n position: absolute;\n right: 0.2rem;\n top: 0.5rem;\n bottom: 0.5rem;\n width: 0.062rem;\n background-color: ${theme.base.palette['border-line']};\n }\n }\n `}\n }\n\n /* 4 selectors required as aggregateCell of only footer need this effect */\n\n .pContainer:not(.pContainerScroll) .footer .aggregateCell.cell {\n border-bottom: none;\n }\n\n .row .cell.cell-last {\n border-right: 0;\n }\n\n ${!colIdToFillRemainingSpace\n ? css`\n .row .cell.cell-last {\n flex-grow: 1;\n }\n `\n : css`\n .row .cell[data-col-id='${colIdToFillRemainingSpace}'] {\n flex-grow: 1;\n }\n `}\n\n /* Disable the flex layout size changes when measuring for content based size to get correct width */\n\n [data-content-size-measuring] & .row .cell {\n flex-grow: 0 !important;\n }\n\n .row-container {\n --data-row-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding)\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--data-row-height)'};\n &:not(.wrap-content-height) > .row:not(.group-header-row) {\n height: var(--data-row-height);\n }\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n & > .row .cell-content {\n /*\n * Using box sizing content-box so that the padding is not considered for the alignment of the cell content.\n * Vertical alignment is done using flex and max-height below even though the .cell-content might overflow due to padding + content size.\n */\n box-sizing: content-box;\n flex-grow: 1;\n\n /* Adding padding on .cell-content so that focus rings can appear properly and doesn't clip due to overflow: hidden */\n padding: var(--cell-vertical-padding) var(--cell-padding);\n\n /* setting max-height so that the elements with more height like RTL, align with the row density height */\n max-height: var(--data-row-height);\n\n /* hiding scroll bar in case the cell render introduces scrollbar based on its implementation */\n & * {\n scrollbar-width: none;\n }\n\n /* in case of combine columns, removing padding from parent cell-content as children already have the padding */\n &:has(.combined-cell) {\n padding: 0;\n\n .cell-content {\n flex-grow: unset;\n }\n }\n }\n\n & > .row:not(.group-header-row) {\n min-width: 100%;\n\n .cell-content {\n &:not(:has(.combined-cell)):not(.combined-cell-content):has(${StyledStatus}) {\n padding: unset;\n\n &,\n & > span,\n & ${StyledStatus} {\n block-size: 100%;\n }\n\n ${StyledStatus} {\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n border-radius: 0;\n }\n }\n }\n }\n\n &.wrap-content-height\n > .row:not(.group-header-row)\n .cell:not(:has(.combined-cell)):has(${StyledStatus}) {\n padding: 0;\n }\n\n & > .row .cell:not(.column-type-action) .cell-content {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\n }\n }\n\n .row .aggregateCell .cell-content {\n line-height: initial;\n padding: 0;\n }\n\n .short-height,\n .medium-height {\n ${StyledStatus} {\n white-space: nowrap;\n }\n }\n\n .short-height {\n ${StyledRadioCheck} ${StyledLabel} {\n min-height: auto;\n }\n }\n\n .medium-height {\n --row-height-multiplier: 4 / 3;\n }\n\n .tall-height {\n --row-height-multiplier: calc(4 / 3 + 0.5);\n > .row:not(.group-header-row) {\n > .cell {\n display: inline-grid;\n align-items: start;\n white-space: normal;\n word-break: break-all;\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .wrap-content-height {\n --row-height-multiplier: 4 / 3;\n --row-min-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding) * 2\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--row-min-height)'};\n\n > .row:not(.group-header-row) {\n height: auto;\n min-height: var(--row-min-height);\n > .cell {\n white-space: normal;\n\n /* -- For BUG-625508 -- */\n word-break: break-word;\n display: inline-grid;\n align-items: start;\n padding-top: var(--cell-vertical-padding);\n padding-bottom: var(--cell-vertical-padding);\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n /* for full-content, the row cells should adjust according to content */\n max-height: none;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .footer {\n .row {\n .cell {\n padding: 0;\n }\n }\n }\n\n /* stylelint-disable no-duplicate-selectors */\n .row-container {\n position: absolute;\n display: grid;\n width: 100%;\n font-size: ${fontSize.s};\n\n > .group-header-row,\n .hierarchical-group-footer-row {\n height: var(--group-header-height);\n .cell {\n padding: 0;\n border-right-width: 0;\n }\n }\n\n > .hierarchical-group-header-row {\n height: var(--group-header-height);\n }\n input.checkbox-on-hover + label {\n opacity: 0;\n }\n input.checkbox-on-hover:checked + label {\n opacity: 1;\n }\n .row.selected-row {\n background-color: ${selectedRowColor};\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${selectedRowColor};\n }\n }\n .row-on-hover:hover {\n background-color: ${lightGreyColor};\n input.checkbox-on-hover + label {\n opacity: 1;\n }\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${lightGreyColor};\n }\n }\n .row.hierarchical-group-footer-row {\n .cell-fixed {\n background: ${lightGreyColor};\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n\n .toolbar-button-applied {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .column-resizer {\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 3;\n width: 0.25rem;\n height: 100%;\n }\n\n .column-resizer:hover,\n .column-resizer:active {\n background: var(--interactive);\n }\n\n .align-right {\n justify-content: right;\n\n .cell-content {\n text-align: right;\n }\n }\n\n .align-left {\n justify-content: left;\n\n .cell-content {\n text-align: left;\n }\n }\n\n .align-center {\n justify-content: center;\n\n .cell-content {\n text-align: center;\n }\n }\n\n .popper {\n div.row {\n display: flex;\n vertical-align: middle;\n line-height: unset;\n border-bottom: none;\n outline: none 0;\n height: auto;\n }\n }\n `;\n});\n\nexport default StyledTableContainer;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizeWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":"AAiBA;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"VirtualizeWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":"AAiBA;;;;;;;;;;4CA4JC;;;;;;;;;;;;;;;;;sBA7KqB,YAAY"}
|
|
@@ -23,11 +23,11 @@ useVariableRowHeightVirtualization = false, bufferMultiplier }) {
|
|
|
23
23
|
const [hasMoreResults, setHasMoreResults] = useState(false);
|
|
24
24
|
const previousTotalItemCount = usePrevious(view.totalItemCount);
|
|
25
25
|
const paginationCallback = useCallback((payload, payloadMeta) => {
|
|
26
|
-
paginationPayload.current = payload;
|
|
27
|
-
setIsFetching(true);
|
|
28
26
|
const updatedPayload = meta.template === REPEATING_STRUCTURE_TEMPLATES.GALLERY
|
|
29
27
|
? { ...payload, startIndex: 0 }
|
|
30
28
|
: payload;
|
|
29
|
+
paginationPayload.current = updatedPayload;
|
|
30
|
+
setIsFetching(true);
|
|
31
31
|
view.type.onPaginate(updatedPayload, payloadMeta);
|
|
32
32
|
}, [view.type.onPaginate]);
|
|
33
33
|
const renderEmptyRecords = useCallback(() => (_jsx(EmptyContainer, { message: isFilterApplied({ filterExpression, searchText, externalState }, meta.externalFilters)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizeWrapper.js","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OA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AAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;IACxE,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,iBAAiB,EAAE,SAAS,CAAC,MAAM;IACnC,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IAClD,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,kCAAkC,EAAE,SAAS,CAAC,IAAI;IAClD,gBAAgB,EAAE,SAAS,CAAC,MAAM;CACnC,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\nimport { usePrevious } from '@pega/cosmos-react-core';\n\nimport Virtualize from '../../Components/Virtualise';\nimport VirtualizeInfinite from '../../Components/Virtualise/VirtualizeInfinite';\nimport VariableHeightVirtualizer from '../../Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer';\nimport { isPaginationRequestCompleted } from '../../Components/Virtualise/utility';\nimport { isFilterApplied } from '../../Utils';\nimport EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';\nimport useTranslate from '../../Hooks/useTranslate';\n\nimport Row from './Row';\nimport useCountChange from './useCountChange';\n\nexport default function VirtualizeWrapper({\n view,\n children,\n id,\n renderHeader = null,\n rowContainerClass = '',\n renderFooter = null,\n isFullscreen = false,\n // TODO: Remove this prop and deprecate older virtualizers once we fully migrate to variable row height virtualizer for gallery and grouped list views\n useVariableRowHeightVirtualization = false,\n bufferMultiplier\n}) {\n const { state, meta } = view;\n const { filterExpression, searchText, externalState } = state;\n const [translate] = useTranslate();\n const paginationPayload = useRef({});\n\n const [isFetching, setIsFetching] = useState(false);\n const [hasMoreResults, setHasMoreResults] = useState(false);\n const previousTotalItemCount = usePrevious(view.totalItemCount);\n\n const paginationCallback = useCallback(\n (payload, payloadMeta) => {\n paginationPayload.current = payload;\n setIsFetching(true);\n\n const updatedPayload =\n meta.template === REPEATING_STRUCTURE_TEMPLATES.GALLERY\n ? { ...payload, startIndex: 0 }\n : payload;\n\n view.type.onPaginate(updatedPayload, payloadMeta);\n },\n [view.type.onPaginate]\n );\n\n const renderEmptyRecords = useCallback(\n () => (\n <EmptyContainer\n message={\n isFilterApplied({ filterExpression, searchText, externalState }, meta.externalFilters)\n ? translate('No records found')\n : translate('No records')\n }\n shouldAnnounce={previousTotalItemCount > 0 && view.totalItemCount === 0}\n domContainer={view.getDomContainer()}\n />\n ),\n [filterExpression, searchText, externalState, meta.externalFilters, view.totalItemCount]\n );\n\n useEffect(() => {\n if (view.isInstantRender) return;\n\n const isRequestComplete = isPaginationRequestCompleted(\n paginationPayload.current,\n view.state?.paginationOptions?.[id]\n );\n setIsFetching(!isRequestComplete);\n }, [view.isInstantRender, view.state?.paginationOptions?.[id]]);\n\n useEffect(() => {\n if (view.isInstantRender || !paginationPayload.current) return;\n\n const requestedRows =\n paginationPayload.current.endIndex - paginationPayload.current.startIndex + 1;\n setHasMoreResults(view.rows?.length === requestedRows);\n }, [view.isInstantRender, view.state?.paginationOptions?.[id]]);\n\n useCountChange(view, isFetching, view.getVirtualizeElement?.(id)?.notifyCountChange);\n\n if (useVariableRowHeightVirtualization) {\n const paginationStartIndex = view?.state?.paginationOptions?.rootVirtualiser?.startIndex || 0;\n return (\n <VariableHeightVirtualizer\n id={id}\n totalItemCount={view.totalItemCount}\n isDataFetching={isFetching}\n loadedDataRange={view?.state?.paginationOptions?.[id] || {}}\n apiCallback={paginationCallback}\n defaultItemHeight={40}\n maxItemsToPaint={5000}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n renderEmptyRecords={renderEmptyRecords}\n itemContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r?.getBufferContainer());\n }}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n minHeightWhenNoItemsRendered='100px'\n >\n {view?.groupHeaders?.[0]?.getRows()?.map((row, index) => (\n <Row\n key={row.reactKey}\n row={row}\n columns={view.columns}\n level={0}\n dataIndex={paginationStartIndex + index}\n />\n ))}\n </VariableHeightVirtualizer>\n );\n }\n\n if (meta.template === REPEATING_STRUCTURE_TEMPLATES.GALLERY) {\n return (\n <VirtualizeInfinite\n id={id}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n itemHeight={view.rowHeight}\n callback={paginationCallback}\n isFetching={isFetching}\n hasMoreResults={hasMoreResults}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r && r.vi && r.vi.bContainer);\n }}\n rowContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n state={view.state?.paginationOptions?.[id]}\n resetCount={view.isCountUpdateRequired}\n showLoadingIndicator\n renderEmptyRecords={renderEmptyRecords}\n bufferMultiplier={bufferMultiplier}\n >\n {children}\n </VirtualizeInfinite>\n );\n }\n\n // Only used for grouped table\n return (\n <Virtualize\n id={id}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n totalRecordCount={view.totalItemCount}\n itemHeight={view.rowHeight}\n callback={paginationCallback}\n isFetching={isFetching}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r && r.vi && r.vi.bContainer);\n }}\n rowContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n state={view.state?.paginationOptions?.[id]}\n showLoadingIndicator\n renderEmptyRecords={renderEmptyRecords}\n bufferMultiplier={bufferMultiplier}\n >\n {children}\n </Virtualize>\n );\n}\n\nVirtualizeWrapper.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n renderHeader: PropTypes.func,\n renderFooter: PropTypes.func,\n rowContainerClass: PropTypes.string,\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n isFullscreen: PropTypes.bool,\n useVariableRowHeightVirtualization: PropTypes.bool,\n bufferMultiplier: PropTypes.number\n};\n"]}
|
|
1
|
+
{"version":3,"file":"VirtualizeWrapper.js","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,kBAAkB,MAAM,gDAAgD,CAAC;AAChF,OAAO,yBAAyB,MAAM,iFAAiF,CAAC;AACxH,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,YAAY,GAAG,IAAI,EACnB,iBAAiB,GAAG,EAAE,EACtB,YAAY,GAAG,IAAI,EACnB,YAAY,GAAG,KAAK;AACpB,sJAAsJ;AACtJ,kCAAkC,GAAG,KAAK,EAC1C,gBAAgB,EACjB;IACC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,CAA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K,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC,EAC1C,oBAAoB,QACpB,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,YAEjC,QAAQ,GACE,CACd,CAAC;AACJ,CAAC;AAED,iBAAiB,CAAC,SAAS,GAAG;IAC5B,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;IAC7E,EAAE,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;IACxE,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,iBAAiB,EAAE,SAAS,CAAC,MAAM;IACnC,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IAClD,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,kCAAkC,EAAE,SAAS,CAAC,IAAI;IAClD,gBAAgB,EAAE,SAAS,CAAC,MAAM;CACnC,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\nimport { usePrevious } from '@pega/cosmos-react-core';\n\nimport Virtualize from '../../Components/Virtualise';\nimport VirtualizeInfinite from '../../Components/Virtualise/VirtualizeInfinite';\nimport VariableHeightVirtualizer from '../../Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer';\nimport { isPaginationRequestCompleted } from '../../Components/Virtualise/utility';\nimport { isFilterApplied } from '../../Utils';\nimport EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';\nimport useTranslate from '../../Hooks/useTranslate';\n\nimport Row from './Row';\nimport useCountChange from './useCountChange';\n\nexport default function VirtualizeWrapper({\n view,\n children,\n id,\n renderHeader = null,\n rowContainerClass = '',\n renderFooter = null,\n isFullscreen = false,\n // TODO: Remove this prop and deprecate older virtualizers once we fully migrate to variable row height virtualizer for gallery and grouped list views\n useVariableRowHeightVirtualization = false,\n bufferMultiplier\n}) {\n const { state, meta } = view;\n const { filterExpression, searchText, externalState } = state;\n const [translate] = useTranslate();\n const paginationPayload = useRef({});\n\n const [isFetching, setIsFetching] = useState(false);\n const [hasMoreResults, setHasMoreResults] = useState(false);\n const previousTotalItemCount = usePrevious(view.totalItemCount);\n\n const paginationCallback = useCallback(\n (payload, payloadMeta) => {\n const updatedPayload =\n meta.template === REPEATING_STRUCTURE_TEMPLATES.GALLERY\n ? { ...payload, startIndex: 0 }\n : payload;\n\n paginationPayload.current = updatedPayload;\n setIsFetching(true);\n view.type.onPaginate(updatedPayload, payloadMeta);\n },\n [view.type.onPaginate]\n );\n\n const renderEmptyRecords = useCallback(\n () => (\n <EmptyContainer\n message={\n isFilterApplied({ filterExpression, searchText, externalState }, meta.externalFilters)\n ? translate('No records found')\n : translate('No records')\n }\n shouldAnnounce={previousTotalItemCount > 0 && view.totalItemCount === 0}\n domContainer={view.getDomContainer()}\n />\n ),\n [filterExpression, searchText, externalState, meta.externalFilters, view.totalItemCount]\n );\n\n useEffect(() => {\n if (view.isInstantRender) return;\n\n const isRequestComplete = isPaginationRequestCompleted(\n paginationPayload.current,\n view.state?.paginationOptions?.[id]\n );\n setIsFetching(!isRequestComplete);\n }, [view.isInstantRender, view.state?.paginationOptions?.[id]]);\n\n useEffect(() => {\n if (view.isInstantRender || !paginationPayload.current) return;\n\n const requestedRows =\n paginationPayload.current.endIndex - paginationPayload.current.startIndex + 1;\n setHasMoreResults(view.rows?.length === requestedRows);\n }, [view.isInstantRender, view.state?.paginationOptions?.[id]]);\n\n useCountChange(view, isFetching, view.getVirtualizeElement?.(id)?.notifyCountChange);\n\n if (useVariableRowHeightVirtualization) {\n const paginationStartIndex = view?.state?.paginationOptions?.rootVirtualiser?.startIndex || 0;\n return (\n <VariableHeightVirtualizer\n id={id}\n totalItemCount={view.totalItemCount}\n isDataFetching={isFetching}\n loadedDataRange={view?.state?.paginationOptions?.[id] || {}}\n apiCallback={paginationCallback}\n defaultItemHeight={40}\n maxItemsToPaint={5000}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n renderEmptyRecords={renderEmptyRecords}\n itemContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r?.getBufferContainer());\n }}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n minHeightWhenNoItemsRendered='100px'\n >\n {view?.groupHeaders?.[0]?.getRows()?.map((row, index) => (\n <Row\n key={row.reactKey}\n row={row}\n columns={view.columns}\n level={0}\n dataIndex={paginationStartIndex + index}\n />\n ))}\n </VariableHeightVirtualizer>\n );\n }\n\n if (meta.template === REPEATING_STRUCTURE_TEMPLATES.GALLERY) {\n return (\n <VirtualizeInfinite\n id={id}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n itemHeight={view.rowHeight}\n callback={paginationCallback}\n isFetching={isFetching}\n hasMoreResults={hasMoreResults}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r && r.vi && r.vi.bContainer);\n }}\n rowContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n state={view.state?.paginationOptions?.[id]}\n resetCount={view.isCountUpdateRequired}\n showLoadingIndicator\n renderEmptyRecords={renderEmptyRecords}\n bufferMultiplier={bufferMultiplier}\n >\n {children}\n </VirtualizeInfinite>\n );\n }\n\n // Only used for grouped table\n return (\n <Virtualize\n id={id}\n viewMaxHeight={isFullscreen ? null : view.bodyHeight}\n totalRecordCount={view.totalItemCount}\n itemHeight={view.rowHeight}\n callback={paginationCallback}\n isFetching={isFetching}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n ref={r => {\n view.putVirtualizeElement(id, r);\n view.setScrollNode(r && r.vi && r.vi.bContainer);\n }}\n rowContainerClass={`${rowContainerClass} ${view.rowHeightClass}`}\n state={view.state?.paginationOptions?.[id]}\n showLoadingIndicator\n renderEmptyRecords={renderEmptyRecords}\n bufferMultiplier={bufferMultiplier}\n >\n {children}\n </Virtualize>\n );\n}\n\nVirtualizeWrapper.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n renderHeader: PropTypes.func,\n renderFooter: PropTypes.func,\n rowContainerClass: PropTypes.string,\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n isFullscreen: PropTypes.bool,\n useVariableRowHeightVirtualization: PropTypes.bool,\n bufferMultiplier: PropTypes.number\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "9.0.0-build.19.
|
|
3
|
+
"version": "9.0.0-build.19.12",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0-build.19.
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0-build.19.
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0-build.19.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.19.12",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.19.12",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0-build.19.12",
|
|
20
20
|
"@types/lodash-es": "^4.17.12",
|
|
21
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
22
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dayjs": "^1.11.13",
|
|
25
25
|
"fast-deep-equal": "^3.1.3",
|
|
26
26
|
"lodash-es": "^4.17.23",
|
|
27
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.19.
|
|
28
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.19.
|
|
27
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.19.12",
|
|
28
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.19.12",
|
|
29
29
|
"polished": "^4.1.0",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
31
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@testing-library/react": "^16.0.0",
|
|
45
45
|
"@testing-library/user-event": "^14.6.1",
|
|
46
46
|
"jest-axe": "^8.0.0",
|
|
47
|
-
"srs-utils": "9.0.0-build.19.
|
|
47
|
+
"srs-utils": "9.0.0-build.19.12",
|
|
48
48
|
"typescript": "~5.9.3"
|
|
49
49
|
}
|
|
50
50
|
}
|