@pega/cosmos-react-work 7.0.0-build.23.0 → 7.0.0-build.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/HierarchicalAssignments/AssignmentContainer.d.ts +33 -0
- package/lib/components/HierarchicalAssignments/AssignmentContainer.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentContainer.js +45 -0
- package/lib/components/HierarchicalAssignments/AssignmentContainer.js.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentItem.d.ts +11 -0
- package/lib/components/HierarchicalAssignments/AssignmentItem.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentItem.js +19 -0
- package/lib/components/HierarchicalAssignments/AssignmentItem.js.map +1 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts +49 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.js +217 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.js.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.d.ts +7 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js +34 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.d.ts +4 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.js +17 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.js.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +65 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js +2 -0
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -0
- package/lib/components/HierarchicalAssignments/index.d.ts +3 -0
- package/lib/components/HierarchicalAssignments/index.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/index.js +2 -0
- package/lib/components/HierarchicalAssignments/index.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type TestIdProp } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { CaseListProps, ItemsProps, AssignmentProps } from './HierarchicalAssignments.types';
|
|
4
|
+
interface AssignmentContainerProps extends CaseListProps {
|
|
5
|
+
/** Depth of the tree component, used for CSS indentation purpose. */
|
|
6
|
+
depth: number;
|
|
7
|
+
/** First Id of Assignment or childCase from the list. */
|
|
8
|
+
firstItemId?: AssignmentProps['id'] | CaseListProps['id'];
|
|
9
|
+
/** Boolean indicating if the given breakpoint is active or not */
|
|
10
|
+
isMediumOrAbove: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface AssignmentTopContainerProps extends ItemsProps, TestIdProp {
|
|
13
|
+
/** Depth of the tree component, used for CSS indentation purpose. */
|
|
14
|
+
depth: 0;
|
|
15
|
+
/** First Id of Assignment or childCase from the list. */
|
|
16
|
+
firstItemId?: AssignmentProps['id'] | CaseListProps['id'];
|
|
17
|
+
/** Boolean indicating if the given breakpoint is active or not */
|
|
18
|
+
isMediumOrAbove: boolean;
|
|
19
|
+
/** AssignmentContainer is a Recursion component, where id will not be passed as prop on initial call from HierarchicalAssignment. */
|
|
20
|
+
id?: never;
|
|
21
|
+
/** AssignmentContainer is a Recursion component, where status will not be passed as prop on initial call from HierarchicalAssignment. */
|
|
22
|
+
status?: never;
|
|
23
|
+
/** AssignmentContainer is a Recursion component, where link will not be passed as prop on initial call from HierarchicalAssignment. */
|
|
24
|
+
link?: never;
|
|
25
|
+
/** AssignmentContainer is a Recursion component, where name will not be passed as prop on initial call from HierarchicalAssignment. */
|
|
26
|
+
name?: never;
|
|
27
|
+
}
|
|
28
|
+
export declare const maxDepth = 5;
|
|
29
|
+
declare const _default: (({ assignments, childCases, id, depth, status, link, collapsed, onToggleCollapsed, firstItemId, name, testId, isMediumOrAbove }: AssignmentContainerProps | AssignmentTopContainerProps) => JSX.Element) & {
|
|
30
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action", "label", "id", "status"]>;
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=AssignmentContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentContainer.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/AssignmentContainer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAUL,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAalG,UAAU,wBAAyB,SAAQ,aAAa;IACtD,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAC1D,kEAAkE;IAClE,eAAe,EAAE,OAAO,CAAC;CAC1B;AACD,UAAU,2BAA4B,SAAQ,UAAU,EAAE,UAAU;IAClE,qEAAqE;IACrE,KAAK,EAAE,CAAC,CAAC;IACT,yDAAyD;IACzD,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAC1D,kEAAkE;IAClE,eAAe,EAAE,OAAO,CAAC;IACzB,qIAAqI;IACrI,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,yIAAyI;IACzI,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,uIAAuI;IACvI,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,uIAAuI;IACvI,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,eAAO,MAAM,QAAQ,IAAI,CAAC;;;;AAmL1B,wBAAgE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo, useState } from 'react';
|
|
4
|
+
import { Flex, useI18n, ExpandCollapse, Icon, Text, Link, Status, withTestIds, useTestIds } from '@pega/cosmos-react-core';
|
|
5
|
+
import AssignmentItem from './AssignmentItem';
|
|
6
|
+
import { StyledExpandButton, StyledHeaderContainer, StyledAssignmentContainer, StyledLinkContainer, StyledMetaListContainer, StyledMetaIdStatusContainer, StyledSummaryItem } from './Assignments.styles';
|
|
7
|
+
import { getCaseTestIds } from './HierarchicalAssignments.test-ids';
|
|
8
|
+
export const maxDepth = 5;
|
|
9
|
+
const AssignmentContainer = ({ assignments, childCases, id, depth, status, link, collapsed = false, onToggleCollapsed, firstItemId, name, testId, isMediumOrAbove }) => {
|
|
10
|
+
const t = useI18n();
|
|
11
|
+
const [open, setOpen] = useState(collapsed);
|
|
12
|
+
const testIds = useTestIds(testId, getCaseTestIds);
|
|
13
|
+
const header = useMemo(() => {
|
|
14
|
+
if (!status) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const { text, variant } = status;
|
|
18
|
+
const hasChildren = !!(childCases?.length || assignments?.length);
|
|
19
|
+
return (_jsxs(Flex, { as: StyledHeaderContainer, container: { alignItems: 'center', gap: 1 }, depth: depth, role: 'treeitem', children: [hasChildren && (_jsx(StyledExpandButton, { "data-testid": testIds.toggleAction, type: 'button', variant: 'text', "aria-controls": id, "aria-expanded": open, "aria-label": t('childCase'), onClick: () => {
|
|
20
|
+
onToggleCollapsed?.(!open, id);
|
|
21
|
+
setOpen(prev => !prev);
|
|
22
|
+
}, children: _jsx(Icon, { name: 'caret-right' }) })), isMediumOrAbove ? (_jsx(StyledMetaListContainer, { wrapItems: true, hasChildren: hasChildren, items: [
|
|
23
|
+
_jsx(StyledLinkContainer, { isMediumOrAbove: isMediumOrAbove, children: _jsx(Link, { "data-testid": testIds.label, href: link?.href, previewable: true, onPreview: link?.onPreview, target: link?.target, icon: true, children: name }) }, `${id}-caseName`),
|
|
24
|
+
_jsx(StyledMetaIdStatusContainer, { wrapItems: false, items: [
|
|
25
|
+
_jsx(Text, { "data-testid": testIds.id, variant: 'h5', children: id }, `${id}-id`),
|
|
26
|
+
_jsx(Status, { "data-testid": testIds.status, variant: variant ?? 'info', children: text }, `${id}-status`)
|
|
27
|
+
] }, `${id}-id-status`)
|
|
28
|
+
] })) : (_jsx(StyledSummaryItem, { hasChildren: hasChildren, primary: _jsx(StyledLinkContainer, { isMediumOrAbove: isMediumOrAbove, children: _jsx(Link, { "data-testid": testIds.label, href: link?.href, previewable: true, onPreview: link?.onPreview, target: link?.target, icon: true, children: name }) }), secondary: _jsx(StyledMetaIdStatusContainer, { wrapItems: false, items: [
|
|
29
|
+
_jsx(Text, { "data-testid": testIds.id, variant: 'h5', children: id }, `${id}-id`),
|
|
30
|
+
_jsx(Status, { "data-testid": testIds.status, variant: variant ?? 'info', children: text }, `${id}-status`)
|
|
31
|
+
] }) }))] }));
|
|
32
|
+
}, [childCases, assignments, id, open, name, status, isMediumOrAbove]);
|
|
33
|
+
return (_jsxs(StyledAssignmentContainer, { "data-testid": id && testIds.root, depth: depth, hideBorders: firstItemId === id, children: [!id &&
|
|
34
|
+
assignments?.map(item => {
|
|
35
|
+
return (_createElement(AssignmentItem, { ...item, key: item.id, depth: depth, assigneeName: item?.assigneeName, firstItemId: firstItemId, testId: testId, isMediumOrAbove: isMediumOrAbove }));
|
|
36
|
+
}), id && status && header, _jsxs(ExpandCollapse, { collapsed: !open, id: id, children: [id &&
|
|
37
|
+
assignments?.map(item => {
|
|
38
|
+
return (_createElement(AssignmentItem, { ...item, key: item.id, depth: depth, assigneeName: item?.assigneeName, testId: testId, isMediumOrAbove: isMediumOrAbove }));
|
|
39
|
+
}), childCases?.map(item => {
|
|
40
|
+
const childDepth = Math.min(depth + 1, maxDepth);
|
|
41
|
+
return (_createElement(AssignmentContainer, { ...item, key: item.id, depth: childDepth, onToggleCollapsed: onToggleCollapsed, firstItemId: firstItemId, testId: testId, isMediumOrAbove: isMediumOrAbove }));
|
|
42
|
+
})] })] }));
|
|
43
|
+
};
|
|
44
|
+
export default withTestIds(AssignmentContainer, getCaseTestIds);
|
|
45
|
+
//# sourceMappingURL=AssignmentContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentContainer.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/AssignmentContainer.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,UAAU,EAEX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AA2BpE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAE1B,MAAM,mBAAmB,GAAG,CAAC,EAC3B,WAAW,EACX,UAAU,EACV,EAAE,EACF,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,GAAG,KAAK,EACjB,iBAAiB,EACjB,WAAW,EACX,IAAI,EACJ,MAAM,EACN,eAAe,EAC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eAAe,EAAE,eAAe,GAChC,CACH,CAAC;oBACJ,CAAC,CAAC,IACa,IACS,CAC7B,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,WAAW,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { useMemo, useState } from 'react';\n\nimport {\n Flex,\n useI18n,\n ExpandCollapse,\n Icon,\n Text,\n Link,\n Status,\n withTestIds,\n useTestIds,\n type TestIdProp\n} from '@pega/cosmos-react-core';\n\nimport type { CaseListProps, ItemsProps, AssignmentProps } from './HierarchicalAssignments.types';\nimport AssignmentItem from './AssignmentItem';\nimport {\n StyledExpandButton,\n StyledHeaderContainer,\n StyledAssignmentContainer,\n StyledLinkContainer,\n StyledMetaListContainer,\n StyledMetaIdStatusContainer,\n StyledSummaryItem\n} from './Assignments.styles';\nimport { getCaseTestIds } from './HierarchicalAssignments.test-ids';\n\ninterface AssignmentContainerProps extends CaseListProps {\n /** Depth of the tree component, used for CSS indentation purpose. */\n depth: number;\n /** First Id of Assignment or childCase from the list. */\n firstItemId?: AssignmentProps['id'] | CaseListProps['id'];\n /** Boolean indicating if the given breakpoint is active or not */\n isMediumOrAbove: boolean;\n}\ninterface AssignmentTopContainerProps extends ItemsProps, TestIdProp {\n /** Depth of the tree component, used for CSS indentation purpose. */\n depth: 0;\n /** First Id of Assignment or childCase from the list. */\n firstItemId?: AssignmentProps['id'] | CaseListProps['id'];\n /** Boolean indicating if the given breakpoint is active or not */\n isMediumOrAbove: boolean;\n /** AssignmentContainer is a Recursion component, where id will not be passed as prop on initial call from HierarchicalAssignment. */\n id?: never;\n /** AssignmentContainer is a Recursion component, where status will not be passed as prop on initial call from HierarchicalAssignment. */\n status?: never;\n /** AssignmentContainer is a Recursion component, where link will not be passed as prop on initial call from HierarchicalAssignment. */\n link?: never;\n /** AssignmentContainer is a Recursion component, where name will not be passed as prop on initial call from HierarchicalAssignment. */\n name?: never;\n}\n\nexport const maxDepth = 5;\n\nconst AssignmentContainer = ({\n assignments,\n childCases,\n id,\n depth,\n status,\n link,\n collapsed = false,\n onToggleCollapsed,\n firstItemId,\n name,\n testId,\n isMediumOrAbove\n}: AssignmentTopContainerProps | AssignmentContainerProps) => {\n const t = useI18n();\n const [open, setOpen] = useState(collapsed);\n\n const testIds = useTestIds(testId, getCaseTestIds);\n\n const header = useMemo(() => {\n if (!status) {\n return;\n }\n const { text, variant } = status;\n const hasChildren = !!(childCases?.length || assignments?.length);\n return (\n <Flex\n as={StyledHeaderContainer}\n container={{ alignItems: 'center', gap: 1 }}\n depth={depth}\n role='treeitem'\n >\n {hasChildren && (\n <StyledExpandButton\n data-testid={testIds.toggleAction}\n type='button'\n variant='text'\n aria-controls={id}\n aria-expanded={open}\n aria-label={t('childCase')}\n onClick={() => {\n onToggleCollapsed?.(!open, id);\n setOpen(prev => !prev);\n }}\n >\n <Icon name='caret-right' />\n </StyledExpandButton>\n )}\n {isMediumOrAbove ? (\n <StyledMetaListContainer\n wrapItems\n hasChildren={hasChildren}\n items={[\n <StyledLinkContainer isMediumOrAbove={isMediumOrAbove} key={`${id}-caseName`}>\n <Link\n data-testid={testIds.label}\n href={link?.href}\n previewable\n onPreview={link?.onPreview}\n target={link?.target}\n icon\n >\n {name}\n </Link>\n </StyledLinkContainer>,\n <StyledMetaIdStatusContainer\n key={`${id}-id-status`}\n wrapItems={false}\n items={[\n <Text data-testid={testIds.id} variant='h5' key={`${id}-id`}>\n {id}\n </Text>,\n <Status\n data-testid={testIds.status}\n variant={variant ?? 'info'}\n key={`${id}-status`}\n >\n {text}\n </Status>\n ]}\n />\n ]}\n />\n ) : (\n <StyledSummaryItem\n hasChildren={hasChildren}\n primary={\n <StyledLinkContainer isMediumOrAbove={isMediumOrAbove}>\n <Link\n data-testid={testIds.label}\n href={link?.href}\n previewable\n onPreview={link?.onPreview}\n target={link?.target}\n icon\n >\n {name}\n </Link>\n </StyledLinkContainer>\n }\n secondary={\n <StyledMetaIdStatusContainer\n wrapItems={false}\n items={[\n <Text data-testid={testIds.id} variant='h5' key={`${id}-id`}>\n {id}\n </Text>,\n <Status\n data-testid={testIds.status}\n variant={variant ?? 'info'}\n key={`${id}-status`}\n >\n {text}\n </Status>\n ]}\n />\n }\n />\n )}\n </Flex>\n );\n }, [childCases, assignments, id, open, name, status, isMediumOrAbove]);\n\n return (\n <StyledAssignmentContainer\n data-testid={id && testIds.root}\n depth={depth}\n hideBorders={firstItemId === id}\n >\n {!id &&\n assignments?.map(item => {\n return (\n <AssignmentItem\n {...item}\n key={item.id}\n depth={depth}\n assigneeName={item?.assigneeName}\n firstItemId={firstItemId}\n testId={testId}\n isMediumOrAbove={isMediumOrAbove}\n />\n );\n })}\n {id && status && header}\n <ExpandCollapse collapsed={!open} id={id}>\n {id &&\n assignments?.map(item => {\n return (\n <AssignmentItem\n {...item}\n key={item.id}\n depth={depth}\n assigneeName={item?.assigneeName}\n testId={testId}\n isMediumOrAbove={isMediumOrAbove}\n />\n );\n })}\n\n {childCases?.map(item => {\n const childDepth = Math.min(depth + 1, maxDepth);\n return (\n <AssignmentContainer\n {...item}\n key={item.id}\n depth={childDepth}\n onToggleCollapsed={onToggleCollapsed}\n firstItemId={firstItemId}\n testId={testId}\n isMediumOrAbove={isMediumOrAbove}\n />\n );\n })}\n </ExpandCollapse>\n </StyledAssignmentContainer>\n );\n};\nexport default withTestIds(AssignmentContainer, getCaseTestIds);\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AssignmentProps } from './HierarchicalAssignments.types';
|
|
3
|
+
declare const _default: (({ processName, assigneeName, urgency, depth, id, firstItemId, onOpen, onAssigneeClick, testId, isMediumOrAbove }: AssignmentProps & {
|
|
4
|
+
depth: number;
|
|
5
|
+
firstItemId?: string | undefined;
|
|
6
|
+
isMediumOrAbove: boolean;
|
|
7
|
+
}) => JSX.Element) & {
|
|
8
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action"]>;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=AssignmentItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentItem.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/AssignmentItem.tsx"],"names":[],"mappings":";AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;;;;;;;;AAqFvE,wBAAiE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text, useI18n, withTestIds, useTestIds, Flex } from '@pega/cosmos-react-core';
|
|
3
|
+
import { StyledAssignmentItem, StyledProcessContainer, StyledActionContainer, StyledAssigneeContainer, StyledUrgencyTextContainer, StyledLabelContainer, StyledAssigneeText } from './Assignments.styles';
|
|
4
|
+
import { getAssignmentTestIds } from './HierarchicalAssignments.test-ids';
|
|
5
|
+
import { maxDepth } from './AssignmentContainer';
|
|
6
|
+
const AssignmentItem = ({ processName, assigneeName, urgency, depth, id, firstItemId, onOpen, onAssigneeClick, testId, isMediumOrAbove }) => {
|
|
7
|
+
const t = useI18n();
|
|
8
|
+
const testIds = useTestIds(testId, getAssignmentTestIds);
|
|
9
|
+
const tableDepth = depth === 0 ? depth : Math.min(depth + 1, maxDepth);
|
|
10
|
+
return (_jsxs(StyledAssignmentItem, { "data-testid": testIds.root, container: {
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
cols: isMediumOrAbove ? '3.5fr 1.5fr 1fr 1fr' : '2fr 0.5fr',
|
|
13
|
+
rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(3, auto)'
|
|
14
|
+
}, hideBorders: firstItemId === id, role: 'treeitem', children: [_jsx(Flex, { container: true, as: StyledProcessContainer, "data-testid": testIds.label, depth: tableDepth, children: _jsx(Text, { variant: 'primary', children: processName }) }), _jsxs(Flex, { container: { justify: isMediumOrAbove ? 'end' : 'start' }, as: StyledAssigneeContainer, "data-testid": testIds.assignee, depth: tableDepth, variant: 'secondary', isMediumOrAbove: isMediumOrAbove, children: [_jsxs(StyledLabelContainer, { variant: 'secondary', children: [t('assignee'), ":"] }), _jsx(StyledAssigneeText, { onClick: (e) => {
|
|
15
|
+
onAssigneeClick(id, e);
|
|
16
|
+
}, variant: 'link', children: assigneeName })] }), _jsxs(Flex, { container: { justify: isMediumOrAbove ? 'end' : 'start' }, as: StyledUrgencyTextContainer, "data-testid": testIds.urgency, depth: tableDepth, isMediumOrAbove: isMediumOrAbove, children: [_jsxs(StyledLabelContainer, { variant: 'secondary', children: [t('urgency'), ":"] }), _jsx(Text, { variant: 'secondary', children: urgency })] }), _jsx(Flex, { as: StyledActionContainer, container: { justify: 'end' }, isMediumOrAbove: isMediumOrAbove, children: onOpen && (_jsx(Button, { "data-testid": testIds.action, compact: true, variant: 'primary', onClick: (e) => onOpen(id, e), children: t('go') })) })] }));
|
|
17
|
+
};
|
|
18
|
+
export default withTestIds(AssignmentItem, getAssignmentTestIds);
|
|
19
|
+
//# sourceMappingURL=AssignmentItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentItem.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/AssignmentItem.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/F,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,cAAc,GAAG,CAAC,EACt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AAE,CAAC,CAAgC,EAAE,EAAE;4BAC5C,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;wBACzB,CAAC,EACD,OAAO,EAAC,MAAM,YAEb,YAAY,GACM,IAChB,EACP,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,EACzD,EAAE,EAAE,0BAA0B,iBACjB,OAAO,CAAC,OAAO,EAC5B,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,eAAe,aAEhC,MAAC,oBAAoB,IAAC,OAAO,EAAC,WAAW,aAAE,CAAC,CAAC,SAAS,CAAC,SAAyB,EAChF,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,OAAO,GAAQ,IACrC,EACP,KAAC,IAAI,IACH,EAAE,EAAE,qBAAqB,EACzB,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAC7B,eAAe,EAAE,eAAe,YAE/B,MAAM,IAAI,CACT,KAAC,MAAM,mBACQ,OAAO,CAAC,MAAM,EAC3B,OAAO,QACP,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,YAE3D,CAAC,CAAC,IAAI,CAAC,GACD,CACV,GACI,IACc,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import type { MouseEvent } from 'react';\n\nimport { Button, Text, useI18n, withTestIds, useTestIds, Flex } from '@pega/cosmos-react-core';\n\nimport {\n StyledAssignmentItem,\n StyledProcessContainer,\n StyledActionContainer,\n StyledAssigneeContainer,\n StyledUrgencyTextContainer,\n StyledLabelContainer,\n StyledAssigneeText\n} from './Assignments.styles';\nimport type { AssignmentProps } from './HierarchicalAssignments.types';\nimport { getAssignmentTestIds } from './HierarchicalAssignments.test-ids';\nimport { maxDepth } from './AssignmentContainer';\n\nconst AssignmentItem = ({\n processName,\n assigneeName,\n urgency,\n depth,\n id,\n firstItemId,\n onOpen,\n onAssigneeClick,\n testId,\n isMediumOrAbove\n}: AssignmentProps & {\n depth: number;\n firstItemId?: string;\n isMediumOrAbove: boolean;\n}) => {\n const t = useI18n();\n const testIds = useTestIds(testId, getAssignmentTestIds);\n const tableDepth = depth === 0 ? depth : Math.min(depth + 1, maxDepth);\n return (\n <StyledAssignmentItem\n data-testid={testIds.root}\n container={{\n alignItems: 'center',\n cols: isMediumOrAbove ? '3.5fr 1.5fr 1fr 1fr' : '2fr 0.5fr',\n rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(3, auto)'\n }}\n hideBorders={firstItemId === id}\n role='treeitem'\n >\n <Flex container as={StyledProcessContainer} data-testid={testIds.label} depth={tableDepth}>\n <Text variant='primary'>{processName}</Text>\n </Flex>\n <Flex\n container={{ justify: isMediumOrAbove ? 'end' : 'start' }}\n as={StyledAssigneeContainer}\n data-testid={testIds.assignee}\n depth={tableDepth}\n variant='secondary'\n isMediumOrAbove={isMediumOrAbove}\n >\n <StyledLabelContainer variant='secondary'>{t('assignee')}:</StyledLabelContainer>\n <StyledAssigneeText\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onAssigneeClick(id, e);\n }}\n variant='link'\n >\n {assigneeName}\n </StyledAssigneeText>\n </Flex>\n <Flex\n container={{ justify: isMediumOrAbove ? 'end' : 'start' }}\n as={StyledUrgencyTextContainer}\n data-testid={testIds.urgency}\n depth={tableDepth}\n isMediumOrAbove={isMediumOrAbove}\n >\n <StyledLabelContainer variant='secondary'>{t('urgency')}:</StyledLabelContainer>\n <Text variant='secondary'>{urgency}</Text>\n </Flex>\n <Flex\n as={StyledActionContainer}\n container={{ justify: 'end' }}\n isMediumOrAbove={isMediumOrAbove}\n >\n {onOpen && (\n <Button\n data-testid={testIds.action}\n compact\n variant='primary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => onOpen(id, e)}\n >\n {t('go')}\n </Button>\n )}\n </Flex>\n </StyledAssignmentItem>\n );\n};\n\nexport default withTestIds(AssignmentItem, getAssignmentTestIds);\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Grid } from '@pega/cosmos-react-core';
|
|
3
|
+
export declare const StyledExpandButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StyledExpandCollapse: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ExpandCollapseProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StyledParentExpandCollapse: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const StyledAssignmentItem: typeof Grid;
|
|
7
|
+
export declare const StyledProcessContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
depth?: number | undefined;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const StyledActionContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
|
+
isMediumOrAbove?: boolean | undefined;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const StyledHeaderContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
14
|
+
depth?: number | undefined;
|
|
15
|
+
}, never>;
|
|
16
|
+
export declare const StyledSummaryItem: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").SummaryItemProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
17
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["primary", "secondary", "visual", "actions"]>;
|
|
18
|
+
}, import("styled-components").DefaultTheme, {
|
|
19
|
+
hasChildren?: boolean | undefined;
|
|
20
|
+
}, never>;
|
|
21
|
+
export declare const StyledAssignments: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
22
|
+
expanded?: boolean | undefined;
|
|
23
|
+
}, never>;
|
|
24
|
+
export declare const StyledAssignmentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
25
|
+
depth?: number | undefined;
|
|
26
|
+
hideBorders?: boolean | undefined;
|
|
27
|
+
}, never>;
|
|
28
|
+
export declare const StyledLinkContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
29
|
+
isMediumOrAbove?: boolean | undefined;
|
|
30
|
+
}, never>;
|
|
31
|
+
export declare const StyledAssigneeContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
32
|
+
depth?: number | undefined;
|
|
33
|
+
isMediumOrAbove?: boolean | undefined;
|
|
34
|
+
}, never>;
|
|
35
|
+
export declare const StyledAssigneeText: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
36
|
+
export declare const StyledUrgencyTextContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
37
|
+
depth?: number | undefined;
|
|
38
|
+
isMediumOrAbove?: boolean | undefined;
|
|
39
|
+
}, never>;
|
|
40
|
+
export declare const StyledMetaListContainer: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").MetaListProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
41
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
42
|
+
}, import("styled-components").DefaultTheme, {
|
|
43
|
+
hasChildren?: boolean | undefined;
|
|
44
|
+
}, never>;
|
|
45
|
+
export declare const StyledMetaIdStatusContainer: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").MetaListProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
46
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
47
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
48
|
+
export declare const StyledLabelContainer: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
49
|
+
//# sourceMappingURL=Assignments.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assignments.styles.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/Assignments.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,IAAI,EAUL,MAAM,yBAAyB,CAAC;AASjC,eAAO,MAAM,kBAAkB,qOA0B7B,CAAC;AAIH,eAAO,MAAM,oBAAoB,6OAQ/B,CAAC;AAIH,eAAO,MAAM,0BAA0B,yGAMrC,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OAAO,IAsBxC,CAAC;AAGH,eAAO,MAAM,sBAAsB;;SA4BlC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;SAYjC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;SAoBjC,CAAC;AAGF,eAAO,MAAM,iBAAiB;;;;SAiB5B,CAAC;AAGH,eAAO,MAAM,iBAAiB;;SAW5B,CAAC;AAIH,eAAO,MAAM,yBAAyB;;;SA8BrC,CAAC;AAGF,eAAO,MAAM,mBAAmB;;SAsB/B,CAAC;AAGF,eAAO,MAAM,uBAAuB;;;SA2BnC,CAAC;AAGF,eAAO,MAAM,kBAAkB,qOAG9B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;SA0BtC,CAAC;AAGF,eAAO,MAAM,uBAAuB;;;;SA4BlC,CAAC;AAGH,eAAO,MAAM,2BAA2B;;uDAQtC,CAAC;AAGH,eAAO,MAAM,oBAAoB,mOAQ/B,CAAC"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { Grid, Button, Card, defaultThemeProp, StyledIcon, ExpandCollapse, useDirection, Text, MetaList, SummaryItem } from '@pega/cosmos-react-core';
|
|
3
|
+
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
4
|
+
const StyledEllipsis = css `
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
`;
|
|
9
|
+
export const StyledExpandButton = styled(Button)(({ theme: { base: { animation } } }) => {
|
|
10
|
+
const { rtl } = useDirection();
|
|
11
|
+
return css `
|
|
12
|
+
margin: 0;
|
|
13
|
+
|
|
14
|
+
${StyledIcon} {
|
|
15
|
+
transition: transform ${animation.speed} ${animation.timing.ease};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[aria-expanded='true'] ${StyledIcon} {
|
|
19
|
+
transform: rotate(90deg);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[aria-expanded='false'] ${StyledIcon} {
|
|
23
|
+
transform: rotate(${rtl ? 180 : 0}deg);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover,
|
|
27
|
+
&:active {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
});
|
|
32
|
+
StyledExpandButton.defaultProps = defaultThemeProp;
|
|
33
|
+
export const StyledExpandCollapse = styled(ExpandCollapse)(({ theme: { base: { spacing } } }) => {
|
|
34
|
+
return css `
|
|
35
|
+
padding-inline: calc(${spacing} * 2);
|
|
36
|
+
`;
|
|
37
|
+
});
|
|
38
|
+
StyledExpandCollapse.defaultProps = defaultThemeProp;
|
|
39
|
+
export const StyledParentExpandCollapse = styled.div(() => {
|
|
40
|
+
const assignmentHeight = '50dvh';
|
|
41
|
+
return css `
|
|
42
|
+
max-height: ${assignmentHeight};
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
`;
|
|
45
|
+
});
|
|
46
|
+
StyledParentExpandCollapse.defaultProps = defaultThemeProp;
|
|
47
|
+
export const StyledAssignmentItem = styled(Grid)(({ theme: { base: { spacing, colors }, components: { table: { body: { 'border-width': borderWidth } } } }, hideBorders }) => {
|
|
48
|
+
return css `
|
|
49
|
+
padding-inline-end: calc(2 * ${spacing});
|
|
50
|
+
padding-block: calc(0.5 * ${spacing});
|
|
51
|
+
border-block-start: ${borderWidth} dashed ${colors.gray.light};
|
|
52
|
+
${hideBorders &&
|
|
53
|
+
css `
|
|
54
|
+
border-block-start: none;
|
|
55
|
+
`};
|
|
56
|
+
`;
|
|
57
|
+
});
|
|
58
|
+
StyledAssignmentItem.defaultProps = defaultThemeProp;
|
|
59
|
+
export const StyledProcessContainer = styled.div(({ depth, theme: { base: { spacing }, components: { icon: { size: { s } } } } }) => {
|
|
60
|
+
const paddingInlineStart = depth
|
|
61
|
+
? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`
|
|
62
|
+
: `calc(1.5 * ${spacing})`;
|
|
63
|
+
const assignmentNameWidth = '22rem';
|
|
64
|
+
return css `
|
|
65
|
+
${StyledEllipsis};
|
|
66
|
+
max-width: ${assignmentNameWidth};
|
|
67
|
+
padding-inline-start: ${paddingInlineStart};
|
|
68
|
+
grid-row-start: 1;
|
|
69
|
+
grid-row-end: 1;
|
|
70
|
+
span {
|
|
71
|
+
padding-inline: calc(0.5 * ${spacing});
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
});
|
|
75
|
+
StyledProcessContainer.defaultProps = defaultThemeProp;
|
|
76
|
+
export const StyledActionContainer = styled.div(({ isMediumOrAbove }) => {
|
|
77
|
+
return css `
|
|
78
|
+
grid-row-start: 1;
|
|
79
|
+
grid-row-end: -1;
|
|
80
|
+
${isMediumOrAbove &&
|
|
81
|
+
css `
|
|
82
|
+
grid-column-start: 4;
|
|
83
|
+
grid-column-end: -1;
|
|
84
|
+
`}
|
|
85
|
+
`;
|
|
86
|
+
});
|
|
87
|
+
StyledActionContainer.defaultProps = defaultThemeProp;
|
|
88
|
+
export const StyledHeaderContainer = styled.div(({ theme: { base: { spacing, palette: { 'secondary-background': secondaryBackground } } }, depth }) => {
|
|
89
|
+
const paddingInlineStart = depth
|
|
90
|
+
? `calc(1.5 * ${spacing} * ${depth})`
|
|
91
|
+
: `calc(1.5 * ${spacing})`;
|
|
92
|
+
return css `
|
|
93
|
+
padding-inline-start: ${paddingInlineStart};
|
|
94
|
+
padding-block: calc(0.5 * ${spacing});
|
|
95
|
+
background-color: ${secondaryBackground};
|
|
96
|
+
`;
|
|
97
|
+
});
|
|
98
|
+
StyledHeaderContainer.defaultProps = defaultThemeProp;
|
|
99
|
+
export const StyledSummaryItem = styled(SummaryItem)(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, hasChildren }) => {
|
|
100
|
+
return css `
|
|
101
|
+
${!hasChildren &&
|
|
102
|
+
css `
|
|
103
|
+
padding-inline-start: calc(${s} + ${spacing});
|
|
104
|
+
`}
|
|
105
|
+
`;
|
|
106
|
+
});
|
|
107
|
+
StyledSummaryItem.defaultProps = defaultThemeProp;
|
|
108
|
+
export const StyledAssignments = styled(Card)(({ theme, expanded }) => {
|
|
109
|
+
return css `
|
|
110
|
+
padding: calc(${theme.base.spacing} * 2);
|
|
111
|
+
box-shadow: ${expanded ? theme.base.shadow.low : 'none'};
|
|
112
|
+
&&& {
|
|
113
|
+
> ${StyledCardHeader} {
|
|
114
|
+
padding: 0;
|
|
115
|
+
padding-block-end: ${expanded ? `calc(${theme.base.spacing} * 2)` : 0};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
});
|
|
120
|
+
StyledAssignments.defaultProps = defaultThemeProp;
|
|
121
|
+
export const StyledAssignmentContainer = styled.div(({ theme: { base: { colors, 'border-radius': borderRadius }, components: { table: { body: { 'border-width': borderWidth } } } }, depth, hideBorders }) => {
|
|
122
|
+
return css `
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
width: 100%;
|
|
125
|
+
${!depth &&
|
|
126
|
+
css `
|
|
127
|
+
border: ${borderWidth} solid ${colors.gray.light};
|
|
128
|
+
border-radius: ${borderRadius};
|
|
129
|
+
`}
|
|
130
|
+
${depth &&
|
|
131
|
+
css `
|
|
132
|
+
border-block-start: ${hideBorders ? 'none' : `${borderWidth} dashed ${colors.gray.light}`};
|
|
133
|
+
`}
|
|
134
|
+
`;
|
|
135
|
+
});
|
|
136
|
+
StyledAssignmentContainer.defaultProps = defaultThemeProp;
|
|
137
|
+
export const StyledLinkContainer = styled.div(({ theme: { base: { spacing } }, isMediumOrAbove }) => {
|
|
138
|
+
const caseNameWidth = '28rem';
|
|
139
|
+
return css `
|
|
140
|
+
${StyledEllipsis};
|
|
141
|
+
padding: calc(0.5 * ${spacing});
|
|
142
|
+
padding-inline-end: calc(2 * ${spacing});
|
|
143
|
+
& > a > span {
|
|
144
|
+
width: 0;
|
|
145
|
+
}
|
|
146
|
+
${isMediumOrAbove &&
|
|
147
|
+
css `
|
|
148
|
+
max-width: ${caseNameWidth};
|
|
149
|
+
padding-inline-end: calc(0.5 * ${spacing});
|
|
150
|
+
`}
|
|
151
|
+
`;
|
|
152
|
+
});
|
|
153
|
+
StyledLinkContainer.defaultProps = defaultThemeProp;
|
|
154
|
+
export const StyledAssigneeContainer = styled.div(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, depth, isMediumOrAbove }) => {
|
|
155
|
+
const paddingInlineStart = depth
|
|
156
|
+
? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`
|
|
157
|
+
: `calc(1.5 * ${spacing})`;
|
|
158
|
+
return css `
|
|
159
|
+
padding-block: calc(0.5 * ${spacing});
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
padding-inline-start: ${paddingInlineStart};
|
|
162
|
+
${isMediumOrAbove &&
|
|
163
|
+
css `
|
|
164
|
+
padding: calc(0.5 * ${spacing});
|
|
165
|
+
`};
|
|
166
|
+
`;
|
|
167
|
+
});
|
|
168
|
+
StyledAssigneeContainer.defaultProps = defaultThemeProp;
|
|
169
|
+
export const StyledAssigneeText = styled(Button) `
|
|
170
|
+
${StyledEllipsis}
|
|
171
|
+
display: inline;
|
|
172
|
+
`;
|
|
173
|
+
export const StyledUrgencyTextContainer = styled.div(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, depth, isMediumOrAbove }) => {
|
|
174
|
+
const paddingInlineStart = depth
|
|
175
|
+
? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`
|
|
176
|
+
: `calc(1.5 * ${spacing})`;
|
|
177
|
+
return css `
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
padding-inline-start: ${paddingInlineStart};
|
|
180
|
+
${isMediumOrAbove &&
|
|
181
|
+
css `
|
|
182
|
+
padding-inline: calc(0.5 * ${spacing});
|
|
183
|
+
`}
|
|
184
|
+
`;
|
|
185
|
+
});
|
|
186
|
+
StyledUrgencyTextContainer.defaultProps = defaultThemeProp;
|
|
187
|
+
export const StyledMetaListContainer = styled(MetaList)(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, hasChildren }) => {
|
|
188
|
+
return css `
|
|
189
|
+
${!hasChildren &&
|
|
190
|
+
css `
|
|
191
|
+
padding-inline-start: calc(${s} + ${spacing});
|
|
192
|
+
`}
|
|
193
|
+
width: 100%;
|
|
194
|
+
flex-wrap: nowrap;
|
|
195
|
+
& > li:nth-child(1) {
|
|
196
|
+
flex-shrink: 1;
|
|
197
|
+
}
|
|
198
|
+
& > li:nth-child(2),
|
|
199
|
+
& > li:nth-child(3) {
|
|
200
|
+
flex-shrink: 0;
|
|
201
|
+
}
|
|
202
|
+
`;
|
|
203
|
+
});
|
|
204
|
+
StyledMetaListContainer.defaultProps = defaultThemeProp;
|
|
205
|
+
export const StyledMetaIdStatusContainer = styled(MetaList)(({ theme: { base: { spacing } } }) => {
|
|
206
|
+
return css `
|
|
207
|
+
padding-inline: calc(0.5 * ${spacing});
|
|
208
|
+
`;
|
|
209
|
+
});
|
|
210
|
+
StyledMetaIdStatusContainer.defaultProps = defaultThemeProp;
|
|
211
|
+
export const StyledLabelContainer = styled(Text)(({ theme: { base: { spacing } } }) => {
|
|
212
|
+
return css `
|
|
213
|
+
padding-inline: calc(0.5 * ${spacing});
|
|
214
|
+
`;
|
|
215
|
+
});
|
|
216
|
+
StyledLabelContainer.defaultProps = defaultThemeProp;
|
|
217
|
+
//# sourceMappingURL=Assignments.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assignments.styles.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/Assignments.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAE1F,MAAM,cAAc,GAAG,GAAG,CAAA;;;;CAIzB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAChD,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,SAAS,EAAE,EACpB,EACF,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,GAAG,CAAA;;;MAGN,UAAU;8BACc,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI;;;8BAGxC,UAAU;;;;+BAIT,UAAU;0BACf,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAA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AE,EAAE;IACH,OAAO,GAAG,CAAA;iCACqB,OAAO;GACrC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,2BAA2B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAChD,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;iCACqB,OAAO;GACrC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n Grid,\n Button,\n Card,\n defaultThemeProp,\n StyledIcon,\n ExpandCollapse,\n useDirection,\n Text,\n MetaList,\n SummaryItem\n} from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\n\nconst StyledEllipsis = css`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const StyledExpandButton = styled(Button)(({\n theme: {\n base: { animation }\n }\n}) => {\n const { rtl } = useDirection();\n return css`\n margin: 0;\n\n ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n &[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n &[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n\n &:hover,\n &:active {\n text-decoration: none;\n }\n `;\n});\n\nStyledExpandButton.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapse = styled(ExpandCollapse)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n padding-inline: calc(${spacing} * 2);\n `;\n});\n\nStyledExpandCollapse.defaultProps = defaultThemeProp;\n\nexport const StyledParentExpandCollapse = styled.div(() => {\n const assignmentHeight = '50dvh';\n return css`\n max-height: ${assignmentHeight};\n overflow-y: auto;\n `;\n});\n\nStyledParentExpandCollapse.defaultProps = defaultThemeProp;\n\nexport const StyledAssignmentItem: typeof Grid = styled(Grid)<{\n hideBorders?: boolean;\n}>(({\n theme: {\n base: { spacing, colors },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n },\n hideBorders\n}) => {\n return css`\n padding-inline-end: calc(2 * ${spacing});\n padding-block: calc(0.5 * ${spacing});\n border-block-start: ${borderWidth} dashed ${colors.gray.light};\n ${hideBorders &&\n css`\n border-block-start: none;\n `};\n `;\n});\nStyledAssignmentItem.defaultProps = defaultThemeProp;\n\nexport const StyledProcessContainer = styled.div<{ depth?: number }>(\n ({\n depth,\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n }\n }) => {\n const paddingInlineStart = depth\n ? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`\n : `calc(1.5 * ${spacing})`;\n const assignmentNameWidth = '22rem';\n\n return css`\n ${StyledEllipsis};\n max-width: ${assignmentNameWidth};\n padding-inline-start: ${paddingInlineStart};\n grid-row-start: 1;\n grid-row-end: 1;\n span {\n padding-inline: calc(0.5 * ${spacing});\n }\n `;\n }\n);\nStyledProcessContainer.defaultProps = defaultThemeProp;\n\nexport const StyledActionContainer = styled.div<{ isMediumOrAbove?: boolean }>(\n ({ isMediumOrAbove }) => {\n return css`\n grid-row-start: 1;\n grid-row-end: -1;\n ${isMediumOrAbove &&\n css`\n grid-column-start: 4;\n grid-column-end: -1;\n `}\n `;\n }\n);\nStyledActionContainer.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderContainer = styled.div<{ depth?: number }>(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'secondary-background': secondaryBackground }\n }\n },\n depth\n }) => {\n const paddingInlineStart = depth\n ? `calc(1.5 * ${spacing} * ${depth})`\n : `calc(1.5 * ${spacing})`;\n\n return css`\n padding-inline-start: ${paddingInlineStart};\n padding-block: calc(0.5 * ${spacing});\n background-color: ${secondaryBackground};\n `;\n }\n);\nStyledHeaderContainer.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryItem = styled(SummaryItem)<{ hasChildren?: boolean }>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n hasChildren\n}) => {\n return css`\n ${!hasChildren &&\n css`\n padding-inline-start: calc(${s} + ${spacing});\n `}\n `;\n});\nStyledSummaryItem.defaultProps = defaultThemeProp;\n\nexport const StyledAssignments = styled(Card)<{ expanded?: boolean }>(({ theme, expanded }) => {\n return css`\n padding: calc(${theme.base.spacing} * 2);\n box-shadow: ${expanded ? theme.base.shadow.low : 'none'};\n &&& {\n > ${StyledCardHeader} {\n padding: 0;\n padding-block-end: ${expanded ? `calc(${theme.base.spacing} * 2)` : 0};\n }\n }\n `;\n});\n\nStyledAssignments.defaultProps = defaultThemeProp;\n\nexport const StyledAssignmentContainer = styled.div<{\n depth?: number;\n hideBorders?: boolean;\n}>(\n ({\n theme: {\n base: { colors, 'border-radius': borderRadius },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n },\n depth,\n hideBorders\n }) => {\n return css`\n overflow: hidden;\n width: 100%;\n ${!depth &&\n css`\n border: ${borderWidth} solid ${colors.gray.light};\n border-radius: ${borderRadius};\n `}\n ${depth &&\n css`\n border-block-start: ${hideBorders ? 'none' : `${borderWidth} dashed ${colors.gray.light}`};\n `}\n `;\n }\n);\nStyledAssignmentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledLinkContainer = styled.div<{ isMediumOrAbove?: boolean }>(\n ({\n theme: {\n base: { spacing }\n },\n isMediumOrAbove\n }) => {\n const caseNameWidth = '28rem';\n return css`\n ${StyledEllipsis};\n padding: calc(0.5 * ${spacing});\n padding-inline-end: calc(2 * ${spacing});\n & > a > span {\n width: 0;\n }\n ${isMediumOrAbove &&\n css`\n max-width: ${caseNameWidth};\n padding-inline-end: calc(0.5 * ${spacing});\n `}\n `;\n }\n);\nStyledLinkContainer.defaultProps = defaultThemeProp;\n\nexport const StyledAssigneeContainer = styled.div<{ depth?: number; isMediumOrAbove?: boolean }>(\n ({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n depth,\n isMediumOrAbove\n }) => {\n const paddingInlineStart = depth\n ? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`\n : `calc(1.5 * ${spacing})`;\n\n return css`\n padding-block: calc(0.5 * ${spacing});\n overflow: hidden;\n padding-inline-start: ${paddingInlineStart};\n ${isMediumOrAbove &&\n css`\n padding: calc(0.5 * ${spacing});\n `};\n `;\n }\n);\nStyledAssigneeContainer.defaultProps = defaultThemeProp;\n\nexport const StyledAssigneeText = styled(Button)`\n ${StyledEllipsis}\n display: inline;\n`;\n\nexport const StyledUrgencyTextContainer = styled.div<{ depth?: number; isMediumOrAbove?: boolean }>(\n ({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n depth,\n isMediumOrAbove\n }) => {\n const paddingInlineStart = depth\n ? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`\n : `calc(1.5 * ${spacing})`;\n\n return css`\n white-space: nowrap;\n padding-inline-start: ${paddingInlineStart};\n ${isMediumOrAbove &&\n css`\n padding-inline: calc(0.5 * ${spacing});\n `}\n `;\n }\n);\nStyledUrgencyTextContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMetaListContainer = styled(MetaList)<{\n hasChildren?: boolean;\n}>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n hasChildren\n}) => {\n return css`\n ${!hasChildren &&\n css`\n padding-inline-start: calc(${s} + ${spacing});\n `}\n width: 100%;\n flex-wrap: nowrap;\n & > li:nth-child(1) {\n flex-shrink: 1;\n }\n & > li:nth-child(2),\n & > li:nth-child(3) {\n flex-shrink: 0;\n }\n `;\n});\nStyledMetaListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMetaIdStatusContainer = styled(MetaList)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n padding-inline: calc(0.5 * ${spacing});\n `;\n});\nStyledMetaIdStatusContainer.defaultProps = defaultThemeProp;\n\nexport const StyledLabelContainer = styled(Text)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n padding-inline: calc(0.5 * ${spacing});\n `;\n});\nStyledLabelContainer.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { HierarchicalAssignmentProps } from './HierarchicalAssignments.types';
|
|
3
|
+
declare const _default: FC<HierarchicalAssignmentProps> & {
|
|
4
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action"]>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=HierarchicalAssignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAwBhC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;;;;AAgHnF,wBAAuF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef } from 'react';
|
|
3
|
+
import { CardHeader, useI18n, Icon, Text, Flex, useUID, Progress, useTestIds, withTestIds, useBreakpoint, ExpandCollapse } from '@pega/cosmos-react-core';
|
|
4
|
+
import Glimpse from '../Glimpse';
|
|
5
|
+
import { TaskItem } from '../Tasks/TaskList';
|
|
6
|
+
import { StyledAssignments, StyledExpandButton as StyledTitleExpandButton, StyledParentExpandCollapse } from './Assignments.styles';
|
|
7
|
+
import AssignmentContainer from './AssignmentContainer';
|
|
8
|
+
import { getHierarchicalAssignmentsTestIds } from './HierarchicalAssignments.test-ids';
|
|
9
|
+
const HierarchicalAssignments = forwardRef(({ assignments, childCases, collapsed = false, onToggleCollapsed, openItem, progress, assigneeProfile, name, testId }, ref) => {
|
|
10
|
+
const t = useI18n();
|
|
11
|
+
const assignmentsId = useUID();
|
|
12
|
+
const testIds = useTestIds(testId, getHierarchicalAssignmentsTestIds);
|
|
13
|
+
const containerRef = useRef(null);
|
|
14
|
+
const isMediumOrAbove = useBreakpoint('sm', { breakpointRef: containerRef });
|
|
15
|
+
const open = !collapsed;
|
|
16
|
+
const { target, id: profileId, onDismiss, ...restAssigneeProfile } = assigneeProfile ?? {};
|
|
17
|
+
const header = (_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'caret-right' }), _jsx(Text, { variant: 'h2', children: name ?? t('assignments') })] }));
|
|
18
|
+
const findFirstLeaf = () => {
|
|
19
|
+
if (assignments?.length) {
|
|
20
|
+
return assignments[0].id;
|
|
21
|
+
}
|
|
22
|
+
if (childCases?.length) {
|
|
23
|
+
return childCases[0].id;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const showAssignmentList = !!(assignments?.length || childCases?.length);
|
|
27
|
+
return (_jsx(_Fragment, { children: showAssignmentList && (_jsxs(StyledAssignments, { "data-testid": testIds.root, ref: ref, expanded: open, children: [openItem ? (_jsx(TaskItem, { ...openItem })) : (_jsxs(_Fragment, { children: [_jsx(CardHeader, { container: { justify: 'start', alignItems: 'center', gap: 1 }, children: _jsx(StyledTitleExpandButton, { "data-testid": testIds.toggleAction, type: 'button', variant: 'text', onClick: () => {
|
|
28
|
+
if (onToggleCollapsed) {
|
|
29
|
+
onToggleCollapsed(!collapsed);
|
|
30
|
+
}
|
|
31
|
+
}, "aria-controls": assignmentsId, "aria-expanded": open, "aria-label": name ?? t('assignments'), children: header }) }), open && (_jsx(ExpandCollapse, { as: StyledParentExpandCollapse, ref: containerRef, collapsed: collapsed, role: 'tree', children: progress ? (_jsx(Progress, { focusOnVisible: true, delay: true, placement: 'block', message: t('loading') })) : (_jsx(AssignmentContainer, { assignments: assignments, childCases: childCases, depth: 0, collapsed: true, firstItemId: findFirstLeaf(), testId: testIds.root, isMediumOrAbove: isMediumOrAbove })) }))] })), target && profileId && onDismiss && (_jsx(Glimpse, { ...restAssigneeProfile, progress: assigneeProfile?.progress ?? !assigneeProfile?.fields?.length, id: profileId, target: target, onDismiss: onDismiss }))] })) }));
|
|
32
|
+
});
|
|
33
|
+
export default withTestIds(HierarchicalAssignments, getHierarchicalAssignmentsTestIds);
|
|
34
|
+
//# sourceMappingURL=HierarchicalAssignments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EACL,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,IAAI,uBAAuB,EAC7C,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAEvF,MAAM,uBAAuB,GAAoC,UAAU,CACzE,CACE,EACE,WAAW,EACX,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACP,EACD,GAAuC,EACvC,EAA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EACd,SAAS,EAAE,SAAS,GACpB,CACH,IACiB,CACrB,GACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,uBAAuB,EAAE,iCAAiC,CAAC,CAAC","sourcesContent":["import { forwardRef, useRef } from 'react';\nimport type { FC } from 'react';\n\nimport {\n CardHeader,\n useI18n,\n Icon,\n Text,\n Flex,\n useUID,\n Progress,\n useTestIds,\n withTestIds,\n useBreakpoint,\n ExpandCollapse\n} from '@pega/cosmos-react-core';\n\nimport Glimpse from '../Glimpse';\nimport { TaskItem } from '../Tasks/TaskList';\n\nimport {\n StyledAssignments,\n StyledExpandButton as StyledTitleExpandButton,\n StyledParentExpandCollapse\n} from './Assignments.styles';\nimport type { HierarchicalAssignmentProps } from './HierarchicalAssignments.types';\nimport AssignmentContainer from './AssignmentContainer';\nimport { getHierarchicalAssignmentsTestIds } from './HierarchicalAssignments.test-ids';\n\nconst HierarchicalAssignments: FC<HierarchicalAssignmentProps> = forwardRef(\n (\n {\n assignments,\n childCases,\n collapsed = false,\n onToggleCollapsed,\n openItem,\n progress,\n assigneeProfile,\n name,\n testId\n },\n ref: HierarchicalAssignmentProps['ref']\n ) => {\n const t = useI18n();\n const assignmentsId = useUID();\n const testIds = useTestIds(testId, getHierarchicalAssignmentsTestIds);\n const containerRef = useRef<HTMLDivElement>(null);\n const isMediumOrAbove = useBreakpoint('sm', { breakpointRef: containerRef });\n const open = !collapsed;\n\n const { target, id: profileId, onDismiss, ...restAssigneeProfile } = assigneeProfile ?? {};\n\n const header = (\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Icon name='caret-right' />\n <Text variant='h2'>{name ?? t('assignments')}</Text>\n </Flex>\n );\n\n const findFirstLeaf = () => {\n if (assignments?.length) {\n return assignments[0].id;\n }\n if (childCases?.length) {\n return childCases[0].id;\n }\n };\n\n const showAssignmentList = !!(assignments?.length || childCases?.length);\n\n return (\n <>\n {showAssignmentList && (\n <StyledAssignments data-testid={testIds.root} ref={ref} expanded={open}>\n {openItem ? (\n <TaskItem {...openItem} />\n ) : (\n <>\n <CardHeader container={{ justify: 'start', alignItems: 'center', gap: 1 }}>\n <StyledTitleExpandButton\n data-testid={testIds.toggleAction}\n type='button'\n variant='text'\n onClick={() => {\n if (onToggleCollapsed) {\n onToggleCollapsed(!collapsed);\n }\n }}\n aria-controls={assignmentsId}\n aria-expanded={open}\n aria-label={name ?? t('assignments')}\n >\n {header}\n </StyledTitleExpandButton>\n </CardHeader>\n {open && (\n <ExpandCollapse\n as={StyledParentExpandCollapse}\n ref={containerRef}\n collapsed={collapsed}\n role='tree'\n >\n {progress ? (\n <Progress focusOnVisible delay placement='block' message={t('loading')} />\n ) : (\n <AssignmentContainer\n assignments={assignments}\n childCases={childCases}\n depth={0}\n collapsed\n firstItemId={findFirstLeaf()}\n testId={testIds.root}\n isMediumOrAbove={isMediumOrAbove}\n />\n )}\n </ExpandCollapse>\n )}\n </>\n )}\n\n {target && profileId && onDismiss && (\n <Glimpse\n {...restAssigneeProfile}\n progress={assigneeProfile?.progress ?? !assigneeProfile?.fields?.length}\n id={profileId}\n target={target}\n onDismiss={onDismiss}\n />\n )}\n </StyledAssignments>\n )}\n </>\n );\n }\n);\n\nexport default withTestIds(HierarchicalAssignments, getHierarchicalAssignmentsTestIds);\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getHierarchicalAssignmentsTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action"]>;
|
|
2
|
+
export declare const getAssignmentTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action"]>;
|
|
3
|
+
export declare const getCaseTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action", "label", "id", "status"]>;
|
|
4
|
+
//# sourceMappingURL=HierarchicalAssignments.test-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,yHAEnC,CAAC;AAEZ,eAAO,MAAM,oBAAoB,kJAKtB,CAAC;AAEZ,eAAO,MAAM,cAAc,kJAKhB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createTestIds } from '@pega/cosmos-react-core';
|
|
2
|
+
export const getHierarchicalAssignmentsTestIds = createTestIds('hierarchical-assignments', [
|
|
3
|
+
'toggle-action'
|
|
4
|
+
]);
|
|
5
|
+
export const getAssignmentTestIds = createTestIds('assignment', [
|
|
6
|
+
'label',
|
|
7
|
+
'assignee',
|
|
8
|
+
'urgency',
|
|
9
|
+
'action'
|
|
10
|
+
]);
|
|
11
|
+
export const getCaseTestIds = createTestIds('case', [
|
|
12
|
+
'toggle-action',
|
|
13
|
+
'label',
|
|
14
|
+
'id',
|
|
15
|
+
'status'
|
|
16
|
+
]);
|
|
17
|
+
//# sourceMappingURL=HierarchicalAssignments.test-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.test-ids.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,iCAAiC,GAAG,aAAa,CAAC,0BAA0B,EAAE;IACzF,eAAe;CACP,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,YAAY,EAAE;IAC9D,OAAO;IACP,UAAU;IACV,SAAS;IACT,QAAQ;CACA,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,EAAE;IAClD,eAAe;IACf,OAAO;IACP,IAAI;IACJ,QAAQ;CACA,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getHierarchicalAssignmentsTestIds = createTestIds('hierarchical-assignments', [\n 'toggle-action'\n] as const);\n\nexport const getAssignmentTestIds = createTestIds('assignment', [\n 'label',\n 'assignee',\n 'urgency',\n 'action'\n] as const);\n\nexport const getCaseTestIds = createTestIds('case', [\n 'toggle-action',\n 'label',\n 'id',\n 'status'\n] as const);\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { MouseEvent, Ref } from 'react';
|
|
2
|
+
import type { LinkProps, NoChildrenProp, OmitStrict, StatusProps, TestIdProp } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { GlimpseProps, TaskItemProps } from '@pega/cosmos-react-work';
|
|
4
|
+
export interface AssignmentProps extends TestIdProp {
|
|
5
|
+
/** Unique Id of the assignment */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Name of the process for the assignment. */
|
|
8
|
+
processName: string;
|
|
9
|
+
/** Number to defined the Urgency of assignment */
|
|
10
|
+
urgency: number;
|
|
11
|
+
/** Assignee's Name of the assignment */
|
|
12
|
+
assigneeName: string;
|
|
13
|
+
/** Callback fired when click of Assignee Name to show Glimpse component */
|
|
14
|
+
onAssigneeClick: (id: AssignmentProps['id'], e: MouseEvent<HTMLButtonElement>) => void;
|
|
15
|
+
/** Callback fired from the Go button */
|
|
16
|
+
onOpen?: (id: AssignmentProps['id'], e: MouseEvent<HTMLButtonElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface ItemsProps extends NoChildrenProp {
|
|
19
|
+
/** An array of assignment details to be rendered as Assignment details */
|
|
20
|
+
assignments?: AssignmentProps[];
|
|
21
|
+
/** An array of child cases to be rendered as case details */
|
|
22
|
+
childCases?: CaseListProps[];
|
|
23
|
+
/**
|
|
24
|
+
* Boolean that refers the state of the ExpandButton.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
/** Callback on toggle of ExpandCollapseButton of each Case */
|
|
29
|
+
onToggleCollapsed?: (collapsed: boolean, id: string) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface CaseListProps extends NoChildrenProp, ItemsProps, TestIdProp {
|
|
32
|
+
/** Name of the task group displayed in the list. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Unique Id of the childcase */
|
|
35
|
+
id: string;
|
|
36
|
+
/** status details for the case */
|
|
37
|
+
status: {
|
|
38
|
+
text: string;
|
|
39
|
+
variant: StatusProps['variant'];
|
|
40
|
+
};
|
|
41
|
+
/** Meta details of link to navigate to the case */
|
|
42
|
+
link: {
|
|
43
|
+
onPreview: LinkProps['onPreview'];
|
|
44
|
+
href: LinkProps['href'];
|
|
45
|
+
target?: LinkProps['target'];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface HierarchicalAssignmentProps extends OmitStrict<ItemsProps, 'onToggleCollapsed'>, TestIdProp {
|
|
49
|
+
/**
|
|
50
|
+
* Hierarchical Assignment widget's title
|
|
51
|
+
* @default 'Assignment'
|
|
52
|
+
*/
|
|
53
|
+
name?: string;
|
|
54
|
+
/** Boolean refers to state of the progress in assignment widget */
|
|
55
|
+
progress?: boolean;
|
|
56
|
+
/** Task Content to be rendered on click of Go Action button */
|
|
57
|
+
openItem?: TaskItemProps;
|
|
58
|
+
/** Meta details to Render the Glimpse component to show the Assignee details */
|
|
59
|
+
assigneeProfile?: GlimpseProps;
|
|
60
|
+
/** Callback on toggle of Top level ExpandCollapseButton */
|
|
61
|
+
onToggleCollapsed: (collapsed: boolean) => void;
|
|
62
|
+
/** Ref placed on the element. */
|
|
63
|
+
ref?: Ref<HTMLDivElement>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=HierarchicalAssignments.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.types.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.types.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AkC;IAClC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;KACjC,CAAC;IACF,mDAAmD;IACnD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;KAC9B,CAAC;CACH;AAED,MAAM,WAAW,2BACf,SAAQ,UAAU,CAAC,UAAU,EAAE,mBAAmB,CAAC,EACjD,UAAU;IACZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,gFAAgF;IAChF,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,2DAA2D;IAC3D,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,iCAAiC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalAssignments.types.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEvent, Ref } from 'react';\n\nimport type {\n LinkProps,\n NoChildrenProp,\n OmitStrict,\n StatusProps,\n TestIdProp\n} from '@pega/cosmos-react-core';\nimport type { GlimpseProps, TaskItemProps } from '@pega/cosmos-react-work';\n\nexport interface AssignmentProps extends TestIdProp {\n /** Unique Id of the assignment */\n id: string;\n /** Name of the process for the assignment. */\n processName: string;\n /** Number to defined the Urgency of assignment */\n urgency: number;\n /** Assignee's Name of the assignment */\n assigneeName: string;\n /** Callback fired when click of Assignee Name to show Glimpse component */\n onAssigneeClick: (id: AssignmentProps['id'], e: MouseEvent<HTMLButtonElement>) => void;\n /** Callback fired from the Go button */\n onOpen?: (id: AssignmentProps['id'], e: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport interface ItemsProps extends NoChildrenProp {\n /** An array of assignment details to be rendered as Assignment details */\n assignments?: AssignmentProps[];\n /** An array of child cases to be rendered as case details */\n childCases?: CaseListProps[];\n /**\n * Boolean that refers the state of the ExpandButton.\n * @default false\n */\n collapsed?: boolean;\n /** Callback on toggle of ExpandCollapseButton of each Case */\n onToggleCollapsed?: (collapsed: boolean, id: string) => void;\n}\n\nexport interface CaseListProps extends NoChildrenProp, ItemsProps, TestIdProp {\n /** Name of the task group displayed in the list. */\n name: string;\n /** Unique Id of the childcase */\n id: string;\n /** status details for the case */\n status: {\n text: string;\n variant: StatusProps['variant'];\n };\n /** Meta details of link to navigate to the case */\n link: {\n onPreview: LinkProps['onPreview'];\n href: LinkProps['href'];\n target?: LinkProps['target'];\n };\n}\n\nexport interface HierarchicalAssignmentProps\n extends OmitStrict<ItemsProps, 'onToggleCollapsed'>,\n TestIdProp {\n /**\n * Hierarchical Assignment widget's title\n * @default 'Assignment'\n */\n name?: string;\n /** Boolean refers to state of the progress in assignment widget */\n progress?: boolean;\n /** Task Content to be rendered on click of Go Action button */\n openItem?: TaskItemProps;\n /** Meta details to Render the Glimpse component to show the Assignee details */\n assigneeProfile?: GlimpseProps;\n /** Callback on toggle of Top level ExpandCollapseButton */\n onToggleCollapsed: (collapsed: boolean) => void;\n /** Ref placed on the element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,YAAY,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { default } from './HierarchicalAssignments';\nexport type { HierarchicalAssignmentProps, AssignmentProps } from './HierarchicalAssignments.types';\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { default as GenAICoach } from './components/GenAICoach';
|
|
|
20
20
|
export * from './components/GenAICoach';
|
|
21
21
|
export { default as Glimpse } from './components/Glimpse';
|
|
22
22
|
export * from './components/Glimpse';
|
|
23
|
+
export { default as HierarchicalAssignments } from './components/HierarchicalAssignments';
|
|
24
|
+
export * from './components/HierarchicalAssignments';
|
|
23
25
|
export { default as IntelligentGuidance } from './components/IntelligentGuidance';
|
|
24
26
|
export * from './components/IntelligentGuidance';
|
|
25
27
|
export { default as InteractionNotification } from './components/InteractionNotification';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MA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AI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,cAAc,sCAAsC,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -21,6 +21,8 @@ export { default as GenAICoach } from './components/GenAICoach';
|
|
|
21
21
|
export * from './components/GenAICoach';
|
|
22
22
|
export { default as Glimpse } from './components/Glimpse';
|
|
23
23
|
export * from './components/Glimpse';
|
|
24
|
+
export { default as HierarchicalAssignments } from './components/HierarchicalAssignments';
|
|
25
|
+
export * from './components/HierarchicalAssignments';
|
|
24
26
|
export { default as IntelligentGuidance } from './components/IntelligentGuidance';
|
|
25
27
|
export * from './components/IntelligentGuidance';
|
|
26
28
|
export { default as InteractionNotification } from './components/InteractionNotification';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as GenAICoach } from './components/GenAICoach';\nexport * from './components/GenAICoach';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as Timeline } from './components/Timeline';\nexport * from './components/Timeline';\nexport { default as UtilitiesLayout } from './components/UtilitiesLayout';\nexport * from './components/UtilitiesLayout';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC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,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as GenAICoach } from './components/GenAICoach';\nexport * from './components/GenAICoach';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as HierarchicalAssignments } from './components/HierarchicalAssignments';\nexport * from './components/HierarchicalAssignments';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as Timeline } from './components/Timeline';\nexport * from './components/Timeline';\nexport { default as UtilitiesLayout } from './components/UtilitiesLayout';\nexport * from './components/UtilitiesLayout';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-work",
|
|
3
|
-
"version": "7.0.0-build.
|
|
3
|
+
"version": "7.0.0-build.24.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/pegasystems/cosmos-react.git",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"build": "tsc -b tsconfig.build.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@pega/cosmos-react-core": "7.0.0-build.
|
|
23
|
-
"@pega/cosmos-react-rte": "7.0.0-build.
|
|
22
|
+
"@pega/cosmos-react-core": "7.0.0-build.24.0",
|
|
23
|
+
"@pega/cosmos-react-rte": "7.0.0-build.24.0",
|
|
24
24
|
"@types/react": "^17.0.62",
|
|
25
25
|
"@types/react-dom": "^17.0.20",
|
|
26
26
|
"@types/styled-components": "^5.1.26",
|