@pega/lists-react 8.20.0 → 8.21.1

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.
Files changed (62) hide show
  1. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  2. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  3. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +249 -0
  4. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  5. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  6. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  7. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  8. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  9. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  10. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  11. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  12. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  13. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  14. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  15. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  16. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  17. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  18. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  19. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  20. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  21. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  22. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  23. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  24. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  25. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  26. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  27. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  28. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  29. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  30. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  31. package/lib/Core/Components/Virtualise/utility.js +3 -2
  32. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  33. package/lib/Core/Components/WarningBanner.d.ts +11 -0
  34. package/lib/Core/Components/WarningBanner.d.ts.map +1 -0
  35. package/lib/Core/Components/WarningBanner.js +23 -0
  36. package/lib/Core/Components/WarningBanner.js.map +1 -0
  37. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  38. package/lib/Core/Views/Gallery/index.js +2 -1
  39. package/lib/Core/Views/Gallery/index.js.map +1 -1
  40. package/lib/Core/Views/Table/Row.d.ts +3 -1
  41. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  42. package/lib/Core/Views/Table/Row.js +5 -3
  43. package/lib/Core/Views/Table/Row.js.map +1 -1
  44. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  45. package/lib/Core/Views/Table/StyledTableContainer.js +4 -0
  46. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  47. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +3 -1
  48. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  49. package/lib/Core/Views/Table/VirtualizeWrapper.js +18 -2
  50. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  51. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  52. package/lib/Core/Views/Table/index.js +4 -3
  53. package/lib/Core/Views/Table/index.js.map +1 -1
  54. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  55. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  56. package/lib/Core/Views/Table/useCountChange.js +39 -0
  57. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  58. package/lib/index.d.ts +1 -1
  59. package/lib/index.d.ts.map +1 -1
  60. package/lib/index.js +1 -1
  61. package/lib/index.js.map +1 -1
  62. package/package.json +8 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../Core/Components/Virtualise/VariableHeightVirtualizer/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA2BrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,KAA4C,EACF,EAAE;IAC5C,MAAM,EACJ,cAAc,EACd,MAAM,EACN,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,wBAAwB,GAAG,MAAM,GAAG,CAAC,CAAC;IAC5C,IAAI,cAAc,KAAK,CAAC,IAAI,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,KAAK,CAAC,EAAE,CAAC;QAC9E,OAAO,EAAE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AAC,QAAQ,GAAG,UAAU,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,0BAA0B,IAAI,CAAC;QACnD,0BAA0B,IAAI,WAAW,CAAC,gBAAgB,CAAC,IAAI,iBAAiB,CAAC;QACjF,gBAAgB,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAChD,CAAC,CAAC","sourcesContent":["import type { RefObject } from 'react';\n\nimport { getScrollbarWidth } from 'pega-repeating-structures-core';\nimport { isInstance } from '@pega/cosmos-react-core';\n\nimport type { ItemsHeight } from './VariableHeightVirtualizer';\n\ninterface GetVirtualizedPaginationIndicesParams {\n /** Current vertical scroll offset of the container. */\n scrollTop: number;\n /** Ref to the scrolling container element */\n containerRef: RefObject<HTMLDivElement>;\n /** Ref to the container holding the list items */\n itemContainerRef: RefObject<HTMLDivElement>;\n\n /** Total number of items. */\n totalItemCount: number;\n /** Mapping of item indices and their actual height. */\n itemsHeight: ItemsHeight;\n /** Default height for items if not measured. */\n defaultItemHeight: number;\n\n /** Number of extra items to render above and below the visible viewport for smooth scrolling. */\n buffer: number;\n /** Maximum allowed end index (exclusive). */\n endIndexLimit: number;\n /** If true, allows indices to exceed totalCount for infinite scrolling by including buffer. */\n isInfiniteMode?: boolean;\n}\n\n/**\n * Calculates the start and end indices for virtualized pagination in a variable-height list.\n *\n * @returns {{ startIndex: number, endIndex: number }} Object containing the calculated start and end indices for rendering (inclusive both indices).\n */\nexport const getVirtualizedPaginationIndices = (\n param: GetVirtualizedPaginationIndicesParams\n): { startIndex: number; endIndex: number } => {\n const {\n totalItemCount,\n buffer,\n itemContainerRef,\n scrollTop,\n containerRef,\n itemsHeight,\n defaultItemHeight,\n endIndexLimit,\n isInfiniteMode\n } = param;\n\n const minimumItemsToFetchOnTop = buffer * 4;\n if (totalItemCount === 0 || itemContainerRef.current?.childElementCount === 0) {\n return { startIndex: 0, endIndex: minimumItemsToFetchOnTop };\n }\n\n const viewportHeight = containerRef.current?.clientHeight || 0;\n\n // Find the first visible item index for the current scroll position\n let aboveTheFoldItemsHeight = 0;\n let visibleStartIndex = 0;\n while (\n visibleStartIndex < totalItemCount &&\n aboveTheFoldItemsHeight + (itemsHeight[visibleStartIndex] ?? defaultItemHeight) < scrollTop\n ) {\n aboveTheFoldItemsHeight += itemsHeight[visibleStartIndex] ?? defaultItemHeight;\n visibleStartIndex += 1;\n }\n\n // Find the last visible item index for the current scroll position\n let inViewItemsHeight = 0;\n let visibleEndIndex = visibleStartIndex;\n while (visibleEndIndex < totalItemCount && inViewItemsHeight < viewportHeight) {\n inViewItemsHeight += itemsHeight[visibleEndIndex] ?? defaultItemHeight;\n visibleEndIndex += 1;\n }\n\n const startIndex = Math.max(0, visibleStartIndex - buffer);\n let endIndex = Math.min(visibleEndIndex + buffer, endIndexLimit - 1);\n if (isInfiniteMode) {\n endIndex = Math.max(endIndex, minimumItemsToFetchOnTop);\n } else {\n // In cases where the count is very less due to filters, we would fetch more items to avoid unnecessary API calls if the count after the filter removed is more\n endIndex = Math.max(Math.min(totalItemCount - 1, endIndex), minimumItemsToFetchOnTop);\n }\n return { startIndex, endIndex };\n};\n\n/**\n * Calculates the total buffer height for a list of items, using their individual heights if available,\n * or a default height otherwise.\n *\n * @param totalItemCount - The total number of items in the list.\n * @param itemsHeight - An object or array containing the heights of individual items, indexed by item position.\n * @param defaultItemHeight - The default height to use for items whose height is not specified in `itemsHeight`.\n * @returns The sum of all item heights, using the default height for any missing values.\n */\nexport const calculateTotalBufferHeight = (\n totalItemCount: number,\n itemsHeight: ItemsHeight,\n defaultItemHeight: number\n): number => {\n let totalBufferHeight = 0;\n for (let i = 0; i < totalItemCount; i += 1) {\n totalBufferHeight += itemsHeight[i] || defaultItemHeight;\n }\n\n return totalBufferHeight;\n};\n\n/**\n * Returns a CSS-compatible max-height value based on the input.\n *\n * @param viewMaxHeight - The maximum height value, which can be a number (pixels), a string (CSS value), or `null`.\n * @returns A string representing the CSS max-height value.\n */\nexport const getMaxHeight = (viewMaxHeight: number | string | null): string => {\n if (!viewMaxHeight) return 'none';\n return typeof viewMaxHeight === 'number' ? `${viewMaxHeight}px` : viewMaxHeight;\n};\n\n/**\n * Calculates the vertical offset for a given item index in a list with variable item heights.\n *\n * @param index - The index of the item for which to calculate the offset.\n * @param itemsHeight - Mapping of item indices and their actual height.\n * @param defaultItemHeight - The default height to use for items not present in the cache.\n * @returns The total offset (in pixels) from the top of the list to the specified index.\n */\nexport const getOffsetForIndex = (\n index: number,\n itemsHeight: ItemsHeight,\n defaultItemHeight: number\n): number => {\n let offset = 0;\n\n for (let i = 0; i < index; i += 1) {\n offset += itemsHeight[i] ?? defaultItemHeight;\n }\n return offset;\n};\n\n/**\n * Determines whether the viewable area of a virtualized list is not fully filled with rendered items.\n *\n * @param totalItemCount - The total number of items that should be rendered.\n * @param itemContainer - The HTML element containing the rendered items.\n * @param parentContainer - The parent HTML element that contains the items and possibly the header.\n * @param renderHeader - Indicates whether a header is rendered at the top of the parent container.\n * @returns `true` if the view is not filled with all items, `false` otherwise.\n */\nexport const isViewNotFilled = (\n totalItemCount: number,\n itemContainer: HTMLDivElement,\n parentContainer: HTMLDivElement,\n renderHeader: boolean\n): boolean => {\n const parentContainerPosition = parentContainer.getBoundingClientRect();\n let headerHeight = 0;\n if (renderHeader && parentContainer.childElementCount > 1) {\n const firstChild = parentContainer.children[0];\n if (isInstance(firstChild, HTMLDivElement)) {\n headerHeight = firstChild.offsetHeight;\n }\n }\n\n const scrollbarWidth = getScrollbarWidth();\n const items = Array.from(itemContainer.children);\n\n if (!items.length && !totalItemCount) return false;\n if (!items.length && totalItemCount) return true;\n\n return (\n !!totalItemCount &&\n items.length !== totalItemCount &&\n (Math.floor(items[items.length - 1].getBoundingClientRect().bottom) <\n Math.floor(parentContainerPosition.bottom - scrollbarWidth) ||\n Math.floor(items[0].getBoundingClientRect().top) >\n Math.floor(parentContainerPosition.top + headerHeight) ||\n items.length === 0)\n );\n};\n\n/**\n * Retrieves the numeric data index from the `data-index` attribute of a given Element.\n *\n * @param element - The Element from which to extract the data index.\n * @returns The parsed integer value of the `data-index` attribute, or `null` if the attribute is not present.\n */\nexport const getDataIndex = (element: Element): number | null => {\n const dataIndexStr = element?.getAttribute('data-index');\n if (!dataIndexStr) return null;\n const parsedDataIndex = parseInt(dataIndexStr, 10);\n return Number.isNaN(parsedDataIndex) ? null : parsedDataIndex;\n};\n\n/**\n * Calculates and returns an object containing the heights of items whose heights have changed\n * compared to their previous values.\n *\n * @param itemContainer - The container HTMLElement whose child nodes represent items to measure.\n * @param itemsHeight - An object mapping item indices to their measured heights.\n * @param defaultItemHeight - The default height to use for items not present in `itemsHeight`.\n * @returns An object mapping item indices to their new heights for items whose heights have changed.\n */\nexport function getChangedItemsHeight(\n itemContainer: HTMLDivElement,\n itemsHeight: ItemsHeight,\n defaultItemHeight: number\n): ItemsHeight {\n if (!itemContainer) return {};\n\n const newHeights: ItemsHeight = {};\n const nodes = Array.from(itemContainer.children);\n\n nodes.forEach(node => {\n const itemDataIndex = getDataIndex(node);\n if (itemDataIndex === null) return;\n\n const measuredHeight = node.getBoundingClientRect().height;\n const prevHeight = itemsHeight[itemDataIndex] ?? defaultItemHeight;\n if (measuredHeight !== prevHeight) {\n newHeights[itemDataIndex] = measuredHeight;\n }\n });\n\n return newHeights;\n}\n\n/**\n * Calculates the cumulative change in item heights between two sets of item height data,\n * for a range of items starting from `startIndex` up to (but not including) `previousFirstItemDataIndex`.\n *\n * This function compares the current heights (`itemsHeight`) with the previous heights (`previousItemsHeight`)\n * for each item in the specified range, using `defaultItemHeight` as a fallback if a previous height is missing.\n * The result is the sum of the differences in height for all items in the range.\n *\n * @param startIndex - The index at which to start calculating the cumulative height change.\n * @param previousFirstItemDataIndex - The index up to which to calculate (exclusive). If `null` or less than or equal to 0, returns 0.\n * @param itemsHeight - An object mapping item indices to their measured heights.\n * @param previousItemsHeight - An object mapping item indices of previously rendered items to their heights.\n * @param defaultItemHeight - The default height to use if a previous height is not available.\n * @returns The cumulative change in item heights for the specified range, or 0 if the result is not finite.\n */\nexport const calculateCumulativeItemSizeChange = (\n startIndex: number,\n previousFirstItemDataIndex: number | null,\n itemsHeight: ItemsHeight,\n previousItemsHeight: ItemsHeight,\n defaultItemHeight: number\n): number => {\n if (previousFirstItemDataIndex === null || previousFirstItemDataIndex <= 0) {\n return 0;\n }\n\n let delta = 0;\n\n for (let i = startIndex; i < previousFirstItemDataIndex; i += 1) {\n const actualHeight = itemsHeight[i];\n const previousHeight = previousItemsHeight[i] ?? defaultItemHeight;\n\n if (actualHeight !== null && actualHeight !== undefined) {\n delta += actualHeight - previousHeight;\n }\n }\n\n return Number.isFinite(delta) ? delta : 0;\n};\n\n/**\n * Updates the position styles of child items within a container element to enable virtualized rendering.\n * Sets the container's top offset and positions each child absolutely based on their calculated heights.\n *\n * @param itemContainer - The HTML element containing the list items to be positioned.\n * @param itemsHeight - An object mapping item indices to their measured heights.\n * @param defaultItemHeight - The default height to use for items without a specified height.\n * @returns The total height of all items within the container, rounded down to the nearest integer.\n */\nexport const updateItemPositionStyles = (\n itemContainer: HTMLDivElement,\n itemsHeight: ItemsHeight,\n defaultItemHeight: number\n): number => {\n const items = itemContainer.children;\n if (!items?.length) {\n return 0;\n }\n\n const firstItemDataIndex = getDataIndex(items[0]);\n if (firstItemDataIndex === null) return 0;\n\n const offset = getOffsetForIndex(firstItemDataIndex, itemsHeight, defaultItemHeight);\n itemContainer.style.top = `${offset}px`;\n\n let itemContainerCurrentHeight = 0;\n let currentItemIndex = firstItemDataIndex;\n Array.from(items).forEach(item => {\n if (!isInstance(item, HTMLDivElement)) return;\n\n item.style.position = 'absolute';\n item.style.top = `${itemContainerCurrentHeight}px`;\n itemContainerCurrentHeight += itemsHeight[currentItemIndex] ?? defaultItemHeight;\n currentItemIndex += 1;\n });\n\n return Math.floor(itemContainerCurrentHeight);\n};\n"]}
@@ -5,7 +5,7 @@ export declare function isPaginationRequestCompleted(requestedIndexes?: {
5
5
  }, receivedIndexes?: {
6
6
  startIndex: number;
7
7
  endIndex: number;
8
- }): boolean | undefined;
8
+ }): number | boolean | undefined;
9
9
  export declare function isViewNotFilled(totalRecordCount: number, vi: {
10
10
  rContainer: HTMLDivElement;
11
11
  }, pContainer: HTMLDivElement, renderHeader: boolean): boolean | 0;
