@pega/lists-react 10.0.0-build.4.2 → 10.0.0-build.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +284 -83
- package/lib/Core/Components/Card/CardFieldValue.d.ts +8 -0
- package/lib/Core/Components/Card/CardFieldValue.d.ts.map +1 -0
- package/lib/Core/Components/Card/CardFieldValue.js +8 -0
- package/lib/Core/Components/Card/CardFieldValue.js.map +1 -0
- package/lib/Core/Components/Card/CardHeader.d.ts +9 -0
- package/lib/Core/Components/Card/CardHeader.d.ts.map +1 -0
- package/lib/Core/{Views/Gallery/Components/GalleryHeader.js → Components/Card/CardHeader.js} +5 -4
- package/lib/Core/Components/Card/CardHeader.js.map +1 -0
- package/lib/Core/Components/Card/CardSubHeading.d.ts +10 -0
- package/lib/Core/Components/Card/CardSubHeading.d.ts.map +1 -0
- package/lib/Core/Components/Card/CardSubHeading.js +9 -0
- package/lib/Core/Components/Card/CardSubHeading.js.map +1 -0
- package/lib/Core/Components/Card/cardData.d.ts +48 -0
- package/lib/Core/Components/Card/cardData.d.ts.map +1 -0
- package/lib/Core/{Views/Gallery/utils.js → Components/Card/cardData.js} +55 -52
- package/lib/Core/Components/Card/cardData.js.map +1 -0
- package/lib/Core/Components/Card/hooks/useRowActions.d.ts.map +1 -0
- package/lib/Core/Components/Card/hooks/useRowActions.js.map +1 -0
- package/lib/Core/Components/Card/index.d.ts +5 -0
- package/lib/Core/Components/Card/index.d.ts.map +1 -0
- package/lib/Core/Components/Card/index.js +5 -0
- package/lib/Core/Components/Card/index.js.map +1 -0
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js +3 -3
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +2 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
- package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -1
- package/lib/Core/Components/GroupRenderer/index.js +7 -2
- package/lib/Core/Components/GroupRenderer/index.js.map +1 -1
- package/lib/Core/Components/RSWrapper/index.d.ts.map +1 -1
- package/lib/Core/Components/RSWrapper/index.js +4 -0
- package/lib/Core/Components/RSWrapper/index.js.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js +5 -2
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/RefreshBanner.d.ts +5 -1
- package/lib/Core/Components/Toolbar/RefreshBanner.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/RefreshBanner.js +22 -6
- package/lib/Core/Components/Toolbar/RefreshBanner.js.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.js +2 -2
- package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.js +10 -4
- package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.js +8 -7
- 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 +3 -3
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -1
- package/lib/Core/Views/Gallery/Gallery.types.d.ts +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -1
- package/lib/Core/Views/Gallery/GalleryContainer.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/GalleryContainer.js +1 -1
- package/lib/Core/Views/Gallery/GalleryContainer.js.map +1 -1
- package/lib/Core/Views/Gallery/index.d.ts +1 -1
- package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/index.js +6 -9
- package/lib/Core/Views/Gallery/index.js.map +1 -1
- package/lib/Core/Views/Kanban/Kanban.styles.d.ts +13 -0
- package/lib/Core/Views/Kanban/Kanban.styles.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/Kanban.styles.js +53 -0
- package/lib/Core/Views/Kanban/Kanban.styles.js.map +1 -0
- package/lib/Core/Views/Kanban/Kanban.types.d.ts +10 -0
- package/lib/Core/Views/Kanban/Kanban.types.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/Kanban.types.js +2 -0
- package/lib/Core/Views/Kanban/Kanban.types.js.map +1 -0
- package/lib/Core/Views/Kanban/KanbanCard.d.ts +7 -0
- package/lib/Core/Views/Kanban/KanbanCard.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/KanbanCard.js +20 -0
- package/lib/Core/Views/Kanban/KanbanCard.js.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLane.d.ts +23 -0
- package/lib/Core/Views/Kanban/KanbanLane.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLane.js +21 -0
- package/lib/Core/Views/Kanban/KanbanLane.js.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLaneHeader.d.ts +12 -0
- package/lib/Core/Views/Kanban/KanbanLaneHeader.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLaneHeader.js +16 -0
- package/lib/Core/Views/Kanban/KanbanLaneHeader.js.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.d.ts +20 -0
- package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.js +37 -0
- package/lib/Core/Views/Kanban/KanbanLaneVirtualizer.js.map +1 -0
- package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.d.ts +19 -0
- package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.js +32 -0
- package/lib/Core/Views/Kanban/hooks/useKanbanLanesVirtualization.js.map +1 -0
- package/lib/Core/Views/Kanban/index.d.ts +9 -0
- package/lib/Core/Views/Kanban/index.d.ts.map +1 -0
- package/lib/Core/Views/Kanban/index.js +63 -0
- package/lib/Core/Views/Kanban/index.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts +2 -2
- package/lib/Core/templateFeatureSupport.js +2 -2
- package/lib/Core/templateFeatureSupport.js.map +1 -1
- package/package.json +7 -7
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +0 -8
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +0 -8
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +0 -1
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +0 -8
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +0 -1
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +0 -1
- package/lib/Core/Views/Gallery/utils.d.ts +0 -36
- package/lib/Core/Views/Gallery/utils.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/utils.js.map +0 -1
- /package/lib/Core/{Views/Gallery → Components/Card}/hooks/useRowActions.d.ts +0 -0
- /package/lib/Core/{Views/Gallery → Components/Card}/hooks/useRowActions.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,MAAM,2BAA2B,GAAG,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC;AAEzF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE;IAC1D,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,C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port 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 /* On scroll-state-stuck shadow will be removed on all group-header-row. Below shadow will be applied only to the first group-header-row. */\n &.group-header-row:nth-child(${groupHeader.level + 1}) {\n filter: ${theme.base.shadow['low-filter']};\n }\n\n &:has(button[aria-expanded='true']) {\n > div {\n box-shadow: ${theme.base.shadow.low};\n }\n }\n\n ${!borderHorizontalInner &&\n css`\n > div {\n /* On scroll-state-stuck this shadow will be removed */\n box-shadow: ${theme.base.shadow.low};\n }\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 }\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]\n .sort((colA, colB) => colA.order - colB.order)\n .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
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEz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,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;iCAC7C,GAAG,CAAC,CAAC,CAAC,EAAE;gCACP,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,GACA,IACD,IACF,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 /* On scroll-state-stuck shadow will be removed on all group-header-row. Below shadow will be applied only to the first group-header-row. */\n &.group-header-row:nth-child(${groupHeader.level + 1}) {\n filter: ${theme.base.shadow['low-filter']};\n }\n\n &:has(button[aria-expanded='true']) {\n > div {\n box-shadow: ${theme.base.shadow.low};\n }\n }\n\n ${!borderHorizontalInner &&\n css`\n > div {\n /* On scroll-state-stuck this shadow will be removed */\n box-shadow: ${theme.base.shadow.low};\n }\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 }\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\nconst StyledGroupName = styled.span`\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\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 {/* TODO: refactor this to a flex based DOM instead of empty div containers for spacing */}\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 <StyledGroupName>\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n </StyledGroupName>\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 <Flex item={{ grow: 1 }} container={{ direction: 'column' }}>\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]\n .sort((colA, colB) => colA.order - colB.order)\n .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 </Flex>\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/RSWrapper/index.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Components/RSWrapper/index.jsx"],"names":[],"mappings":"AAgCO;;4CAEN"}
|
|
@@ -7,6 +7,7 @@ import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
|
7
7
|
import styles from '../../Views/rs-styles';
|
|
8
8
|
import Table from '../../Views/Table';
|
|
9
9
|
import Gallery from '../../Views/Gallery';
|
|
10
|
+
import Kanban from '../../Views/Kanban';
|
|
10
11
|
import Timeline from '../../Views/Timeline';
|
|
11
12
|
import Map from '../../Views/Map';
|
|
12
13
|
import repeatComponent from '../../index';
|
|
@@ -36,6 +37,9 @@ const RSWrapper = ({ view }) => {
|
|
|
36
37
|
case REPEATING_STRUCTURE_TEMPLATES.GALLERY:
|
|
37
38
|
Component = Gallery;
|
|
38
39
|
break;
|
|
40
|
+
case REPEATING_STRUCTURE_TEMPLATES.KANBAN:
|
|
41
|
+
Component = Kanban;
|
|
42
|
+
break;
|
|
39
43
|
case REPEATING_STRUCTURE_TEMPLATES.TIMELINE:
|
|
40
44
|
Component = Timeline;
|
|
41
45
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/RSWrapper/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAClC,OAAO,eAAe,MAAM,aAAa,CAAC;AAC1C,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,cAAK,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAC,CAAC,CAAC,GAAG,EAAE;IAC9F,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAE1C,OAAO,GAAG,CAAA;MACN,MAAM;;MAEN,UAAU;QACZ,UAAU,CAAC,CAAC,CAAC;QACb,GAAG,CAAA;;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AAE,CAAC;IACjC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAEtC,OAAO,CACL,KAAC,eAAe,cACd,KAAC,iBAAiB,IAChB,GAAG,EAAE,CAAC,CAAC,EAAE;gBACP,eAAe,CAAC,CAAC,CAAC,CAAC;gBACnB,eAAe,CAAC,OAAO,GAAG,CAAC,CAAC;YAC9B,CAAC,EACD,KAAK,EAAE,YAAY,EACnB,SAAS,EAAC,YAAY,YAEtB,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,GACP,GACJ,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,SAAS,CAAC,SAAS,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAErE,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACtC,OAAO,CACL,KAAC,oBAAoB,cACnB,KAAC,eAAe,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,GACnB,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC","sourcesContent":["import { forwardRef, memo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport styled, { css } from 'styled-components';\n\nimport { Fullscreen, useFullscreenContext } from '@pega/cosmos-react-core';\nimport { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\nimport styles from '../../Views/rs-styles';\nimport Table from '../../Views/Table';\nimport Gallery from '../../Views/Gallery';\nimport Timeline from '../../Views/Timeline';\nimport Map from '../../Views/Map';\nimport repeatComponent from '../../index';\nimport useConfirmationModal from '../../Hooks/useConfirmationModal';\nimport useSmallScreen from '../../Hooks/useSmallScreen';\nimport { LocalizationProvider } from '../../Context/LocalizationContext';\n\nconst StyledRSContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(() => {\n const fullscreen = useFullscreenContext();\n\n return css`\n ${styles}\n\n ${fullscreen &&\n fullscreen[0] &&\n css`\n height: 100%;\n `}\n `;\n});\n\nexport const CosmosProviders = ({ children }) => {\n return <Fullscreen>{children}</Fullscreen>;\n};\n\nconst RSWrapper = ({ view }) => {\n /** Read template from view, as changeTemplate feature can mutate the template */\n const { template, setDomContainer, columns } = view;\n\n let Component;\n switch (template) {\n case REPEATING_STRUCTURE_TEMPLATES.GALLERY:\n Component = Gallery;\n break;\n case REPEATING_STRUCTURE_TEMPLATES.TIMELINE:\n Component = Timeline;\n break;\n case REPEATING_STRUCTURE_TEMPLATES.MAP:\n Component = Map;\n break;\n default:\n Component = Table;\n }\n\n useConfirmationModal({ view });\n\n /**\n * Adding all column level styles into columnStyles on DOMContainer.\n * Since domContainer is the only ref available across the features.\n * If some feature want to override something (say Resize the width), that only refelects if we add styles here.\n * Other wise fall into specificity/precedence of local CSS variables.\n * This won't effect other RS views, since these styles are generated through features.\n * If a feature is not applicable it won't add styles to this object.\n */\n const columnStyles = columns?.reduce((acc, column) => {\n const { style, field, hidden } = column;\n if (hidden) return acc;\n Object.entries(style).forEach(([s, v]) => {\n acc[`--col-${s}-${field.idHash}`] = v;\n });\n return acc;\n }, {});\n\n const domContainerRef = useRef();\n useSmallScreen(view, domContainerRef);\n\n return (\n <CosmosProviders>\n <StyledRSContainer\n ref={r => {\n setDomContainer(r);\n domContainerRef.current = r;\n }}\n style={columnStyles}\n className='rs-wrapper'\n >\n <Component view={view} />\n </StyledRSContainer>\n </CosmosProviders>\n );\n};\n\nRSWrapper.displayName = 'RSWrapper';\n\nRSWrapper.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nconst RepeatComponent = memo(forwardRef(repeatComponent(RSWrapper)));\n\nconst WithLocalization = (props, ref) => {\n return (\n <LocalizationProvider>\n <RepeatComponent {...props} ref={ref} />\n </LocalizationProvider>\n );\n};\n\nexport default memo(forwardRef(WithLocalization));\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/RSWrapper/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAClC,OAAO,eAAe,MAAM,aAAa,CAAC;AAC1C,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,cAAK,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAC,CAAC,CAAC,GAAG,EAAE;IAC9F,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAE1C,OAAO,GAAG,CAAA;MACN,MAAM;;MAEN,UAAU;QACZ,UAAU,CAAC,CAAC,CAAC;QACb,GAAG,CAAA;;KAEF;GACF,CAAC;AACJ,CAAC,C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CAAC,CAAC;IAEP,MAAM,eAAe,GAAG,MAAM,EAAE,CAAC;IACjC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAEtC,OAAO,CACL,KAAC,eAAe,cACd,KAAC,iBAAiB,IAChB,GAAG,EAAE,CAAC,CAAC,EAAE;gBACP,eAAe,CAAC,CAAC,CAAC,CAAC;gBACnB,eAAe,CAAC,OAAO,GAAG,CAAC,CAAC;YAC9B,CAAC,EACD,KAAK,EAAE,YAAY,EACnB,SAAS,EAAC,YAAY,YAEtB,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,GACP,GACJ,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,SAAS,CAAC,SAAS,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAErE,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACtC,OAAO,CACL,KAAC,oBAAoB,cACnB,KAAC,eAAe,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,GACnB,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC","sourcesContent":["import { forwardRef, memo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport styled, { css } from 'styled-components';\n\nimport { Fullscreen, useFullscreenContext } from '@pega/cosmos-react-core';\nimport { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\nimport styles from '../../Views/rs-styles';\nimport Table from '../../Views/Table';\nimport Gallery from '../../Views/Gallery';\nimport Kanban from '../../Views/Kanban';\nimport Timeline from '../../Views/Timeline';\nimport Map from '../../Views/Map';\nimport repeatComponent from '../../index';\nimport useConfirmationModal from '../../Hooks/useConfirmationModal';\nimport useSmallScreen from '../../Hooks/useSmallScreen';\nimport { LocalizationProvider } from '../../Context/LocalizationContext';\n\nconst StyledRSContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(() => {\n const fullscreen = useFullscreenContext();\n\n return css`\n ${styles}\n\n ${fullscreen &&\n fullscreen[0] &&\n css`\n height: 100%;\n `}\n `;\n});\n\nexport const CosmosProviders = ({ children }) => {\n return <Fullscreen>{children}</Fullscreen>;\n};\n\nconst RSWrapper = ({ view }) => {\n /** Read template from view, as changeTemplate feature can mutate the template */\n const { template, setDomContainer, columns } = view;\n\n let Component;\n switch (template) {\n case REPEATING_STRUCTURE_TEMPLATES.GALLERY:\n Component = Gallery;\n break;\n case REPEATING_STRUCTURE_TEMPLATES.KANBAN:\n Component = Kanban;\n break;\n case REPEATING_STRUCTURE_TEMPLATES.TIMELINE:\n Component = Timeline;\n break;\n case REPEATING_STRUCTURE_TEMPLATES.MAP:\n Component = Map;\n break;\n default:\n Component = Table;\n }\n\n useConfirmationModal({ view });\n\n /**\n * Adding all column level styles into columnStyles on DOMContainer.\n * Since domContainer is the only ref available across the features.\n * If some feature want to override something (say Resize the width), that only refelects if we add styles here.\n * Other wise fall into specificity/precedence of local CSS variables.\n * This won't effect other RS views, since these styles are generated through features.\n * If a feature is not applicable it won't add styles to this object.\n */\n const columnStyles = columns?.reduce((acc, column) => {\n const { style, field, hidden } = column;\n if (hidden) return acc;\n Object.entries(style).forEach(([s, v]) => {\n acc[`--col-${s}-${field.idHash}`] = v;\n });\n return acc;\n }, {});\n\n const domContainerRef = useRef();\n useSmallScreen(view, domContainerRef);\n\n return (\n <CosmosProviders>\n <StyledRSContainer\n ref={r => {\n setDomContainer(r);\n domContainerRef.current = r;\n }}\n style={columnStyles}\n className='rs-wrapper'\n >\n <Component view={view} />\n </StyledRSContainer>\n </CosmosProviders>\n );\n};\n\nRSWrapper.displayName = 'RSWrapper';\n\nRSWrapper.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nconst RepeatComponent = memo(forwardRef(repeatComponent(RSWrapper)));\n\nconst WithLocalization = (props, ref) => {\n return (\n <LocalizationProvider>\n <RepeatComponent {...props} ref={ref} />\n </LocalizationProvider>\n );\n};\n\nexport default memo(forwardRef(WithLocalization));\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdvanceToolbar.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/AdvanceToolbar.jsx"],"names":[],"mappings":"AAwBA;;
|
|
1
|
+
{"version":3,"file":"AdvanceToolbar.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/AdvanceToolbar.jsx"],"names":[],"mappings":"AAwBA;;4CAyHC;;;;;;;;;sBAjJqB,YAAY"}
|
|
@@ -20,7 +20,7 @@ import ValidateMessage from './ValidateMessage';
|
|
|
20
20
|
import useFormControlProps from './hooks/useFormControlProps';
|
|
21
21
|
import useWrapAction from './hooks/useWrapAction';
|
|
22
22
|
export default function AdvanceToolbar({ view }) {
|
|
23
|
-
const { selectedRecordsCount, meta: { basicMode, selectionMode, title, showTitle, headingTag, toolbarActions, allowBulkActions, mapFieldIds } = {}, rows, state, getContext, isLoading, showCount, refreshNotification, type: { forceRefresh }, announceCount, template } = view;
|
|
23
|
+
const { selectedRecordsCount, meta: { basicMode, selectionMode, title, showTitle, headingTag, toolbarActions, allowBulkActions, allowRefresh, mapFieldIds } = {}, rows, state, getContext, isLoading, showCount, refreshNotification, type: { forceRefresh }, announceCount, template } = view;
|
|
24
24
|
const { getRequiredDef } = getContext();
|
|
25
25
|
const { validatemessage } = getRequiredDef() || {};
|
|
26
26
|
const { viewSelector, createEditViewContent } = usePersonalization({ view });
|
|
@@ -31,6 +31,9 @@ export default function AdvanceToolbar({ view }) {
|
|
|
31
31
|
const sort = useSort({ view });
|
|
32
32
|
const { actions, actionsButtonRef, selectedActionContent } = useMore({ view });
|
|
33
33
|
const enableActionsMenu = selectionMode === SELECTION_MODES.multi && selectedRecordsCount !== 0;
|
|
34
|
+
const activePersonalization = state.personalization?.active;
|
|
35
|
+
const activePersonalizationName = state.personalization?.allPersonalizations?.[activePersonalization]?.name;
|
|
36
|
+
const viewName = activePersonalizationName ? `${title}: ${activePersonalizationName}` : title;
|
|
34
37
|
const formControlProps = useFormControlProps(view);
|
|
35
38
|
const wrapAction = useWrapAction(view);
|
|
36
39
|
const additionalActions = (_jsxs(_Fragment, { children: [basicMode && (_jsx(ToolbarActions, { toolbarActions: toolbarActions?.filter(action => !action.id.startsWith('Add')) })), allowBulkActions && template !== REPEATING_STRUCTURE_TEMPLATES.TIMELINE && (_jsx(ActionsMenu, { enableActionsMenu: enableActionsMenu, view: view }))] }));
|
|
@@ -42,7 +45,7 @@ export default function AdvanceToolbar({ view }) {
|
|
|
42
45
|
}
|
|
43
46
|
: undefined;
|
|
44
47
|
const Toolbar = template === REPEATING_STRUCTURE_TEMPLATES.MAP ? (_jsx(MapToolbar, { locationFieldId: mapFieldIds?.location, name: title, showName: showTitle, headingTag: headingTag, formControlProps: formControlProps, rows: rows, count: count, createNew: createNew, additionalActions: additionalActions })) : (_jsxs(_Fragment, { children: [_jsx(ListToolbar, { name: title, showName: showTitle, headingTag: headingTag, formControlProps: formControlProps, viewSelector: viewSelector, search: search, count: count, additionalActions: additionalActions, filter: filter, group: showFeatureForTemplate(template, 'group') && group, sort: sort, actions: actions, actionsButtonRef: actionsButtonRef, createNew: createNew, wrap: wrapAction }), selectedActionContent, createEditViewContent] }));
|
|
45
|
-
return (_jsxs(AnnounceRowsCount, { state: state, count: count, isLoading: isLoading, announceCount: announceCount, children: [_jsx(ValidateMessage, { message: validatemessage, children: Toolbar }), refreshNotification && (_jsx(RefreshBanner, { refreshNotification: refreshNotification, forceRefresh: forceRefresh }))] }));
|
|
48
|
+
return (_jsxs(AnnounceRowsCount, { state: state, count: count, isLoading: isLoading, announceCount: announceCount, children: [_jsx(ValidateMessage, { message: validatemessage, children: Toolbar }), refreshNotification && (_jsx(RefreshBanner, { refreshNotification: refreshNotification, forceRefresh: forceRefresh, viewName: viewName, allowRefresh: allowRefresh }))] }));
|
|
46
49
|
}
|
|
47
50
|
AdvanceToolbar.propTypes = {
|
|
48
51
|
view: PropTypes.objectOf(PropTypes.any).isRequired
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdvanceToolbar.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/AdvanceToolbar.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,sBAAsB,MAAM,8BAA8B,CAAC;AAElE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,6BAA6B,CAAC;AAC9D,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE;IAC7C,MAA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,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { ListToolbar } from '@pega/cosmos-react-core';\nimport { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\nimport { SELECTION_MODES } from '../../constants';\nimport showFeatureForTemplate from '../../templateFeatureSupport';\n\nimport ActionsMenu from './ActionsMenu';\nimport MapToolbar from './Map/MapToolbar';\nimport ToolbarActions from './ToolbarActions';\nimport useSearch from './hooks/useSearch';\nimport useFilter from './hooks/useFilter';\nimport usePersonalization from './hooks/usePersonalization';\nimport useMore from './hooks/useMore';\nimport useGroup from './hooks/useGroup/useGroup';\nimport useSort from './hooks/useSort/useSort';\nimport getCount from './utils/getCount';\nimport RefreshBanner from './RefreshBanner';\nimport AnnounceRowsCount from './AnnounceRowsCount';\nimport ValidateMessage from './ValidateMessage';\nimport useFormControlProps from './hooks/useFormControlProps';\nimport useWrapAction from './hooks/useWrapAction';\n\nexport default function AdvanceToolbar({ view }) {\n const {\n selectedRecordsCount,\n meta: {\n basicMode,\n selectionMode,\n title,\n showTitle,\n headingTag,\n toolbarActions,\n allowBulkActions,\n allowRefresh,\n mapFieldIds\n } = {},\n rows,\n state,\n getContext,\n isLoading,\n showCount,\n refreshNotification,\n type: { forceRefresh },\n announceCount,\n template\n } = view;\n const { getRequiredDef } = getContext();\n const { validatemessage } = getRequiredDef() || {};\n const { viewSelector, createEditViewContent } = usePersonalization({ view });\n const search = useSearch({ view });\n const count = showCount ? getCount({ view }) : undefined;\n const filter = useFilter({ view });\n const group = useGroup({ view });\n const sort = useSort({ view });\n const { actions, actionsButtonRef, selectedActionContent } = useMore({ view });\n const enableActionsMenu = selectionMode === SELECTION_MODES.multi && selectedRecordsCount !== 0;\n const activePersonalization = state.personalization?.active;\n const activePersonalizationName =\n state.personalization?.allPersonalizations?.[activePersonalization]?.name;\n const viewName = activePersonalizationName ? `${title}: ${activePersonalizationName}` : title;\n const formControlProps = useFormControlProps(view);\n const wrapAction = useWrapAction(view);\n\n const additionalActions = (\n <>\n {basicMode && (\n <ToolbarActions\n toolbarActions={toolbarActions?.filter(action => !action.id.startsWith('Add'))}\n />\n )}\n {allowBulkActions && template !== REPEATING_STRUCTURE_TEMPLATES.TIMELINE && (\n <ActionsMenu enableActionsMenu={enableActionsMenu} view={view} />\n )}\n </>\n );\n\n const createNewAction = toolbarActions?.find(action => action.id.startsWith('Add'));\n const createNew =\n createNewAction && basicMode\n ? {\n label: createNewAction?.text,\n onClick: createNewAction.onClick\n }\n : undefined;\n\n const Toolbar =\n template === REPEATING_STRUCTURE_TEMPLATES.MAP ? (\n <MapToolbar\n locationFieldId={mapFieldIds?.location}\n name={title}\n showName={showTitle}\n headingTag={headingTag}\n formControlProps={formControlProps}\n rows={rows}\n count={count}\n createNew={createNew}\n additionalActions={additionalActions}\n />\n ) : (\n <>\n <ListToolbar\n name={title}\n showName={showTitle}\n headingTag={headingTag}\n formControlProps={formControlProps}\n viewSelector={viewSelector}\n search={search}\n count={count}\n additionalActions={additionalActions}\n filter={filter}\n group={showFeatureForTemplate(template, 'group') && group}\n sort={sort}\n actions={actions}\n actionsButtonRef={actionsButtonRef}\n createNew={createNew}\n wrap={wrapAction}\n />\n {selectedActionContent}\n {createEditViewContent}\n </>\n );\n\n return (\n <AnnounceRowsCount\n state={state}\n count={count}\n isLoading={isLoading}\n announceCount={announceCount}\n >\n <ValidateMessage message={validatemessage}>\n {Toolbar}\n {/* FIXME: This implementation of error status should be considered temporary until an official, and properly accessible, spec is determined. */}\n </ValidateMessage>\n {refreshNotification && (\n <RefreshBanner\n refreshNotification={refreshNotification}\n forceRefresh={forceRefresh}\n viewName={viewName}\n allowRefresh={allowRefresh}\n />\n )}\n </AnnounceRowsCount>\n );\n}\n\nAdvanceToolbar.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
declare function RefreshBanner({ refreshNotification, forceRefresh }: {
|
|
1
|
+
declare function RefreshBanner({ refreshNotification, forceRefresh, viewName, allowRefresh }: {
|
|
2
2
|
refreshNotification: any;
|
|
3
3
|
forceRefresh: any;
|
|
4
|
+
viewName: any;
|
|
5
|
+
allowRefresh: any;
|
|
4
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
declare namespace RefreshBanner {
|
|
6
8
|
namespace propTypes {
|
|
@@ -8,6 +10,8 @@ declare namespace RefreshBanner {
|
|
|
8
10
|
[x: string]: any;
|
|
9
11
|
}>;
|
|
10
12
|
let forceRefresh: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
+
let viewName: PropTypes.Validator<string>;
|
|
14
|
+
let allowRefresh: PropTypes.Requireable<boolean>;
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
17
|
export default RefreshBanner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshBanner.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/RefreshBanner.jsx"],"names":[],"mappings":"AAmBA
|
|
1
|
+
{"version":3,"file":"RefreshBanner.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/RefreshBanner.jsx"],"names":[],"mappings":"AAmBA;;;;;4CAsDC;;;;;;;;;;;;sBAzEqB,YAAY"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import { useState, useEffect, useRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import { Banner, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
5
|
+
import { Banner, defaultThemeProp, useI18n, useLiveLog } from '@pega/cosmos-react-core';
|
|
6
6
|
const StyledBanner = styled(Banner)(({ theme }) => {
|
|
7
7
|
return css `
|
|
8
8
|
flex-shrink: 0;
|
|
@@ -14,12 +14,26 @@ const StyledBanner = styled(Banner)(({ theme }) => {
|
|
|
14
14
|
`;
|
|
15
15
|
});
|
|
16
16
|
StyledBanner.defaultProps = defaultThemeProp;
|
|
17
|
-
export default function RefreshBanner({ refreshNotification, forceRefresh }) {
|
|
17
|
+
export default function RefreshBanner({ refreshNotification, forceRefresh, viewName, allowRefresh }) {
|
|
18
18
|
const { id: notificationId, message, refreshActionLabel } = refreshNotification || {};
|
|
19
19
|
const [showBanner, setShowBanner] = useState(true);
|
|
20
|
+
const previousNotificationId = useRef(null);
|
|
21
|
+
const t = useI18n();
|
|
22
|
+
const { announcePolite } = useLiveLog();
|
|
20
23
|
useEffect(() => {
|
|
24
|
+
if (previousNotificationId.current === notificationId)
|
|
25
|
+
return;
|
|
21
26
|
setShowBanner(true);
|
|
22
|
-
|
|
27
|
+
if (message) {
|
|
28
|
+
announcePolite({
|
|
29
|
+
message: t(allowRefresh
|
|
30
|
+
? 'refresh_notification_instructions_with_toolbar_actions'
|
|
31
|
+
: 'refresh_notification_instructions', [viewName]),
|
|
32
|
+
type: 'info'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
previousNotificationId.current = notificationId;
|
|
36
|
+
}, [allowRefresh, announcePolite, message, notificationId, t, viewName]);
|
|
23
37
|
return (_jsx(_Fragment, { children: showBanner && (_jsx(StyledBanner, { variant: 'info', messages: [
|
|
24
38
|
{
|
|
25
39
|
label: message,
|
|
@@ -30,10 +44,12 @@ export default function RefreshBanner({ refreshNotification, forceRefresh }) {
|
|
|
30
44
|
}
|
|
31
45
|
}
|
|
32
46
|
}
|
|
33
|
-
], onDismiss: () => setShowBanner(false) })) }));
|
|
47
|
+
], onDismiss: () => setShowBanner(false) }, notificationId)) }));
|
|
34
48
|
}
|
|
35
49
|
RefreshBanner.propTypes = {
|
|
36
50
|
refreshNotification: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
37
|
-
forceRefresh: PropTypes.func.isRequired
|
|
51
|
+
forceRefresh: PropTypes.func.isRequired,
|
|
52
|
+
viewName: PropTypes.string.isRequired,
|
|
53
|
+
allowRefresh: PropTypes.bool
|
|
38
54
|
};
|
|
39
55
|
//# sourceMappingURL=RefreshBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshBanner.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/RefreshBanner.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RefreshBanner.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/RefreshBanner.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAExF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAChD,OAAO,GAAG,CAAA;;0BAEc,KAAK,CAAC,IAAI,CAAC,OAAO;uBACrB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;GAItC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,YAAY,EACb;IACC,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,IAAI,EAAE,CAAC;IACtF,MAAM,CAAC,UAAU,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U;IACvC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACrC,YAAY,EAAE,SAAS,CAAC,IAAI;CAC7B,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useState, useEffect, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Banner, defaultThemeProp, useI18n, useLiveLog } from '@pega/cosmos-react-core';\n\nconst StyledBanner = styled(Banner)(({ theme }) => {\n return css`\n flex-shrink: 0;\n margin-bottom: calc(${theme.base.spacing} * 2);\n margin-top: calc(${theme.base.spacing} * 2);\n ul {\n margin-inline-end: unset;\n }\n `;\n});\n\nStyledBanner.defaultProps = defaultThemeProp;\n\nexport default function RefreshBanner({\n refreshNotification,\n forceRefresh,\n viewName,\n allowRefresh\n}) {\n const { id: notificationId, message, refreshActionLabel } = refreshNotification || {};\n const [showBanner, setShowBanner] = useState(true);\n const previousNotificationId = useRef(null);\n const t = useI18n();\n const { announcePolite } = useLiveLog();\n\n useEffect(() => {\n if (previousNotificationId.current === notificationId) return;\n\n setShowBanner(true);\n\n if (message) {\n announcePolite({\n message: t(\n allowRefresh\n ? 'refresh_notification_instructions_with_toolbar_actions'\n : 'refresh_notification_instructions',\n [viewName]\n ),\n type: 'info'\n });\n }\n\n previousNotificationId.current = notificationId;\n }, [allowRefresh, announcePolite, message, notificationId, t, viewName]);\n\n return (\n <>\n {showBanner && (\n <StyledBanner\n key={notificationId}\n variant='info'\n messages={[\n {\n label: message,\n action: {\n text: refreshActionLabel,\n onClick: () => {\n forceRefresh();\n }\n }\n }\n ]}\n onDismiss={() => setShowBanner(false)}\n />\n )}\n </>\n );\n}\n\nRefreshBanner.propTypes = {\n refreshNotification: PropTypes.objectOf(PropTypes.any).isRequired,\n forceRefresh: PropTypes.func.isRequired,\n viewName: PropTypes.string.isRequired,\n allowRefresh: PropTypes.bool\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleToolbar.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/SimpleToolbar.jsx"],"names":[],"mappings":"AAWA;;
|
|
1
|
+
{"version":3,"file":"SimpleToolbar.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/SimpleToolbar.jsx"],"names":[],"mappings":"AAWA;;4CAsCC;;;;;;;;;sBAjDqB,YAAY"}
|
|
@@ -8,13 +8,13 @@ import ValidateMessage from './ValidateMessage';
|
|
|
8
8
|
import useFormControlProps from './hooks/useFormControlProps';
|
|
9
9
|
import useWrapAction from './hooks/useWrapAction';
|
|
10
10
|
export default function SimpleToolbar({ view }) {
|
|
11
|
-
const { meta: { title, showTitle, headingTag } = {}, state, getContext, showCount, refreshNotification, type: { forceRefresh } } = view;
|
|
11
|
+
const { meta: { title, showTitle, headingTag, allowRefresh } = {}, state, getContext, showCount, refreshNotification, type: { forceRefresh } } = view;
|
|
12
12
|
const { getRequiredDef } = getContext();
|
|
13
13
|
const { validatemessage } = getRequiredDef() || {};
|
|
14
14
|
const count = showCount ? getCount({ view }) : undefined;
|
|
15
15
|
const formControlProps = useFormControlProps(view);
|
|
16
16
|
const wrapAction = useWrapAction(view);
|
|
17
|
-
return (_jsxs(AnnounceRowsCount, { state: state, count: count, children: [_jsx(ValidateMessage, { message: validatemessage, children: _jsx(ListToolbar, { name: title, showName: showTitle, headingTag: headingTag, count: count, formControlProps: formControlProps, wrap: wrapAction }) }), refreshNotification && (_jsx(RefreshBanner, { refreshNotification: refreshNotification, forceRefresh: forceRefresh }))] }));
|
|
17
|
+
return (_jsxs(AnnounceRowsCount, { state: state, count: count, children: [_jsx(ValidateMessage, { message: validatemessage, children: _jsx(ListToolbar, { name: title, showName: showTitle, headingTag: headingTag, count: count, formControlProps: formControlProps, wrap: wrapAction }) }), refreshNotification && (_jsx(RefreshBanner, { refreshNotification: refreshNotification, forceRefresh: forceRefresh, viewName: title, allowRefresh: allowRefresh }))] }));
|
|
18
18
|
}
|
|
19
19
|
SimpleToolbar.propTypes = {
|
|
20
20
|
view: PropTypes.objectOf(PropTypes.any).isRequired
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleToolbar.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/SimpleToolbar.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,6BAA6B,CAAC;AAC9D,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,IAAI,EAAE;IAC5C,MAAM,EACJ,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleToolbar.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/SimpleToolbar.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,6BAA6B,CAAC;AAC9D,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,IAAI,EAAE;IAC5C,MAAM,EACJ,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,EACzD,KAAK,EACL,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,IAAI,EAAE,EAAE,YAAY,EAAE,EACvB,GAAG,IAAI,CAAC;IACT,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACxC,MAAM,EAAE,eAAe,EAAE,GAAG,cAAc,EAAE,IAAI,EAAE,CAAC;IACnD,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEvC,OAAO,CACL,MAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,aAC3C,KAAC,eAAe,IAAC,OAAO,EAAE,eAAe,YACvC,KAAC,WAAW,IACV,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,UAAU,GAChB,GAEc,EACjB,mBAAmB,IAAI,CACtB,KAAC,aAAa,IACZ,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,YAAY,GAC1B,CACH,IACiB,CACrB,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { ListToolbar } from '@pega/cosmos-react-core';\n\nimport RefreshBanner from './RefreshBanner';\nimport getCount from './utils/getCount';\nimport AnnounceRowsCount from './AnnounceRowsCount';\nimport ValidateMessage from './ValidateMessage';\nimport useFormControlProps from './hooks/useFormControlProps';\nimport useWrapAction from './hooks/useWrapAction';\n\nexport default function SimpleToolbar({ view }) {\n const {\n meta: { title, showTitle, headingTag, allowRefresh } = {},\n state,\n getContext,\n showCount,\n refreshNotification,\n type: { forceRefresh }\n } = view;\n const { getRequiredDef } = getContext();\n const { validatemessage } = getRequiredDef() || {};\n const count = showCount ? getCount({ view }) : undefined;\n const formControlProps = useFormControlProps(view);\n const wrapAction = useWrapAction(view);\n\n return (\n <AnnounceRowsCount state={state} count={count}>\n <ValidateMessage message={validatemessage}>\n <ListToolbar\n name={title}\n showName={showTitle}\n headingTag={headingTag}\n count={count}\n formControlProps={formControlProps}\n wrap={wrapAction}\n />\n {/* FIXME: This implementation of error status should be considered temporary until an official, and properly accessible, spec is determined. */}\n </ValidateMessage>\n {refreshNotification && (\n <RefreshBanner\n refreshNotification={refreshNotification}\n forceRefresh={forceRefresh}\n viewName={title}\n allowRefresh={allowRefresh}\n />\n )}\n </AnnounceRowsCount>\n );\n}\n\nSimpleToolbar.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/utils/utils.js"],"names":[],"mappings":";AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEE;AAEF,oEA/DW,MAAM;;;IAIJ,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/utils/utils.js"],"names":[],"mappings":";AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEE;AAEF,oEA/DW,MAAM;;;IAIJ,KAAK,CAsHjB"}
|
|
@@ -110,14 +110,20 @@ function getMenuItemsFromColumns(fieldDefs, fieldProp, { selectedField, columns
|
|
|
110
110
|
// TODO primary should be renderer rather string for user reference fields to show display value instead of id in condition builder.
|
|
111
111
|
...(filterPickListColumn && {
|
|
112
112
|
possibleValues: args => filterPickListColumn.getUniqueValues().then(records => {
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
const searchString = args?.searchString?.toString().toLowerCase().trim();
|
|
114
|
+
const filteredValues = records
|
|
115
|
+
.filter(id => id !== null &&
|
|
116
|
+
id !== undefined &&
|
|
117
|
+
(!searchString || id.toString().toLowerCase().includes(searchString)))
|
|
115
118
|
.map(id => ({ id, primary: id }));
|
|
116
119
|
// ConditionBuilder calls with { ids } to resolve display text for pre-selected values
|
|
117
120
|
if (args && 'ids' in args) {
|
|
118
|
-
return
|
|
121
|
+
return args.ids.reduce((selectedValues, id) => {
|
|
122
|
+
selectedValues.push(filteredValues.find(value => value.id === id) || { id, primary: id });
|
|
123
|
+
return selectedValues;
|
|
124
|
+
}, []);
|
|
119
125
|
}
|
|
120
|
-
return
|
|
126
|
+
return filteredValues;
|
|
121
127
|
})
|
|
122
128
|
})
|
|
123
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/utils/utils.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE;IACnC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC/B,OAAO,GAAG,CAAC,KAAK,CAAC;QACnB,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,KAAK,GAAG,EAAE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,CAAC,CAAC,CAAC;oBAEpC,sFAAsF;oBACtF,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;wBAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE;4BAC5C,cAAc,CAAC,IAAI,CACjB,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CACrE,CAAC;4BACF,OAAO,cAAc,CAAC;wBACxB,CAAC,EAAE,EAAE,CAAC,CAAC;oBACT,CAAC;oBAED,OAAO,cAAc,CAAC;gBACxB,CAAC,CAAC;aACL,CAAC;SACH,CAAC;QAEF,WAAW,GAAG,KAAK,CAAC;QACpB,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAClE,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC;AACD,eAAe,uBAAuB,CAAC","sourcesContent":["import { FieldType } from 'pega-repeating-structures-core';\n\nimport { typeMap } from '../../Filters/config';\n\nconst getCategoryItems = (id, arr) => {\n for (const obj of arr) {\n if (obj.id === id && obj.items) {\n return obj.items;\n }\n }\n};\n\nconst prepareCategoryInfo = (id, label, arr) => {\n const items = [];\n arr.push({ id, primary: label, items });\n return items;\n};\n\nconst prepareCategoryItems = (categories, items) => {\n let curPath = '';\n let leafCategoryArr = items;\n for (let i = 0; i < categories.length; i += 1) {\n curPath = i > 0 ? `${curPath}.${categories[i].label}-${i}` : `${categories[i].label}-${i}`;\n\n const existingCategoryArr = getCategoryItems(curPath, leafCategoryArr);\n if (!existingCategoryArr) {\n leafCategoryArr = prepareCategoryInfo(curPath, categories[i].label, leafCategoryArr);\n } else {\n leafCategoryArr = existingCategoryArr;\n }\n }\n return leafCategoryArr;\n};\n\n/**\n * returns copy of embedded property's leafNode model from store or null\n * @function getMenuItemsFromColumns\n * @param fieldDefs - field definitions to build menu items from\n * @param {string} fieldProp value for id prop(either 'name' of 'id')\n * @param options.selectedField - field id that is already selected (for sort/group/filter actions)\n * @param options.columns - live column objects that expose `field.filterPickList` and `getUniqueValues()`\n * @param options.defaultType - fallback field type if not specified on the field definition\n * @returns {array} returns an array of objects where each object is one category\n *\n * @example <caption>Example for getMenuItemsFromColumns.</caption>\n * We have two fields named ID and Priority where ID does not belong to any category and priority belongs to Bugs class category\n *\n * columns example(fieldDefs) :\n * [\n * {\n filter: true,\n type: 'text',\n name: 'pyID',\n label: 'ID',\n id: '2',\n category: [{ label: 'Profile' }],\n sort: true\n },\n {\n type: 'text',\n name: 'pyLabel',\n label: 'Name',\n id: '3',\n category: [{ label: 'Profile' }],\n sort: true\n },\n {\n type: 'text',\n name: 'pyOperatorName',\n label: 'Operator name',\n id: '4',\n filterPicklist:true\n }\n ]\n *\n * getMenuItemsFromColumns(fieldDefs) returns :\n * [\n {\n id: 'pyID',\n primary: ID,\n items: undefined,\n selected: undefined\n },\n {\n id: ‘pyLabel’,\n primary: ‘Name’,\n selected: undefined,\n items: [ {id: ‘Priority', primary: ‘Priority’, selected: true, items: undefined}]\n },\n {\n id: 'pyOperatorName',\n primary: 'Operator name',\n selected: undefined,\n possibleValues: function() {\n // Fetch unique values for Operator name column\n }\n }\n\n ]\n*/\n\nfunction getMenuItemsFromColumns(\n fieldDefs,\n fieldProp,\n { selectedField, columns = [], defaultType = FieldType.TEXT } = {}\n) {\n const items = [];\n let categoryArr = [];\n\n if (!fieldDefs) {\n return items;\n }\n\n fieldDefs.forEach(field => {\n const filterPickListColumn =\n field.filterPickList && columns?.find(c => c.field.name === field[fieldProp]);\n\n const leafCategoryItem = {\n id: field[fieldProp],\n primary: field.label,\n type: typeMap[field.type?.toLowerCase()] || typeMap[defaultType],\n selected: field.id === selectedField,\n // Attach possibleValues for picklist columns (e.g. UserReference, WorkStatus)\n // TODO primary should be renderer rather string for user reference fields to show display value instead of id in condition builder.\n ...(filterPickListColumn && {\n possibleValues: args =>\n filterPickListColumn.getUniqueValues().then(records => {\n const searchString = args?.searchString?.toString().toLowerCase().trim();\n const filteredValues = records\n .filter(\n id =>\n id !== null &&\n id !== undefined &&\n (!searchString || id.toString().toLowerCase().includes(searchString))\n )\n .map(id => ({ id, primary: id }));\n\n // ConditionBuilder calls with { ids } to resolve display text for pre-selected values\n if (args && 'ids' in args) {\n return args.ids.reduce((selectedValues, id) => {\n selectedValues.push(\n filteredValues.find(value => value.id === id) || { id, primary: id }\n );\n return selectedValues;\n }, []);\n }\n\n return filteredValues;\n })\n })\n };\n\n categoryArr = items;\n if (field.category) {\n categoryArr = prepareCategoryItems(field.category, categoryArr);\n }\n categoryArr.push(leafCategoryItem);\n });\n\n return items;\n}\nexport default getMenuItemsFromColumns;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GalleryCardProps } from '../Gallery.types';
|
|
2
|
-
declare const GalleryCard: import("react").MemoExoticComponent<({ headerColumn, row, meta, visibleColumns }: GalleryCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
declare const GalleryCard: import("react").MemoExoticComponent<({ headerColumn, subHeadingsColumns, row, meta, visibleColumns }: GalleryCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default GalleryCard;
|
|
4
4
|
//# sourceMappingURL=GalleryCard.d.ts.map
|
|
@@ -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;
|
|
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;AAGzD,QAAA,MAAM,WAAW,wGACmD,gBAAgB,6CAgDnF,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { SelectionCardDisplay } from '@pega/cosmos-react-core';
|
|
4
|
-
import { getCardData, getCardUIProps } from '
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const { label, image, footer, fields, 'aria-label': ariaLabel } = getCardData({
|
|
4
|
+
import { getCardData, getCardUIProps, useRowActions } from '../../../Components/Card';
|
|
5
|
+
const GalleryCard = memo(({ headerColumn, subHeadingsColumns, row, meta, visibleColumns }) => {
|
|
6
|
+
const cardConfig = { ...meta.galleryConfig, ...meta.cardConfig };
|
|
7
|
+
const { label, subheading, image, footer, fields, 'aria-label': ariaLabel } = getCardData({
|
|
8
8
|
row,
|
|
9
9
|
visibleColumns,
|
|
10
|
-
|
|
11
|
-
headerColumn
|
|
10
|
+
cardConfig,
|
|
11
|
+
headerColumn,
|
|
12
|
+
subHeadingsColumns
|
|
12
13
|
});
|
|
13
14
|
const uiProps = getCardUIProps({ row });
|
|
14
15
|
const fetchActionsCb = useRowActions({ row, meta });
|
|
15
16
|
const { onCardClick } = meta.galleryConfig ?? {};
|
|
16
17
|
const rowData = onCardClick ? row.getContext().getValue() : undefined;
|
|
17
|
-
return (_jsx(SelectionCardDisplay, { "aria-label": ariaLabel, label: label, headingTag: 'h3', image: image, fields: fields, "data-gallery-card": true, actions: fetchActionsCb, ...uiProps, footer: footer, ...(onCardClick &&
|
|
18
|
+
return (_jsx(SelectionCardDisplay, { "aria-label": ariaLabel, label: label, subheading: subheading, headingTag: 'h3', image: image, fields: fields, "data-gallery-card": true, actions: fetchActionsCb, ...uiProps, footer: footer, ...(onCardClick &&
|
|
18
19
|
rowData && {
|
|
19
20
|
onClick: () => onCardClick(rowData),
|
|
20
21
|
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,
|
|
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,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEtF,MAAM,WAAW,GAAG,IAAI,CACtB,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAoB,EAAE,EAAE;IACpF,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IACjE,MAAM,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,YAAY,EAAE,SAAS,EACxB,GAAG,WAAW,CAAC;QACd,GAAG;QACH,cAAc;QACd,UAAU;QACV,YAAY;QACZ,kBAAkB;KACnB,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,EAAE,UAAU,EACtB,UAAU,EAAC,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,6BAEd,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,CACF,CAAC;AAEF,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, useRowActions } from '../../../Components/Card';\n\nconst GalleryCard = memo(\n ({ headerColumn, subHeadingsColumns, row, meta, visibleColumns }: GalleryCardProps) => {\n const cardConfig = { ...meta.galleryConfig, ...meta.cardConfig };\n const {\n label,\n subheading,\n image,\n footer,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n cardConfig,\n headerColumn,\n subHeadingsColumns\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 subheading={subheading}\n headingTag='h3'\n image={image}\n fields={fields}\n data-gallery-card\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);\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;
|
|
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;AAGzD,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC;CACrC;AAED,QAAA,MAAM,mBAAmB,qGACwC,wBAAwB,6CA8CxF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|