@pega/lists-react 10.0.0-build.4.2 → 10.0.0-build.4.20

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 (118) hide show
  1. package/README.md +284 -83
  2. package/lib/Core/Components/Card/CardFieldValue.d.ts +8 -0
  3. package/lib/Core/Components/Card/CardFieldValue.d.ts.map +1 -0
  4. package/lib/Core/Components/Card/CardFieldValue.js +8 -0
  5. package/lib/Core/Components/Card/CardFieldValue.js.map +1 -0
  6. package/lib/Core/Components/Card/CardHeader.d.ts +9 -0
  7. package/lib/Core/Components/Card/CardHeader.d.ts.map +1 -0
  8. package/lib/Core/{Views/Gallery/Components/GalleryHeader.js → Components/Card/CardHeader.js} +5 -4
  9. package/lib/Core/Components/Card/CardHeader.js.map +1 -0
  10. package/lib/Core/Components/Card/CardSubHeading.d.ts +10 -0
  11. package/lib/Core/Components/Card/CardSubHeading.d.ts.map +1 -0
  12. package/lib/Core/Components/Card/CardSubHeading.js +9 -0
  13. package/lib/Core/Components/Card/CardSubHeading.js.map +1 -0
  14. package/lib/Core/Components/Card/cardData.d.ts +48 -0
  15. package/lib/Core/Components/Card/cardData.d.ts.map +1 -0
  16. package/lib/Core/{Views/Gallery/utils.js → Components/Card/cardData.js} +55 -52
  17. package/lib/Core/Components/Card/cardData.js.map +1 -0
  18. package/lib/Core/Components/Card/hooks/useRowActions.d.ts.map +1 -0
  19. package/lib/Core/Components/Card/hooks/useRowActions.js.map +1 -0
  20. package/lib/Core/Components/Card/index.d.ts +5 -0
  21. package/lib/Core/Components/Card/index.d.ts.map +1 -0
  22. package/lib/Core/Components/Card/index.js +5 -0
  23. package/lib/Core/Components/Card/index.js.map +1 -0
  24. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +2 -1
  25. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  26. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +3 -3
  27. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  28. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
  29. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +2 -1
  30. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
  31. package/lib/Core/Components/DefaultComponents/index.d.ts +2 -1
  32. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  33. package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -1
  34. package/lib/Core/Components/GroupRenderer/index.js +7 -2
  35. package/lib/Core/Components/GroupRenderer/index.js.map +1 -1
  36. package/lib/Core/Components/RSWrapper/index.d.ts.map +1 -1
  37. package/lib/Core/Components/RSWrapper/index.js +4 -0
  38. package/lib/Core/Components/RSWrapper/index.js.map +1 -1
  39. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  40. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +5 -2
  41. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  42. package/lib/Core/Components/Toolbar/RefreshBanner.d.ts +5 -1
  43. package/lib/Core/Components/Toolbar/RefreshBanner.d.ts.map +1 -1
  44. package/lib/Core/Components/Toolbar/RefreshBanner.js +22 -6
  45. package/lib/Core/Components/Toolbar/RefreshBanner.js.map +1 -1
  46. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  47. package/lib/Core/Components/Toolbar/SimpleToolbar.js +2 -2
  48. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  49. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  50. package/lib/Core/Components/Toolbar/utils/utils.js +10 -4
  51. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  52. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +1 -1
  53. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -1
  54. package/lib/Core/Views/Gallery/Components/GalleryCard.js +8 -7
  55. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -1
  56. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -1
  57. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +3 -3
  58. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -1
  59. package/lib/Core/Views/Gallery/Gallery.types.d.ts +1 -0
  60. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -1
  61. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -1
  62. package/lib/Core/Views/Gallery/GalleryContainer.d.ts.map +1 -1
  63. package/lib/Core/Views/Gallery/GalleryContainer.js +1 -1
  64. package/lib/Core/Views/Gallery/GalleryContainer.js.map +1 -1
  65. package/lib/Core/Views/Gallery/index.d.ts +1 -1
  66. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  67. package/lib/Core/Views/Gallery/index.js +6 -9
  68. package/lib/Core/Views/Gallery/index.js.map +1 -1
  69. package/lib/Core/Views/Kanban/Kanban.styles.d.ts +13 -0
  70. package/lib/Core/Views/Kanban/Kanban.styles.d.ts.map +1 -0
  71. package/lib/Core/Views/Kanban/Kanban.styles.js +53 -0
  72. package/lib/Core/Views/Kanban/Kanban.styles.js.map +1 -0
  73. package/lib/Core/Views/Kanban/Kanban.types.d.ts +10 -0
  74. package/lib/Core/Views/Kanban/Kanban.types.d.ts.map +1 -0
  75. package/lib/Core/Views/Kanban/Kanban.types.js +2 -0
  76. package/lib/Core/Views/Kanban/Kanban.types.js.map +1 -0
  77. package/lib/Core/Views/Kanban/KanbanCard.d.ts +7 -0
  78. package/lib/Core/Views/Kanban/KanbanCard.d.ts.map +1 -0
  79. package/lib/Core/Views/Kanban/KanbanCard.js +20 -0
  80. package/lib/Core/Views/Kanban/KanbanCard.js.map +1 -0
  81. package/lib/Core/Views/Kanban/KanbanLane.d.ts +23 -0
  82. package/lib/Core/Views/Kanban/KanbanLane.d.ts.map +1 -0
  83. package/lib/Core/Views/Kanban/KanbanLane.js +21 -0
  84. package/lib/Core/Views/Kanban/KanbanLane.js.map +1 -0
  85. package/lib/Core/Views/Kanban/KanbanLaneHeader.d.ts +12 -0
  86. package/lib/Core/Views/Kanban/KanbanLaneHeader.d.ts.map +1 -0
  87. package/lib/Core/Views/Kanban/KanbanLaneHeader.js +16 -0
  88. package/lib/Core/Views/Kanban/KanbanLaneHeader.js.map +1 -0
  89. package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.d.ts +20 -0
  90. package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.d.ts.map +1 -0
  91. package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.js +37 -0
  92. package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.js.map +1 -0
  93. package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.d.ts +19 -0
  94. package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.d.ts.map +1 -0
  95. package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.js +32 -0
  96. package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.js.map +1 -0
  97. package/lib/Core/Views/Kanban/index.d.ts +9 -0
  98. package/lib/Core/Views/Kanban/index.d.ts.map +1 -0
  99. package/lib/Core/Views/Kanban/index.js +63 -0
  100. package/lib/Core/Views/Kanban/index.js.map +1 -0
  101. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +2 -2
  102. package/lib/Core/templateFeatureSupport.js +2 -2
  103. package/lib/Core/templateFeatureSupport.js.map +1 -1
  104. package/package.json +7 -7
  105. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +0 -8
  106. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +0 -1
  107. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +0 -8
  108. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +0 -1
  109. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +0 -8
  110. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +0 -1
  111. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +0 -1
  112. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +0 -1
  113. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +0 -1
  114. package/lib/Core/Views/Gallery/utils.d.ts +0 -36
  115. package/lib/Core/Views/Gallery/utils.d.ts.map +0 -1
  116. package/lib/Core/Views/Gallery/utils.js.map +0 -1
  117. /package/lib/Core/{Views/Gallery → Components/Card}/hooks/useRowActions.d.ts +0 -0
  118. /package/lib/Core/{Views/Gallery → Components/Card}/hooks/useRowActions.js +0 -0
