@pega/lists-react 9.0.0-build.22.1 → 9.0.0-build.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineGroup.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TimelineGroup.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AAE9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASvD,UAAU,kBAAkB;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,OAAO,EAAE,KAAK,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,aAAa,GAAI,6DAMpB,kBAAkB,4CA8CpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ExpandCollapse, ExpandCollapseButton, Grid, Text, useI18n } from '@pega/cosmos-react-core';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { ExpandCollapse, ExpandCollapseButton, Grid, Text, useI18n, useUID } from '@pega/cosmos-react-core';
|
|
4
4
|
import { StyledGroupContentList, StyledGroupHeader, StyledTimelineGroup, timelineItemsGridProps } from './Timeline.styles';
|
|
5
5
|
import TimelineItem from './TimelineItem';
|
|
6
6
|
const TimelineGroup = ({ header, activity, groupBy, currentTime, defaultExpanded }) => {
|
|
7
7
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
8
|
-
const headerId =
|
|
9
|
-
const contentId =
|
|
8
|
+
const headerId = useUID();
|
|
9
|
+
const contentId = useUID();
|
|
10
10
|
const t = useI18n();
|
|
11
11
|
const toggleLabel = expanded ? t('collapse') : t('expand');
|
|
12
12
|
return (_jsxs(StyledTimelineGroup, { "data-timeline-group": true, children: [_jsxs(StyledGroupHeader, { children: [_jsx(ExpandCollapseButton, { expanded: expanded, onToggle: () => setExpanded(prev => !prev), iconOnly: true, compact: true, "aria-label": toggleLabel, "aria-describedby": headerId, "aria-controls": contentId }), _jsx(Text, { variant: 'h3', id: headerId, children: header })] }), _jsx(ExpandCollapse, { collapsed: !expanded, dimension: 'height', as: 'section', children: _jsx("div", { id: contentId, role: 'region', "aria-labelledby": headerId, children: _jsx(Grid, { ...timelineItemsGridProps, as: StyledGroupContentList, children: activity.map((item, index) => (_jsx(TimelineItem, { item: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineGroup.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TimelineGroup.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACP,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAU1C,MAAM,aAAa,GAAG,CAAC,EACrB,M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AAC,IAAI;oCACxD,WAAW,EAAE,MAAM;iCACpB,CAAC;6BACL,EACD,YAAY,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EACvC,YAAY,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EACvC,WAAW,EAAE,WAAW,IAVnB,IAAI,CAAC,EAAE,CAWZ,CACH,CAAC,GACG,GACH,GACS,IACG,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { ReactNode } from 'react';\nimport { useState } from 'react';\n\nimport {\n ExpandCollapse,\n ExpandCollapseButton,\n Grid,\n Text,\n useI18n,\n useUID\n} from '@pega/cosmos-react-core';\nimport type { Group } from 'pega-repeating-structures-core/types/State.types';\n\nimport type { ActivityObject } from './Timeline.types';\nimport {\n StyledGroupContentList,\n StyledGroupHeader,\n StyledTimelineGroup,\n timelineItemsGridProps\n} from './Timeline.styles';\nimport TimelineItem from './TimelineItem';\n\ninterface TimelineGroupProps {\n header: ReactNode;\n activity: ActivityObject[];\n groupBy: Group | undefined;\n currentTime: Date;\n defaultExpanded: boolean;\n}\n\nconst TimelineGroup = ({\n header,\n activity,\n groupBy,\n currentTime,\n defaultExpanded\n}: TimelineGroupProps) => {\n const [expanded, setExpanded] = useState(defaultExpanded);\n const headerId = useUID();\n const contentId = useUID();\n const t = useI18n();\n const toggleLabel = expanded ? t('collapse') : t('expand');\n\n return (\n <StyledTimelineGroup data-timeline-group>\n <StyledGroupHeader>\n <ExpandCollapseButton\n expanded={expanded}\n onToggle={() => setExpanded(prev => !prev)}\n iconOnly\n compact\n aria-label={toggleLabel}\n aria-describedby={headerId}\n aria-controls={contentId}\n />\n <Text variant='h3' id={headerId}>\n {header}\n </Text>\n </StyledGroupHeader>\n <ExpandCollapse collapsed={!expanded} dimension='height' as='section'>\n <div id={contentId} role='region' aria-labelledby={headerId}>\n <Grid {...timelineItemsGridProps} as={StyledGroupContentList}>\n {activity.map((item, index) => (\n <TimelineItem\n key={item.id}\n item={{\n ...item,\n ...(groupBy?.dateFunction === 'DAYS' &&\n (!item.dateVariant || item.dateVariant === 'datetime') && {\n dateVariant: 'time'\n })\n }}\n prevItemDate={activity[index - 1]?.date}\n nextItemDate={activity[index + 1]?.date}\n currentTime={currentTime}\n />\n ))}\n </Grid>\n </div>\n </ExpandCollapse>\n </StyledTimelineGroup>\n );\n};\n\nexport default TimelineGroup;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "9.0.0-build.22.
|
|
3
|
+
"version": "9.0.0-build.22.2",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0-build.22.
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0-build.22.
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0-build.22.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.22.2",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.22.2",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0-build.22.2",
|
|
20
20
|
"@types/lodash-es": "^4.17.12",
|
|
21
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
22
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dayjs": "^1.11.13",
|
|
25
25
|
"fast-deep-equal": "^3.1.3",
|
|
26
26
|
"lodash-es": "^4.17.23",
|
|
27
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.22.
|
|
28
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.22.
|
|
27
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.22.2",
|
|
28
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.22.2",
|
|
29
29
|
"polished": "^4.1.0",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
31
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@testing-library/react": "^16.0.0",
|
|
45
45
|
"@testing-library/user-event": "^14.6.1",
|
|
46
46
|
"jest-axe": "^8.0.0",
|
|
47
|
-
"srs-utils": "9.0.0-build.22.
|
|
47
|
+
"srs-utils": "9.0.0-build.22.2",
|
|
48
48
|
"typescript": "~5.9.3"
|
|
49
49
|
}
|
|
50
50
|
}
|