@pega/lists-react 9.0.0-build.22.2 → 9.0.0-build.23.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":"AAkRA;;;;;;QAwCC;AA2GD;;;mDAiJC;;;;;;;;;;sBAtjBqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":"AAkRA;;;;;;QAwCC;AA2GD;;;mDAkJC;;;;;;;;;;sBAvjBqB,YAAY"}
@@ -360,7 +360,7 @@ export default function GroupHeader({ groupHeader, columns }) {
360
360
  e.preventDefault();
361
361
  buttonRef.current.focus();
362
362
  }
363
- }, children: _jsxs(Flex, { container: true, children: [_jsx(ColorBadge, { colorIndicator: groupHeader.colorIndicator }), _jsxs("div", { children: [_jsxs("div", { className: 'stickyGroupHeader', children: [_jsxs(BareButton, { ref: buttonRef, "aria-labelledby": [groupLabelId, groupNameId, ...additionalInfoIds].join(' '), "aria-expanded": !!groupHeader.isExpanded, style: {
363
+ }, 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: {
364
364
  paddingRight: 'var(--group-left)'
365
365
  }, onClick: () => toggleGroup(), onKeyDown: event => {
366
366
  if (event.key === 'Enter') {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAA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,EAAE,GAAG,EAAE,CACb,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,CAAC;iCAC/E,CAAC;gCACF,OAAO,CACL,KAAC,cAAc,IAEb,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE;wCACpB,YAAY,EAAE,MAAM,CAAC,MAAM;qCAC5B,CAAC,IALG,CAAC,CAAC,KAAK,CAAC,EAAE,CAMf,CACH,CAAC;4BACJ,CAAC,CAAC,GACE,IACF,IACD,GACW,CACrB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IACpD,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CAC1D,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useRef, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Icon, Text, MetaList, Tooltip, VisuallyHiddenText, Flex } from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport { getGroupFromKey } from 'pega-ui-list-data-apis';\n\nimport { createClassName as cx } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\nimport { customFunctions, intervalGroupingBoundaries } from '../../constants';\nimport AggregatorCell from '../AggregatorCell';\nimport RenderingEngine from '../RenderingEngine/RenderCell';\nimport DateValueDisplay from '../DateValueDisplay';\nimport TestIdConstants from '../TestIdConstants';\n\nimport GroupAdditionalInfo from './GroupAdditionalInfo';\n\nconst groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;\n\nconst ColorBadge = styled.div(({ theme, colorIndicator }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n\n return css`\n position: sticky;\n inset-inline-start: 0;\n z-index: 10;\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 0.25rem;\n height: 100%;\n background-color: ${colorIndicator};\n z-index: 12;\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-top-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n border-bottom-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n `}\n }\n `;\n});\n\n/**\n * TODO: remove currentColor style after cosmos fixes the issue\n * Cosmos yet to handle dark theme on BareButton\n */\n\nconst StyledGroupHeader = styled.div(({ theme, isAggregationApplied, groupHeader }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner = theme.components.table.border['horizontal-inner'];\n\n return css`\n --group-left: ${groupheaderleftdisplacement(groupHeader)};\n background-color: var(--group-bg-color);\n\n &:has(button[aria-expanded='true']) {\n > div {\n box-shadow: ${theme.base.shadow.low};\n }\n }\n\n ${!borderHorizontalInner &&\n css`\n filter: ${theme.base.shadow['low-filter']};\n `}\n\n &.row.sticky-group-header {\n position: sticky;\n\n /* Declare as a scroll-state container so descendants can query the stuck state */\n @supports (container-type: scroll-state) {\n container-name: group-header-container;\n container-type: scroll-state;\n }\n display: block;\n top: calc(\n ${groupHeader.isLeafNode && groupHeader.level !== 0\n ? 'calc(var(--row-height) + var(--group-header-height))'\n : 'var(--row-height)'}\n );\n\n /* z-index starting from 8 because freeze-line has z-index 7 */\n z-index: ${`${8 + groupHeader.index}`};\n > .cell-action,\n .cell-fixed {\n background-color: var(--group-bg-color);\n }\n }\n\n .group-label {\n width: 0.437rem;\n display: inline-block;\n flex-shrink: 0;\n }\n\n .group-header-groupby {\n font-weight: ${theme.base['font-weight'].normal};\n }\n\n .group-context-count .group-count {\n font-weight: ${theme.base['font-weight'].bold};\n white-space: pre;\n }\n\n &.row.group-header-row {\n height: auto;\n border-bottom: ${!isAggregationApplied && borderHorizontalInner\n ? 'var(--border-style)'\n : 'none'};\n\n .group-header-aggregation-row {\n display: flex;\n\n /* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */\n height: ${isAggregationApplied ? 'var(--group-header-height)' : 0};\n }\n }\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n /* consider three group-header-rows stacked vertically, the first and second group headers have RULE 2 AND RULE 3 applied, the third group-header has only RULE 3 applied */\n &.group-header-row {\n /* RULE 1- if there are no adjacent group-headers, apply border-radius to all corners */\n border-radius: min(${theme.base['border-radius']}, 0.25rem);\n\n /* RULE-2- if there is an adjacent group-header below, remove bottom border-radius */\n &:has(+ .group-header-row) {\n border-radius: 0;\n\n & ${ColorBadge}::before {\n border-radius: 0;\n }\n }\n\n /*RULE 3- if there is an adjacent group-header, go to the adjacent group header and remove top border-radius */\n &:has(+ .group-header-row) + .group-header-row {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & ${ColorBadge}::before {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n `}\n\n &.group-header-row .stickyGroupHeader {\n position: sticky;\n left: 0;\n width: 0;\n z-index: 10;\n height: var(--group-header-height);\n\n > button {\n color: currentColor;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: max-content;\n max-width: var(--container-width);\n display: flex;\n align-items: center;\n background-color: var(--group-bg-color);\n padding-left: var(--group-left);\n margin-inline-start: 0.25rem;\n z-index: 30;\n cursor: pointer;\n white-space: nowrap;\n text-align: inherit;\n font-stretch: inherit;\n\n > .group-wrapper {\n margin-inline-start: ${groupHeader.count === 0\n ? `calc(${theme.base.spacing} * 2.25)`\n : 'unset'};\n align-items: baseline;\n }\n\n .cell-content {\n max-height: var(--group-header-height);\n padding: 0;\n }\n }\n button:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n }\n .group-header.cell {\n left: 0;\n padding-left: var(--group-left);\n }\n\n div.group-header.cell-fixed {\n background-color: var(--group-bg-color);\n }\n\n /* When the group header is stuck to the top (overlapped by another group header),\n remove the expanded-state box-shadow and add a top border for visual separation */\n @supports (container-type: scroll-state) {\n @container group-header-container scroll-state(stuck: top) {\n &:has(button[aria-expanded='true']) > div {\n box-shadow: none;\n border-top: var(--border-style);\n }\n }\n }\n `;\n});\n\nconst StyledMetaList = styled(MetaList)`\n margin-inline-start: 0;\n\n /* Overrides default MetaList padding and margin which was causing text-overflow issues */\n margin: 0;\n padding: 0 0.3rem;\n`;\nconst GroupAdditionalInfoSeparator = styled.span`\n margin-inline-start: 0.3rem;\n`;\n\n/**\n * Generates unique ARIA label IDs for accessibility.\n * - groupLabelId: for the group label (e.g., \"Status:\")\n * - groupNameId: for the group value (e.g., \"Open\")\n * - additionalInfoIds: for any additional fields shown in the group header\n * These IDs are used in aria-labelledby to improve screen reader support.\n */\nconst getAriaLabelIds = (uniqueId, additionalFields) => {\n const groupLabelId = `group-label-${uniqueId}`;\n const groupNameId = `group-name-${uniqueId}`;\n const additionalInfoIds = additionalFields?.map(\n additionalField =>\n `group-additional-info-${uniqueId}-${additionalField.id}` /* used in aria-labelledby */\n );\n return { groupLabelId, groupNameId, additionalInfoIds };\n};\n/**\n * Returns label for interval grouping based on interval and boundaries\n Response data depends on boundary settings.\n Ex: For sample data of profit\n profit --> cases(count)\n {'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}\n For Interval 10\n If the boundary is 'include-lower-only',\n and value is 10 then label -> 10 to 20\n\n If boundary is 'include-upper-only',\n and value is 10 then label -> 0 to 10\n * */\nfunction buildIntervalGroupingLabel(value, customFunction, translate) {\n const { interval, boundaries } = customFunction;\n // To restrict the decimals in labels\n const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;\n value = Number(value);\n // In case of 'include-lower-only'\n let lowerValue = value.toFixed(intervalDecimalLength);\n let upperValue = (value + interval).toFixed(intervalDecimalLength);\n // In case of boundary 'include-upper-only'\n if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {\n lowerValue = (value - interval).toFixed(intervalDecimalLength);\n upperValue = value.toFixed(intervalDecimalLength);\n }\n return `${lowerValue} ${translate('to')} ${upperValue}`;\n}\n\nexport function GroupName({ view, column, groupHeader, dateFunction, customFunction }) {\n const [translate] = useTranslate();\n const { locale, timezone } = view.meta;\n const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;\n const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;\n\n if (dateFunction) {\n return (\n <DateValueDisplay\n value={groupHeader.name}\n dateFunction={dateFunction}\n locale={locale}\n timezone={timezone}\n />\n );\n }\n\n if (isRangeGrouping) {\n /** If custom range grouping applied on number field , we need to show group name as text instead of number */\n return groupHeader.name;\n }\n\n if (isIntervalGrouping) {\n /** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */\n return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);\n }\n\n column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)\n\n const columnRendererProps = {\n ...column.getRenderingEngineProps(),\n context: {\n getValue: () => groupHeader.name,\n getExecutionContext: () => {\n return { getValue: () => groupHeader.data, name: 'groupHeader' };\n }\n }\n };\n\n return <RenderingEngine {...columnRendererProps} />;\n}\n\n/**\n * Tooltip content for the group header.\n * Shows the group label, value, and any additional fields.\n * Used for hover/focus tooltips on the group header button.\n */\nfunction GroupHeaderToolTip({ column, groupHeader, columns, additionalFields, target }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n\n return (\n <Tooltip smart target={target} showDelay='short' hideDelay='none' describeTarget={false}>\n <Text>{!column.field.hideGroupColumnNameLabel && groupHeader.label}: </Text>\n <Text>\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n <Text>{` (${groupCountFormatted})`}</Text>\n </Text>\n {!!(groupHeader.additionalFieldsData?.length && additionalFields.length) && (\n <>\n {groupHeader.additionalFieldsData?.map(additionalFieldData => {\n return (\n <>\n {' • '}\n <GroupAdditionalInfo\n groupHeader={groupHeader}\n additionalField={additionalFields.find(\n additionalField => additionalField.id === additionalFieldData.id\n )}\n columns={columns}\n additionalFieldData={additionalFieldData}\n rendererContext='GroupHeaderTooltip'\n />\n </>\n );\n })}\n </>\n )}\n </Tooltip>\n );\n}\n\n/**\n * Renders the main group header label and count.\n * - Shows the group label (e.g., \"Status:\") unless hidden by column config.\n * - Shows the group value and item count.\n * - Uses ARIA IDs for accessibility.\n */\nfunction GroupHeaderLabel({ column, groupHeader }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n const { groupLabelId, groupNameId } = getAriaLabelIds(groupHeader.uniqueId);\n return (\n <>\n <div className='group-label' />\n {!column.field.hideGroupColumnNameLabel && (\n <span\n className='group-header-groupby'\n data-test-id={groupHeader.groupBy}\n data-testid={`${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`}\n id={groupLabelId}\n >\n {groupHeader.label}:\n </span>\n )}\n <div className='group-label' />\n <span\n className='group-context-count'\n style={{ display: 'inline-flex' }}\n data-test-id='groupHeader'\n data-testid={TestIdConstants.groupHeaderCount}\n id={groupNameId}\n >\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n {/* adding whitespace pre to preserve the space at the begining of count text */}\n <span className='group-count'>{` (${groupCountFormatted})`}</span>\n <VisuallyHiddenText> items</VisuallyHiddenText>\n </span>\n </>\n );\n}\n// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable\n\nexport default function GroupHeader({ groupHeader, columns }) {\n const buttonRef = useRef();\n const view = columns[0].parent;\n const toggleGroup = useCallback(() => {\n if (groupHeader.count > 0) {\n view.type.toggleGroupExpansion({ groupHeader });\n }\n }, [groupHeader, view]);\n\n // TODO: This we are adding temporary to show freeze border until we make group header rendering change\n // when we will pick up aggregation.\n if (!groupHeader.isVisible) return null;\n\n // If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer\n const { columnId, additionalFields = [] } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n // if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined\n if (!columnId) {\n return null;\n }\n\n const column = columns.find(c => c.field.id === columnId);\n const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);\n\n // Generate unique ARIA label IDs for accessibility\n const {\n groupLabelId,\n groupNameId,\n additionalInfoIds = []\n } = getAriaLabelIds(groupHeader.uniqueId, additionalFields);\n let groupAdditionalInfo;\n\n // Prepare additional info components if present\n if (groupHeader.additionalFieldsData?.length && additionalFields.length) {\n groupAdditionalInfo = groupHeader.additionalFieldsData.reduce(\n (acc, additionalFieldData, idx) => {\n const additionalField = additionalFields.find(field => field.id === additionalFieldData.id);\n if (additionalField) {\n acc.push(\n <Flex container={{ gap: 0.5 }} id={additionalInfoIds[idx]}>\n <GroupAdditionalInfo\n additionalFieldData={additionalFieldData}\n additionalField={additionalField}\n columns={columns}\n groupHeader={groupHeader}\n rendererContext='GroupHeader'\n />\n </Flex>\n );\n }\n return acc;\n },\n []\n );\n }\n\n // FIXME: Import rather than COPY, i would rather\n return (\n <StyledGroupHeader\n groupHeader={groupHeader}\n className={cx('row group-header-row sticky-group-header')}\n data-test-id='groupHeader'\n data-testid={`${TestIdConstants.groupHeader}-${groupHeader.label}-${groupHeader.name}`}\n isAggregationApplied={isAggregationApplied}\n role='row'\n onFocus={e => {\n if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {\n e.preventDefault();\n buttonRef.current.focus();\n }\n }}\n >\n <Flex container>\n <ColorBadge colorIndicator={groupHeader.colorIndicator} />\n <div>\n <div className='stickyGroupHeader'>\n <BareButton\n ref={buttonRef}\n // ARIA labels for accessibility, includes additional info if present\n aria-labelledby={[groupLabelId, groupNameId, ...additionalInfoIds].join(' ')}\n aria-expanded={!!groupHeader.isExpanded}\n style={{\n paddingRight: 'var(--group-left)'\n }}\n onClick={() => toggleGroup()}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n // Prevent capturing of group header toggle click to its child renderers.\n event.preventDefault();\n event.stopPropagation();\n toggleGroup();\n }\n }}\n tabIndex={-1}\n icon\n >\n {groupHeader.count > 0 &&\n (groupHeader.isExpanded ? <Icon name='caret-down' /> : <Icon name='caret-right' />)}\n <div className='group-wrapper'>\n {/* Main group label and count */}\n <GroupHeaderLabel column={column} groupHeader={groupHeader} />\n {/* Render additional info if present */}\n {groupAdditionalInfo && (\n <>\n <Text variant='secondary' as={GroupAdditionalInfoSeparator}>\n •\n </Text>\n <StyledMetaList wrapItems={false} items={groupAdditionalInfo} />\n </>\n )}\n </div>\n </BareButton>\n {/* Tooltip for group header, shown on hover/focus */}\n {buttonRef.current && (\n <GroupHeaderToolTip\n target={buttonRef.current}\n column={column}\n groupHeader={groupHeader}\n columns={columns}\n additionalFields={additionalFields}\n />\n )}\n </div>\n <div className='group-header-aggregation-row'>\n {columns.map(c => {\n const cxt = {\n getValue: () =>\n groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]\n };\n return (\n <AggregatorCell\n key={c.field.id}\n column={c}\n context={cxt}\n className={cx('cell', {\n 'cell-fixed': column.frozen\n })}\n />\n );\n })}\n </div>\n </div>\n </Flex>\n </StyledGroupHeader>\n );\n}\n\nGroupHeader.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any).isRequired,\n groupHeader: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
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ACxB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,IACG,EACN,cAAK,SAAS,EAAC,8BAA8B,YAC1C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;gCACf,MAAM,GAAG,GAAG;oCACV,QAAQ,EAAE,GAAG,EAAE,CACb,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,CAAC;iCAC/E,CAAC;gCACF,OAAO,CACL,KAAC,cAAc,IAEb,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE;wCACpB,YAAY,EAAE,MAAM,CAAC,MAAM;qCAC5B,CAAC,IALG,CAAC,CAAC,KAAK,CAAC,EAAE,CAMf,CACH,CAAC;4BACJ,CAAC,CAAC,GACE,IACF,IACD,GACW,CACrB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IACpD,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CAC1D,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useRef, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Icon, Text, MetaList, Tooltip, VisuallyHiddenText, Flex } from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport { getGroupFromKey } from 'pega-ui-list-data-apis';\n\nimport { createClassName as cx } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\nimport { customFunctions, intervalGroupingBoundaries } from '../../constants';\nimport AggregatorCell from '../AggregatorCell';\nimport RenderingEngine from '../RenderingEngine/RenderCell';\nimport DateValueDisplay from '../DateValueDisplay';\nimport TestIdConstants from '../TestIdConstants';\n\nimport GroupAdditionalInfo from './GroupAdditionalInfo';\n\nconst groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;\n\nconst ColorBadge = styled.div(({ theme, colorIndicator }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n\n return css`\n position: sticky;\n inset-inline-start: 0;\n z-index: 10;\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 0.25rem;\n height: 100%;\n background-color: ${colorIndicator};\n z-index: 12;\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-top-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n border-bottom-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n `}\n }\n `;\n});\n\n/**\n * TODO: remove currentColor style after cosmos fixes the issue\n * Cosmos yet to handle dark theme on BareButton\n */\n\nconst StyledGroupHeader = styled.div(({ theme, isAggregationApplied, groupHeader }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner = theme.components.table.border['horizontal-inner'];\n\n return css`\n --group-left: ${groupheaderleftdisplacement(groupHeader)};\n background-color: var(--group-bg-color);\n\n &:has(button[aria-expanded='true']) {\n > div {\n box-shadow: ${theme.base.shadow.low};\n }\n }\n\n ${!borderHorizontalInner &&\n css`\n filter: ${theme.base.shadow['low-filter']};\n `}\n\n &.row.sticky-group-header {\n position: sticky;\n\n /* Declare as a scroll-state container so descendants can query the stuck state */\n @supports (container-type: scroll-state) {\n container-name: group-header-container;\n container-type: scroll-state;\n }\n display: block;\n top: calc(\n ${groupHeader.isLeafNode && groupHeader.level !== 0\n ? 'calc(var(--row-height) + var(--group-header-height))'\n : 'var(--row-height)'}\n );\n\n /* z-index starting from 8 because freeze-line has z-index 7 */\n z-index: ${`${8 + groupHeader.index}`};\n > .cell-action,\n .cell-fixed {\n background-color: var(--group-bg-color);\n }\n }\n\n .group-label {\n width: 0.437rem;\n display: inline-block;\n flex-shrink: 0;\n }\n\n .group-header-groupby {\n font-weight: ${theme.base['font-weight'].normal};\n }\n\n .group-context-count .group-count {\n font-weight: ${theme.base['font-weight'].bold};\n white-space: pre;\n }\n\n &.row.group-header-row {\n height: auto;\n border-bottom: ${!isAggregationApplied && borderHorizontalInner\n ? 'var(--border-style)'\n : 'none'};\n\n .group-header-aggregation-row {\n display: flex;\n\n /* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */\n height: ${isAggregationApplied ? 'var(--group-header-height)' : 0};\n }\n }\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n /* consider three group-header-rows stacked vertically, the first and second group headers have RULE 2 AND RULE 3 applied, the third group-header has only RULE 3 applied */\n &.group-header-row {\n /* RULE 1- if there are no adjacent group-headers, apply border-radius to all corners */\n border-radius: min(${theme.base['border-radius']}, 0.25rem);\n\n /* RULE-2- if there is an adjacent group-header below, remove bottom border-radius */\n &:has(+ .group-header-row) {\n border-radius: 0;\n\n & ${ColorBadge}::before {\n border-radius: 0;\n }\n }\n\n /*RULE 3- if there is an adjacent group-header, go to the adjacent group header and remove top border-radius */\n &:has(+ .group-header-row) + .group-header-row {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & ${ColorBadge}::before {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n `}\n\n &.group-header-row .stickyGroupHeader {\n position: sticky;\n left: 0;\n width: 0;\n z-index: 10;\n height: var(--group-header-height);\n\n > button {\n color: currentColor;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: max-content;\n max-width: var(--container-width);\n display: flex;\n align-items: center;\n background-color: var(--group-bg-color);\n padding-left: var(--group-left);\n margin-inline-start: 0.25rem;\n z-index: 30;\n cursor: pointer;\n white-space: nowrap;\n text-align: inherit;\n font-stretch: inherit;\n\n > .group-wrapper {\n margin-inline-start: ${groupHeader.count === 0\n ? `calc(${theme.base.spacing} * 2.25)`\n : 'unset'};\n align-items: baseline;\n }\n\n .cell-content {\n max-height: var(--group-header-height);\n padding: 0;\n }\n }\n button:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n }\n .group-header.cell {\n left: 0;\n padding-left: var(--group-left);\n }\n\n div.group-header.cell-fixed {\n background-color: var(--group-bg-color);\n }\n\n /* When the group header is stuck to the top (overlapped by another group header),\n remove the expanded-state box-shadow and add a top border for visual separation */\n @supports (container-type: scroll-state) {\n @container group-header-container scroll-state(stuck: top) {\n &:has(button[aria-expanded='true']) > div {\n box-shadow: none;\n border-top: var(--border-style);\n }\n }\n }\n `;\n});\n\nconst StyledMetaList = styled(MetaList)`\n margin-inline-start: 0;\n\n /* Overrides default MetaList padding and margin which was causing text-overflow issues */\n margin: 0;\n padding: 0 0.3rem;\n`;\nconst GroupAdditionalInfoSeparator = styled.span`\n margin-inline-start: 0.3rem;\n`;\n\n/**\n * Generates unique ARIA label IDs for accessibility.\n * - groupLabelId: for the group label (e.g., \"Status:\")\n * - groupNameId: for the group value (e.g., \"Open\")\n * - additionalInfoIds: for any additional fields shown in the group header\n * These IDs are used in aria-labelledby to improve screen reader support.\n */\nconst getAriaLabelIds = (uniqueId, additionalFields) => {\n const groupLabelId = `group-label-${uniqueId}`;\n const groupNameId = `group-name-${uniqueId}`;\n const additionalInfoIds = additionalFields?.map(\n additionalField =>\n `group-additional-info-${uniqueId}-${additionalField.id}` /* used in aria-labelledby */\n );\n return { groupLabelId, groupNameId, additionalInfoIds };\n};\n/**\n * Returns label for interval grouping based on interval and boundaries\n Response data depends on boundary settings.\n Ex: For sample data of profit\n profit --> cases(count)\n {'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}\n For Interval 10\n If the boundary is 'include-lower-only',\n and value is 10 then label -> 10 to 20\n\n If boundary is 'include-upper-only',\n and value is 10 then label -> 0 to 10\n * */\nfunction buildIntervalGroupingLabel(value, customFunction, translate) {\n const { interval, boundaries } = customFunction;\n // To restrict the decimals in labels\n const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;\n value = Number(value);\n // In case of 'include-lower-only'\n let lowerValue = value.toFixed(intervalDecimalLength);\n let upperValue = (value + interval).toFixed(intervalDecimalLength);\n // In case of boundary 'include-upper-only'\n if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {\n lowerValue = (value - interval).toFixed(intervalDecimalLength);\n upperValue = value.toFixed(intervalDecimalLength);\n }\n return `${lowerValue} ${translate('to')} ${upperValue}`;\n}\n\nexport function GroupName({ view, column, groupHeader, dateFunction, customFunction }) {\n const [translate] = useTranslate();\n const { locale, timezone } = view.meta;\n const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;\n const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;\n\n if (dateFunction) {\n return (\n <DateValueDisplay\n value={groupHeader.name}\n dateFunction={dateFunction}\n locale={locale}\n timezone={timezone}\n />\n );\n }\n\n if (isRangeGrouping) {\n /** If custom range grouping applied on number field , we need to show group name as text instead of number */\n return groupHeader.name;\n }\n\n if (isIntervalGrouping) {\n /** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */\n return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);\n }\n\n column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)\n\n const columnRendererProps = {\n ...column.getRenderingEngineProps(),\n context: {\n getValue: () => groupHeader.name,\n getExecutionContext: () => {\n return { getValue: () => groupHeader.data, name: 'groupHeader' };\n }\n }\n };\n\n return <RenderingEngine {...columnRendererProps} />;\n}\n\n/**\n * Tooltip content for the group header.\n * Shows the group label, value, and any additional fields.\n * Used for hover/focus tooltips on the group header button.\n */\nfunction GroupHeaderToolTip({ column, groupHeader, columns, additionalFields, target }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n\n return (\n <Tooltip smart target={target} showDelay='short' hideDelay='none' describeTarget={false}>\n <Text>{!column.field.hideGroupColumnNameLabel && groupHeader.label}: </Text>\n <Text>\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n <Text>{` (${groupCountFormatted})`}</Text>\n </Text>\n {!!(groupHeader.additionalFieldsData?.length && additionalFields.length) && (\n <>\n {groupHeader.additionalFieldsData?.map(additionalFieldData => {\n return (\n <>\n {' • '}\n <GroupAdditionalInfo\n groupHeader={groupHeader}\n additionalField={additionalFields.find(\n additionalField => additionalField.id === additionalFieldData.id\n )}\n columns={columns}\n additionalFieldData={additionalFieldData}\n rendererContext='GroupHeaderTooltip'\n />\n </>\n );\n })}\n </>\n )}\n </Tooltip>\n );\n}\n\n/**\n * Renders the main group header label and count.\n * - Shows the group label (e.g., \"Status:\") unless hidden by column config.\n * - Shows the group value and item count.\n * - Uses ARIA IDs for accessibility.\n */\nfunction GroupHeaderLabel({ column, groupHeader }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n const { groupLabelId, groupNameId } = getAriaLabelIds(groupHeader.uniqueId);\n return (\n <>\n <div className='group-label' />\n {!column.field.hideGroupColumnNameLabel && (\n <span\n className='group-header-groupby'\n data-test-id={groupHeader.groupBy}\n data-testid={`${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`}\n id={groupLabelId}\n >\n {groupHeader.label}:\n </span>\n )}\n <div className='group-label' />\n <span\n className='group-context-count'\n style={{ display: 'inline-flex' }}\n data-test-id='groupHeader'\n data-testid={TestIdConstants.groupHeaderCount}\n id={groupNameId}\n >\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n {/* adding whitespace pre to preserve the space at the begining of count text */}\n <span className='group-count'>{` (${groupCountFormatted})`}</span>\n <VisuallyHiddenText> items</VisuallyHiddenText>\n </span>\n </>\n );\n}\n// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable\n\nexport default function GroupHeader({ groupHeader, columns }) {\n const buttonRef = useRef();\n const view = columns[0].parent;\n const toggleGroup = useCallback(() => {\n if (groupHeader.count > 0) {\n view.type.toggleGroupExpansion({ groupHeader });\n }\n }, [groupHeader, view]);\n\n // TODO: This we are adding temporary to show freeze border until we make group header rendering change\n // when we will pick up aggregation.\n if (!groupHeader.isVisible) return null;\n\n // If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer\n const { columnId, additionalFields = [] } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n // if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined\n if (!columnId) {\n return null;\n }\n\n const column = columns.find(c => c.field.id === columnId);\n const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);\n\n // Generate unique ARIA label IDs for accessibility\n const {\n groupLabelId,\n groupNameId,\n additionalInfoIds = []\n } = getAriaLabelIds(groupHeader.uniqueId, additionalFields);\n let groupAdditionalInfo;\n\n // Prepare additional info components if present\n if (groupHeader.additionalFieldsData?.length && additionalFields.length) {\n groupAdditionalInfo = groupHeader.additionalFieldsData.reduce(\n (acc, additionalFieldData, idx) => {\n const additionalField = additionalFields.find(field => field.id === additionalFieldData.id);\n if (additionalField) {\n acc.push(\n <Flex container={{ gap: 0.5 }} id={additionalInfoIds[idx]}>\n <GroupAdditionalInfo\n additionalFieldData={additionalFieldData}\n additionalField={additionalField}\n columns={columns}\n groupHeader={groupHeader}\n rendererContext='GroupHeader'\n />\n </Flex>\n );\n }\n return acc;\n },\n []\n );\n }\n\n // FIXME: Import rather than COPY, i would rather\n return (\n <StyledGroupHeader\n groupHeader={groupHeader}\n className={cx('row group-header-row sticky-group-header')}\n data-test-id='groupHeader'\n data-testid={`${TestIdConstants.groupHeader}-${groupHeader.label}-${groupHeader.name}`}\n isAggregationApplied={isAggregationApplied}\n role='row'\n onFocus={e => {\n if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {\n e.preventDefault();\n buttonRef.current.focus();\n }\n }}\n >\n <Flex container>\n <ColorBadge colorIndicator={groupHeader.colorIndicator} />\n <div>\n <div className='stickyGroupHeader'>\n <BareButton\n ref={buttonRef}\n data-testid={`${TestIdConstants.groupHeaderButton}-${groupHeader.label}-${groupHeader.name}`}\n // ARIA labels for accessibility, includes additional info if present\n aria-labelledby={[groupLabelId, groupNameId, ...additionalInfoIds].join(' ')}\n aria-expanded={!!groupHeader.isExpanded}\n style={{\n paddingRight: 'var(--group-left)'\n }}\n onClick={() => toggleGroup()}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n // Prevent capturing of group header toggle click to its child renderers.\n event.preventDefault();\n event.stopPropagation();\n toggleGroup();\n }\n }}\n tabIndex={-1}\n icon\n >\n {groupHeader.count > 0 &&\n (groupHeader.isExpanded ? <Icon name='caret-down' /> : <Icon name='caret-right' />)}\n <div className='group-wrapper'>\n {/* Main group label and count */}\n <GroupHeaderLabel column={column} groupHeader={groupHeader} />\n {/* Render additional info if present */}\n {groupAdditionalInfo && (\n <>\n <Text variant='secondary' as={GroupAdditionalInfoSeparator}>\n •\n </Text>\n <StyledMetaList wrapItems={false} items={groupAdditionalInfo} />\n </>\n )}\n </div>\n </BareButton>\n {/* Tooltip for group header, shown on hover/focus */}\n {buttonRef.current && (\n <GroupHeaderToolTip\n target={buttonRef.current}\n column={column}\n groupHeader={groupHeader}\n columns={columns}\n additionalFields={additionalFields}\n />\n )}\n </div>\n <div className='group-header-aggregation-row'>\n {columns.map(c => {\n const cxt = {\n getValue: () =>\n groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]\n };\n return (\n <AggregatorCell\n key={c.field.id}\n column={c}\n context={cxt}\n className={cx('cell', {\n 'cell-fixed': column.frozen\n })}\n />\n );\n })}\n </div>\n </div>\n </Flex>\n </StyledGroupHeader>\n );\n}\n\nGroupHeader.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any).isRequired,\n groupHeader: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/HeaderMenu/index.jsx"],"names":[],"mappings":"AAgFA;;;mDAkNC;;;;;;;;;;;;;;;;;;sBAlSqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/HeaderMenu/index.jsx"],"names":[],"mappings":"AAgFA;;;mDAmNC;;;;;;;;;;;;;;;;;;sBAnSqB,YAAY"}
@@ -153,7 +153,7 @@ export default function HeaderMenu({ column, popoverButtonRef }) {
153
153
  // Don't show the menu for columns which are of action type eg: rowActionMenu, rowDragDrop etc
154
154
  if (firstLevelActions.flat().length === 0 || field.type === FieldType.ACTION_FIELD_TYPE)
155
155
  return null;
156
- return (_jsxs("div", { className: 'header-menu', children: [_jsx(Button, { variant: 'simple', className: 'button-more', compact: true, icon: true, "aria-expanded": forceShowMenu, "aria-label": `${translate('Actions')} - ${column.categorizedHeaderLabel}`, label: !forceShowMenu ? `${translate('Actions')}` : undefined, ref: popoverButtonRef, "aria-describedby": sortDescriptionId, onClick: () => {
156
+ return (_jsxs("div", { className: 'header-menu', children: [_jsx(Button, { "data-testid": 'column-header-menu-button', variant: 'simple', className: 'button-more', compact: true, icon: true, "aria-expanded": forceShowMenu, "aria-label": `${translate('Actions')} - ${column.categorizedHeaderLabel}`, label: !forceShowMenu ? `${translate('Actions')}` : undefined, ref: popoverButtonRef, "aria-describedby": sortDescriptionId, onClick: () => {
157
157
  setMoreContent('default');
158
158
  setForceShowMenu(true);
159
159
  }, onKeyDown: e => {
@@ -1 +1 @@
1
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ACV,KAAC,OAAO,IACN,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAE,YAAY,EACjB,KAAK,QACL,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAChC,SAAS,EAAC,cAAc,EACxB,kBAAkB;oBAClB,8FAA8F;oBAC9F,SAAS,EAAE,CAAC,CAAC,EAAE;wBACb,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,aAAa,EAAE,CAAC;4BACxC,gBAAgB,CAAC,KAAK,CAAC,CAAC;4BACxB,YAAY,CAAC,IAAI,CAAC,CAAC;4BACnB,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;wBACnC,CAAC;wBACD,IAAI,CAAC,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;4BACpB,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;wBACrC,CAAC;oBACH,CAAC,YAEA,OAAO,GACA,EACV,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,CAChC,EAEH,KAAC,kBAAkB,IAAC,EAAE,EAAE,iBAAiB,iCACtC,eAAe,GACG,IACjB,CACP,CAAC;AACJ,CAAC;AAED,UAAU,CAAC,SAAS,GAAG;IACrB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,gBAAgB,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CACpD,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,MAAM,EAAE,EAAE;IACV,gBAAgB,EAAE,EAAE;CACrB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useMemo, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n Icon,\n Popover,\n Menu,\n useElement,\n Button,\n VisuallyHiddenText,\n createUID,\n getActiveElement,\n useOuterEvent\n} from '@pega/cosmos-react-core';\nimport { removeEmptyValues, FieldType } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport DynamicFieldConfiguration from '../DynamicFieldConfiguration';\nimport FilterComponent from '../Filters/Filter';\nimport RFColumnConfigurator from '../RFColumnConfigurator';\nimport GroupingMenu from '../Grouping/GroupingMenu';\n\nimport { getActions, customizeColumn } from './actions';\n\nconst Default = 'default';\nconst Filter = 'Filter';\nconst Grouping = 'Grouping';\nconst DynamicColumnLeft = 'Combine with left';\nconst DynamicColumnRight = 'Combine with right';\nconst CustomizeColumn = 'Format';\nconst sortActionStates = ['Sort-ascending', 'Sort-descending', 'Remove-sort'];\n\nconst ariaSort = {\n asc: 'Ascending',\n desc: 'Descending'\n};\n\nfunction getFirstLevelActions(actions) {\n return removeEmptyValues(\n actions.map(function mapper(s) {\n if (Array.isArray(s)) {\n return s.map(mapper);\n }\n const { id, icon, label, show = true, onClick, disabled } = s;\n if (!show) {\n return null;\n }\n return {\n 'data-test-id': id,\n primary: label,\n visual: <Icon name={icon} />,\n id: id.replaceAll(' ', '-'), // eg: Combine with right -> Combine-with-right\n onClick,\n disabled\n };\n })\n );\n}\n\nfunction getFocusables(elementRef) {\n return elementRef.querySelectorAll(\n 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]):not([readonly]), input:not([disabled]):not([readonly]), select:not([disabled]):not([readonly])'\n );\n}\n\nfunction headerMenuTabHandler(e, popperRef) {\n const focusables = getFocusables(popperRef);\n const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;\n const activeEl = getActiveElement();\n\n if (!e.shiftKey && (activeEl === popperRef || activeEl === lastFocusable)) {\n firstFocusable?.focus();\n e.preventDefault();\n } else if (e.shiftKey && (activeEl === popperRef || activeEl === firstFocusable)) {\n lastFocusable?.focus();\n e.preventDefault();\n }\n}\n\nexport default function HeaderMenu({ column, popoverButtonRef }) {\n const view = column.parent;\n const {\n state: { clearColFilter }\n } = view;\n const [translate] = useTranslate();\n const { field } = column;\n const uid = createUID();\n const sortDescriptionId = `${uid}_description`;\n const isClearColFilter = clearColFilter === field.id;\n const sort = ariaSort[column?.getSortProperties()?.sortOrder];\n const sortSequence = column?.getSortProperties()?.sortSequence;\n const filtered = column?.filtered;\n\n const [moreContent, setMoreContent] = useState(Default);\n const [forceShowMenu, setForceShowMenu] = useState(false);\n const [sortDescription, setSortDescription] = useState('');\n const [popperRef, setPopperRef] = useElement();\n\n const finishPopOver = useCallback(() => {\n if (moreContent === Filter && isClearColFilter) {\n view.type.clearFilter(null);\n }\n if (popperRef && popoverButtonRef.current) {\n popoverButtonRef.current.focus();\n }\n setForceShowMenu(false);\n }, [moreContent, isClearColFilter, view, popperRef, popoverButtonRef]);\n\n const onUndoHierarchy = useCallback(() => {\n column.parent?.type.clearHierarchicalGroup();\n finishPopOver();\n }, [column, finishPopOver]);\n\n useEffect(() => {\n let sortStr = '';\n if (sort) sortStr = `${translate('Sorted')} ${translate(sort)}`;\n if (sortSequence) sortStr += ` ${translate('Sort priority')} ${sortSequence}`;\n if (filtered) sortStr += ` ${translate('Filtered column')}`;\n setSortDescription(sortStr);\n }, [sort, sortSequence, filtered, translate]);\n\n const actions = useMemo(\n () =>\n getActions({\n column,\n setMoreContent,\n onUndoHierarchy,\n translate,\n finishPopOver\n }),\n [column, onUndoHierarchy, translate, finishPopOver]\n );\n\n const firstLevelActions = useMemo(() => getFirstLevelActions(actions), [actions]);\n\n const content = useMemo(() => {\n switch (moreContent) {\n case Filter:\n return (\n <FilterComponent\n column={column}\n finishPopOver={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n />\n );\n case Grouping:\n return <GroupingMenu column={column} finishPopOver={finishPopOver} />;\n case DynamicColumnLeft:\n case DynamicColumnRight:\n return (\n <DynamicFieldConfiguration\n column={column}\n onSubmit={(title, templateName, bHideColumns) => {\n column.applyMerge(\n moreContent === DynamicColumnLeft ? 'left' : 'right',\n title,\n templateName,\n bHideColumns\n );\n finishPopOver();\n if (templateName === 'multiline') view.type.applyRowHeight('4');\n }}\n onCancel={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n heading={`Combine with ${moreContent === DynamicColumnLeft ? 'left' : 'right'}`}\n />\n );\n case CustomizeColumn:\n return (\n <RFColumnConfigurator\n column={column}\n finishPopOver={finishPopOver}\n onSubmit={(rfConfig, columnAlias, displayMode) => {\n customizeColumn(column, rfConfig, displayMode, columnAlias, column.alias);\n }}\n onCancel={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n />\n );\n default:\n return (\n <Menu\n scrollAt='400'\n data-test-id='action-menu'\n items={firstLevelActions.flat()}\n className='action-menu'\n focusControlEl={popoverButtonRef.current}\n onItemClick={id => {\n // NVDA/JAWS reading out the stale sort order on sort action\n // Removing intermediate sort state and adding back when we receive it from column prop\n if (sortActionStates.includes(id)) {\n setSortDescription('');\n }\n }}\n />\n );\n }\n }, [moreContent, column, finishPopOver, popoverButtonRef, firstLevelActions, view.type]);\n\n useOuterEvent('mousedown', [popperRef], () => {\n if (\n moreContent !== Filter &&\n moreContent !== 'Format' &&\n moreContent !== 'Combine with left' &&\n moreContent !== 'Combine with right'\n ) {\n finishPopOver();\n }\n });\n\n useEffect(() => {\n if (isClearColFilter) {\n setMoreContent(Filter);\n setForceShowMenu(true);\n }\n }, [isClearColFilter]);\n\n useEffect(() => {\n // Focus the first focusable element in nested menu content eg: filter,customize column etc\n if (moreContent && popperRef && moreContent !== 'default') {\n getFocusables(popperRef)?.[0]?.focus();\n }\n }, [forceShowMenu, popperRef, moreContent]);\n\n // Don't show the menu for columns which are of action type eg: rowActionMenu, rowDragDrop etc\n if (firstLevelActions.flat().length === 0 || field.type === FieldType.ACTION_FIELD_TYPE)\n return null;\n\n return (\n <div className='header-menu'>\n <Button\n variant='simple'\n className='button-more'\n compact\n icon\n aria-expanded={forceShowMenu}\n aria-label={`${translate('Actions')} - ${column.categorizedHeaderLabel}`}\n label={!forceShowMenu ? `${translate('Actions')}` : undefined}\n ref={popoverButtonRef}\n aria-describedby={sortDescriptionId}\n onClick={() => {\n setMoreContent('default');\n setForceShowMenu(true);\n }}\n onKeyDown={e => {\n if (forceShowMenu && e.key !== 'Enter') {\n // TODO remove preventDefault when popover steals the focus into its content\n e.preventDefault();\n }\n if (e.key === 'Escape' && forceShowMenu) {\n e.stopPropagation();\n setForceShowMenu(false);\n setPopperRef(null);\n }\n }}\n >\n <Icon name='more' />\n </Button>\n {forceShowMenu &&\n createPortal(\n <Popover\n className='popper'\n ref={setPopperRef}\n arrow\n target={popoverButtonRef.current}\n placement='bottom-start'\n hideOnTargetHidden\n // TODO: Consume FormDialog cosmos component in nested menu option renderers filter, group etc\n onKeyDown={e => {\n if (e.key === 'Escape' && forceShowMenu) {\n setForceShowMenu(false);\n setPopperRef(null);\n popoverButtonRef.current.focus();\n }\n if (e.key === 'Tab') {\n headerMenuTabHandler(e, popperRef);\n }\n }}\n >\n {content}\n </Popover>,\n column.parent.getDomContainer()\n )}\n\n <VisuallyHiddenText id={sortDescriptionId} aria-hidden>\n {sortDescription}\n </VisuallyHiddenText>\n </div>\n );\n}\n\nHeaderMenu.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n popoverButtonRef: PropTypes.objectOf(PropTypes.any)\n};\n\nHeaderMenu.defaultProps = {\n column: {},\n popoverButtonRef: {}\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/HeaderMenu/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACp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CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;wBACrC,CAAC;oBACH,CAAC,YAEA,OAAO,GACA,EACV,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,CAChC,EAEH,KAAC,kBAAkB,IAAC,EAAE,EAAE,iBAAiB,iCACtC,eAAe,GACG,IACjB,CACP,CAAC;AACJ,CAAC;AAED,UAAU,CAAC,SAAS,GAAG;IACrB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,gBAAgB,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CACpD,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,MAAM,EAAE,EAAE;IACV,gBAAgB,EAAE,EAAE;CACrB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useMemo, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n Icon,\n Popover,\n Menu,\n useElement,\n Button,\n VisuallyHiddenText,\n createUID,\n getActiveElement,\n useOuterEvent\n} from '@pega/cosmos-react-core';\nimport { removeEmptyValues, FieldType } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport DynamicFieldConfiguration from '../DynamicFieldConfiguration';\nimport FilterComponent from '../Filters/Filter';\nimport RFColumnConfigurator from '../RFColumnConfigurator';\nimport GroupingMenu from '../Grouping/GroupingMenu';\n\nimport { getActions, customizeColumn } from './actions';\n\nconst Default = 'default';\nconst Filter = 'Filter';\nconst Grouping = 'Grouping';\nconst DynamicColumnLeft = 'Combine with left';\nconst DynamicColumnRight = 'Combine with right';\nconst CustomizeColumn = 'Format';\nconst sortActionStates = ['Sort-ascending', 'Sort-descending', 'Remove-sort'];\n\nconst ariaSort = {\n asc: 'Ascending',\n desc: 'Descending'\n};\n\nfunction getFirstLevelActions(actions) {\n return removeEmptyValues(\n actions.map(function mapper(s) {\n if (Array.isArray(s)) {\n return s.map(mapper);\n }\n const { id, icon, label, show = true, onClick, disabled } = s;\n if (!show) {\n return null;\n }\n return {\n 'data-test-id': id,\n primary: label,\n visual: <Icon name={icon} />,\n id: id.replaceAll(' ', '-'), // eg: Combine with right -> Combine-with-right\n onClick,\n disabled\n };\n })\n );\n}\n\nfunction getFocusables(elementRef) {\n return elementRef.querySelectorAll(\n 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]):not([readonly]), input:not([disabled]):not([readonly]), select:not([disabled]):not([readonly])'\n );\n}\n\nfunction headerMenuTabHandler(e, popperRef) {\n const focusables = getFocusables(popperRef);\n const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;\n const activeEl = getActiveElement();\n\n if (!e.shiftKey && (activeEl === popperRef || activeEl === lastFocusable)) {\n firstFocusable?.focus();\n e.preventDefault();\n } else if (e.shiftKey && (activeEl === popperRef || activeEl === firstFocusable)) {\n lastFocusable?.focus();\n e.preventDefault();\n }\n}\n\nexport default function HeaderMenu({ column, popoverButtonRef }) {\n const view = column.parent;\n const {\n state: { clearColFilter }\n } = view;\n const [translate] = useTranslate();\n const { field } = column;\n const uid = createUID();\n const sortDescriptionId = `${uid}_description`;\n const isClearColFilter = clearColFilter === field.id;\n const sort = ariaSort[column?.getSortProperties()?.sortOrder];\n const sortSequence = column?.getSortProperties()?.sortSequence;\n const filtered = column?.filtered;\n\n const [moreContent, setMoreContent] = useState(Default);\n const [forceShowMenu, setForceShowMenu] = useState(false);\n const [sortDescription, setSortDescription] = useState('');\n const [popperRef, setPopperRef] = useElement();\n\n const finishPopOver = useCallback(() => {\n if (moreContent === Filter && isClearColFilter) {\n view.type.clearFilter(null);\n }\n if (popperRef && popoverButtonRef.current) {\n popoverButtonRef.current.focus();\n }\n setForceShowMenu(false);\n }, [moreContent, isClearColFilter, view, popperRef, popoverButtonRef]);\n\n const onUndoHierarchy = useCallback(() => {\n column.parent?.type.clearHierarchicalGroup();\n finishPopOver();\n }, [column, finishPopOver]);\n\n useEffect(() => {\n let sortStr = '';\n if (sort) sortStr = `${translate('Sorted')} ${translate(sort)}`;\n if (sortSequence) sortStr += ` ${translate('Sort priority')} ${sortSequence}`;\n if (filtered) sortStr += ` ${translate('Filtered column')}`;\n setSortDescription(sortStr);\n }, [sort, sortSequence, filtered, translate]);\n\n const actions = useMemo(\n () =>\n getActions({\n column,\n setMoreContent,\n onUndoHierarchy,\n translate,\n finishPopOver\n }),\n [column, onUndoHierarchy, translate, finishPopOver]\n );\n\n const firstLevelActions = useMemo(() => getFirstLevelActions(actions), [actions]);\n\n const content = useMemo(() => {\n switch (moreContent) {\n case Filter:\n return (\n <FilterComponent\n column={column}\n finishPopOver={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n />\n );\n case Grouping:\n return <GroupingMenu column={column} finishPopOver={finishPopOver} />;\n case DynamicColumnLeft:\n case DynamicColumnRight:\n return (\n <DynamicFieldConfiguration\n column={column}\n onSubmit={(title, templateName, bHideColumns) => {\n column.applyMerge(\n moreContent === DynamicColumnLeft ? 'left' : 'right',\n title,\n templateName,\n bHideColumns\n );\n finishPopOver();\n if (templateName === 'multiline') view.type.applyRowHeight('4');\n }}\n onCancel={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n heading={`Combine with ${moreContent === DynamicColumnLeft ? 'left' : 'right'}`}\n />\n );\n case CustomizeColumn:\n return (\n <RFColumnConfigurator\n column={column}\n finishPopOver={finishPopOver}\n onSubmit={(rfConfig, columnAlias, displayMode) => {\n customizeColumn(column, rfConfig, displayMode, columnAlias, column.alias);\n }}\n onCancel={finishPopOver}\n popoverButtonRef={popoverButtonRef}\n />\n );\n default:\n return (\n <Menu\n scrollAt='400'\n data-test-id='action-menu'\n items={firstLevelActions.flat()}\n className='action-menu'\n focusControlEl={popoverButtonRef.current}\n onItemClick={id => {\n // NVDA/JAWS reading out the stale sort order on sort action\n // Removing intermediate sort state and adding back when we receive it from column prop\n if (sortActionStates.includes(id)) {\n setSortDescription('');\n }\n }}\n />\n );\n }\n }, [moreContent, column, finishPopOver, popoverButtonRef, firstLevelActions, view.type]);\n\n useOuterEvent('mousedown', [popperRef], () => {\n if (\n moreContent !== Filter &&\n moreContent !== 'Format' &&\n moreContent !== 'Combine with left' &&\n moreContent !== 'Combine with right'\n ) {\n finishPopOver();\n }\n });\n\n useEffect(() => {\n if (isClearColFilter) {\n setMoreContent(Filter);\n setForceShowMenu(true);\n }\n }, [isClearColFilter]);\n\n useEffect(() => {\n // Focus the first focusable element in nested menu content eg: filter,customize column etc\n if (moreContent && popperRef && moreContent !== 'default') {\n getFocusables(popperRef)?.[0]?.focus();\n }\n }, [forceShowMenu, popperRef, moreContent]);\n\n // Don't show the menu for columns which are of action type eg: rowActionMenu, rowDragDrop etc\n if (firstLevelActions.flat().length === 0 || field.type === FieldType.ACTION_FIELD_TYPE)\n return null;\n\n return (\n <div className='header-menu'>\n <Button\n data-testid='column-header-menu-button'\n variant='simple'\n className='button-more'\n compact\n icon\n aria-expanded={forceShowMenu}\n aria-label={`${translate('Actions')} - ${column.categorizedHeaderLabel}`}\n label={!forceShowMenu ? `${translate('Actions')}` : undefined}\n ref={popoverButtonRef}\n aria-describedby={sortDescriptionId}\n onClick={() => {\n setMoreContent('default');\n setForceShowMenu(true);\n }}\n onKeyDown={e => {\n if (forceShowMenu && e.key !== 'Enter') {\n // TODO remove preventDefault when popover steals the focus into its content\n e.preventDefault();\n }\n if (e.key === 'Escape' && forceShowMenu) {\n e.stopPropagation();\n setForceShowMenu(false);\n setPopperRef(null);\n }\n }}\n >\n <Icon name='more' />\n </Button>\n {forceShowMenu &&\n createPortal(\n <Popover\n className='popper'\n ref={setPopperRef}\n arrow\n target={popoverButtonRef.current}\n placement='bottom-start'\n hideOnTargetHidden\n // TODO: Consume FormDialog cosmos component in nested menu option renderers filter, group etc\n onKeyDown={e => {\n if (e.key === 'Escape' && forceShowMenu) {\n setForceShowMenu(false);\n setPopperRef(null);\n popoverButtonRef.current.focus();\n }\n if (e.key === 'Tab') {\n headerMenuTabHandler(e, popperRef);\n }\n }}\n >\n {content}\n </Popover>,\n column.parent.getDomContainer()\n )}\n\n <VisuallyHiddenText id={sortDescriptionId} aria-hidden>\n {sortDescription}\n </VisuallyHiddenText>\n </div>\n );\n}\n\nHeaderMenu.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n popoverButtonRef: PropTypes.objectOf(PropTypes.any)\n};\n\nHeaderMenu.defaultProps = {\n column: {},\n popoverButtonRef: {}\n};\n"]}
@@ -7,6 +7,7 @@ declare namespace _default {
7
7
  let aggregateDisplayValue: string;
8
8
  let columnFilterIcon: string;
9
9
  let groupHeader: string;
10
+ let groupHeaderButton: string;
10
11
  let groupHeaderCount: string;
11
12
  let groupHeaderGroupBy: string;
12
13
  let hierarchicalCell: string;
@@ -7,6 +7,7 @@ export default {
7
7
  aggregateDisplayValue: 'aggregate-display-value',
8
8
  columnFilterIcon: 'column-filter-icon',
9
9
  groupHeader: 'group-header',
10
+ groupHeaderButton: 'group-header-button',
10
11
  groupHeaderCount: 'group-header-count',
11
12
  groupHeaderGroupBy: 'group-header-group-by',
12
13
  hierarchicalCell: 'hierarchical-cell',
@@ -1 +1 @@
1
- {"version":3,"file":"TestIdConstants.js","sourceRoot":"","sources":["../../../Core/Components/TestIdConstants.js"],"names":[],"mappings":"AAAA,eAAe;IACb,YAAY,EAAE,sBAAsB;IACpC,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,oBAAoB;IAChC,iBAAiB,EAAE,4BAA4B;IAC/C,SAAS,EAAE,mBAAmB;IAC9B,qBAAqB,EAAE,yBAAyB;IAChD,gBAAgB,EAAE,oBAAoB;IACtC,WAAW,EAAE,cAAc;IAC3B,gBAAgB,EAAE,oBAAoB;IACtC,kBAAkB,EAAE,uBAAuB;IAC3C,gBAAgB,EAAE,mBAAmB;IACrC,WAAW,EAAE,qBAAqB;CACnC,CAAC","sourcesContent":["export default {\n filterButton: 'repeat-filter-button',\n groupButton: 'repeat-group-button',\n sortButton: 'repeat-sort-button',\n moreOptionsButton: 'repeat-more-options-button',\n noRecords: 'repeat-no-records',\n aggregateDisplayValue: 'aggregate-display-value',\n columnFilterIcon: 'column-filter-icon',\n groupHeader: 'group-header',\n groupHeaderCount: 'group-header-count',\n groupHeaderGroupBy: 'group-header-group-by',\n hierarchicalCell: 'hierarchical-cell',\n contextMenu: 'repeat-context-menu'\n};\n"]}
1
+ {"version":3,"file":"TestIdConstants.js","sourceRoot":"","sources":["../../../Core/Components/TestIdConstants.js"],"names":[],"mappings":"AAAA,eAAe;IACb,YAAY,EAAE,sBAAsB;IACpC,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,oBAAoB;IAChC,iBAAiB,EAAE,4BAA4B;IAC/C,SAAS,EAAE,mBAAmB;IAC9B,qBAAqB,EAAE,yBAAyB;IAChD,gBAAgB,EAAE,oBAAoB;IACtC,WAAW,EAAE,cAAc;IAC3B,iBAAiB,EAAE,qBAAqB;IACxC,gBAAgB,EAAE,oBAAoB;IACtC,kBAAkB,EAAE,uBAAuB;IAC3C,gBAAgB,EAAE,mBAAmB;IACrC,WAAW,EAAE,qBAAqB;CACnC,CAAC","sourcesContent":["export default {\n filterButton: 'repeat-filter-button',\n groupButton: 'repeat-group-button',\n sortButton: 'repeat-sort-button',\n moreOptionsButton: 'repeat-more-options-button',\n noRecords: 'repeat-no-records',\n aggregateDisplayValue: 'aggregate-display-value',\n columnFilterIcon: 'column-filter-icon',\n groupHeader: 'group-header',\n groupHeaderButton: 'group-header-button',\n groupHeaderCount: 'group-header-count',\n groupHeaderGroupBy: 'group-header-group-by',\n hierarchicalCell: 'hierarchical-cell',\n contextMenu: 'repeat-context-menu'\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/index.jsx"],"names":[],"mappings":";AA6BA;;4CA+IC;;;;;;;;sBA5KqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Table/index.jsx"],"names":[],"mappings":";AA6BA;;4CAgJC;;;;;;;;sBA7KqB,YAAY"}
@@ -82,7 +82,7 @@ function StyledTable({ view }) {
82
82
  a11yRef.current.clickHandler(e);
83
83
  }
84
84
  }, []);
85
- return (_jsx(RsCardWrapper, { children: _jsxs(StyledTableContainer, { style: containerStyles, "data-test-id": 'table', className: cx('t-container', {
85
+ return (_jsx(RsCardWrapper, { children: _jsxs(StyledTableContainer, { style: containerStyles, "data-test-id": 'table', "data-testid": 'table', className: cx('t-container', {
86
86
  'show-expand-collapse-all': view.showGroupingExpandCollapseAll
87
87
  }), theme: theme, view: view, isFullscreen: isFullscreen, children: [_jsx(WarningBanner, { warningMessages: view.warningMessages }), _jsx(Toolbar, { view: view }), _jsx(RenderView, { type: EXTERNAL_FILTERS, view: view }), _jsx(NotificationManager, { view: view }), _jsx(RepeatingStructureA11y, { view: view, a11yRef: a11yRef, children: _jsxs("div", { className: cx('container', view.className, {
88
88
  'small-screen-table': !isSmallOrAbove
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Table/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AACvE,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AACrF,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,WAAW,MAA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CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,EACjE,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,GAAI,IAC/D,GACiB,IACJ,GACT,CACjB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useRef, useEffect } from 'react';\n\nimport { useLiveLog } from '@pega/cosmos-react-core/lib/hooks';\nimport { useFullscreenContext, useTheme } from '@pega/cosmos-react-core';\nimport { expandCollapseAllMeta } from 'pega-repeating-structures-core';\n\nimport { createClassName as cx } from '../../Utils';\nimport NotificationManager from '../../Components/NotificationManager';\nimport WarningBanner from '../../Components/WarningBanner';\nimport Toolbar from '../../Components/Toolbar';\nimport ContextMenuContainer from '../../Components/ContextMenu/ContextMenuContainer';\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport TableFooter from '../../Components/Footer';\nimport RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from '../../constants';\nimport useTranslate from '../../Hooks/useTranslate';\nimport RsCardWrapper from '../RsCardWrapper';\n\nimport GroupingHeaderCell from './GroupingHeaderCell';\nimport StyledTableContainer from './StyledTableContainer';\nimport TableA11y from './TableA11y';\nimport Body from './Body';\nimport Virtualiser from './VirtualizeWrapper';\nimport Headers from './Headers';\n\nconst contextMenuSelector = { query: '.cell:not([role=\"columnheader\"])' };\n\nfunction StyledTable({ view }) {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const { columns, rows, groupHeaders, meta: { toolbarActions } = {} } = view;\n const rowHeight = 40;\n const footerHeight = 57;\n const isSmallOrAbove = view?.state?.responsive?.sm;\n const expandCollapseAllWidth = view.showGroupingExpandCollapseAll\n ? expandCollapseAllMeta.width\n : 0;\n\n const containerStyles = {\n '--row-height': `${rowHeight}px`,\n '--footer-height': `${footerHeight}px`,\n '--expand-collapse-all-width': `${expandCollapseAllWidth}px`\n };\n const renderHeader = useCallback(\n () => <Headers ref={view.setItemElement} columns={columns} isVisible={!!rows} />,\n [columns, rows, view]\n );\n const renderFooter = useCallback(() => <TableFooter view={view} />, [view]);\n const addAction = toolbarActions?.find(action => action.id === 'Add_Record');\n const theme = useTheme();\n const containerRef = useRef(null);\n const { announcePolite } = useLiveLog();\n const [translate] = useTranslate();\n const a11yRef = useRef(\n new TableA11y(\n {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.cell',\n parentElementSelector: '.row',\n aboveLoader: '.above-loader',\n belowLoader: '.below-loader',\n expandCollpaseAll: '.expand-collapse-all',\n stickyGroupHeaderSelector: '.stickyGroupHeader',\n tableLoader: '.table-loader',\n footer: '.footer',\n addActionSelector: addAction ? `[aria-label=\"${addAction.text}\"]` : undefined\n },\n FOCUSABLE_SELECTORS,\n {\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n null,\n announcePolite,\n translate,\n ACTIONABLE_SELECTORS,\n translate('Interactive content')\n )\n );\n\n useEffect(() => {\n a11yRef.current.setContainer(containerRef.current);\n\n return () => {\n containerRef.current = null;\n a11yRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n a11yRef.current.itemsLoadedCallback();\n });\n\n const keyDownHandler = useCallback(e => {\n a11yRef.current.a11yHandler(e);\n }, []);\n\n const onClickHandler = useCallback(e => {\n const pointerType = e.nativeEvent.pointerType;\n if (pointerType) {\n a11yRef.current.clickHandler(e);\n }\n }, []);\n\n return (\n <RsCardWrapper>\n <StyledTableContainer\n style={containerStyles}\n data-test-id='table'\n className={cx('t-container', {\n 'show-expand-collapse-all': view.showGroupingExpandCollapseAll\n })}\n theme={theme}\n view={view}\n isFullscreen={isFullscreen}\n >\n <WarningBanner warningMessages={view.warningMessages} />\n <Toolbar view={view} />\n <RenderView type={EXTERNAL_FILTERS} view={view} />\n <NotificationManager view={view} />\n <RepeatingStructureA11y view={view} a11yRef={a11yRef}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n className={cx('container', view.className, {\n 'small-screen-table': !isSmallOrAbove\n })}\n ref={containerRef}\n {...view.getUIProps()}\n onClick={onClickHandler}\n onKeyDown={keyDownHandler}\n onFocusCapture={e => a11yRef.current.onFocusHandler(e)}\n onBlurCapture={e => a11yRef.current.onBlurHandler(e)}\n >\n {view.state?.groups?.length ? (\n <>\n <GroupingHeaderCell {...view.groupingHeaderCellProps} />\n <Virtualiser\n id='rootVirtualiser'\n view={view}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n isFullscreen={isFullscreen}\n >\n <Body\n groupHeaders={groupHeaders}\n columns={columns}\n hierarchicalGroupEnabled={view.hierarchicalGroupEnabled}\n />\n </Virtualiser>\n </>\n ) : (\n <Virtualiser\n id='rootVirtualiser'\n view={view}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n isFullscreen={isFullscreen}\n useVariableRowHeightVirtualization\n />\n )}\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n <ContextMenuContainer view={view} selector={contextMenuSelector} />\n </div>\n </RepeatingStructureA11y>\n </StyledTableContainer>\n </RsCardWrapper>\n );\n}\n\nStyledTable.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default StyledTable;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Table/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAA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,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,YAE1B,KAAC,IAAI,IACH,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,GACvD,GACU,IACb,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IACV,EAAE,EAAC,iBAAiB,EACpB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,kCAAkC,SAClC,CACH,EACD,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,EACjE,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,GAAI,IAC/D,GACiB,IACJ,GACT,CACjB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useRef, useEffect } from 'react';\n\nimport { useLiveLog } from '@pega/cosmos-react-core/lib/hooks';\nimport { useFullscreenContext, useTheme } from '@pega/cosmos-react-core';\nimport { expandCollapseAllMeta } from 'pega-repeating-structures-core';\n\nimport { createClassName as cx } from '../../Utils';\nimport NotificationManager from '../../Components/NotificationManager';\nimport WarningBanner from '../../Components/WarningBanner';\nimport Toolbar from '../../Components/Toolbar';\nimport ContextMenuContainer from '../../Components/ContextMenu/ContextMenuContainer';\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport TableFooter from '../../Components/Footer';\nimport RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from '../../constants';\nimport useTranslate from '../../Hooks/useTranslate';\nimport RsCardWrapper from '../RsCardWrapper';\n\nimport GroupingHeaderCell from './GroupingHeaderCell';\nimport StyledTableContainer from './StyledTableContainer';\nimport TableA11y from './TableA11y';\nimport Body from './Body';\nimport Virtualiser from './VirtualizeWrapper';\nimport Headers from './Headers';\n\nconst contextMenuSelector = { query: '.cell:not([role=\"columnheader\"])' };\n\nfunction StyledTable({ view }) {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const { columns, rows, groupHeaders, meta: { toolbarActions } = {} } = view;\n const rowHeight = 40;\n const footerHeight = 57;\n const isSmallOrAbove = view?.state?.responsive?.sm;\n const expandCollapseAllWidth = view.showGroupingExpandCollapseAll\n ? expandCollapseAllMeta.width\n : 0;\n\n const containerStyles = {\n '--row-height': `${rowHeight}px`,\n '--footer-height': `${footerHeight}px`,\n '--expand-collapse-all-width': `${expandCollapseAllWidth}px`\n };\n const renderHeader = useCallback(\n () => <Headers ref={view.setItemElement} columns={columns} isVisible={!!rows} />,\n [columns, rows, view]\n );\n const renderFooter = useCallback(() => <TableFooter view={view} />, [view]);\n const addAction = toolbarActions?.find(action => action.id === 'Add_Record');\n const theme = useTheme();\n const containerRef = useRef(null);\n const { announcePolite } = useLiveLog();\n const [translate] = useTranslate();\n const a11yRef = useRef(\n new TableA11y(\n {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.cell',\n parentElementSelector: '.row',\n aboveLoader: '.above-loader',\n belowLoader: '.below-loader',\n expandCollpaseAll: '.expand-collapse-all',\n stickyGroupHeaderSelector: '.stickyGroupHeader',\n tableLoader: '.table-loader',\n footer: '.footer',\n addActionSelector: addAction ? `[aria-label=\"${addAction.text}\"]` : undefined\n },\n FOCUSABLE_SELECTORS,\n {\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n null,\n announcePolite,\n translate,\n ACTIONABLE_SELECTORS,\n translate('Interactive content')\n )\n );\n\n useEffect(() => {\n a11yRef.current.setContainer(containerRef.current);\n\n return () => {\n containerRef.current = null;\n a11yRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n a11yRef.current.itemsLoadedCallback();\n });\n\n const keyDownHandler = useCallback(e => {\n a11yRef.current.a11yHandler(e);\n }, []);\n\n const onClickHandler = useCallback(e => {\n const pointerType = e.nativeEvent.pointerType;\n if (pointerType) {\n a11yRef.current.clickHandler(e);\n }\n }, []);\n\n return (\n <RsCardWrapper>\n <StyledTableContainer\n style={containerStyles}\n data-test-id='table'\n data-testid='table'\n className={cx('t-container', {\n 'show-expand-collapse-all': view.showGroupingExpandCollapseAll\n })}\n theme={theme}\n view={view}\n isFullscreen={isFullscreen}\n >\n <WarningBanner warningMessages={view.warningMessages} />\n <Toolbar view={view} />\n <RenderView type={EXTERNAL_FILTERS} view={view} />\n <NotificationManager view={view} />\n <RepeatingStructureA11y view={view} a11yRef={a11yRef}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n className={cx('container', view.className, {\n 'small-screen-table': !isSmallOrAbove\n })}\n ref={containerRef}\n {...view.getUIProps()}\n onClick={onClickHandler}\n onKeyDown={keyDownHandler}\n onFocusCapture={e => a11yRef.current.onFocusHandler(e)}\n onBlurCapture={e => a11yRef.current.onBlurHandler(e)}\n >\n {view.state?.groups?.length ? (\n <>\n <GroupingHeaderCell {...view.groupingHeaderCellProps} />\n <Virtualiser\n id='rootVirtualiser'\n view={view}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n isFullscreen={isFullscreen}\n >\n <Body\n groupHeaders={groupHeaders}\n columns={columns}\n hierarchicalGroupEnabled={view.hierarchicalGroupEnabled}\n />\n </Virtualiser>\n </>\n ) : (\n <Virtualiser\n id='rootVirtualiser'\n view={view}\n renderHeader={renderHeader}\n renderFooter={renderFooter}\n isFullscreen={isFullscreen}\n useVariableRowHeightVirtualization\n />\n )}\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n <ContextMenuContainer view={view} selector={contextMenuSelector} />\n </div>\n </RepeatingStructureA11y>\n </StyledTableContainer>\n </RsCardWrapper>\n );\n}\n\nStyledTable.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default StyledTable;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/lists-react",
3
- "version": "9.0.0-build.22.2",
3
+ "version": "9.0.0-build.23.1",
4
4
  "description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Pegasystems",
@@ -14,9 +14,9 @@
14
14
  "build": "tsc -b tsconfig.build.json"
15
15
  },
16
16
  "dependencies": {
17
- "@pega/cosmos-react-condition-builder": "9.0.0-build.22.2",
18
- "@pega/cosmos-react-core": "9.0.0-build.22.2",
19
- "@pega/cosmos-react-rte": "9.0.0-build.22.2",
17
+ "@pega/cosmos-react-condition-builder": "9.0.0-build.23.1",
18
+ "@pega/cosmos-react-core": "9.0.0-build.23.1",
19
+ "@pega/cosmos-react-rte": "9.0.0-build.23.1",
20
20
  "@types/lodash-es": "^4.17.12",
21
21
  "@types/react": "^17.0.62 || ^18.3.3",
22
22
  "@types/react-dom": "^17.0.20 || ^18.3.0",
@@ -24,8 +24,8 @@
24
24
  "dayjs": "^1.11.13",
25
25
  "fast-deep-equal": "^3.1.3",
26
26
  "lodash-es": "^4.17.23",
27
- "pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.22.2",
28
- "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.22.2",
27
+ "pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.23.1",
28
+ "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.23.1",
29
29
  "polished": "^4.1.0",
30
30
  "prop-types": "^15.8.1",
31
31
  "react": "^17.0.0 || ^18.0.0",
@@ -44,7 +44,7 @@
44
44
  "@testing-library/react": "^16.0.0",
45
45
  "@testing-library/user-event": "^14.6.1",
46
46
  "jest-axe": "^8.0.0",
47
- "srs-utils": "9.0.0-build.22.2",
47
+ "srs-utils": "9.0.0-build.23.1",
48
48
  "typescript": "~5.9.3"
49
49
  }
50
50
  }