@@ -1 +1 @@
1
- {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Virtualise/utility.ts"],"names":[],"mappings":"AAOA,wBAAgB,4BAA4B,CAAC,gBAAgB,EAAE,MAAM,UAEpE;AAID,wBAAgB,4BAA4B,CAC1C,gBAAgB,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC3D,eAAe,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,uBAU3D;AAED,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,MAAM,EACxB,EAAE,EAAE;IAAE,UAAU,EAAE,cAAc,CAAA;CAAE,EAClC,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,OAAO,eAmBtB;AA4BD,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,eAAe,UAAQ;;;;;EAkCvF;AAgGD,wBAAgB,qBAAqB,CACnC,EAAE,EAAE;IACF,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE;QACL,IAAI,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/C,iBAAiB,EAAE;YACjB,SAAS,EAAE,MAAM,CAAC;YAClB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,0BAA0B,EAAE,MAAM,CAAC;YACnC,gBAAgB,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,uBAAuB,EAAE;YAAE,CAAC,EAAE,MAAM,CAAA;SA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AM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC/C,UAAU,EAAE,WAAW,QAKxB;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,WAAW,sBAU/D;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAClC,YAAY,EAAE,MAAM,GAAG,MAAM,GAC5B,MAAM,GAAG,MAAM,CAMjB;AAED,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAG/E"}
@@ -12,8 +12,9 @@ export function isPaginationRequestCompleted(requestedIndexes, receivedIndexes)
12
12
  // about updated index though pagination is really not required.
13
13
  return (receivedIndexes &&
14
14
  requestedIndexes &&
15
- receivedIndexes.startIndex === requestedIndexes.startIndex &&
16
- receivedIndexes.endIndex === requestedIndexes.endIndex);
15
+ ((receivedIndexes.startIndex === requestedIndexes.startIndex &&
16
+ receivedIndexes.endIndex === requestedIndexes.endIndex) ||
17
+ (Object.keys(requestedIndexes).length === 0 && receivedIndexes.endIndex)));
17
18
  }