@@ -1,15 +1,16 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
2
3
  import styled from 'styled-components';
3
- import RenderingEngine from '../../../Components/RenderingEngine/RenderCell';
4
+ import RenderingEngine from '../RenderingEngine/RenderCell';
4
5
  const StyledHeaderContainer = styled.div `
5
6
  word-break: break-word;
6
7
  `;
7
- function GalleryHeader({ headerColumn, row }) {
8
+ function CardHeader({ headerColumn, row }) {
8
9
  if (!headerColumn) {
9
10
  return null;
10
11
  }
11
12
  headerColumn?.setExecutionContext(row);
12
13
  return (_jsx(StyledHeaderContainer, { children: _jsx(RenderingEngine, { ...headerColumn.getRenderingEngineProps() }) }));
13
14
  }
14
- export default GalleryHeader;
15
- //# sourceMappingURL=GalleryHeader.js.map
15
+ export default memo(CardHeader);
16
+ //# sourceMappingURL=CardHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardHeader.js","sourceRoot":"","sources":["../../../../Core/Components/Card/CardHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAIvC,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAO5D,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEvC,CAAC;AAEF,SAAS,UAAU,CAAC,EAAE,YAAY,EAAE,GAAG,EAAmB;IACxD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAEvC,OAAO,CACL,KAAC,qBAAqB,cACpB,KAAC,eAAe,OAAK,YAAY,CAAC,uBAAuB,EAAE,GAAI,GACzC,CACzB,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { memo } from 'react';\nimport styled from 'styled-components';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport RenderingEngine from '../RenderingEngine/RenderCell';\n\ntype CardHeaderProps = {\n headerColumn?: RsCoreTypes.Column;\n row: RsCoreTypes.Row;\n};\n\nconst StyledHeaderContainer = styled.div`\n word-break: break-word;\n`;\n\nfunction CardHeader({ headerColumn, row }: CardHeaderProps) {\n if (!headerColumn) {\n return null;\n }\n\n headerColumn?.setExecutionContext(row);\n\n return (\n <StyledHeaderContainer>\n <RenderingEngine {...headerColumn.getRenderingEngineProps()} />\n </StyledHeaderContainer>\n );\n}\n\nexport default memo(CardHeader);\n"]}
@@ -0,0 +1,10 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { RsCoreTypes } from 'pega-repeating-structures-core';
3
+ interface CardSubHeadingProps {
4
+ subHeadingColumn: RsCoreTypes.Column;
5
+ row: RsCoreTypes.Row;
6
+ }
7
+ declare function CardSubHeading({ subHeadingColumn, row }: CardSubHeadingProps): ReactElement;
8
+ declare const _default: import("react").MemoExoticComponent<typeof CardSubHeading>;
9
+ export default _default;
10
+ //# sourceMappingURL=CardSubHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardSubHeading.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Card/CardSubHeading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,UAAU,mBAAmB;IAC3B,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;CACtB;AAED,iBAAS,cAAc,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,EAAE,mBAAmB,GAAG,YAAY,CAIpF;;AAED,wBAAoC"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import RenderingEngine from '../RenderingEngine/RenderCell';
4
+ function CardSubHeading({ subHeadingColumn, row }) {
5
+ subHeadingColumn.setExecutionContext(row);
6
+ return _jsx(RenderingEngine, { ...subHeadingColumn.getRenderingEngineProps() });
7
+ }
8
+ export default memo(CardSubHeading);
9
+ //# sourceMappingURL=CardSubHeading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardSubHeading.js","sourceRoot":"","sources":["../../../../Core/Components/Card/CardSubHeading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAK7B,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAO5D,SAAS,cAAc,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAuB;IACpE,gBAAgB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAE1C,OAAO,KAAC,eAAe,OAAK,gBAAgB,CAAC,uBAAuB,EAAE,GAAI,CAAC;AAC7E,CAAC;AAED,eAAe,IAAI,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { memo } from 'react';\nimport type { ReactElement } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport RenderingEngine from '../RenderingEngine/RenderCell';\n\ninterface CardSubHeadingProps {\n subHeadingColumn: RsCoreTypes.Column;\n row: RsCoreTypes.Row;\n}\n\nfunction CardSubHeading({ subHeadingColumn, row }: CardSubHeadingProps): ReactElement {\n subHeadingColumn.setExecutionContext(row);\n\n return <RenderingEngine {...subHeadingColumn.getRenderingEngineProps()} />;\n}\n\nexport default memo(CardSubHeading);\n"]}
@@ -0,0 +1,48 @@
1
+ import { type RsCoreTypes } from 'pega-repeating-structures-core';
2
+ import type { CardConfig } from 'pega-repeating-structures-core/types/Meta.types';
3
+ import type { ImageSize, SelectionCardDisplayProps } from '@pega/cosmos-react-core';
4
+ export declare const GALLERY_IMAGE_PLACEMENT_MAP: {
5
+ readonly left: "inline-start";
6
+ readonly right: "inline-end";
7
+ readonly top: "block-start";
8
+ };
9
+ export declare const DEFAULT_IMAGE_PLACEMENT: RsCoreTypes.HeroImagePlacement;
10
+ export declare const DEFAULT_IMAGE_SIZE: ImageSize;
11
+ export declare const isInlinePlacement: (placement: RsCoreTypes.HeroImagePlacement) => placement is Extract<RsCoreTypes.HeroImagePlacement, "left" | "right">;
12
+ /**
13
+ * Extracts UI-related props from a row for card components.
14
+ *
15
+ * @param props - The properties containing the row.
16
+ * @param props.row - The data row.
17
+ * @returns An object containing card-safe row metadata.
18
+ */
19
+ export declare function getCardUIProps({ row }: {
20
+ row: RsCoreTypes.Row;
21
+ }): {
22
+ 'data-key': string;
23
+ };
24
+ interface CardDataProps {
25
+ row: RsCoreTypes.Row;
26
+ visibleColumns: RsCoreTypes.Column[];
27
+ cardConfig?: Pick<CardConfig, 'heroImage' | 'tile' | 'showFieldLabels' | 'renderCardFooter'>;
28
+ headerColumn?: RsCoreTypes.Column;
29
+ subHeadingsColumns?: RsCoreTypes.Column[];
30
+ }
31
+ interface CardColumns {
32
+ visibleColumns: RsCoreTypes.Column[];
33
+ headerColumn?: RsCoreTypes.Column;
34
+ subHeadingsColumns?: RsCoreTypes.Column[];
35
+ }
36
+ /**
37
+ * Resolves the columns used to render a configured card.
38
+ */
39
+ export declare function getCardColumns(columns: RsCoreTypes.Column[], { header, subHeadings }: Pick<CardConfig, 'header' | 'subHeadings'>): CardColumns;
40
+ /**
41
+ * Generates SelectionCardDisplay data from card content configuration.
42
+ *
43
+ * @param props - Card data dependencies.
44
+ * @returns Data used to render a selection card.
45
+ */
46
+ export declare function getCardData({ row, visibleColumns, cardConfig, headerColumn, subHeadingsColumns }: CardDataProps): Pick<SelectionCardDisplayProps, 'label' | 'subheading' | 'image' | 'fields' | 'aria-label' | 'footer'>;
47
+ export {};
48
+ //# sourceMappingURL=cardData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cardData.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Card/cardData.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,KAAK,EAAkB,SAAS,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAMpG,eAAO,MAAM,2BAA2B;;;;CAImC,CAAC;AAG5E,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,kBAA2B,CAAC;AAC9E,eAAO,MAAM,kBAAkB,EAAE,SAAsB,CAAC;AAExD,eAAO,MAAM,iBAAiB,GAC5B,WAAW,WAAW,CAAC,kBAAkB,KACxC,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAEvE,CAAC;AA+BF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAA;CAAE;;EAK/D;AAED,UAAU,aAAa;IACrB,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;IACrB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;IACrC,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,GAAG,iBAAiB,GAAG,kBAAkB,CAAC,CAAC;IAC7F,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;CAC3C;AAED,UAAU,WAAW;IACnB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;IACrC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,EAC7B,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,aAAa,CAAC,GAClE,WAAW,CAab;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,cAAc,EACd,UAAU,EACV,YAAY,EACZ,kBAAkB,EACnB,EAAE,aAAa,GAAG,IAAI,CACrB,yBAAyB,EACzB,OAAO,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CACtE,CAmEA"}
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isEmpty } from 'pega-repeating-structures-core';
3
- import GalleryFieldValue from './Components/GalleryFieldValue';
4
- import GalleryHeader from './Components/GalleryHeader';
2
+ import { FieldType, isEmpty } from 'pega-repeating-structures-core';
3
+ import CardFieldValue from './CardFieldValue';
4
+ import CardHeader from './CardHeader';
5
+ import CardSubHeading from './CardSubHeading';
5
6
  export const GALLERY_IMAGE_PLACEMENT_MAP = {
6
7
  left: 'inline-start',
7
8
  right: 'inline-end',
@@ -14,18 +15,10 @@ export const isInlinePlacement = (placement) => {
14
15
  return INLINE_PLACEMENTS.includes(placement);
15
16
  };
16
17
  /**
17
- * Extracts image data from the provided metadata and row context.
18
- *
19
- * @param meta - The metadata object containing gallery configuration.
20
- * @param row - The row object providing context and data values.
21
- * @returns An object containing:
22
- * - `src`: The image source URL.
23
- * - `alt`: The alternative text for the image.
24
- * - `placement`: The placement of the image within the gallery.
25
- * - `size`: The size of the image.
18
+ * Extracts image data from a HeroImage config and row context.
26
19
  */
27
- function getImageData(meta, row) {
28
- const { galleryConfig: { heroImage: { source, altText, placement, size } = {} } = {} } = meta;
20
+ function getHeroImageData(heroImage, row) {
21
+ const { source, altText, placement, size } = heroImage;
29
22
  const rowData = row.getContext().getValue();
30
23
  let altTextValue = '';
31
24
  if (altText && 'field' in altText) {
@@ -40,33 +33,55 @@ function getImageData(meta, row) {
40
33
  return { src: imageUrl, alt: altTextValue, placement: imagePlacement, size: imageSize };
41
34
  }
42
35
  /**
43
- * Generates the data required to display a card in the gallery view.
36
+ * Extracts UI-related props from a row for card components.
44
37
  *
45
- * @param props - The properties required to generate the card data.
46
- * @param props.row - The data for the current row.
47
- * @param props.visibleColumns - The columns that are visible in the gallery.
48
- * @param props.meta - Metadata including gallery configuration.
49
- * @param props.headerColumn - The column used for the card header.
50
- * @param props.actionColumn - The column used for card actions.
51
- * @returns An object containing the card's label, image, footer, and fields to be displayed.
38
+ * @param props - The properties containing the row.
39
+ * @param props.row - The data row.
40
+ * @returns An object containing card-safe row metadata.
41
+ */
42
+ export function getCardUIProps({ row }) {
43
+ const uiProps = row.getUIProps();
44
+ return {
45
+ 'data-key': uiProps['data-key']
46
+ };
47
+ }
48
+ /**
49
+ * Resolves the columns used to render a configured card.
52
50
  */
53
- export function getCardData({ row, visibleColumns, meta, headerColumn }) {
54
- const { galleryConfig: { heroImage, tile: tileConfig, showFieldLabels = true } = {} } = meta;
55
- // Must set execution context for each column to ensure correct value retrieval
51
+ export function getCardColumns(columns, { header, subHeadings }) {
52
+ const visibleColumns = [...columns]
53
+ .filter(column => !column.hidden && column.field.type !== FieldType.ACTION_FIELD_TYPE)
54
+ .sort((first, second) => (first.order ?? 0) - (second.order ?? 0));
55
+ const headerColumn = header?.field
56
+ ? columns.find(column => column.field.id === header.field)
57
+ : undefined;
58
+ const subHeadingsColumns = subHeadings?.flatMap(({ field }) => {
59
+ const column = columns.find(candidate => candidate.field.id === field);
60
+ return column ? [column] : [];
61
+ });
62
+ return { visibleColumns, headerColumn, subHeadingsColumns };
63
+ }
64
+ /**
65
+ * Generates SelectionCardDisplay data from card content configuration.
66
+ *
67
+ * @param props - Card data dependencies.
68
+ * @returns Data used to render a selection card.
69
+ */
70
+ export function getCardData({ row, visibleColumns, cardConfig, headerColumn, subHeadingsColumns }) {
71
+ const { heroImage, tile: tileConfig, showFieldLabels = true, renderCardFooter } = cardConfig ?? {};
56
72
  visibleColumns.forEach(col => col.setExecutionContext(row));
57
73
  const rowData = row.getContext().getValue();
58
74
  const fields = visibleColumns.map(col => ({
59
75
  id: col.field.id,
60
76
  ...(showFieldLabels && { name: col.getContext()?.getLabel() }),
61
77
  ...(col.field.layoutMode && { variant: col.field.layoutMode }),
62
- // TODO: Add truncation for non-tile cards once `truncate` is typed at
63
- // the field-level API.
64
78
  ...(!heroImage && tileConfig
65
79
  ? { value: String(rowData[col.field.id] ?? ''), truncate: true }
66
- : { value: _jsx(GalleryFieldValue, { column: col, row: row }) })
80
+ : { value: _jsx(CardFieldValue, { column: col, row: row }) })
67
81
  }));
68
- const heroImageData = heroImage ? getImageData(meta, row) : undefined;
69
- let image = heroImageData;
82
+ let image = heroImage
83
+ ? getHeroImageData(heroImage, row)
84
+ : undefined;
70
85
  if (!heroImage && tileConfig) {
71
86
  const foregroundColor = tileConfig.foregroundColor.field in rowData
72
87
  ? String(rowData[tileConfig.foregroundColor.field])
@@ -81,10 +96,7 @@ export function getCardData({ row, visibleColumns, meta, headerColumn }) {
81
96
  const tileText = tileConfig.text && tileConfig.text.field in rowData
82
97
  ? String(rowData[tileConfig.text.field]) || undefined
83
98
  : undefined;
84
- const tileBase = {
85
- foregroundColor,
86
- backgroundColor
87
- };
99
+ const tileBase = { foregroundColor, backgroundColor };
88
100
  if (tileName) {
89
101
  image = { ...tileBase, icon: tileName };
90
102
  }
@@ -93,23 +105,14 @@ export function getCardData({ row, visibleColumns, meta, headerColumn }) {
93
105
  }
94
106
  }
95
107
  }
96
- const footer = meta.galleryConfig?.renderCardFooter?.(rowData) ?? null;
97
- const label = _jsx(GalleryHeader, { headerColumn: headerColumn, row: row });
108
+ const footer = renderCardFooter?.(rowData) ?? null;
109
+ const label = _jsx(CardHeader, { headerColumn: headerColumn, row: row });
110
+ const subheading = subHeadingsColumns?.map(column => (_jsx(CardSubHeading, { subHeadingColumn: column, row: row }, column.field.id)));
98
111
  const headerValue = row.getContext()?.getRowHeader()?.getValue();
99
- const ariaLabel = !isEmpty(headerValue) ? String(headerValue) : undefined;
100
- return { fields, image, footer, label, 'aria-label': ariaLabel };
101
- }
102
- /**
103
- * Extracts UI-related props from a row for card components.
104
- *
105
- * @param props - The properties containing the row.
106
- * @param props.row - The data row.
107
- * @returns An object containing card-safe row metadata.
108
- */
109
- export function getCardUIProps({ row }) {
110
- const uiProps = row.getUIProps();
111
- return {
112
- 'data-key': uiProps['data-key']
113
- };
112
+ let ariaLabel;
113
+ if (!headerColumn && !isEmpty(headerValue)) {
114
+ ariaLabel = String(headerValue);
115
+ }
116
+ return { fields, image, footer, label, subheading, 'aria-label': ariaLabel };
114
117
  }
115
- //# sourceMappingURL=utils.js.map
118
+ //# sourceMappingURL=cardData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cardData.js","sourceRoot":"","sources":["../../../../Core/Components/Card/cardData.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAoB,MAAM,gCAAgC,CAAC;AAItF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,aAAa;CACuD,CAAC;AAE5E,MAAM,iBAAiB,GAAqC,CAAC,MAAM,EAAE,OAAO,CAAU,CA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C;IAED,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;IACnD,MAAM,KAAK,GAAG,KAAC,UAAU,IAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;IACnE,MAAM,UAAU,GAAG,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACnD,KAAC,cAAc,IAAuB,gBAAgB,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAnD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAwC,CAC7E,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,EAAE,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC;IACjE,IAAI,SAA6B,CAAC;IAClC,IAAI,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3C,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAC/E,CAAC","sourcesContent":["import { FieldType, isEmpty, type RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { CardConfig } from 'pega-repeating-structures-core/types/Meta.types';\nimport type { ImagePlacement, ImageSize, SelectionCardDisplayProps } from '@pega/cosmos-react-core';\n\nimport CardFieldValue from './CardFieldValue';\nimport CardHeader from './CardHeader';\nimport CardSubHeading from './CardSubHeading';\n\nexport const GALLERY_IMAGE_PLACEMENT_MAP = {\n left: 'inline-start',\n right: 'inline-end',\n top: 'block-start'\n} as const satisfies Record<RsCoreTypes.HeroImagePlacement, ImagePlacement>;\n\nconst INLINE_PLACEMENTS: RsCoreTypes.HeroImagePlacement[] = ['left', 'right'] as const;\nexport const DEFAULT_IMAGE_PLACEMENT: RsCoreTypes.HeroImagePlacement = 'left';\nexport const DEFAULT_IMAGE_SIZE: ImageSize = 'flexible';\n\nexport const isInlinePlacement = (\n placement: RsCoreTypes.HeroImagePlacement\n): placement is Extract<RsCoreTypes.HeroImagePlacement, 'left' | 'right'> => {\n return INLINE_PLACEMENTS.includes(placement);\n};\n\n/**\n * Extracts image data from a HeroImage config and row context.\n */\nfunction getHeroImageData(\n heroImage: RsCoreTypes.HeroImage,\n row: RsCoreTypes.Row\n): {\n src: string;\n alt: string;\n placement: ImagePlacement;\n size: ImageSize;\n} {\n const { source, altText, placement, size } = heroImage;\n const rowData = row.getContext().getValue();\n\n let altTextValue = '';\n if (altText && 'field' in altText) {\n altTextValue = altText.field in rowData ? String(rowData[altText.field]) : '';\n } else if (altText && 'value' in altText) {\n altTextValue = altText.value;\n }\n\n const imageUrl = source?.field && source?.field in rowData ? String(rowData[source.field]) : '';\n const imagePlacement = GALLERY_IMAGE_PLACEMENT_MAP[placement ?? DEFAULT_IMAGE_PLACEMENT];\n const imageSize = size || DEFAULT_IMAGE_SIZE;\n\n return { src: imageUrl, alt: altTextValue, placement: imagePlacement, size: imageSize };\n}\n\n/**\n * Extracts UI-related props from a row for card components.\n *\n * @param props - The properties containing the row.\n * @param props.row - The data row.\n * @returns An object containing card-safe row metadata.\n */\nexport function getCardUIProps({ row }: { row: RsCoreTypes.Row }) {\n const uiProps = row.getUIProps();\n return {\n 'data-key': uiProps['data-key']\n };\n}\n\ninterface CardDataProps {\n row: RsCoreTypes.Row;\n visibleColumns: RsCoreTypes.Column[];\n cardConfig?: Pick<CardConfig, 'heroImage' | 'tile' | 'showFieldLabels' | 'renderCardFooter'>;\n headerColumn?: RsCoreTypes.Column;\n subHeadingsColumns?: RsCoreTypes.Column[];\n}\n\ninterface CardColumns {\n visibleColumns: RsCoreTypes.Column[];\n headerColumn?: RsCoreTypes.Column;\n subHeadingsColumns?: RsCoreTypes.Column[];\n}\n\n/**\n * Resolves the columns used to render a configured card.\n */\nexport function getCardColumns(\n columns: RsCoreTypes.Column[],\n { header, subHeadings }: Pick<CardConfig, 'header' | 'subHeadings'>\n): CardColumns {\n const visibleColumns = [...columns]\n .filter(column => !column.hidden && column.field.type !== FieldType.ACTION_FIELD_TYPE)\n .sort((first, second) => (first.order ?? 0) - (second.order ?? 0));\n const headerColumn = header?.field\n ? columns.find(column => column.field.id === header.field)\n : undefined;\n const subHeadingsColumns = subHeadings?.flatMap(({ field }) => {\n const column = columns.find(candidate => candidate.field.id === field);\n return column ? [column] : [];\n });\n\n return { visibleColumns, headerColumn, subHeadingsColumns };\n}\n\n/**\n * Generates SelectionCardDisplay data from card content configuration.\n *\n * @param props - Card data dependencies.\n * @returns Data used to render a selection card.\n */\nexport function getCardData({\n row,\n visibleColumns,\n cardConfig,\n headerColumn,\n subHeadingsColumns\n}: CardDataProps): Pick<\n SelectionCardDisplayProps,\n 'label' | 'subheading' | 'image' | 'fields' | 'aria-label' | 'footer'\n> {\n const {\n heroImage,\n tile: tileConfig,\n showFieldLabels = true,\n renderCardFooter\n } = cardConfig ?? {};\n\n visibleColumns.forEach(col => col.setExecutionContext(row));\n\n const rowData = row.getContext().getValue();\n\n const fields = visibleColumns.map(col => ({\n id: col.field.id,\n ...(showFieldLabels && { name: col.getContext()?.getLabel() }),\n ...(col.field.layoutMode && { variant: col.field.layoutMode }),\n ...(!heroImage && tileConfig\n ? { value: String(rowData[col.field.id] ?? ''), truncate: true }\n : { value: <CardFieldValue column={col} row={row} /> })\n }));\n\n let image: SelectionCardDisplayProps['image'] = heroImage\n ? getHeroImageData(heroImage, row)\n : undefined;\n\n if (!heroImage && tileConfig) {\n const foregroundColor =\n tileConfig.foregroundColor.field in rowData\n ? String(rowData[tileConfig.foregroundColor.field])\n : undefined;\n const backgroundColor =\n tileConfig.backgroundColor.field in rowData\n ? String(rowData[tileConfig.backgroundColor.field])\n : undefined;\n\n if (foregroundColor && backgroundColor) {\n const tileName =\n tileConfig.iconName && tileConfig.iconName.field in rowData\n ? String(rowData[tileConfig.iconName.field]) || undefined\n : undefined;\n const tileText =\n tileConfig.text && tileConfig.text.field in rowData\n ? String(rowData[tileConfig.text.field]) || undefined\n : undefined;\n\n const tileBase = { foregroundColor, backgroundColor };\n\n if (tileName) {\n image = { ...tileBase, icon: tileName };\n } else if (tileText) {\n image = { ...tileBase, text: tileText };\n }\n }\n }\n\n const footer = renderCardFooter?.(rowData) ?? null;\n const label = <CardHeader headerColumn={headerColumn} row={row} />;\n const subheading = subHeadingsColumns?.map(column => (\n <CardSubHeading key={column.field.id} subHeadingColumn={column} row={row} />\n ));\n const headerValue = row.getContext()?.getRowHeader()?.getValue();\n let ariaLabel: string | undefined;\n if (!headerColumn && !isEmpty(headerValue)) {\n ariaLabel = String(headerValue);\n }\n\n return { fields, image, footer, label, subheading, 'aria-label': ariaLabel };\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRowActions.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/Card/hooks/useRowActions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,UAAU,kBAAkB;IAC1B,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,aAAa,GAAI,eAGpB,kBAAkB,KAAG,CAAC,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAuBnD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRowActions.js","sourceRoot":"","sources":["../../../../../Core/Components/Card/hooks/useRowActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAUpC,MAAM,aAAa,GAAG,CAAC,EACrB,GAAG,EACH,IAAI,EACe,EAAyC,EAAE;IAC9D,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAuB,EAAE;QAC7D,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACpC,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;QAEvC,IAAI,CAAC;YACH,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,mBAAmB,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YACnF,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;gBAClC,UAAU,GAAG,CAAC,GAAG,cAAc,EAAE,GAAG,UAAU,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,6CAA6C;QAC/C,CAAC;QAED,OAAO,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC/B,GAAG,MAAM;YACT,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;YAC/D,CAAC;SACF,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAE3B,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useCallback } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { Action } from '@pega/cosmos-react-core';\n\ninterface UseRowActionsProps {\n row: RsCoreTypes.Row;\n meta: RsCoreTypes.Meta;\n}\n\nconst useRowActions = ({\n row,\n meta\n}: UseRowActionsProps): (() => Promise<Action[]>) | undefined => {\n const fetchActions = useCallback(async (): Promise<Action[]> => {\n const rowContext = row.getContext();\n let allActions = meta.rowActions ?? [];\n\n try {\n const dynamicActions = await rowContext.getRowActionDetails(rowContext.getValue());\n if (Array.isArray(dynamicActions)) {\n allActions = [...dynamicActions, ...allActions];\n }\n } catch (error) {\n // On error, fall back to static actions only\n }\n\n return allActions.map(action => ({\n ...action,\n onClick: () => {\n action.onClick(rowContext.getValue(), rowContext.refreshRow);\n }\n }));\n }, [row, meta.rowActions]);\n\n return meta.editing || meta.deleting ? fetchActions : undefined;\n};\n\nexport default useRowActions;\n"]}
@@ -0,0 +1,5 @@
1
+ export { default as CardHeader } from './CardHeader';
2
+ export { default as CardFieldValue } from './CardFieldValue';
3
+ export { default as useRowActions } from './hooks/useRowActions';
4
+ export { getCardUIProps, getCardData, getCardColumns, GALLERY_IMAGE_PLACEMENT_MAP, DEFAULT_IMAGE_PLACEMENT, DEFAULT_IMAGE_SIZE, isInlinePlacement } from './cardData';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default as CardHeader } from './CardHeader';
2
+ export { default as CardFieldValue } from './CardFieldValue';
3
+ export { default as useRowActions } from './hooks/useRowActions';
4
+ export { getCardUIProps, getCardData, getCardColumns, GALLERY_IMAGE_PLACEMENT_MAP, DEFAULT_IMAGE_PLACEMENT, DEFAULT_IMAGE_SIZE, isInlinePlacement } from './cardData';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC","sourcesContent":["export { default as CardHeader } from './CardHeader';\nexport { default as CardFieldValue } from './CardFieldValue';\nexport { default as useRowActions } from './hooks/useRowActions';\nexport {\n getCardUIProps,\n getCardData,\n getCardColumns,\n GALLERY_IMAGE_PLACEMENT_MAP,\n DEFAULT_IMAGE_PLACEMENT,\n DEFAULT_IMAGE_SIZE,\n isInlinePlacement\n} from './cardData';\n"]}
@@ -1,7 +1,8 @@
1
1
  export default EmptyContainer;
2
- declare function EmptyContainer({ message, shouldAnnounce, domContainer }: {
2
+ declare function EmptyContainer({ message, shouldAnnounce, domContainer, transparent }: {
3
3
  message: any;
4
4
  shouldAnnounce: any;
5
5
  domContainer: any;
6
+ transparent?: boolean | undefined;
6
7
  }): import("react/jsx-runtime").JSX.Element;
7
8
  //# sourceMappingURL=EmptyContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAuBA;;;;4CAqBC"}
1
+ {"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAwBA;;;;;4CAsBC"}
@@ -13,11 +13,11 @@ const EmptyContainerStyle = styled.div `
13
13
  left: 0;
14
14
  right: 0;
15
15
  bottom: 0;
16
- background: ${props => props.theme.base.palette['primary-background']};
16
+ background: ${({ theme, $transparent }) => $transparent ? 'transparent' : theme.base.palette['primary-background']};
17
17
  overflow: hidden;
18
18
  `;
19
19
  EmptyContainerStyle.defaultProps = defaultThemeProp;
20
- const EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {
20
+ const EmptyContainer = ({ message, shouldAnnounce, domContainer, transparent = false }) => {
21
21
  const { announcePolite } = useLiveLog();
22
22
  useEffect(() => {
23
23
  if (shouldAnnounce &&
@@ -26,7 +26,7 @@ const EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {
26
26
  announcePolite({ message });
27
27
  }
28
28
  }, [shouldAnnounce, message, announcePolite, domContainer]);
29
- return (_jsx(EmptyContainerStyle, { "data-test-id": TestIdConstants.noRecords, "data-testid": TestIdConstants.noRecords, children: _jsx(EmptyState, { message: message }) }));
29
+ return (_jsx(EmptyContainerStyle, { "$transparent": transparent, "data-test-id": TestIdConstants.noRecords, "data-testid": TestIdConstants.noRecords, children: _jsx(EmptyState, { message: message }) }));
30
30
  };
31
31
  export default EmptyContainer;
32
32
  //# sourceMappingURL=EmptyContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;gBAUtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;CAEtE,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE;IACnE,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IACE,cAAc;YACd,OAAO,QAAQ,KAAK,WAAW;YAC/B,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC9C,CAAC;YACD,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5D,OAAO,CACL,KAAC,mBAAmB,oBACJ,eAAe,CAAC,SAAS,iBAC1B,eAAe,CAAC,SAAS,YAEtC,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,GAAI,GACZ,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import styled from 'styled-components';\nimport { useEffect } from 'react';\n\nimport { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';\n\nimport TestIdConstants from '../TestIdConstants';\n\nconst EmptyContainerStyle = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: var(--row-height, 0);\n left: 0;\n right: 0;\n bottom: 0;\n background: ${props => props.theme.base.palette['primary-background']};\n overflow: hidden;\n`;\n\nEmptyContainerStyle.defaultProps = defaultThemeProp;\n\nconst EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {\n const { announcePolite } = useLiveLog();\n\n useEffect(() => {\n if (\n shouldAnnounce &&\n typeof document !== 'undefined' &&\n domContainer?.contains(document.activeElement)\n ) {\n announcePolite({ message });\n }\n }, [shouldAnnounce, message, announcePolite, domContainer]);\n\n return (\n <EmptyContainerStyle\n data-test-id={TestIdConstants.noRecords}\n data-testid={TestIdConstants.noRecords}\n >\n <EmptyState message={message} />\n </EmptyContainerStyle>\n );\n};\n\nexport default EmptyContainer;\n"]}
1
+ {"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;gBAUtB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,CACxC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;CAE1E,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IACE,cAAc;YACd,OAAO,QAAQ,KAAK,WAAW;YAC/B,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC9C,CAAC;YACD,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5D,OAAO,CACL,KAAC,mBAAmB,oBACJ,WAAW,kBACX,eAAe,CAAC,SAAS,iBAC1B,eAAe,CAAC,SAAS,YAEtC,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,GAAI,GACZ,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import styled from 'styled-components';\nimport { useEffect } from 'react';\n\nimport { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';\n\nimport TestIdConstants from '../TestIdConstants';\n\nconst EmptyContainerStyle = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: var(--row-height, 0);\n left: 0;\n right: 0;\n bottom: 0;\n background: ${({ theme, $transparent }) =>\n $transparent ? 'transparent' : theme.base.palette['primary-background']};\n overflow: hidden;\n`;\n\nEmptyContainerStyle.defaultProps = defaultThemeProp;\n\nconst EmptyContainer = ({ message, shouldAnnounce, domContainer, transparent = false }) => {\n const { announcePolite } = useLiveLog();\n\n useEffect(() => {\n if (\n shouldAnnounce &&\n typeof document !== 'undefined' &&\n domContainer?.contains(document.activeElement)\n ) {\n announcePolite({ message });\n }\n }, [shouldAnnounce, message, announcePolite, domContainer]);\n\n return (\n <EmptyContainerStyle\n $transparent={transparent}\n data-test-id={TestIdConstants.noRecords}\n data-testid={TestIdConstants.noRecords}\n >\n <EmptyState message={message} />\n </EmptyContainerStyle>\n );\n};\n\nexport default EmptyContainer;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"AAOA;;;;;4CAqHC;;;;;;;;;;;QAUW,mCAAQ;;;;;;;sBArIE,YAAY"}
1
+ {"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"AAOA;;;;;4CAsHC;;;;;;;;;;;QAUW,mCAAQ;;;;;;;sBAtIE,YAAY"}
@@ -54,6 +54,8 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
54
54
  setViewName(e.target.value);
55
55
  };
56
56
  const onSubmit = () => {
57
+ if (error)
58
+ return;
57
59
  const trimmedName = viewName.trim();
58
60
  if (!trimmedName) {
59
61
  viewNameRef.current.focus();
@@ -72,7 +74,6 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
72
74
  view.type.createPersonalization(trimmedName, markAsDefault || null);
73
75
  }
74
76
  onFinish();
75
- return undefined;
76
77
  };
77
78
  return (_jsx(FormDialog, { heading: translate(editing ? 'Edit customized view' : 'Add customized view'), onCancel: onFinish, onSubmit: onSubmit, target: target, children: _jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Input, { ref: viewNameRef, name: 'viewName', required: true, label: translate('View name'), autoComplete: 'off', status: error ? 'error' : undefined, info: error, value: viewName, onChange: onChange }), !(editing && isAppDefaultView) && (_jsx(Checkbox, { checked: markAsDefault, label: translate('Always show this view first'), onChange: () => setMarkAsDefault(curState => !curState) }))] }) }));
78
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PersonalizationCreateEdit.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,MAAM,EAAE;IAC3F,MAAM,EACJ,KAAK,EAAE,EAAE,eAAe,EAAE,EAC1B,IAAI,EAAE,EAAE,0BAA0B,EAAE,EACrC,GAAG,IAAI,CAAC;IACT,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE;QACx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AAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IAClD,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;CACtC,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG;IACvC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,OAAO,EAAE,KAAK;CACf,CAAC","sourcesContent":["import { useState, useEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Flex, Input, Checkbox, FormDialog } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\n\nexport default function PersonalizationCreateEdit({ view, onFinish, editing = false, target }) {\n const {\n state: { personalization },\n meta: { nonPersonalizationViewName }\n } = view;\n const personalizationNames = useMemo(() => {\n const personalizations = personalization?.allPersonalizations || {};\n return Object.keys(personalizations).map(key => personalizations[key]?.name?.toLowerCase());\n }, [personalization]);\n const [translate] = useTranslate();\n const currentPersonalization = personalization?.allPersonalizations?.[personalization.active];\n const currentPersonalizationName = currentPersonalization?.name;\n const isAppDefaultView = personalization.active === 'APP_DEFAULT';\n const [viewName, setViewName] = useState(() => {\n if (editing) return currentPersonalizationName;\n return '';\n });\n const [error, setError] = useState();\n const viewNameRef = useRef(null);\n const defaultNameError = `${nonPersonalizationViewName} ${translate(\n 'name is reserved for non Personalized view and cannot be used.'\n )}`;\n const viewAlreadyPresentError = translate('This view is already present.');\n const viewNameEmptyError = translate('This view name cannot be empty.');\n const viewNameMaxLengthError = translate('View name must contain less than 65 characters.');\n const [markAsDefault, setMarkAsDefault] = useState(\n !!(editing && personalization.defaultPersonalization === personalization.active)\n );\n\n useEffect(() => {\n if (viewName && viewName.toLowerCase() === nonPersonalizationViewName.toLowerCase()) {\n setError(defaultNameError);\n return;\n }\n if (\n personalizationNames.includes(viewName?.trim().toLowerCase()) &&\n !(editing && viewName.trim() === currentPersonalizationName)\n ) {\n setError(viewAlreadyPresentError);\n return;\n }\n if (viewName?.length > 64) {\n setError(viewNameMaxLengthError);\n return;\n }\n setError(null);\n }, [\n defaultNameError,\n currentPersonalizationName,\n editing,\n nonPersonalizationViewName,\n personalizationNames,\n viewName,\n viewAlreadyPresentError,\n viewNameMaxLengthError\n ]);\n\n const onChange = e => {\n setViewName(e.target.value);\n };\n\n const onSubmit = () => {\n const trimmedName = viewName.trim();\n if (!trimmedName) {\n viewNameRef.current.focus();\n setError(viewNameEmptyError);\n return;\n }\n if (editing) {\n view.type.editPersonalization(\n personalization.active,\n trimmedName,\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n markAsDefault || null,\n isAppDefaultView\n );\n } else {\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n view.type.createPersonalization(trimmedName, markAsDefault || null);\n }\n\n onFinish();\n return undefined;\n };\n\n return (\n <FormDialog\n heading={translate(editing ? 'Edit customized view' : 'Add customized view')}\n onCancel={onFinish}\n onSubmit={onSubmit}\n target={target}\n >\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input\n ref={viewNameRef}\n name='viewName'\n required\n label={translate('View name')}\n autoComplete='off'\n status={error ? 'error' : undefined}\n info={error}\n value={viewName}\n onChange={onChange}\n />\n\n {!(editing && isAppDefaultView) && (\n <Checkbox\n checked={markAsDefault}\n label={translate('Always show this view first')}\n onChange={() => setMarkAsDefault(curState => !curState)}\n />\n )}\n </Flex>\n </FormDialog>\n );\n}\n\nPersonalizationCreateEdit.propTypes = {\n onFinish: PropTypes.func,\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n editing: PropTypes.bool,\n target: PropTypes.instanceOf(Element)\n};\n\nPersonalizationCreateEdit.defaultProps = {\n onFinish: () => {},\n editing: false\n};\n"]}
1
+ {"version":3,"file":"PersonalizationCreateEdit.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":";AAAA,O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,KAAK,EAClB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACnC,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,QAAQ,GAClB,EAED,CAAC,CAAC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CACjC,KAAC,QAAQ,IACP,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,SAAS,CAAC,6BAA6B,CAAC,EAC/C,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,GACvD,CACH,IACI,GACI,CACd,CAAC;AACJ,CAAC;AAED,yBAAyB,CAAC,SAAS,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IAClD,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;CACtC,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG;IACvC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,OAAO,EAAE,KAAK;CACf,CAAC","sourcesContent":["import { useState, useEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Flex, Input, Checkbox, FormDialog } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\n\nexport default function PersonalizationCreateEdit({ view, onFinish, editing = false, target }) {\n const {\n state: { personalization },\n meta: { nonPersonalizationViewName }\n } = view;\n const personalizationNames = useMemo(() => {\n const personalizations = personalization?.allPersonalizations || {};\n return Object.keys(personalizations).map(key => personalizations[key]?.name?.toLowerCase());\n }, [personalization]);\n const [translate] = useTranslate();\n const currentPersonalization = personalization?.allPersonalizations?.[personalization.active];\n const currentPersonalizationName = currentPersonalization?.name;\n const isAppDefaultView = personalization.active === 'APP_DEFAULT';\n const [viewName, setViewName] = useState(() => {\n if (editing) return currentPersonalizationName;\n return '';\n });\n const [error, setError] = useState();\n const viewNameRef = useRef(null);\n const defaultNameError = `${nonPersonalizationViewName} ${translate(\n 'name is reserved for non Personalized view and cannot be used.'\n )}`;\n const viewAlreadyPresentError = translate('This view is already present.');\n const viewNameEmptyError = translate('This view name cannot be empty.');\n const viewNameMaxLengthError = translate('View name must contain less than 65 characters.');\n const [markAsDefault, setMarkAsDefault] = useState(\n !!(editing && personalization.defaultPersonalization === personalization.active)\n );\n\n useEffect(() => {\n if (viewName && viewName.toLowerCase() === nonPersonalizationViewName.toLowerCase()) {\n setError(defaultNameError);\n return;\n }\n if (\n personalizationNames.includes(viewName?.trim().toLowerCase()) &&\n !(editing && viewName.trim() === currentPersonalizationName)\n ) {\n setError(viewAlreadyPresentError);\n return;\n }\n if (viewName?.length > 64) {\n setError(viewNameMaxLengthError);\n return;\n }\n setError(null);\n }, [\n defaultNameError,\n currentPersonalizationName,\n editing,\n nonPersonalizationViewName,\n personalizationNames,\n viewName,\n viewAlreadyPresentError,\n viewNameMaxLengthError\n ]);\n\n const onChange = e => {\n setViewName(e.target.value);\n };\n\n const onSubmit = () => {\n if (error) return;\n\n const trimmedName = viewName.trim();\n if (!trimmedName) {\n viewNameRef.current.focus();\n setError(viewNameEmptyError);\n return;\n }\n if (editing) {\n view.type.editPersonalization(\n personalization.active,\n trimmedName,\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n markAsDefault || null,\n isAppDefaultView\n );\n } else {\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n view.type.createPersonalization(trimmedName, markAsDefault || null);\n }\n\n onFinish();\n };\n\n return (\n <FormDialog\n heading={translate(editing ? 'Edit customized view' : 'Add customized view')}\n onCancel={onFinish}\n onSubmit={onSubmit}\n target={target}\n >\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input\n ref={viewNameRef}\n name='viewName'\n required\n label={translate('View name')}\n autoComplete='off'\n status={error ? 'error' : undefined}\n info={error}\n value={viewName}\n onChange={onChange}\n />\n\n {!(editing && isAppDefaultView) && (\n <Checkbox\n checked={markAsDefault}\n label={translate('Always show this view first')}\n onChange={() => setMarkAsDefault(curState => !curState)}\n />\n )}\n </Flex>\n </FormDialog>\n );\n}\n\nPersonalizationCreateEdit.propTypes = {\n onFinish: PropTypes.func,\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n editing: PropTypes.bool,\n target: PropTypes.instanceOf(Element)\n};\n\nPersonalizationCreateEdit.defaultProps = {\n onFinish: () => {},\n editing: false\n};\n"]}
@@ -63,10 +63,11 @@ declare const _default: {
63
63
  sortRenderer: typeof sort;
64
64
  filterRenderer: typeof Filter;
65
65
  headerCellRenderer: typeof HeaderCell;
66
- emptyContainerRenderer: ({ message, shouldAnnounce, domContainer }: {
66
+ emptyContainerRenderer: ({ message, shouldAnnounce, domContainer, transparent }: {
67
67
  message: any;
68
68
  shouldAnnounce: any;
69
69
  domContainer: any;
70
+ transparent?: boolean | undefined;
70
71
  }) => import("react/jsx-runtime").JSX.Element;
71
72
  loadingIndicator: typeof LoadingIndicator;
72
73
  rowHeightRenderer: typeof RowHeightRenderer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/index.jsx"],"names":[],"mappings":"AA4BA,uGAKC;;;;;;;;;;AAUD,mGASC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBApDqB,YAAY;iBAEjB,QAAQ;mBACN,UAAU;uBAEN,cAAc;6BAER,oBAAoB;8BACnB,aAAa;4CAEC,2BAA2B;8CACzB,6BAA6B;8BAC7C,qBAAqB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/index.jsx"],"names":[],"mappings":"AA4BA,uGAKC;;;;;;;;;;AAUD,mGASC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBApDqB,YAAY;iBAEjB,QAAQ;mBACN,UAAU;uBAEN,cAAc;6BAER,oBAAoB;8BACnB,aAAa;4CAEC,2BAA2B;8CACzB,6BAA6B;8BAC7C,qBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":"AAyRA;;;;;;QAwCC;AA2GD;;;mDAoJC;;;;;;;;;;sBAhkBqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":"AA+RA;;;;;;QAwCC;AA8GD;;;mDAoJC;;;;;;;;;;sBAzkBqB,YAAY"}
@@ -224,6 +224,11 @@ const StyledMetaList = styled(MetaList) `
224
224
  const GroupAdditionalInfoSeparator = styled.span `
225
225
  margin-inline-start: 0.3rem;
226
226
  `;
227
+ const StyledGroupName = styled.span `
228
+ min-width: 0;
229
+ overflow: hidden;
230
+ text-overflow: ellipsis;
231
+ `;
227
232
  /**
228
233
  * Generates unique ARIA label IDs for accessibility.
229
234
  * - groupLabelId: for the group label (e.g., "Status:")
@@ -325,7 +330,7 @@ function GroupHeaderLabel({ column, groupHeader }) {
325
330
  ? formatter(groupHeader.count, { locale })
326
331
  : groupHeader.count;
327
332
  const { groupLabelId, groupNameId } = getAriaLabelIds(groupHeader.uniqueId);
328
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'group-label' }), !column.field.hideGroupColumnNameLabel && (_jsxs("span", { className: 'group-header-groupby', "data-test-id": groupHeader.groupBy, "data-testid": `${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`, id: groupLabelId, children: [groupHeader.label, ":"] })), _jsx("div", { className: 'group-label' }), _jsxs("span", { className: 'group-context-count', style: { display: 'inline-flex' }, "data-test-id": 'groupHeader', "data-testid": TestIdConstants.groupHeaderCount, id: groupNameId, children: [_jsx(GroupName, { view: view, column: column, groupHeader: groupHeader, dateFunction: dateFunction, customFunction: customFunction }), _jsx("span", { className: 'group-count', children: ` (${groupCountFormatted})` }), _jsx(VisuallyHiddenText, { children: " items" })] })] }));
333
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'group-label' }), !column.field.hideGroupColumnNameLabel && (_jsxs("span", { className: 'group-header-groupby', "data-test-id": groupHeader.groupBy, "data-testid": `${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`, id: groupLabelId, children: [groupHeader.label, ":"] })), _jsx("div", { className: 'group-label' }), _jsxs("span", { className: 'group-context-count', style: { display: 'inline-flex' }, "data-test-id": 'groupHeader', "data-testid": TestIdConstants.groupHeaderCount, id: groupNameId, children: [_jsx(StyledGroupName, { children: _jsx(GroupName, { view: view, column: column, groupHeader: groupHeader, dateFunction: dateFunction, customFunction: customFunction }) }), _jsx("span", { className: 'group-count', children: ` (${groupCountFormatted})` }), _jsx(VisuallyHiddenText, { children: " items" })] })] }));
329
334
  }
330
335
  // NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable
331
336
  export default function GroupHeader({ groupHeader, columns }) {
@@ -367,7 +372,7 @@ export default function GroupHeader({ groupHeader, columns }) {
367
372
  e.preventDefault();
368
373
  buttonRef.current.focus();
369
374
  }
370
- }, children: _jsxs(Flex, { container: true, children: [_jsx(ColorBadge, { colorIndicator: groupHeader.colorIndicator }), _jsxs("div", { children: [_jsxs("div", { className: 'stickyGroupHeader', children: [_jsxs(BareButton, { ref: buttonRef, "data-testid": `${TestIdConstants.groupHeaderButton}-${groupHeader.label}-${groupHeader.name}`, "aria-labelledby": [groupLabelId, groupNameId, ...additionalInfoIds].join(' '), "aria-expanded": !!groupHeader.isExpanded, style: {
375
+ }, children: _jsxs(Flex, { container: true, children: [_jsx(ColorBadge, { colorIndicator: groupHeader.colorIndicator }), _jsxs(Flex, { item: { grow: 1 }, container: { direction: 'column' }, children: [_jsxs("div", { className: 'stickyGroupHeader', children: [_jsxs(BareButton, { ref: buttonRef, "data-testid": `${TestIdConstants.groupHeaderButton}-${groupHeader.label}-${groupHeader.name}`, "aria-labelledby": [groupLabelId, groupNameId, ...additionalInfoIds].join(' '), "aria-expanded": !!groupHeader.isExpanded, style: {
371
376
  paddingRight: 'var(--group-left)'
372
377
  }, onClick: () => toggleGroup(), onKeyDown: event => {
373
378
  if (event.key === 'Enter') {