@pega/lists-react 9.0.0-build.29.1 → 9.0.0-build.29.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.js +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -1
- package/lib/Core/Views/Table/Body.d.ts.map +1 -1
- package/lib/Core/Views/Table/Body.js +5 -2
- package/lib/Core/Views/Table/Body.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,QAAA,MAAM,WAAW,oFAAsD,gBAAgB,
|
|
1
|
+
{"version":3,"file":"GalleryCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,QAAA,MAAM,WAAW,oFAAsD,gBAAgB,6CA0CrF,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -14,7 +14,7 @@ const GalleryCard = memo(({ headerColumn, row, meta, visibleColumns }) => {
|
|
|
14
14
|
const fetchActionsCb = useRowActions({ row, meta });
|
|
15
15
|
const { onCardClick } = meta.galleryConfig ?? {};
|
|
16
16
|
const rowData = onCardClick ? row.getContext().getValue() : undefined;
|
|
17
|
-
return (_jsx(SelectionCardDisplay, { "aria-label": ariaLabel, label: label, image: image, fields: fields, actions: fetchActionsCb, ...uiProps, footer: footer, ...(onCardClick &&
|
|
17
|
+
return (_jsx(SelectionCardDisplay, { "aria-label": ariaLabel, label: label, headingTag: 'h3', image: image, fields: fields, actions: fetchActionsCb, ...uiProps, footer: footer, ...(onCardClick &&
|
|
18
18
|
rowData && {
|
|
19
19
|
onClick: () => onCardClick(rowData),
|
|
20
20
|
onKeyDown: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryCard.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAoB,EAAE,EAAE;IACzF,MAAM,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,YAAY,EAAE,SAAS,EACxB,GAAG,WAAW,CAAC;QACd,GAAG;QACH,cAAc;QACd,IAAI;QACJ,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IACxC,MAAM,cAAc,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC;IAEjD,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAEtE,OAAO,CACL,KAAC,oBAAoB,kBACP,SAAS,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,KACnB,OAAO,EACX,MAAM,EAAE,MAAM,KACV,CAAC,WAAW;YACd,OAAO,IAAI;YACT,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;YACnC,SAAS,EAAE,CAAC,CAAgB,EAAE,EAAE;gBAC9B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;oBACvC,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,WAAW,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;SACF,CAAC,GACJ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { memo } from 'react';\nimport type { KeyboardEvent } from 'react';\n\nimport { SelectionCardDisplay } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\nconst GalleryCard = memo(({ headerColumn, row, meta, visibleColumns }: GalleryCardProps) => {\n const {\n label,\n image,\n footer,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n const fetchActionsCb = useRowActions({ row, meta });\n const { onCardClick } = meta.galleryConfig ?? {};\n\n const rowData = onCardClick ? row.getContext().getValue() : undefined;\n\n return (\n <SelectionCardDisplay\n aria-label={ariaLabel}\n label={label}\n image={image}\n fields={fields}\n actions={fetchActionsCb}\n {...uiProps}\n footer={footer}\n {...(onCardClick &&\n rowData && {\n onClick: () => onCardClick(rowData),\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onCardClick(rowData);\n }\n }\n })}\n />\n );\n});\n\nexport default GalleryCard;\n"]}
|
|
1
|
+
{"version":3,"file":"GalleryCard.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAoB,EAAE,EAAE;IACzF,MAAM,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,YAAY,EAAE,SAAS,EACxB,GAAG,WAAW,CAAC;QACd,GAAG;QACH,cAAc;QACd,IAAI;QACJ,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IACxC,MAAM,cAAc,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC;IAEjD,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAEtE,OAAO,CACL,KAAC,oBAAoB,kBACP,SAAS,EACrB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAC,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,KACnB,OAAO,EACX,MAAM,EAAE,MAAM,KACV,CAAC,WAAW;YACd,OAAO,IAAI;YACT,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;YACnC,SAAS,EAAE,CAAC,CAAgB,EAAE,EAAE;gBAC9B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;oBACvC,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,WAAW,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;SACF,CAAC,GACJ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { memo } from 'react';\nimport type { KeyboardEvent } from 'react';\n\nimport { SelectionCardDisplay } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\nconst GalleryCard = memo(({ headerColumn, row, meta, visibleColumns }: GalleryCardProps) => {\n const {\n label,\n image,\n footer,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n const fetchActionsCb = useRowActions({ row, meta });\n const { onCardClick } = meta.galleryConfig ?? {};\n\n const rowData = onCardClick ? row.getContext().getValue() : undefined;\n\n return (\n <SelectionCardDisplay\n aria-label={ariaLabel}\n label={label}\n headingTag='h3'\n image={image}\n fields={fields}\n actions={fetchActionsCb}\n {...uiProps}\n footer={footer}\n {...(onCardClick &&\n rowData && {\n onClick: () => onCardClick(rowData),\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onCardClick(rowData);\n }\n }\n })}\n />\n );\n});\n\nexport default GalleryCard;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryCheckboxCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCheckboxCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC;CACrC;AAED,QAAA,MAAM,mBAAmB,qGACwC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"GalleryCheckboxCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCheckboxCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC;CACrC;AAED,QAAA,MAAM,mBAAmB,qGACwC,wBAAwB,6CA4CxF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -19,7 +19,7 @@ const GalleryCheckboxCard = memo(({ headerColumn, selectionColumn, row, meta, vi
|
|
|
19
19
|
const disableSelection = selectionColumn.disableSelection ?? disableSelectionOnLoad;
|
|
20
20
|
const handleChange = useCallback((event) => selectRow(event.target.checked), [row, selectRow]);
|
|
21
21
|
const fetchActionsCb = useRowActions({ row, meta });
|
|
22
|
-
return (_jsx(CheckboxCard, { "aria-label": ariaLabel, label: label, image: image, fields: fields, onChange: handleChange, checked: getContext()?.$selected, readOnly: disableSelection, ...uiProps, actions: fetchActionsCb }));
|
|
22
|
+
return (_jsx(CheckboxCard, { "aria-label": ariaLabel, label: label, headingTag: 'h3', image: image, fields: fields, onChange: handleChange, checked: getContext()?.$selected, readOnly: disableSelection, ...uiProps, actions: fetchActionsCb }));
|
|
23
23
|
});
|
|
24
24
|
export default GalleryCheckboxCard;
|
|
25
25
|
//# sourceMappingURL=GalleryCheckboxCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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AAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAChC,QAAQ,EAAE,gBAAgB,KACtB,OAAO,EACX,OAAO,EAAE,cAAc,GACvB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { memo, useCallback, type ChangeEvent } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { CheckboxCard } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\ninterface GalleryCheckboxCardProps extends GalleryCardProps {\n selectionColumn: RsCoreTypes.Column;\n}\n\nconst GalleryCheckboxCard = memo(\n ({ headerColumn, selectionColumn, row, meta, visibleColumns }: GalleryCheckboxCardProps) => {\n const {\n label,\n image,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n\n const { selectRow, getContext } = row;\n const disableSelectionOnLoad = selectionColumn\n .getContext()\n ?.getRsMeta()?.disableSelectionOnLoad;\n // TODO: identify the usecase for column.disableSelection. Keeping it for now to keep the behavior in sync with RowSelectionColumn in table.\n const disableSelection = selectionColumn.disableSelection ?? disableSelectionOnLoad;\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => selectRow(event.target.checked),\n [row, selectRow]\n );\n\n const fetchActionsCb = useRowActions({ row, meta });\n\n return (\n <CheckboxCard\n aria-label={ariaLabel}\n label={label}\n image={image}\n fields={fields}\n onChange={handleChange}\n checked={getContext()?.$selected}\n readOnly={disableSelection}\n {...uiProps}\n actions={fetchActionsCb}\n />\n );\n }\n);\n\nexport default GalleryCheckboxCard;\n"]}
|
|
1
|
+
{"version":3,"file":"GalleryCheckboxCard.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryC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ACtB,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAChC,QAAQ,EAAE,gBAAgB,KACtB,OAAO,EACX,OAAO,EAAE,cAAc,GACvB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { memo, useCallback, type ChangeEvent } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { CheckboxCard } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\ninterface GalleryCheckboxCardProps extends GalleryCardProps {\n selectionColumn: RsCoreTypes.Column;\n}\n\nconst GalleryCheckboxCard = memo(\n ({ headerColumn, selectionColumn, row, meta, visibleColumns }: GalleryCheckboxCardProps) => {\n const {\n label,\n image,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n\n const { selectRow, getContext } = row;\n const disableSelectionOnLoad = selectionColumn\n .getContext()\n ?.getRsMeta()?.disableSelectionOnLoad;\n // TODO: identify the usecase for column.disableSelection. Keeping it for now to keep the behavior in sync with RowSelectionColumn in table.\n const disableSelection = selectionColumn.disableSelection ?? disableSelectionOnLoad;\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => selectRow(event.target.checked),\n [row, selectRow]\n );\n\n const fetchActionsCb = useRowActions({ row, meta });\n\n return (\n <CheckboxCard\n aria-label={ariaLabel}\n label={label}\n headingTag='h3'\n image={image}\n fields={fields}\n onChange={handleChange}\n checked={getContext()?.$selected}\n readOnly={disableSelection}\n {...uiProps}\n actions={fetchActionsCb}\n />\n );\n }\n);\n\nexport default GalleryCheckboxCard;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/Body.jsx"],"names":[],"mappings":";AAYA;;;;
|
|
1
|
+
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/Body.jsx"],"names":[],"mappings":";AAYA;;;;4CA6DC;;;;;;;;;;;;;;;;sBAzEqB,YAAY"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Fragment, useRef, useEffect } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { supplementalColors, useTheme } from '@pega/cosmos-react-core';
|
|
5
5
|
import GroupHeader from '../../Components/GroupRenderer';
|
|
6
6
|
import { HierarchicalGroupHeader, resetCounter } from '../../Components/HierarchicalGroupRenderer';
|
|
7
7
|
import HierarchicalGroupFooters from '../../Components/HierarchicalGroupFooters';
|
|
8
8
|
import { keyFrom } from '../../Utils';
|
|
9
9
|
import Row from './Row';
|
|
10
10
|
function Body({ groupHeaders, columns, hierarchicalGroupEnabled }) {
|
|
11
|
+
const theme = useTheme();
|
|
12
|
+
const supplementalColorsList = supplementalColors(theme);
|
|
11
13
|
const hierarchicalInfo = useRef({
|
|
12
14
|
prevLevel: 0,
|
|
13
15
|
parentGroupFooters: {}
|
|
@@ -32,7 +34,8 @@ function Body({ groupHeaders, columns, hierarchicalGroupEnabled }) {
|
|
|
32
34
|
if (header.level === 0) {
|
|
33
35
|
numParentGroups += 1;
|
|
34
36
|
}
|
|
35
|
-
header.colorIndicator =
|
|
37
|
+
header.colorIndicator =
|
|
38
|
+
supplementalColorsList[numParentGroups % supplementalColorsList.length];
|
|
36
39
|
return (_jsxs(Fragment, { children: [header.isHierarchical ? (_jsx(HierarchicalGroupHeader, { groupHeader: header, columns: columns })) : (_jsx(GroupHeader, { groupHeader: header, columns: columns })), dataMap, header.isHierarchical ? (_jsx(HierarchicalGroupFooters, { groupHeaders: groupHeaders, columns: columns, headerIndex: idx, hierarchicalGroupInfoRef: hierarchicalInfo })) : null] }, groupHeaderKey));
|
|
37
40
|
}) }));
|
|
38
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../../Core/Views/Table/Body.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../../Core/Views/Table/Body.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AACnG,OAAO,wBAAwB,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,SAAS,IAAI,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,wBAAwB,EAAE;IAC/D,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAEzD,MAAM,gBAAgB,GAAG,MAAM,CAAC;QAC9B,SAAS,EAAE,CAAC;QACZ,kBAAkB,EAAE,EAAE;KACvB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,8EAA8E;QAC9E,IAAI,wBAAwB,EAAE,CAAC;YAC7B,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,eAAe,GAAG,CAAC,CAA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AAC,CAAC,IAAI,KAdK,cAAc,CAelB,CACZ,CAAC;YACJ,CAAC,CAAC,GACH,CACJ,CAAC;AACJ,CAAC;AAED,IAAI,CAAC,SAAS,GAAG;IACf,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;IAC9C,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,wBAAwB,EAAE,SAAS,CAAC,IAAI;CACzC,CAAC;AAEF,IAAI,CAAC,YAAY,GAAG;IAClB,YAAY,EAAE,EAAE;IAChB,OAAO,EAAE,EAAE;IACX,wBAAwB,EAAE,KAAK;CAChC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { Fragment, useRef, useEffect } from 'react';\n\nimport { supplementalColors, useTheme } from '@pega/cosmos-react-core';\n\nimport GroupHeader from '../../Components/GroupRenderer';\nimport { HierarchicalGroupHeader, resetCounter } from '../../Components/HierarchicalGroupRenderer';\nimport HierarchicalGroupFooters from '../../Components/HierarchicalGroupFooters';\nimport { keyFrom } from '../../Utils';\n\nimport Row from './Row';\n\nfunction Body({ groupHeaders, columns, hierarchicalGroupEnabled }) {\n const theme = useTheme();\n const supplementalColorsList = supplementalColors(theme);\n\n const hierarchicalInfo = useRef({\n prevLevel: 0,\n parentGroupFooters: {}\n });\n\n useEffect(() => {\n // Reset counter which was used to calculate hierarchical group header z-index\n if (hierarchicalGroupEnabled) {\n resetCounter();\n }\n });\n\n let numParentGroups = -1;\n\n return (\n <>\n {groupHeaders &&\n groupHeaders.map((header, idx) => {\n let dataMap = null;\n const groupHeaderKey = keyFrom(...header.hierarchy);\n\n if (header.isLeafNode && header.isExpanded) {\n const rows = header.getRows();\n dataMap =\n rows &&\n rows.map(row => (\n <Row key={row.reactKey} row={row} columns={columns} level={header.level + 1} />\n ));\n }\n\n if (header.level === 0) {\n numParentGroups += 1;\n }\n header.colorIndicator =\n supplementalColorsList[numParentGroups % supplementalColorsList.length];\n\n return (\n <Fragment key={groupHeaderKey}>\n {header.isHierarchical ? (\n <HierarchicalGroupHeader groupHeader={header} columns={columns} />\n ) : (\n <GroupHeader groupHeader={header} columns={columns} />\n )}\n {dataMap}\n {header.isHierarchical ? (\n <HierarchicalGroupFooters\n groupHeaders={groupHeaders}\n columns={columns}\n headerIndex={idx}\n hierarchicalGroupInfoRef={hierarchicalInfo}\n />\n ) : null}\n </Fragment>\n );\n })}\n </>\n );\n}\n\nBody.propTypes = {\n groupHeaders: PropTypes.arrayOf(PropTypes.any),\n columns: PropTypes.arrayOf(PropTypes.any),\n hierarchicalGroupEnabled: PropTypes.bool\n};\n\nBody.defaultProps = {\n groupHeaders: [],\n columns: [],\n hierarchicalGroupEnabled: false\n};\n\nexport default Body;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.10",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0-build.29.
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0-build.29.
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0-build.29.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.29.10",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.29.10",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0-build.29.10",
|
|
20
20
|
"@types/lodash-es": "^4.17.12",
|
|
21
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
22
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
23
23
|
"dayjs": "^1.11.13",
|
|
24
24
|
"fast-deep-equal": "^3.1.3",
|
|
25
25
|
"lodash-es": "^4.18.1",
|
|
26
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.29.
|
|
27
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.29.
|
|
26
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.29.10",
|
|
27
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.29.10",
|
|
28
28
|
"polished": "^4.1.0",
|
|
29
29
|
"prop-types": "^15.8.1",
|
|
30
30
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@testing-library/react": "^16.0.0",
|
|
43
43
|
"@testing-library/user-event": "^14.6.1",
|
|
44
44
|
"jest-axe": "^8.0.0",
|
|
45
|
-
"srs-utils": "9.0.0-build.29.
|
|
45
|
+
"srs-utils": "9.0.0-build.29.10",
|
|
46
46
|
"typescript": "~5.9.3"
|
|
47
47
|
}
|
|
48
48
|
}
|