18
19
  export function isViewNotFilled(totalRecordCount, vi, pContainer, renderHeader) {
19
20
  const parentContainerPosition = pContainer.getBoundingClientRect();
@@ -1 +1 @@
1
- {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../../Core/Components/Virtualise/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,UAAU,4BAA4B,CAAC,gBAAwB;IACnE,OAAO,gBAAgB,GAAG,wBAAwB,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,gBAAgB,CAAC;AACnG,CAAC;AAED,0DAA0D;AAC1D,+CAA+C;AAC/C,MAAM,UAAU,4BAA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,wBAAwB,CAAC,UAAuB;IAC9D,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAEtE,IAAI,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxD,IAAI,UAAU,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACpD,qBAAqB,IAAI,iBAAiB,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAAkC,EAClC,YAA6B;IAE7B,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtB,CAAC;IACD,OAAO,GAAG,KAAK,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,aAA0C;IACrE,IAAI,CAAC,aAAa;QAAE,OAAO,MAAM,CAAC;IAClC,OAAO,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;AAClF,CAAC","sourcesContent":["import { getScrollbarWidth } from 'pega-repeating-structures-core';\n\nimport { StickyGroupHeader } from './Pagination';\n\n// TODO: in future, take this count in meta\nconst MAX_SCROLLABLE_ROW_COUNT = 5000;\n\nexport function getRecordCountForLayoutPaint(totalRecordCount: number) {\n return totalRecordCount > MAX_SCROLLABLE_ROW_COUNT ? MAX_SCROLLABLE_ROW_COUNT : totalRecordCount;\n}\n\n// State should be communicated back from consumer to know\n// if pagination last request completed or not.\nexport function isPaginationRequestCompleted(\n requestedIndexes?: { startIndex: number; endIndex: number },\n receivedIndexes?: { startIndex: number; endIndex: number }\n) {\n // this is required when there is a pagination request which is raised just to update consumer\n // about updated index though pagination is really not required.\n return (\n receivedIndexes &&\n requestedIndexes &&\n receivedIndexes.startIndex === requestedIndexes.startIndex &&\n receivedIndexes.endIndex === requestedIndexes.endIndex\n );\n}\n\nexport function isViewNotFilled(\n totalRecordCount: number,\n vi: { rContainer: HTMLDivElement },\n pContainer: HTMLDivElement,\n renderHeader: boolean\n) {\n const parentContainerPosition = pContainer.getBoundingClientRect();\n // This is required to accommodate header height.\n // TODO: Need to find a better solution to pull out header out of this.\n const headerRowHeight =\n renderHeader && pContainer.childElementCount > 1\n ? (pContainer.childNodes[0] as HTMLElement).offsetHeight\n : 0;\n const scrollbarWidth = getScrollbarWidth();\n return (\n totalRecordCount &&\n vi.rContainer.childElementCount !== totalRecordCount &&\n (Math.floor(vi.rContainer.getBoundingClientRect().bottom) <\n Math.floor(parentContainerPosition.bottom - scrollbarWidth) ||\n Math.floor(vi.rContainer.getBoundingClientRect().top) >\n Math.floor(parentContainerPosition.top + headerRowHeight) ||\n vi.rContainer.childElementCount === 0)\n );\n}\n\nfunction getItemCountPerRow(rows: Element[]) {\n const itemsCountPerRow: {\n [key: string]: { count: number; height: number; isStickyGroupHeader: boolean };\n } = {};\n rows.forEach(item => {\n const itemBoundary = item.getBoundingClientRect();\n // isStickyGroupHeader flag helps in including the overlapped sticky-group-header for getting correct averages\n const isStickyGroupHeader = item.classList.contains(StickyGroupHeader);\n if (itemsCountPerRow[itemBoundary.top]) {\n itemsCountPerRow[itemBoundary.top].count += 1;\n if (itemsCountPerRow[itemBoundary.top].height < itemBoundary.height) {\n itemsCountPerRow[itemBoundary.top].height = itemBoundary.height;\n }\n } else {\n itemsCountPerRow[itemBoundary.top] = {\n count: 1,\n height: itemBoundary.height,\n isStickyGroupHeader\n };\n }\n });\n return itemsCountPerRow;\n}\n\n// Based on row container size, get estimated count,\n// average height and no of items in a row.\nexport function getCurrentEstimation(rContainer: HTMLDivElement, includeRowsOnly = false) {\n const rContainerChildren = Array.from(rContainer.children || []);\n const filteredRowsContainer = includeRowsOnly\n ? rContainerChildren.filter(r => r.hasAttribute('data-key'))\n : rContainerChildren;\n\n const itemsCountPerRow = getItemCountPerRow(filteredRowsContainer);\n const itemCount = filteredRowsContainer.length || 0;\n // TODO FIXME: #virtualizer Remove dependency on sticky-group-header class and try to make the key of ItemsCountPerRow unique which will work for overlapping scenarios\n // BUG-740809 handling the rowCount in case of overlapped sticky-group-header\n // If we have sticky-group-headers, add overlapped sticky-group-headers to rowCount.\n // So, that averageNumberOfItemsInARow will be 1 for grid. That's why adding the complete count.\n const rowCount = Object.values(itemsCountPerRow).reduce(\n (acc: number, o: { isStickyGroupHeader: boolean; count: number }) => {\n if (o.isStickyGroupHeader) {\n return acc + o.count;\n }\n return acc + 1;\n },\n 0\n );\n const averageNumberOfItemsInARow = rowCount > 0 ? itemCount / rowCount : 0;\n const height = Object.values(itemsCountPerRow).reduce(\n (acc: number, o: { isStickyGroupHeader: boolean; height: number; count: number }) => {\n if (o.isStickyGroupHeader) {\n return acc + o.height * o.count;\n }\n return acc + o.height;\n },\n 0\n );\n const averageRowHeight = rowCount > 0 ? height / rowCount : 0;\n const rowContainerHeight = rContainer.offsetHeight || 0;\n return { itemCount, rowContainerHeight, averageNumberOfItemsInARow, averageRowHeight };\n}\n\n// Calculate top which needs to set on row container when component rerender.\n// component can rerender many times though pagination is in progress.\nfunction calculateTop(\n vi: {\n rContainer: HTMLDivElement;\n pInfo?: {\n view?: { startIndex: number; endIndex: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n scrollTop: number\n) {\n let top = 0;\n if (vi.pInfo && vi.pInfo?.view?.startIndex !== 0) {\n // slide row container for current view based on previous estimated value.\n const estimatedNoOfItemsPushedUp =\n scrollTop * (vi.currentEstimation.itemCount / vi.currentEstimation.rowContainerHeight);\n // estimated start view index of current view based on scroll top.\n\n const estimatedStartIndexInView = estimatedNoOfItemsPushedUp + 1;\n // estimated number of buffer records.\n\n const noOfBufferRecords = estimatedStartIndexInView - (vi.pInfo?.view?.startIndex ?? 0);\n const noOfBufferRecordsHeight =\n (noOfBufferRecords / vi.currentEstimation.averageNumberOfItemsInARow) *\n vi.currentEstimation.averageRowHeight;\n // calculated top of row container.\n top = scrollTop - noOfBufferRecordsHeight;\n if (top < 0) top = 0;\n }\n return top;\n}\n\nfunction adjustTopRowContainerToAvoidDrift(\n vi: {\n rContainer: HTMLDivElement;\n pInfo: {\n view: { startIndex: number; endIndex: number };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n existingItemBoundingBox: { y: number };\n currentRowIndex: number;\n bufferNewCords: { top: number };\n bufferOldCords: { top: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n existingTop: number\n) {\n // Adjust top if element was viewable when user stop scrolling and pagination trigger.\n // existing item should be viewable are at time of calculation\n // as we allow user to scroll even pagination request triggered.\n let effectiveTop = existingTop;\n const { existingItemBoundingBox, currentRowIndex } = vi.pInfo;\n // As safari does elastic scroll, we need this check to avoid any space on top.\n const safariIsFirstItem = currentRowIndex === 0;\n if (existingItemBoundingBox && !safariIsFirstItem) {\n const currentRowIndexItem = vi.rContainer.querySelector(\n `[data-index='${vi.pInfo.currentRowIndex}']`\n );\n if (currentRowIndexItem) {\n // scrollNodeTopChange - change in scroll while pagination is in progress.\n const scrollNodeTopChange = vi.pInfo.bufferNewCords.top - vi.pInfo.bufferOldCords.top;\n const newItemBoundingBox = currentRowIndexItem.getBoundingClientRect();\n const top = newItemBoundingBox.y - existingItemBoundingBox.y - scrollNodeTopChange;\n effectiveTop = existingTop - top;\n }\n }\n // As of now, we are making top to zero if it goes in negative, which is not right way.\n // -ve is possible value for it as scroll top is just approximation. Check when\n // gallery view gives you 0 to index result after some scroll.\n // scroll top is 0 as it is top row index based.\n // TODO: can go negative as bottom to top paint strategy is pending.\n // This check and expression is not required after that. This will be handled in next release.\n // Gallery issue wil also be handled in that. As of for first attempt we have to either scroll more.\n // or make buffer size more in that to avoid 0 to index number in next repaint.\n if (effectiveTop < 0 && vi.pInfo.view.startIndex === 0) effectiveTop = 0;\n if (effectiveTop !== existingTop) vi.rContainer.style.top = `${effectiveTop}px`;\n}\n\nexport function updateRowContainerTop(\n vi: {\n rContainer: HTMLDivElement;\n pInfo: {\n view: { startIndex: number; endIndex: number };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n existingItemBoundingBox: { y: number };\n currentRowIndex: number;\n bufferNewCords: { top: number };\n bufferOldCords: { top: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n totalRecordCount: number,\n state: { [key: string]: any },\n pContainer: HTMLDivElement,\n scrollTop: number\n) {\n // if you get last record , put row container to bottom always to Avoid\n // any space left because of estimation otherwise calculate top.\n // if next rerender you get less records,\n if (\n (vi.pInfo?.view?.startIndex === 0 && vi.pInfo?.view?.endIndex < totalRecordCount) ||\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.startIndex + 1 > totalRecordCount ||\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.endIndex - vi.pInfo?.view?.startIndex >= totalRecordCount\n ) {\n // This is a case when you scroll to top or say after filter your items count reduce to such level\n // it doesn't fit in current start and end index and put container top and fill view\n // will consider if empty.\n vi.rContainer.style.removeProperty('bottom');\n vi.rContainer.style.top = '0px';\n // Any action which makes indexes out of range to total record count,\n // scroll to top as a default behavior.\n if (vi.pInfo.view.startIndex + 1 > totalRecordCount) pContainer.scrollTop = 0;\n\n // commenting below line as it can cause white space on top sometime.\n // Commenting this line might cause a small flicker only when you reach at top.\n // We will solve this in 8.6 release.\n // else if (vi.pInfo?.topRowIndex > 0) adjustTopRowContainerToAvoidDrift(vi, 0);\n } else if (\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.endIndex + 1 >= totalRecordCount &&\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.startIndex + 1 <= totalRecordCount\n ) {\n vi.rContainer.style.removeProperty('top');\n vi.rContainer.style.bottom = '0px';\n } else {\n vi.rContainer.style.removeProperty('bottom');\n const top = calculateTop(vi, scrollTop);\n vi.rContainer.style.top = `${top}px`;\n adjustTopRowContainerToAvoidDrift(vi, top);\n }\n}\n\n// index attrs required to estimate next set.\nexport function setAttributesOnItems(\n state: { startIndex: number; endIndex: number },\n rContainer: HTMLElement\n) {\n rContainer.childNodes.forEach((r, index) => {\n (r as HTMLElement).setAttribute('data-index', `${state.startIndex + index}`);\n });\n}\n\nexport function getPContainerClientWidth(pContainer: HTMLElement) {\n if (!pContainer) return;\n\n const { width: pContainerWidth } = pContainer.getBoundingClientRect();\n\n let pContainerClientWidth = Math.floor(pContainerWidth);\n if (pContainer.offsetWidth > pContainer.clientWidth) {\n pContainerClientWidth -= getScrollbarWidth();\n }\n return pContainerClientWidth;\n}\n\nexport function getValueWithUnit(\n value: string | number | undefined,\n defaultValue: string | number\n): string | number {\n if (!value) return defaultValue;\n if (!value.toString().includes('px') && !value.toString().includes('%')) {\n return `${value}px`;\n }\n return `${value}`;\n}\n\nexport function getMaxHeight(viewMaxHeight: number | string | undefined): string {\n if (!viewMaxHeight) return 'none';\n return typeof viewMaxHeight === 'number' ? `${viewMaxHeight}px` : viewMaxHeight;\n}\n"]}
1
+ {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../../Core/Components/Virtualise/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAA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QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;AAClF,CAAC","sourcesContent":["import { getScrollbarWidth } from 'pega-repeating-structures-core';\n\nimport { StickyGroupHeader } from './Pagination';\n\n// TODO: in future, take this count in meta\nconst MAX_SCROLLABLE_ROW_COUNT = 5000;\n\nexport function getRecordCountForLayoutPaint(totalRecordCount: number) {\n return totalRecordCount > MAX_SCROLLABLE_ROW_COUNT ? MAX_SCROLLABLE_ROW_COUNT : totalRecordCount;\n}\n\n// State should be communicated back from consumer to know\n// if pagination last request completed or not.\nexport function isPaginationRequestCompleted(\n requestedIndexes?: { startIndex: number; endIndex: number },\n receivedIndexes?: { startIndex: number; endIndex: number }\n) {\n // this is required when there is a pagination request which is raised just to update consumer\n // about updated index though pagination is really not required.\n return (\n receivedIndexes &&\n requestedIndexes &&\n ((receivedIndexes.startIndex === requestedIndexes.startIndex &&\n receivedIndexes.endIndex === requestedIndexes.endIndex) ||\n (Object.keys(requestedIndexes).length === 0 && receivedIndexes.endIndex))\n );\n}\n\nexport function isViewNotFilled(\n totalRecordCount: number,\n vi: { rContainer: HTMLDivElement },\n pContainer: HTMLDivElement,\n renderHeader: boolean\n) {\n const parentContainerPosition = pContainer.getBoundingClientRect();\n // This is required to accommodate header height.\n // TODO: Need to find a better solution to pull out header out of this.\n const headerRowHeight =\n renderHeader && pContainer.childElementCount > 1\n ? (pContainer.childNodes[0] as HTMLElement).offsetHeight\n : 0;\n const scrollbarWidth = getScrollbarWidth();\n return (\n totalRecordCount &&\n vi.rContainer.childElementCount !== totalRecordCount &&\n (Math.floor(vi.rContainer.getBoundingClientRect().bottom) <\n Math.floor(parentContainerPosition.bottom - scrollbarWidth) ||\n Math.floor(vi.rContainer.getBoundingClientRect().top) >\n Math.floor(parentContainerPosition.top + headerRowHeight) ||\n vi.rContainer.childElementCount === 0)\n );\n}\n\nfunction getItemCountPerRow(rows: Element[]) {\n const itemsCountPerRow: {\n [key: string]: { count: number; height: number; isStickyGroupHeader: boolean };\n } = {};\n rows.forEach(item => {\n const itemBoundary = item.getBoundingClientRect();\n // isStickyGroupHeader flag helps in including the overlapped sticky-group-header for getting correct averages\n const isStickyGroupHeader = item.classList.contains(StickyGroupHeader);\n if (itemsCountPerRow[itemBoundary.top]) {\n itemsCountPerRow[itemBoundary.top].count += 1;\n if (itemsCountPerRow[itemBoundary.top].height < itemBoundary.height) {\n itemsCountPerRow[itemBoundary.top].height = itemBoundary.height;\n }\n } else {\n itemsCountPerRow[itemBoundary.top] = {\n count: 1,\n height: itemBoundary.height,\n isStickyGroupHeader\n };\n }\n });\n return itemsCountPerRow;\n}\n\n// Based on row container size, get estimated count,\n// average height and no of items in a row.\nexport function getCurrentEstimation(rContainer: HTMLDivElement, includeRowsOnly = false) {\n const rContainerChildren = Array.from(rContainer.children || []);\n const filteredRowsContainer = includeRowsOnly\n ? rContainerChildren.filter(r => r.hasAttribute('data-key'))\n : rContainerChildren;\n\n const itemsCountPerRow = getItemCountPerRow(filteredRowsContainer);\n const itemCount = filteredRowsContainer.length || 0;\n // TODO FIXME: #virtualizer Remove dependency on sticky-group-header class and try to make the key of ItemsCountPerRow unique which will work for overlapping scenarios\n // BUG-740809 handling the rowCount in case of overlapped sticky-group-header\n // If we have sticky-group-headers, add overlapped sticky-group-headers to rowCount.\n // So, that averageNumberOfItemsInARow will be 1 for grid. That's why adding the complete count.\n const rowCount = Object.values(itemsCountPerRow).reduce(\n (acc: number, o: { isStickyGroupHeader: boolean; count: number }) => {\n if (o.isStickyGroupHeader) {\n return acc + o.count;\n }\n return acc + 1;\n },\n 0\n );\n const averageNumberOfItemsInARow = rowCount > 0 ? itemCount / rowCount : 0;\n const height = Object.values(itemsCountPerRow).reduce(\n (acc: number, o: { isStickyGroupHeader: boolean; height: number; count: number }) => {\n if (o.isStickyGroupHeader) {\n return acc + o.height * o.count;\n }\n return acc + o.height;\n },\n 0\n );\n const averageRowHeight = rowCount > 0 ? height / rowCount : 0;\n const rowContainerHeight = rContainer.offsetHeight || 0;\n return { itemCount, rowContainerHeight, averageNumberOfItemsInARow, averageRowHeight };\n}\n\n// Calculate top which needs to set on row container when component rerender.\n// component can rerender many times though pagination is in progress.\nfunction calculateTop(\n vi: {\n rContainer: HTMLDivElement;\n pInfo?: {\n view?: { startIndex: number; endIndex: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n scrollTop: number\n) {\n let top = 0;\n if (vi.pInfo && vi.pInfo?.view?.startIndex !== 0) {\n // slide row container for current view based on previous estimated value.\n const estimatedNoOfItemsPushedUp =\n scrollTop * (vi.currentEstimation.itemCount / vi.currentEstimation.rowContainerHeight);\n // estimated start view index of current view based on scroll top.\n\n const estimatedStartIndexInView = estimatedNoOfItemsPushedUp + 1;\n // estimated number of buffer records.\n\n const noOfBufferRecords = estimatedStartIndexInView - (vi.pInfo?.view?.startIndex ?? 0);\n const noOfBufferRecordsHeight =\n (noOfBufferRecords / vi.currentEstimation.averageNumberOfItemsInARow) *\n vi.currentEstimation.averageRowHeight;\n // calculated top of row container.\n top = scrollTop - noOfBufferRecordsHeight;\n if (top < 0) top = 0;\n }\n return top;\n}\n\nfunction adjustTopRowContainerToAvoidDrift(\n vi: {\n rContainer: HTMLDivElement;\n pInfo: {\n view: { startIndex: number; endIndex: number };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n existingItemBoundingBox: { y: number };\n currentRowIndex: number;\n bufferNewCords: { top: number };\n bufferOldCords: { top: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n existingTop: number\n) {\n // Adjust top if element was viewable when user stop scrolling and pagination trigger.\n // existing item should be viewable are at time of calculation\n // as we allow user to scroll even pagination request triggered.\n let effectiveTop = existingTop;\n const { existingItemBoundingBox, currentRowIndex } = vi.pInfo;\n // As safari does elastic scroll, we need this check to avoid any space on top.\n const safariIsFirstItem = currentRowIndex === 0;\n if (existingItemBoundingBox && !safariIsFirstItem) {\n const currentRowIndexItem = vi.rContainer.querySelector(\n `[data-index='${vi.pInfo.currentRowIndex}']`\n );\n if (currentRowIndexItem) {\n // scrollNodeTopChange - change in scroll while pagination is in progress.\n const scrollNodeTopChange = vi.pInfo.bufferNewCords.top - vi.pInfo.bufferOldCords.top;\n const newItemBoundingBox = currentRowIndexItem.getBoundingClientRect();\n const top = newItemBoundingBox.y - existingItemBoundingBox.y - scrollNodeTopChange;\n effectiveTop = existingTop - top;\n }\n }\n // As of now, we are making top to zero if it goes in negative, which is not right way.\n // -ve is possible value for it as scroll top is just approximation. Check when\n // gallery view gives you 0 to index result after some scroll.\n // scroll top is 0 as it is top row index based.\n // TODO: can go negative as bottom to top paint strategy is pending.\n // This check and expression is not required after that. This will be handled in next release.\n // Gallery issue wil also be handled in that. As of for first attempt we have to either scroll more.\n // or make buffer size more in that to avoid 0 to index number in next repaint.\n if (effectiveTop < 0 && vi.pInfo.view.startIndex === 0) effectiveTop = 0;\n if (effectiveTop !== existingTop) vi.rContainer.style.top = `${effectiveTop}px`;\n}\n\nexport function updateRowContainerTop(\n vi: {\n rContainer: HTMLDivElement;\n pInfo: {\n view: { startIndex: number; endIndex: number };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n existingItemBoundingBox: { y: number };\n currentRowIndex: number;\n bufferNewCords: { top: number };\n bufferOldCords: { top: number };\n };\n currentEstimation: {\n itemCount: number;\n rowContainerHeight: number;\n averageNumberOfItemsInARow: number;\n averageRowHeight: number;\n };\n },\n totalRecordCount: number,\n state: { [key: string]: any },\n pContainer: HTMLDivElement,\n scrollTop: number\n) {\n // if you get last record , put row container to bottom always to Avoid\n // any space left because of estimation otherwise calculate top.\n // if next rerender you get less records,\n if (\n (vi.pInfo?.view?.startIndex === 0 && vi.pInfo?.view?.endIndex < totalRecordCount) ||\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.startIndex + 1 > totalRecordCount ||\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.endIndex - vi.pInfo?.view?.startIndex >= totalRecordCount\n ) {\n // This is a case when you scroll to top or say after filter your items count reduce to such level\n // it doesn't fit in current start and end index and put container top and fill view\n // will consider if empty.\n vi.rContainer.style.removeProperty('bottom');\n vi.rContainer.style.top = '0px';\n // Any action which makes indexes out of range to total record count,\n // scroll to top as a default behavior.\n if (vi.pInfo.view.startIndex + 1 > totalRecordCount) pContainer.scrollTop = 0;\n\n // commenting below line as it can cause white space on top sometime.\n // Commenting this line might cause a small flicker only when you reach at top.\n // We will solve this in 8.6 release.\n // else if (vi.pInfo?.topRowIndex > 0) adjustTopRowContainerToAvoidDrift(vi, 0);\n } else if (\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.endIndex + 1 >= totalRecordCount &&\n // eslint-disable-next-line no-unsafe-optional-chaining\n vi.pInfo?.view?.startIndex + 1 <= totalRecordCount\n ) {\n vi.rContainer.style.removeProperty('top');\n vi.rContainer.style.bottom = '0px';\n } else {\n vi.rContainer.style.removeProperty('bottom');\n const top = calculateTop(vi, scrollTop);\n vi.rContainer.style.top = `${top}px`;\n adjustTopRowContainerToAvoidDrift(vi, top);\n }\n}\n\n// index attrs required to estimate next set.\nexport function setAttributesOnItems(\n state: { startIndex: number; endIndex: number },\n rContainer: HTMLElement\n) {\n rContainer.childNodes.forEach((r, index) => {\n (r as HTMLElement).setAttribute('data-index', `${state.startIndex + index}`);\n });\n}\n\nexport function getPContainerClientWidth(pContainer: HTMLElement) {\n if (!pContainer) return;\n\n const { width: pContainerWidth } = pContainer.getBoundingClientRect();\n\n let pContainerClientWidth = Math.floor(pContainerWidth);\n if (pContainer.offsetWidth > pContainer.clientWidth) {\n pContainerClientWidth -= getScrollbarWidth();\n }\n return pContainerClientWidth;\n}\n\nexport function getValueWithUnit(\n value: string | number | undefined,\n defaultValue: string | number\n): string | number {\n if (!value) return defaultValue;\n if (!value.toString().includes('px') && !value.toString().includes('%')) {\n return `${value}px`;\n }\n return `${value}`;\n}\n\nexport function getMaxHeight(viewMaxHeight: number | string | undefined): string {\n if (!viewMaxHeight) return 'none';\n return typeof viewMaxHeight === 'number' ? `${viewMaxHeight}px` : viewMaxHeight;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { RsCoreTypes } from 'pega-repeating-structures-core';
2
+ interface WarningBannerProps {
3
+ warningMessages?: RsCoreTypes.WarningDetail[];
4
+ }
5
+ /**
6
+ * WarningBanner displays API warnings at the top of the table.
7
+ * Uses cosmos-core Banner component for consistent styling and accessibility.
8
+ */
9
+ export default function WarningBanner({ warningMessages }: WarningBannerProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=WarningBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WarningBanner.d.ts","sourceRoot":"","sources":["../../../Core/Components/WarningBanner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAWlE,UAAU,kBAAkB;IAC1B,eAAe,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,CAAC;CAC/C;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,eAAe,EAAE,EAAE,kBAAkB,kDAa5E"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled, { css } from 'styled-components';
3
+ import { Banner, defaultThemeProp } from '@pega/cosmos-react-core';
4
+ const StyledBanner = styled(Banner)(({ theme }) => {
5
+ return css `
6
+ margin-block-end: calc(${theme.base.spacing} / 2);
7
+ flex-shrink: 0;
8
+ `;
9
+ });
10
+ StyledBanner.defaultProps = defaultThemeProp;
11
+ /**
12
+ * WarningBanner displays API warnings at the top of the table.
13
+ * Uses cosmos-core Banner component for consistent styling and accessibility.
14
+ */
15
+ export default function WarningBanner({ warningMessages }) {
16
+ if (!warningMessages?.length) {
17
+ return null;
18
+ }
19
+ return (_jsx(StyledBanner, { variant: 'warning', messages: warningMessages.map(warning => ({
20
+ label: warning.message || ''
21
+ })) }));
22
+ }
23
+ //# sourceMappingURL=WarningBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WarningBanner.js","sourceRoot":"","sources":["../../../Core/Components/WarningBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAChD,OAAO,GAAG,CAAA;6BACiB,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAM7C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,eAAe,EAAsB;IAC3E,IAAI,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACxC,KAAK,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;SAC7B,CAAC,CAAC,GACH,CACH,CAAC;AACJ,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { Banner, defaultThemeProp } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nconst StyledBanner = styled(Banner)(({ theme }) => {\n return css`\n margin-block-end: calc(${theme.base.spacing} / 2);\n flex-shrink: 0;\n `;\n});\n\nStyledBanner.defaultProps = defaultThemeProp;\n\ninterface WarningBannerProps {\n warningMessages?: RsCoreTypes.WarningDetail[];\n}\n\n/**\n * WarningBanner displays API warnings at the top of the table.\n * Uses cosmos-core Banner component for consistent styling and accessibility.\n */\nexport default function WarningBanner({ warningMessages }: WarningBannerProps) {\n if (!warningMessages?.length) {\n return null;\n }\n\n return (\n <StyledBanner\n variant='warning'\n messages={warningMessages.map(warning => ({\n label: warning.message || ''\n }))}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.jsx"],"names":[],"mappings":";AA4BA;;4CAyFC;;;;;;;;sBArHqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.jsx"],"names":[],"mappings":";AA6BA;;4CA0FC;;;;;;;;sBAvHqB,YAAY"}
@@ -15,6 +15,7 @@ import RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y
15
15
  import useTranslate from '../../Hooks/useTranslate';
16
16
  import RsCardWrapper from '../RsCardWrapper';
17
17
  import { generateRSDataContainerHeightStyles } from '../../Utils/styles';
18
+ import WarningBanner from '../../Components/WarningBanner';
18
19
  import StyledGalleryContainer from './StyledGalleryContainer';
19
20
  import ItemWrapper from './ItemWrapper';
20
21
  import GalleryA11y from './GalleryA11y';
@@ -56,7 +57,7 @@ function Gallery({ view }) {
56
57
  const keyDownHandler = useCallback(e => {
57
58
  a11yRef.current.a11yHandler(e);
58
59
  }, [a11yRef]);
59
- return (_jsx(RsCardWrapper, { children: _jsxs(StyledGalleryContainer, { className: 'rv-gallery', "data-test-id": 'Gallery', view: view, isFullscreen: isFullscreen, children: [_jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsx(RepeatingStructureA11y, { view: view, a11yRef: a11yRef, children: _jsxs(StyledGVirtualizeContainer, { ref: containerRef, onKeyDown: keyDownHandler, className: 'container', children: [_jsx(Virtualiser, { id: 'rootVirtualiser', rowContainerClass: 'grid-container card-item-grid-container', view: view, children: rows &&
60
+ return (_jsx(RsCardWrapper, { children: _jsxs(StyledGalleryContainer, { className: 'rv-gallery', "data-test-id": 'Gallery', view: view, isFullscreen: isFullscreen, children: [_jsx(WarningBanner, { warningMessages: view.warningMessages }), _jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsx(RepeatingStructureA11y, { view: view, a11yRef: a11yRef, children: _jsxs(StyledGVirtualizeContainer, { ref: containerRef, onKeyDown: keyDownHandler, className: 'container', children: [_jsx(Virtualiser, { id: 'rootVirtualiser', rowContainerClass: 'grid-container card-item-grid-container', view: view, children: rows &&
60
61
  rows.map(row => (_jsx(ItemWrapper, { ...row.getUIProps(), children: resolveViewComponent('CardItemRenderer', renderFactory, {
61
62
  row,
62
63
  headerColumn,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACj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IAAI,EAAE,OAAO,EAAE,OAAO,YAClD,MAAC,0BAA0B,IACzB,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAC,WAAW,aAErB,KAAC,WAAW,IACV,EAAE,EAAC,iBAAiB,EACpB,iBAAiB,EAAC,yCAAyC,EAC3D,IAAI,EAAE,IAAI,YAET,IAAI;oCACH,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACd,KAAC,WAAW,OAAwB,GAAG,CAAC,UAAU,EAAE,YACjD,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,EAAE;4CACvD,GAAG;4CACH,YAAY;4CACZ,mBAAmB;4CACnB,eAAe;4CACf,mBAAmB;4CACnB,GAAG,UAAU,EAAE;yCAChB,CAAC,IARc,GAAG,CAAC,QAAQ,CAShB,CACf,CAAC,GACQ,EACd,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,EAC7B,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,EACjE,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,IACH,GACN,IACF,GACX,CACjB,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,SAAS,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useRef, useEffect } from 'react';\nimport styled from 'styled-components';\n\nimport { useFullscreenContext } from '@pega/cosmos-react-core';\n\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport EmptyContainer from '../../Components/EmptyContainer';\nimport GalleryFooter from '../../Components/Footer';\nimport Virtualiser from '../Table/VirtualizeWrapper';\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport { resolveViewComponent } from '../../Components/RenderingEngine/ComponentResolverFactory';\nimport RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';\nimport useTranslate from '../../Hooks/useTranslate';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles } from '../../Utils/styles';\n\nimport StyledGalleryContainer from './StyledGalleryContainer';\nimport ItemWrapper from './ItemWrapper';\nimport GalleryA11y from './GalleryA11y';\n\nconst StyledGVirtualizeContainer = styled.div`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n`;\n\nfunction Gallery({ view }) {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const { rows, columns = [], meta, renderFactory, getContext } = view;\n const { cardHeader, secondaryText } = meta;\n const headerColumn = columns.find(({ field }) => field.name === cardHeader?.name);\n const secondaryTextColumn = columns.find(({ field }) => field.name === secondaryText?.name);\n const filteredColumns = columns.filter(c => c.field.name !== 'RowActionMenu');\n const rowActionMenuColumn = columns.find(c => c.field.name === 'RowActionMenu');\n const containerRef = useRef(null);\n const [translate] = useTranslate();\n const a11yRef = useRef(\n new GalleryA11y(\n {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.tile',\n parentElementSelector: '.grid-container'\n },\n // TODO: consider additional focusbales: input elements, checkbox, radios, etc...\n [`button[aria-label^=${translate('Actions')}]`],\n {\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n null\n )\n );\n\n useEffect(() => {\n a11yRef.current.setContainer(containerRef.current);\n return () => {\n containerRef.current = null;\n a11yRef.current = null;\n };\n }, [a11yRef, containerRef]);\n\n const keyDownHandler = useCallback(\n e => {\n a11yRef.current.a11yHandler(e);\n },\n [a11yRef]\n );\n\n return (\n <RsCardWrapper>\n <StyledGalleryContainer\n className='rv-gallery'\n data-test-id='Gallery'\n view={view}\n isFullscreen={isFullscreen}\n >\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n <RepeatingStructureA11y view={view} a11yRef={a11yRef}>\n <StyledGVirtualizeContainer\n ref={containerRef}\n onKeyDown={keyDownHandler}\n className='container'\n >\n <Virtualiser\n id='rootVirtualiser'\n rowContainerClass='grid-container card-item-grid-container'\n view={view}\n >\n {rows &&\n rows.map(row => (\n <ItemWrapper key={row.reactKey} {...row.getUIProps()}>\n {resolveViewComponent('CardItemRenderer', renderFactory, {\n row,\n headerColumn,\n secondaryTextColumn,\n filteredColumns,\n rowActionMenuColumn,\n ...getContext()\n })}\n </ItemWrapper>\n ))}\n </Virtualiser>\n <GalleryFooter view={view} />\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n <EmptyContainer view={view} />\n </StyledGVirtualizeContainer>\n </RepeatingStructureA11y>\n </StyledGalleryContainer>\n </RsCardWrapper>\n );\n}\n\nGallery.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default Gallery;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACjG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U,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,GAAI,EAClD,KAAC,sBAAsB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,YAClD,MAAC,0BAA0B,IACzB,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAC,WAAW,aAErB,KAAC,WAAW,IACV,EAAE,EAAC,iBAAiB,EACpB,iBAAiB,EAAC,yCAAyC,EAC3D,IAAI,EAAE,IAAI,YAET,IAAI;oCACH,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACd,KAAC,WAAW,OAAwB,GAAG,CAAC,UAAU,EAAE,YACjD,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,EAAE;4CACvD,GAAG;4CACH,YAAY;4CACZ,mBAAmB;4CACnB,eAAe;4CACf,mBAAmB;4CACnB,GAAG,UAAU,EAAE;yCAChB,CAAC,IARc,GAAG,CAAC,QAAQ,CAShB,CACf,CAAC,GACQ,EACd,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,EAC7B,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,EACjE,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,IACH,GACN,IACF,GACX,CACjB,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,SAAS,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useRef, useEffect } from 'react';\nimport styled from 'styled-components';\n\nimport { useFullscreenContext } from '@pega/cosmos-react-core';\n\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport EmptyContainer from '../../Components/EmptyContainer';\nimport GalleryFooter from '../../Components/Footer';\nimport Virtualiser from '../Table/VirtualizeWrapper';\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport { resolveViewComponent } from '../../Components/RenderingEngine/ComponentResolverFactory';\nimport RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';\nimport useTranslate from '../../Hooks/useTranslate';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles } from '../../Utils/styles';\nimport WarningBanner from '../../Components/WarningBanner';\n\nimport StyledGalleryContainer from './StyledGalleryContainer';\nimport ItemWrapper from './ItemWrapper';\nimport GalleryA11y from './GalleryA11y';\n\nconst StyledGVirtualizeContainer = styled.div`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n`;\n\nfunction Gallery({ view }) {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const { rows, columns = [], meta, renderFactory, getContext } = view;\n const { cardHeader, secondaryText } = meta;\n const headerColumn = columns.find(({ field }) => field.name === cardHeader?.name);\n const secondaryTextColumn = columns.find(({ field }) => field.name === secondaryText?.name);\n const filteredColumns = columns.filter(c => c.field.name !== 'RowActionMenu');\n const rowActionMenuColumn = columns.find(c => c.field.name === 'RowActionMenu');\n const containerRef = useRef(null);\n const [translate] = useTranslate();\n const a11yRef = useRef(\n new GalleryA11y(\n {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.tile',\n parentElementSelector: '.grid-container'\n },\n // TODO: consider additional focusbales: input elements, checkbox, radios, etc...\n [`button[aria-label^=${translate('Actions')}]`],\n {\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n null\n )\n );\n\n useEffect(() => {\n a11yRef.current.setContainer(containerRef.current);\n return () => {\n containerRef.current = null;\n a11yRef.current = null;\n };\n }, [a11yRef, containerRef]);\n\n const keyDownHandler = useCallback(\n e => {\n a11yRef.current.a11yHandler(e);\n },\n [a11yRef]\n );\n\n return (\n <RsCardWrapper>\n <StyledGalleryContainer\n className='rv-gallery'\n data-test-id='Gallery'\n view={view}\n isFullscreen={isFullscreen}\n >\n <WarningBanner warningMessages={view.warningMessages} />\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n <RepeatingStructureA11y view={view} a11yRef={a11yRef}>\n <StyledGVirtualizeContainer\n ref={containerRef}\n onKeyDown={keyDownHandler}\n className='container'\n >\n <Virtualiser\n id='rootVirtualiser'\n rowContainerClass='grid-container card-item-grid-container'\n view={view}\n >\n {rows &&\n rows.map(row => (\n <ItemWrapper key={row.reactKey} {...row.getUIProps()}>\n {resolveViewComponent('CardItemRenderer', renderFactory, {\n row,\n headerColumn,\n secondaryTextColumn,\n filteredColumns,\n rowActionMenuColumn,\n ...getContext()\n })}\n </ItemWrapper>\n ))}\n </Virtualiser>\n <GalleryFooter view={view} />\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n <EmptyContainer view={view} />\n </StyledGVirtualizeContainer>\n </RepeatingStructureA11y>\n </StyledGalleryContainer>\n </RsCardWrapper>\n );\n}\n\nGallery.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default Gallery;\n"]}
@@ -1,9 +1,10 @@
1
1
  declare const _default: import("react").MemoExoticComponent<typeof Row>;
2
2
  export default _default;
3
- declare function Row({ row, columns, level }: {
3
+ declare function Row({ row, columns, level, dataIndex }: {
4
4
  row: any;
5
5
  columns: any;
6
6
  level?: number | undefined;
7
+ dataIndex: any;
7
8
  }): import("react/jsx-runtime").JSX.Element;
8
9
  declare namespace Row {
9
10
  namespace propTypes {
@@ -12,6 +13,7 @@ declare namespace Row {
12
13
  [x: string]: any;
13
14
  }>;
14
15
  let level: PropTypes.Requireable<number>;
16
+ let dataIndex: PropTypes.Requireable<number>;
15
17
  }
16
18
  }
17
19
  import PropTypes from 'prop-types';
@@ -1 +1 @@
1
- {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/Row.jsx"],"names":[],"mappings":";;AAKA;;;;4CAYC;;;;;;;;;;sBAjBqB,YAAY"}
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/Row.jsx"],"names":[],"mappings":";;AAKA;;;;;4CAcC;;;;;;;;;;;sBAnBqB,YAAY"}
@@ -2,8 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import PropTypes from 'prop-types';
3
3
  import { memo } from 'react';
4
4
  import CellWrapper from './CellWrapper';
5
- function Row({ row, columns, level = 0 }) {
6
- return (_jsx("div", { ...row.getUIProps(), children: [...columns]
5
+ function Row({ row, columns, level = 0, dataIndex }) {
6
+ const uiProps = { ...row.getUIProps(), ...(dataIndex >= 0 ? { 'data-index': dataIndex } : {}) };
7
+ return (_jsx("div", { ...uiProps, children: [...columns]
7
8
  .sort((colA, colB) => colA.order - colB.order)
8
9
  .map(column => {
9
10
  column.setExecutionContext(row);
@@ -15,7 +16,8 @@ function Row({ row, columns, level = 0 }) {
15
16
  Row.propTypes = {
16
17
  columns: PropTypes.arrayOf(PropTypes.any),
17
18
  row: PropTypes.objectOf(PropTypes.any),
18
- level: PropTypes.number
19
+ level: PropTypes.number,
20
+ dataIndex: PropTypes.number
19
21
  };
20
22
  export default memo(Row);
21
23
  //# sourceMappingURL=Row.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../../Core/Views/Table/Row.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,SAAS,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE;IACtC,OAAO,CACL,iBAAS,GAAG,CAAC,UAAU,EAAE,YACtB,CAAC,GAAG,OAAO,CAAC;aACV,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;aAC7C,GAAG,CAAC,MAAM,CAAC,EAAE;YACZ,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,MAAM,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC/B,OAAO,KAAC,WAAW,IAAuB,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAvD,MAAM,CAAC,KAAK,CAAC,EAAE,CAA4C,CAAC;QACvF,CAAC,CAAC,GACA,CACP,CAAC;AACJ,CAAC;AAED,GAAG,CAAC,SAAS,GAAG;IACd,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,GAAG,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACtC,KAAK,EAAE,SAAS,CAAC,MAAM;CACxB,CAAC;AAEF,eAAe,IAAI,CAAC,GAAG,CAAC,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { memo } from 'react';\n\nimport CellWrapper from './CellWrapper';\n\nfunction Row({ row, columns, level = 0 }) {\n return (\n <div {...row.getUIProps()}>\n {[...columns]\n .sort((colA, colB) => colA.order - colB.order)\n .map(column => {\n column.setExecutionContext(row);\n if (column.hidden) return null;\n return <CellWrapper key={column.field.id} row={row} column={column} level={level} />;\n })}\n </div>\n );\n}\n\nRow.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any),\n row: PropTypes.objectOf(PropTypes.any),\n level: PropTypes.number\n};\n\nexport default memo(Row);\n"]}
1
+ {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../../Core/Views/Table/Row.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,SAAS,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE;IACjD,MAAM,OAAO,GAAG,EAAE,GAAG,GAAG,CAAC,UAAU,EAAE,EAAE,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAEhG,OAAO,CACL,iBAAS,OAAO,YACb,CAAC,GAAG,OAAO,CAAC;aACV,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;aAC7C,GAAG,CAAC,MAAM,CAAC,EAAE;YACZ,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,MAAM,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC/B,OAAO,KAAC,WAAW,IAAuB,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAvD,MAAM,CAAC,KAAK,CAAC,EAAE,CAA4C,CAAC;QACvF,CAAC,CAAC,GACA,CACP,CAAC;AACJ,CAAC;AAED,GAAG,CAAC,SAAS,GAAG;IACd,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,GAAG,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACtC,KAAK,EAAE,SAAS,CAAC,MAAM;IACvB,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B,CAAC;AAEF,eAAe,IAAI,CAAC,GAAG,CAAC,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { memo } from 'react';\n\nimport CellWrapper from './CellWrapper';\n\nfunction Row({ row, columns, level = 0, dataIndex }) {\n const uiProps = { ...row.getUIProps(), ...(dataIndex >= 0 ? { 'data-index': dataIndex } : {}) };\n\n return (\n <div {...uiProps}>\n {[...columns]\n .sort((colA, colB) => colA.order - colB.order)\n .map(column => {\n column.setExecutionContext(row);\n if (column.hidden) return null;\n return <CellWrapper key={column.field.id} row={row} column={column} level={level} />;\n })}\n </div>\n );\n}\n\nRow.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any),\n row: PropTypes.objectOf(PropTypes.any),\n level: PropTypes.number,\n dataIndex: PropTypes.number\n};\n\nexport default memo(Row);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAkBA,oNAs7BG"}
1
+ {"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAkBA,oNA07BG"}
@@ -656,6 +656,10 @@ const StyledTableContainer = styled(forwardRef((props, ref) => _jsx("div", { ref
656
656
  &:not(.wrap-content-height) > .row:not(.group-header-row) {
657
657
  height: var(--data-row-height);
658
658
  }
659
+
660
+ & > .row:not(.group-header-row) {
661
+ min-width: 100%;
662
+ }
659
663
  border-end-start-radius: inherit;
660
664
  border-end-end-radius: inherit;
661
665
 
@@ -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,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,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,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;uBAKlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DtC,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 { StyledLabel, calculateFontSize, tryCatch } from '@pega/cosmos-react-core';\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 0.9,\n theme.components.table.header['foreground-color']\n );\n const oddRowBackgroundColor =\n getLuminance(theme.components.table.body['secondary-background-color']) > 0.5\n ? theme.components.table.body['secondary-background-color']\n : mix(\n 0.75,\n theme.components.table.body['background-color'],\n theme.components.table.body['secondary-background-color']\n );\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 const oddRowContrast = meetsContrastGuidelines(\n theme.components.table.body['foreground-color'],\n oddRowBackgroundColor\n ).AA;\n const useableOddRowForeground = oddRowContrast\n ? theme.components.table.body['foreground-color']\n : readableColor(theme.components.table.body['foreground-color'], oddRowBackgroundColor);\n\n return css`\n --primary-background: ${theme.base.palette['primary-background']};\n --secondary-background: ${theme.components.table.header['background-color']};\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: var(--secondary-background);\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\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 border: var(--border-style);\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\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 .fallback,\n .fallback-footer {\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n position: absolute;\n width: 100%;\n z-index: -1;\n box-sizing: var(--box-sizing);\n }\n\n .fallback {\n /* stylelint-disable unit-allowed-list */\n top: -1px;\n border-bottom: var(--border-style);\n }\n\n .fallback-footer {\n top: 0;\n border-top: var(--border-style);\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\n .cell {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n min-width: 1rem;\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 .cell.selection-border:focus,\n .cell.editable-cell:focus {\n outline: none 0;\n }\n\n .editable-cell > span {\n height: 100%;\n display: flex;\n padding: 0 6px;\n align-items: center;\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 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 transition: transform 0.5s var(--animation-ease);\n border-right: var(--border-style);\n position: relative;\n ${!theme.components.table['striped-rows'] &&\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 min-width: 32px;\n justify-content: center;\n border-left: var(--border-style);\n\n .cell-content {\n padding: 0;\n overflow: visible;\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 span {\n visibility: hidden;\n }\n }\n }\n &.aggregateCell {\n background-color: var(--header-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 ${theme.components.table['striped-rows'] &&\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 {\n &.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 border-inline-start: var(--border-style);\n }\n }\n }\n }\n\n > .cell-action {\n background-color: var(--primary-background);\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 1px 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 ${theme.components.table['striped-rows'] &&\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: var(--primary-background);\n }\n .cell-fixed.aggregateCell {\n background: var(--header-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 `}\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 margin-left: 0.312rem;\n\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 margin: 0 0 0 0.312rem;\n\n svg {\n width: 14px;\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 .editable-cell {\n padding: 0;\n border: 2px solid ${theme.base.palette.interactive} !important;\n box-shadow: 0 0 1px 1px rgba(0, 118, 209) !important;\n }\n\n .editable-cell input {\n border: none;\n outline: none;\n min-width: calc(100%);\n min-height: 0;\n max-height: 100%;\n box-shadow: none !important;\n border-radius: 0;\n }\n\n .editable-cell.align-right input {\n justify-content: right;\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-left: calc(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-right: var(--border-style);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\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 border-right: var(--border-style);\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 }\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\n > .cell-right-align {\n padding: var(--header-cell-padding);\n justify-content: end;\n\n .header-lable-container {\n flex-direction: row-reverse;\n }\n\n .sort-info-container {\n margin-left: 0;\n margin-right: 0.312rem;\n }\n }\n\n .row {\n border-bottom: none;\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 /* stylelint-enable selector-max-class */\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 .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 white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\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 /* stylelint-disable-next-line selector-max-class */\n .cell-content {\n flex-grow: unset;\n }\n }\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: pre-wrap;\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 selector-max-class */\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: pre-wrap;\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 padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\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 .selection-border {\n border: 0.125rem solid var(--medium-blue) !important;\n }\n\n .disable-select {\n user-select: none; /* supported by Chrome and Firefox */\n -webkit-user-select: none; /* Safari */\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":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Y;;;;;;QAMZ,gBAAgB,IAAI,WAAW;;;;;;;;;;;;;;;;;;;mBAmBpB,QAAQ;;;;;;;;;;;;;;;;YAgBf,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;;;;;;;;;uBASf,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;uBAKlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DtC,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 { StyledLabel, calculateFontSize, tryCatch } from '@pega/cosmos-react-core';\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 0.9,\n theme.components.table.header['foreground-color']\n );\n const oddRowBackgroundColor =\n getLuminance(theme.components.table.body['secondary-background-color']) > 0.5\n ? theme.components.table.body['secondary-background-color']\n : mix(\n 0.75,\n theme.components.table.body['background-color'],\n theme.components.table.body['secondary-background-color']\n );\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 const oddRowContrast = meetsContrastGuidelines(\n theme.components.table.body['foreground-color'],\n oddRowBackgroundColor\n ).AA;\n const useableOddRowForeground = oddRowContrast\n ? theme.components.table.body['foreground-color']\n : readableColor(theme.components.table.body['foreground-color'], oddRowBackgroundColor);\n\n return css`\n --primary-background: ${theme.base.palette['primary-background']};\n --secondary-background: ${theme.components.table.header['background-color']};\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: var(--secondary-background);\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\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 border: var(--border-style);\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\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 .fallback,\n .fallback-footer {\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n position: absolute;\n width: 100%;\n z-index: -1;\n box-sizing: var(--box-sizing);\n }\n\n .fallback {\n /* stylelint-disable unit-allowed-list */\n top: -1px;\n border-bottom: var(--border-style);\n }\n\n .fallback-footer {\n top: 0;\n border-top: var(--border-style);\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\n .cell {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n min-width: 1rem;\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 .cell.selection-border:focus,\n .cell.editable-cell:focus {\n outline: none 0;\n }\n\n .editable-cell > span {\n height: 100%;\n display: flex;\n padding: 0 6px;\n align-items: center;\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 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 transition: transform 0.5s var(--animation-ease);\n border-right: var(--border-style);\n position: relative;\n ${!theme.components.table['striped-rows'] &&\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 min-width: 32px;\n justify-content: center;\n border-left: var(--border-style);\n\n .cell-content {\n padding: 0;\n overflow: visible;\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 span {\n visibility: hidden;\n }\n }\n }\n &.aggregateCell {\n background-color: var(--header-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 ${theme.components.table['striped-rows'] &&\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 {\n &.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 border-inline-start: var(--border-style);\n }\n }\n }\n }\n\n > .cell-action {\n background-color: var(--primary-background);\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 1px 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 ${theme.components.table['striped-rows'] &&\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: var(--primary-background);\n }\n .cell-fixed.aggregateCell {\n background: var(--header-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 `}\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 margin-left: 0.312rem;\n\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 margin: 0 0 0 0.312rem;\n\n svg {\n width: 14px;\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 .editable-cell {\n padding: 0;\n border: 2px solid ${theme.base.palette.interactive} !important;\n box-shadow: 0 0 1px 1px rgba(0, 118, 209) !important;\n }\n\n .editable-cell input {\n border: none;\n outline: none;\n min-width: calc(100%);\n min-height: 0;\n max-height: 100%;\n box-shadow: none !important;\n border-radius: 0;\n }\n\n .editable-cell.align-right input {\n justify-content: right;\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-left: calc(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-right: var(--border-style);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\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 border-right: var(--border-style);\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 }\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\n > .cell-right-align {\n padding: var(--header-cell-padding);\n justify-content: end;\n\n .header-lable-container {\n flex-direction: row-reverse;\n }\n\n .sort-info-container {\n margin-left: 0;\n margin-right: 0.312rem;\n }\n }\n\n .row {\n border-bottom: none;\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 /* stylelint-enable selector-max-class */\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 .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 white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\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 /* stylelint-disable-next-line selector-max-class */\n .cell-content {\n flex-grow: unset;\n }\n }\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: pre-wrap;\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 selector-max-class */\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: pre-wrap;\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 padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\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 .selection-border {\n border: 0.125rem solid var(--medium-blue) !important;\n }\n\n .disable-select {\n user-select: none; /* supported by Chrome and Firefox */\n -webkit-user-select: none; /* Safari */\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,4 +1,4 @@
1
- declare function VirtualizeWrapper({ view, children, id, renderHeader, rowContainerClass, renderFooter, isFullscreen }: {
1
+ declare function VirtualizeWrapper({ view, children, id, renderHeader, rowContainerClass, renderFooter, isFullscreen, useVariableRowHeightVirtualization }: {
2
2
  view: any;
3
3
  children: any;
4
4
  id: any;
@@ -6,6 +6,7 @@ declare function VirtualizeWrapper({ view, children, id, renderHeader, rowContai
6
6
  rowContainerClass?: string | undefined;
7
7
  renderFooter?: null | undefined;
8
8
  isFullscreen?: boolean | undefined;
9
+ useVariableRowHeightVirtualization?: boolean | undefined;
9
10
  }): import("react/jsx-runtime").JSX.Element;
10
11
  declare namespace VirtualizeWrapper {
11
12
  namespace propTypes {
@@ -18,6 +19,7 @@ declare namespace VirtualizeWrapper {
18
19
  [x: string]: any;
19
20
  }>;
20
21
  let isFullscreen: PropTypes.Requireable<boolean>;
22
+ let useVariableRowHeightVirtualization: PropTypes.Requireable<boolean>;
21
23
  }
22
24
  }
23
25
  export default VirtualizeWrapper;
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizeWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":"AASA;;;;;;;;4CAgGC;;;;;;;;;;;;;;;sBAzGqB,YAAY"}
1
+ {"version":3,"file":"VirtualizeWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/VirtualizeWrapper.jsx"],"names":[],"mappings":"AAcA;;;;;;;;;4CAwIC;;;;;;;;;;;;;;;;sBAtJqB,YAAY"}