@pega/cosmos-react-work 8.0.0-build.28.2 → 8.0.0-build.28.3

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.
@@ -26,13 +26,8 @@ export declare const StyledLinkContainer: import("styled-components").StyledComp
26
26
  }, never>;
27
27
  export declare const StyledAssigneeContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
28
28
  depth?: number;
29
- isMediumOrAbove?: boolean;
30
29
  }, never>;
31
30
  export declare const StyledAssigneeText: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
32
- export declare const StyledUrgencyTextContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
33
- depth?: number;
34
- isMediumOrAbove?: boolean;
35
- }, never>;
36
31
  export declare const StyledMetaListContainer: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").MetaListProps> & {
37
32
  getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
38
33
  }, import("styled-components").DefaultTheme, {
@@ -50,4 +45,7 @@ export declare const StyledNode: import("styled-components").StyledComponent<"li
50
45
  isChild?: boolean;
51
46
  depth: number;
52
47
  }, never>;
48
+ export declare const StyledAssignmentItemMetaList: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").MetaListProps> & {
49
+ getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
50
+ }, import("styled-components").DefaultTheme, {}, never>;
53
51
  //# sourceMappingURL=Assignments.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Assignments.styles.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/Assignments.styles.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,kBAAkB,oNA0B7B,CAAC;AAIH,eAAO,MAAM,oBAAoB,6OAQ/B,CAAC;AAGH,eAAO,MAAM,oBAAoB;kBACjB,OAAO;SAYtB,CAAC;AAGF,eAAO,MAAM,sBAAsB;YAAwB,MAAM;SA4BhE,CAAC;AAGF,eAAO,MAAM,qBAAqB;sBAAkC,OAAO;SAY1E,CAAC;AAGF,eAAO,MAAM,qBAAqB;YAAwB,MAAM;SAgB/D,CAAC;AAGF,eAAO,MAAM,iBAAiB;2BApCf,CAAC,oEAAkC,yBAE5C;;YAkCyD,OAAO;SAiBpE,CAAC;AAGH,eAAO,MAAM,iBAAiB;eAA6B,OAAO;SAehE,CAAC;AAIH,eAAO,MAAM,oBAAoB,kNAI/B,CAAC;AAGH,eAAO,MAAM,mBAAmB;sBAAkC,OAAO;SAsBxE,CAAC;AAGF,eAAO,MAAM,uBAAuB;YAAwB,MAAM;sBAAoB,OAAO;SA2B5F,CAAC;AAGF,eAAO,MAAM,kBAAkB,oNAO7B,CAAC;AAGH,eAAO,MAAM,0BAA0B;YAAwB,MAAM;sBAAoB,OAAO;SA0B/F,CAAC;AAGF,eAAO,MAAM,uBAAuB;2BA1OpC,CAAA,oEAAkC,yBAAa;;YA2OrC,OAAO;SA2Bf,CAAC;AAGH,eAAO,MAAM,2BAA2B;2BAzQxC,CAAA;uDAiRE,CAAC;AAGH,eAAO,MAAM,oBAAoB,0GAUhC,CAAC;AAGF,eAAO,MAAM,cAAc,wGAkC1B,CAAC;AAGF,eAAO,MAAM,UAAU;0BACC,OAAO;cACnB,OAAO;eACN,OAAO;cACR,OAAO;WACV,MAAM;SA6Dd,CAAC"}
1
+ {"version":3,"file":"Assignments.styles.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/Assignments.styles.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,kBAAkB,oNA0B7B,CAAC;AAIH,eAAO,MAAM,oBAAoB,6OAQ/B,CAAC;AAGH,eAAO,MAAM,oBAAoB;kBACjB,OAAO;SAYtB,CAAC;AAGF,eAAO,MAAM,sBAAsB;YAAwB,MAAM;SA4BhE,CAAC;AAGF,eAAO,MAAM,qBAAqB;sBAAkC,OAAO;SAkB1E,CAAC;AAGF,eAAO,MAAM,qBAAqB;YAAwB,MAAM;SAgB/D,CAAC;AAGF,eAAO,MAAM,iBAAiB;2BA1Cf,CAAC,oEAAkC,yBAE5C;;YAwCyD,OAAO;SAiBpE,CAAC;AAGH,eAAO,MAAM,iBAAiB;eAA6B,OAAO;SAehE,CAAC;AAIH,eAAO,MAAM,oBAAoB,kNAI/B,CAAC;AAGH,eAAO,MAAM,mBAAmB;sBAAkC,OAAO;SAsBxE,CAAC;AAGF,eAAO,MAAM,uBAAuB;YAAwB,MAAM;SAqBjE,CAAC;AAGF,eAAO,MAAM,kBAAkB,oNAQ7B,CAAC;AAGH,eAAO,MAAM,uBAAuB;2BA9MpC,CAAA,oEAAkC,yBAAa;;YA+MrC,OAAO;SA2Bf,CAAC;AAGH,eAAO,MAAM,2BAA2B;2BA7OxC,CAAA;uDAqPE,CAAC;AAGH,eAAO,MAAM,oBAAoB,0GAUhC,CAAC;AAGF,eAAO,MAAM,cAAc,wGAkC1B,CAAC;AAGF,eAAO,MAAM,UAAU;0BACC,OAAO;cACnB,OAAO;eACN,OAAO;cACR,OAAO;WACV,MAAM;SA6Dd,CAAC;AAGF,eAAO,MAAM,4BAA4B;2BA/WzC,CAAA;uDAuXE,CAAC"}
@@ -56,8 +56,9 @@ export const StyledProcessContainer = styled.div(({ depth, theme: { base: { spac
56
56
  `;
57
57
  });
58
58
  StyledProcessContainer.defaultProps = defaultThemeProp;
59
- export const StyledActionContainer = styled.div(({ isMediumOrAbove }) => {
59
+ export const StyledActionContainer = styled.div(({ isMediumOrAbove, theme: { base: { spacing } } }) => {
60
60
  return css `
61
+ min-width: calc(6.625 * ${spacing});
61
62
  grid-row-start: 1;
62
63
  grid-row-end: -1;
63
64
  ${isMediumOrAbove &&
@@ -127,44 +128,26 @@ export const StyledLinkContainer = styled.div(({ theme: { base: { spacing } }, i
127
128
  `;
128
129
  });
129
130
  StyledLinkContainer.defaultProps = defaultThemeProp;
130
- export const StyledAssigneeContainer = styled.div(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, depth, isMediumOrAbove }) => {
131
+ export const StyledAssigneeContainer = styled.div(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, depth }) => {
131
132
  const paddingInlineStart = depth
132
133
  ? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`
133
134
  : `calc(1.5 * ${spacing})`;
134
135
  return css `
135
- padding-block: calc(0.5 * ${spacing});
136
136
  overflow: hidden;
137
137
  padding-inline-start: ${paddingInlineStart};
138
- ${isMediumOrAbove &&
139
- css `
140
- padding: calc(0.5 * ${spacing});
141
- `};
142
138
  `;
143
139
  });
144
140
  StyledAssigneeContainer.defaultProps = defaultThemeProp;
145
141
  export const StyledAssigneeText = styled(Button)(({ theme }) => {
146
142
  const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
147
143
  return css `
144
+ max-width: 16ch;
148
145
  ${ellipsisOverflow}
149
146
  font-size: ${fontSizes[theme.components.text.secondary['font-size']]};
150
147
  font-weight: ${theme.components.text.secondary['font-weight']};
151
148
  `;
152
149
  });
153
150
  StyledAssigneeText.defaultProps = defaultThemeProp;
154
- export const StyledUrgencyTextContainer = 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
- white-space: nowrap;
160
- padding-inline-start: ${paddingInlineStart};
161
- ${isMediumOrAbove &&
162
- css `
163
- padding-inline: calc(0.5 * ${spacing});
164
- `}
165
- `;
166
- });
167
- StyledUrgencyTextContainer.defaultProps = defaultThemeProp;
168
151
  export const StyledMetaListContainer = styled(MetaList)(({ theme: { base: { spacing }, components: { icon: { size: { s } } } }, indent }) => {
169
152
  return css `
170
153
  ${indent &&
@@ -191,7 +174,7 @@ export const StyledMetaIdStatusContainer = styled(MetaList)(({ theme: { base: {
191
174
  StyledMetaIdStatusContainer.defaultProps = defaultThemeProp;
192
175
  export const StyledLabelContainer = styled.span(({ theme: { base: { spacing } } }) => {
193
176
  return css `
194
- padding-inline: calc(0.5 * ${spacing});
177
+ padding-inline-end: calc(0.5 * ${spacing});
195
178
  `;
196
179
  });
197
180
  StyledLabelContainer.defaultProps = defaultThemeProp;
@@ -255,4 +238,10 @@ export const StyledNode = styled.li(({ theme: { base: { shadow, 'border-radius':
255
238
  `;
256
239
  });
257
240
  StyledNode.defaultProps = defaultThemeProp;
241
+ export const StyledAssignmentItemMetaList = styled(MetaList)(({ theme: { base: { spacing } } }) => {
242
+ return css `
243
+ padding: calc(0.5 * ${spacing});
244
+ `;
245
+ });
246
+ StyledAssignmentItemMetaList.defaultProps = defaultThemeProp;
258
247
  //# sourceMappingURL=Assignments.styles.js.map
@@ -1 +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,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,IAAI,EACJ,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAE1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAChD,KAAK,EAAE,EACL,IAAI,E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,mBAAmB,CAAC,CAAC,CAAC,iBAAiB;QACnE,OAAO;QACT,GAAG,CAAA;;;;;wBAKe,MAAM,CAAC,aAAa,CAAC;;OAEtC;;QAEC,mBAAmB;QACrB,GAAG,CAAA;;;wBAGe,MAAM,CAAC,aAAa,CAAC;;OAEtC;;QAEC,QAAQ;QACV,GAAG,CAAA;mCAC0B,YAAY;iCACd,YAAY;;;qCAGR,YAAY;mCACd,YAAY;;OAExC;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AACF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n defaultThemeProp,\n StyledIcon,\n useDirection,\n MetaList,\n SummaryItem,\n calculateFontSize,\n StyledText,\n Text,\n ExpandCollapse\n} from '@pega/cosmos-react-core';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\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 StyledExpandCollpase = styled(ExpandCollapse)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin-block-start: calc(0.125 * ${spacing});\n `;\n});\nStyledExpandCollpase.defaultProps = defaultThemeProp;\n\nexport const StyledAssignmentItem = styled.div<{\n hideBorders?: boolean;\n}>(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding-inline-end: calc(2 * ${spacing});\n padding-block: calc(0.5 * ${spacing});\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\n return css`\n overflow: hidden;\n padding-inline-start: ${paddingInlineStart};\n grid-row-start: 1;\n grid-row-end: 1;\n height: 100%;\n ${StyledText} {\n ${ellipsisOverflow}\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: { spacing }\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 `;\n }\n);\nStyledHeaderContainer.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryItem = styled(SummaryItem)<{ indent: boolean }>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n indent\n}) => {\n return css`\n ${indent &&\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\n &:has(form) {\n box-shadow: ${expanded ? theme.base.shadow.low : 'none'};\n }\n\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 StyledAssignmentText = styled(Text)(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\nStyledAssignmentText.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 ${ellipsisOverflow};\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)(({ theme }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n ${ellipsisOverflow}\n font-size: ${fontSizes[theme.components.text.secondary['font-size'] as FontSize]};\n font-weight: ${theme.components.text.secondary['font-weight']};\n `;\n});\nStyledAssigneeText.defaultProps = defaultThemeProp;\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 indent: boolean;\n}>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n indent\n}) => {\n return css`\n ${indent &&\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.span(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding-inline: calc(0.5 * ${spacing});\n `;\n }\n);\nStyledLabelContainer.defaultProps = defaultThemeProp;\n\nexport const StyledTreeRoot = styled.ul(\n ({\n theme: {\n base: {\n 'border-radius': borderRadius,\n palette: { 'border-line': borderLine }\n },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n }\n }) => {\n return css`\n list-style-type: none;\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: 50dvh;\n overflow-y: auto;\n border: ${borderWidth} solid ${borderLine};\n border-radius: ${borderRadius};\n\n & > li:first-child {\n border-block-start: none;\n border-start-start-radius: ${borderRadius};\n border-start-end-radius: ${borderRadius};\n & > div,\n & > div:focus-within {\n border-start-start-radius: ${borderRadius};\n border-start-end-radius: ${borderRadius};\n }\n }\n `;\n }\n);\nStyledTreeRoot.defaultProps = defaultThemeProp;\n\nexport const StyledNode = styled.li<{\n isNodeInternalFocus?: boolean;\n isFocus?: boolean;\n lastNode?: boolean;\n isChild?: boolean;\n depth: number;\n}>(\n ({\n theme: {\n base: {\n shadow,\n 'border-radius': borderRadius,\n palette: {\n 'secondary-background': secondaryBackground,\n 'primary-background': primaryBackground,\n 'border-line': borderLine\n }\n },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n },\n isNodeInternalFocus,\n isFocus,\n lastNode,\n isChild,\n depth\n }) => {\n return css`\n list-style: none;\n border-block-start: ${borderWidth} dashed ${borderLine};\n outline: none;\n padding: ${depth <= 1 ? borderWidth : '0'};\n background-color: ${isChild ? secondaryBackground : primaryBackground};\n ${isFocus &&\n css`\n &:focus {\n position: relative;\n }\n &:focus > div {\n box-shadow: ${shadow['focus-solid']};\n }\n `}\n\n ${isNodeInternalFocus &&\n css`\n &:focus-within > div {\n position: relative;\n box-shadow: ${shadow['focus-solid']};\n }\n `}\n\n ${lastNode &&\n css`\n border-end-start-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n & > div,\n & > div:focus-within {\n border-end-start-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n }\n `};\n `;\n }\n);\nStyledNode.defaultProps = defaultThemeProp;\n"]}
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,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,WAA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F,CAAC;AACJ,CAAC,CACF,CAAC;AACF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAC5D,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;0BACc,OAAO;GAC9B,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,4BAA4B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n defaultThemeProp,\n StyledIcon,\n useDirection,\n MetaList,\n SummaryItem,\n calculateFontSize,\n StyledText,\n Text,\n ExpandCollapse\n} from '@pega/cosmos-react-core';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\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 StyledExpandCollpase = styled(ExpandCollapse)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin-block-start: calc(0.125 * ${spacing});\n `;\n});\nStyledExpandCollpase.defaultProps = defaultThemeProp;\n\nexport const StyledAssignmentItem = styled.div<{\n hideBorders?: boolean;\n}>(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding-inline-end: calc(2 * ${spacing});\n padding-block: calc(0.5 * ${spacing});\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\n return css`\n overflow: hidden;\n padding-inline-start: ${paddingInlineStart};\n grid-row-start: 1;\n grid-row-end: 1;\n height: 100%;\n ${StyledText} {\n ${ellipsisOverflow}\n padding-inline: calc(0.5 * ${spacing});\n }\n `;\n }\n);\nStyledProcessContainer.defaultProps = defaultThemeProp;\n\nexport const StyledActionContainer = styled.div<{ isMediumOrAbove?: boolean }>(\n ({\n isMediumOrAbove,\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n min-width: calc(6.625 * ${spacing});\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: { spacing }\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 `;\n }\n);\nStyledHeaderContainer.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryItem = styled(SummaryItem)<{ indent: boolean }>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n indent\n}) => {\n return css`\n ${indent &&\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\n &:has(form) {\n box-shadow: ${expanded ? theme.base.shadow.low : 'none'};\n }\n\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 StyledAssignmentText = styled(Text)(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\nStyledAssignmentText.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 ${ellipsisOverflow};\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 }>(\n ({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n depth\n }) => {\n const paddingInlineStart = depth\n ? `calc(1.5 * ${spacing} * ${depth} + ${s} + ${spacing})`\n : `calc(1.5 * ${spacing})`;\n\n return css`\n overflow: hidden;\n padding-inline-start: ${paddingInlineStart};\n `;\n }\n);\nStyledAssigneeContainer.defaultProps = defaultThemeProp;\n\nexport const StyledAssigneeText = styled(Button)(({ theme }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n max-width: 16ch;\n ${ellipsisOverflow}\n font-size: ${fontSizes[theme.components.text.secondary['font-size'] as FontSize]};\n font-weight: ${theme.components.text.secondary['font-weight']};\n `;\n});\nStyledAssigneeText.defaultProps = defaultThemeProp;\n\nexport const StyledMetaListContainer = styled(MetaList)<{\n indent: boolean;\n}>(({\n theme: {\n base: { spacing },\n components: {\n icon: {\n size: { s }\n }\n }\n },\n indent\n}) => {\n return css`\n ${indent &&\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.span(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding-inline-end: calc(0.5 * ${spacing});\n `;\n }\n);\nStyledLabelContainer.defaultProps = defaultThemeProp;\n\nexport const StyledTreeRoot = styled.ul(\n ({\n theme: {\n base: {\n 'border-radius': borderRadius,\n palette: { 'border-line': borderLine }\n },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n }\n }) => {\n return css`\n list-style-type: none;\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: 50dvh;\n overflow-y: auto;\n border: ${borderWidth} solid ${borderLine};\n border-radius: ${borderRadius};\n\n & > li:first-child {\n border-block-start: none;\n border-start-start-radius: ${borderRadius};\n border-start-end-radius: ${borderRadius};\n & > div,\n & > div:focus-within {\n border-start-start-radius: ${borderRadius};\n border-start-end-radius: ${borderRadius};\n }\n }\n `;\n }\n);\nStyledTreeRoot.defaultProps = defaultThemeProp;\n\nexport const StyledNode = styled.li<{\n isNodeInternalFocus?: boolean;\n isFocus?: boolean;\n lastNode?: boolean;\n isChild?: boolean;\n depth: number;\n}>(\n ({\n theme: {\n base: {\n shadow,\n 'border-radius': borderRadius,\n palette: {\n 'secondary-background': secondaryBackground,\n 'primary-background': primaryBackground,\n 'border-line': borderLine\n }\n },\n components: {\n table: {\n body: { 'border-width': borderWidth }\n }\n }\n },\n isNodeInternalFocus,\n isFocus,\n lastNode,\n isChild,\n depth\n }) => {\n return css`\n list-style: none;\n border-block-start: ${borderWidth} dashed ${borderLine};\n outline: none;\n padding: ${depth <= 1 ? borderWidth : '0'};\n background-color: ${isChild ? secondaryBackground : primaryBackground};\n ${isFocus &&\n css`\n &:focus {\n position: relative;\n }\n &:focus > div {\n box-shadow: ${shadow['focus-solid']};\n }\n `}\n\n ${isNodeInternalFocus &&\n css`\n &:focus-within > div {\n position: relative;\n box-shadow: ${shadow['focus-solid']};\n }\n `}\n\n ${lastNode &&\n css`\n border-end-start-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n & > div,\n & > div:focus-within {\n border-end-start-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n }\n `};\n `;\n }\n);\nStyledNode.defaultProps = defaultThemeProp;\n\nexport const StyledAssignmentItemMetaList = styled(MetaList)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n padding: calc(0.5 * ${spacing});\n `;\n});\nStyledAssignmentItemMetaList.defaultProps = defaultThemeProp;\n"]}
@@ -1,4 +1,4 @@
1
1
  export declare const getHierarchicalAssignmentsTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action"]>;
2
- export declare const getAssignmentTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action"]>;
2
+ export declare const getAssignmentTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action", "sla"]>;
3
3
  export declare const getCaseTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["toggle-action", "label", "id", "status"]>;
4
4
  //# sourceMappingURL=HierarchicalAssignments.test-ids.d.ts.map
@@ -1 +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,sJAEnC,CAAC;AAEZ,eAAO,MAAM,oBAAoB,+KAKtB,CAAC;AAEZ,eAAO,MAAM,cAAc,+KAKhB,CAAC"}
1
+ {"version":3,"file":"HierarchicalAssignments.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,sJAEnC,CAAC;AAEZ,eAAO,MAAM,oBAAoB,sLAMtB,CAAC;AAEZ,eAAO,MAAM,cAAc,+KAKhB,CAAC"}
@@ -6,7 +6,8 @@ export const getAssignmentTestIds = createTestIds('assignment', [
6
6
  'label',
7
7
  'assignee',
8
8
  'urgency',
9
- 'action'
9
+ 'action',
10
+ 'sla'
10
11
  ]);
11
12
  export const getCaseTestIds = createTestIds('case', [
12
13
  'toggle-action',
@@ -1 +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"]}
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;IACR,KAAK;CACG,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 'sla'\n] as const);\n\nexport const getCaseTestIds = createTestIds('case', [\n 'toggle-action',\n 'label',\n 'id',\n 'status'\n] as const);\n"]}
@@ -8,6 +8,8 @@ export interface AssignmentProps {
8
8
  name: string;
9
9
  /** Process Name for the assignment. */
10
10
  processName?: string;
11
+ /** Service Level Agreement for the assignment. */
12
+ sla?: string;
11
13
  /** Number to defined the Urgency of assignment */
12
14
  urgency: number;
13
15
  /** Assignee's Id, passed on callback of onAssigneeClick */
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchicalAssignments.types.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,eAAe,EAAE,CACf,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,EACzC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAC7B,IAAI,CAAC;IACV,wCAAwC;IACxC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAChF;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,0EAA0E;IAC1E,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,4HAA4H;IAC5H,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AACD,MAAM,WAAW,aAAc,SAAQ,cAAc,EAAE,UAAU;IAC/D,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;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;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,iCAAiC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
1
+ {"version":3,"file":"HierarchicalAssignments.types.d.ts","sourceRoot":"","sources":["../../../src/components/HierarchicalAssignments/HierarchicalAssignments.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,eAAe;IA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S,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;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,iCAAiC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +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 { TaskItemProps } from '@pega/cosmos-react-work';\n\nexport interface AssignmentProps {\n /** Unique Id of the assignment */\n id: string;\n /** Assignment name shown in Assignment's description */\n name: string;\n /** Process Name for the assignment. */\n processName?: string;\n /** Number to defined the Urgency of assignment */\n urgency: number;\n /** Assignee's Id, passed on callback of onAssigneeClick */\n assigneeId: string;\n /** Assignee's Name of the assignment */\n assigneeName: string;\n /** Callback fired when click of Assignee Name to show Glimpse component */\n onAssigneeClick: (\n assigneeId: AssignmentProps['assigneeId'],\n e: MouseEvent<HTMLButtonElement>\n ) => 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 /** Callback on toggle of ExpandCollapseButton of each Case, with arguments current expanded state of toggler and case id */\n onToggleCollapsed?: (value: boolean, id: string) => void;\n}\nexport interface CaseListProps extends NoChildrenProp, ItemsProps {\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 /**\n * Boolean that refers the state of the ExpandButton.\n * @default false\n */\n collapsed?: boolean;\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"]}
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 { TaskItemProps } from '@pega/cosmos-react-work';\n\nexport interface AssignmentProps {\n /** Unique Id of the assignment */\n id: string;\n /** Assignment name shown in Assignment's description */\n name: string;\n /** Process Name for the assignment. */\n processName?: string;\n /** Service Level Agreement for the assignment. */\n sla?: string;\n /** Number to defined the Urgency of assignment */\n urgency: number;\n /** Assignee's Id, passed on callback of onAssigneeClick */\n assigneeId: string;\n /** Assignee's Name of the assignment */\n assigneeName: string;\n /** Callback fired when click of Assignee Name to show Glimpse component */\n onAssigneeClick: (\n assigneeId: AssignmentProps['assigneeId'],\n e: MouseEvent<HTMLButtonElement>\n ) => 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 /** Callback on toggle of ExpandCollapseButton of each Case, with arguments current expanded state of toggler and case id */\n onToggleCollapsed?: (value: boolean, id: string) => void;\n}\nexport interface CaseListProps extends NoChildrenProp, ItemsProps {\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 /**\n * Boolean that refers the state of the ExpandButton.\n * @default false\n */\n collapsed?: boolean;\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"]}
@@ -7,8 +7,8 @@ interface AssignmentItemProps extends AssignmentProps {
7
7
  export declare const PauseTextNode: ({ children }: {
8
8
  children: ReactNode;
9
9
  }) => import("react/jsx-runtime").JSX.Element;
10
- declare const _default: (({ name, processName, assigneeName, urgency, depth, id, assigneeId, onOpen, onAssigneeClick }: AssignmentItemProps) => import("react/jsx-runtime").JSX.Element) & {
11
- getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action"]>;
10
+ declare const _default: (({ name, processName, assigneeName, urgency, sla, depth, id, assigneeId, onOpen, onAssigneeClick }: AssignmentItemProps) => import("react/jsx-runtime").JSX.Element) & {
11
+ getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["label", "assignee", "urgency", "action", "sla"]>;
12
12
  };
13
13
  export default _default;
14
14
  //# sourceMappingURL=AssignmentItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignmentItem.d.ts","sourceRoot":"","sources":["../../../../src/components/HierarchicalAssignments/nodeItems/AssignmentItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AA4BlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOxE,UAAU,mBAAoB,SAAQ,eAAe;IACnD,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,aAAa,iBAAkB;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAOlE,CAAC;wHAYC,mBAAmB;;;AA8KtB,wBAAiE"}
1
+ {"version":3,"file":"AssignmentItem.d.ts","sourceRoot":"","sources":["../../../../src/components/HierarchicalAssignments/nodeItems/AssignmentItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AA4BlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOxE,UAAU,mBAAoB,SAAQ,eAAe;IACnD,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,aAAa,iBAAkB;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAOlE,CAAC;6HAaC,mBAAmB;;;AAiLtB,wBAAiE"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useRef, useContext, useCallback } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { Grid, Flex, Button, useI18n, withTestIds, useTestIds, cap, useDirection, Text, VisuallyHiddenText, useElement, Tooltip } from '@pega/cosmos-react-core';
5
- import { StyledAssignmentItem, StyledProcessContainer, StyledActionContainer, StyledAssigneeContainer, StyledUrgencyTextContainer, StyledLabelContainer, StyledNode, StyledAssigneeText } from '../Assignments.styles';
5
+ import { StyledAssignmentItem, StyledProcessContainer, StyledActionContainer, StyledAssigneeContainer, StyledLabelContainer, StyledNode, StyledAssigneeText, StyledAssignmentItemMetaList } from '../Assignments.styles';
6
6
  import { getAssignmentTestIds } from '../HierarchicalAssignments.test-ids';
7
7
  import AssignmentTreeContext from '../AssignmentContext';
8
8
  import AssignmentDetails from '../AssignmentDetail';
@@ -13,7 +13,7 @@ const StyledHiddenText = styled(VisuallyHiddenText) `
13
13
  export const PauseTextNode = ({ children }) => {
14
14
  return (_jsxs(_Fragment, { children: [children, _jsx(StyledHiddenText, { children: ", " })] }));
15
15
  };
16
- const AssignmentItem = ({ name, processName, assigneeName, urgency, depth, id, assigneeId, onOpen, onAssigneeClick }) => {
16
+ const AssignmentItem = ({ name, processName, assigneeName, urgency, sla, depth, id, assigneeId, onOpen, onAssigneeClick }) => {
17
17
  const { firstNodeId, focusedNodeId, lastNodeId, changeFocusHandler, caseIdExpandList, isMediumOrAbove, parentRef } = useContext(AssignmentTreeContext);
18
18
  const assignmentRef = useRef(null);
19
19
  const { parentNodeTabIndex, childElementsTabIndex, isNodeInternalFocus, lastNode, setIsNodeInternalFocus, escapeNodeHandler } = useNodeFocus(id, assignmentRef, parentRef, {
@@ -71,12 +71,16 @@ const AssignmentItem = ({ name, processName, assigneeName, urgency, depth, id, a
71
71
  changeFocusHandler(id);
72
72
  }, tabIndex: isNodeInternalFocus ? -1 : parentNodeTabIndex, isNodeInternalFocus: isNodeInternalFocus, isFocus: isNodeInternalFocus ? false : parentNodeTabIndex === 0, lastNode: lastNode, depth: depth, children: _jsxs(Grid, { container: {
73
73
  alignItems: 'center',
74
- cols: isMediumOrAbove ? '3fr 2fr auto auto' : '2fr 0.5fr',
74
+ cols: isMediumOrAbove ? '2fr 2fr auto' : '2fr 0.5fr',
75
75
  colGap: isMediumOrAbove ? 3 : 0,
76
- rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(3, auto)'
77
- }, as: StyledAssignmentItem, children: [_jsx(VisuallyHiddenText, { children: `${t('assignment_announcement_label')}` }), _jsx(Flex, { "data-testid": testIds.label, container: { alignItems: 'center' }, as: StyledProcessContainer, depth: depth, children: _jsx(PauseTextNode, { children: _jsx(AssignmentDetails, { processName: processName, name: name }) }) }), _jsxs(Flex, { "data-testid": testIds.assignee, container: { justify: isMediumOrAbove ? 'end' : 'start' }, as: StyledAssigneeContainer, depth: depth, variant: 'secondary', isMediumOrAbove: isMediumOrAbove, children: [_jsx(Text, { as: StyledLabelContainer, variant: 'secondary', children: t('assignment_item_assignee') }), _jsx(StyledAssigneeText, { onClick: (e) => {
78
- onAssigneeClick(assigneeId, e);
79
- }, variant: 'link', ref: setAssigneeElement, tabIndex: childElementsTabIndex, children: _jsx(PauseTextNode, { children: assigneeName }) }), _jsx(Tooltip, { target: assigneeEl, smart: true, children: assigneeName })] }), _jsxs(Flex, { "data-testid": testIds.urgency, container: { justify: isMediumOrAbove ? 'end' : 'start' }, as: StyledUrgencyTextContainer, depth: depth, isMediumOrAbove: isMediumOrAbove, children: [_jsx(Text, { as: StyledLabelContainer, variant: 'secondary', children: t('assignment_item_urgency') }), _jsx(Text, { variant: 'secondary', children: _jsx(PauseTextNode, { 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), tabIndex: childElementsTabIndex, children: t('go') })) })] }) }));
76
+ rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(2, auto)'
77
+ }, as: StyledAssignmentItem, children: [_jsx(VisuallyHiddenText, { children: `${t('assignment_announcement_label')}` }), _jsx(Flex, { "data-testid": testIds.label, container: { alignItems: 'center' }, as: StyledProcessContainer, depth: depth, children: _jsx(PauseTextNode, { children: _jsx(AssignmentDetails, { processName: processName, name: name }) }) }), _jsx(Flex, { "data-testid": testIds.assignee, container: { justify: isMediumOrAbove ? 'end' : 'start' }, as: StyledAssigneeContainer, depth: depth, variant: 'secondary', children: _jsx(StyledAssignmentItemMetaList, { wrapItems: true, items: [
78
+ _jsxs(_Fragment, { children: [_jsx(StyledAssigneeText, { onClick: (e) => {
79
+ onAssigneeClick(assigneeId, e);
80
+ }, variant: 'link', ref: setAssigneeElement, "data-testid": testIds.assignee, tabIndex: childElementsTabIndex, children: _jsx(PauseTextNode, { children: assigneeName }) }), _jsx(Tooltip, { target: assigneeEl, smart: true, children: assigneeName })] }),
81
+ sla && (_jsx(Text, { variant: 'secondary', "data-testid": testIds.sla, children: _jsx(PauseTextNode, { children: sla }) })),
82
+ _jsxs(_Fragment, { children: [_jsx(Text, { variant: 'secondary', as: StyledLabelContainer, "data-testid": testIds.urgency, children: t('assignment_item_urgency') }), _jsx(Text, { variant: 'secondary', children: _jsx(PauseTextNode, { children: urgency }) })] })
83
+ ] }) }), _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), tabIndex: childElementsTabIndex, children: t('go') })) })] }) }));
80
84
  };
81
85
  export default withTestIds(AssignmentItem, getAssignmentTestIds);
82
86
  //# sourceMappingURL=AssignmentItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignmentItem.js","sourceRoot":"","sources":["../../../../src/components/HierarchicalAssignments/nodeItems/AssignmentItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EACX,UAAU,EACV,GAAG,EACH,YAAY,EACZ,IAAI,EACJ,kBAAkB,EAClB,UAAU,EACV,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,qBAAqB,MAAM,sBAAsB,CAAC;AACzD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAO1C,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;;CAElD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE;IACrE,OAAO,CACL,8BACG,QAAQ,EACT,KAAC,gBAAgB,qBAAsB,IACtC,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EACtB,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,EAAE,EACF,UAAU,EACV,MAAM,EACN,eAAe,EACK,EAAE,EAAE;IACxB,MAAM,EACJ,WAAW,EACX,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACV,GAAG,UAAU,CAAC,q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QAAQ,EAAE,qBAAqB,YAE/B,KAAC,aAAa,cAAE,YAAY,GAAiB,GAC1B,EACrB,KAAC,OAAO,IAAC,MAAM,EAAE,UAAU,EAAE,KAAK,kBAC/B,YAAY,GACL,IACL,EACP,MAAC,IAAI,mBACU,OAAO,CAAC,OAAO,EAC5B,SAAS,EAAE,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,EACzD,EAAE,EAAE,0BAA0B,EAC9B,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,aAEhC,KAAC,IAAI,IAAC,EAAE,EAAE,oBAAoB,EAAE,OAAO,EAAC,WAAW,YAChD,CAAC,CAAC,yBAAyB,CAAC,GACxB,EACP,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YACvB,KAAC,aAAa,cAAE,OAAO,GAAiB,GACnC,IACF,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,EAC5D,QAAQ,EAAE,qBAAqB,YAE9B,CAAC,CAAC,IAAI,CAAC,GACD,CACV,GACI,IACF,GACI,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useRef, useContext, useCallback } from 'react';\nimport type { MouseEvent, KeyboardEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Grid,\n Flex,\n Button,\n useI18n,\n withTestIds,\n useTestIds,\n cap,\n useDirection,\n Text,\n VisuallyHiddenText,\n useElement,\n Tooltip\n} from '@pega/cosmos-react-core';\n\nimport {\n StyledAssignmentItem,\n StyledProcessContainer,\n StyledActionContainer,\n StyledAssigneeContainer,\n StyledUrgencyTextContainer,\n StyledLabelContainer,\n StyledNode,\n StyledAssigneeText\n} from '../Assignments.styles';\nimport type { AssignmentProps } from '../HierarchicalAssignments.types';\nimport { getAssignmentTestIds } from '../HierarchicalAssignments.test-ids';\nimport AssignmentTreeContext from '../AssignmentContext';\nimport AssignmentDetails from '../AssignmentDetail';\n\nimport useNodeFocus from './useNodeFocus';\n\ninterface AssignmentItemProps extends AssignmentProps {\n /** Property defines the node's level */\n depth: number;\n}\n\nconst StyledHiddenText = styled(VisuallyHiddenText)`\n width: 0;\n`;\n\nexport const PauseTextNode = ({ children }: { children: ReactNode }) => {\n return (\n <>\n {children}\n <StyledHiddenText>, </StyledHiddenText>\n </>\n );\n};\n\nconst AssignmentItem = ({\n name,\n processName,\n assigneeName,\n urgency,\n depth,\n id,\n assigneeId,\n onOpen,\n onAssigneeClick\n}: AssignmentItemProps) => {\n const {\n firstNodeId,\n focusedNodeId,\n lastNodeId,\n changeFocusHandler,\n caseIdExpandList,\n isMediumOrAbove,\n parentRef\n } = useContext(AssignmentTreeContext);\n const assignmentRef = useRef<HTMLLIElement>(null);\n\n const {\n parentNodeTabIndex,\n childElementsTabIndex,\n isNodeInternalFocus,\n lastNode,\n setIsNodeInternalFocus,\n escapeNodeHandler\n } = useNodeFocus(id, assignmentRef, parentRef, {\n firstNodeId,\n focusedNodeId,\n lastNodeId\n });\n\n const { start } = useDirection();\n\n const t = useI18n();\n const [assigneeEl, setAssigneeElement] = useElement<HTMLElement>();\n const testIds = useTestIds('', getAssignmentTestIds);\n\n const navigationHandler = useCallback(\n (e: KeyboardEvent<HTMLElement>) => {\n if (['ArrowUp', 'ArrowDown'].includes(e.key)) e.preventDefault();\n switch (e.key) {\n case 'ArrowUp':\n changeFocusHandler(id, 'up', caseIdExpandList);\n break;\n case 'ArrowDown':\n changeFocusHandler(id, 'down', caseIdExpandList);\n break;\n case `Arrow${cap(start)}`:\n if (depth > 0) {\n changeFocusHandler(id, 'left', caseIdExpandList);\n }\n break;\n case 'Home':\n if (firstNodeId) changeFocusHandler(firstNodeId);\n break;\n case 'End':\n if (lastNodeId) changeFocusHandler(lastNodeId);\n break;\n default:\n }\n },\n [id, firstNodeId, lastNodeId, depth, caseIdExpandList]\n );\n\n return (\n <StyledNode\n data-testid={testIds.root}\n role='treeitem'\n aria-selected={isNodeInternalFocus ? false : parentNodeTabIndex === 0}\n aria-labelledby={id}\n ref={assignmentRef}\n onKeyDown={(e: KeyboardEvent<HTMLElement>) => {\n e.stopPropagation();\n if (e.key === 'Enter' && !isNodeInternalFocus) {\n setIsNodeInternalFocus?.(true);\n return;\n }\n\n if (e.key === 'Escape' && isNodeInternalFocus) {\n changeFocusHandler(id);\n setIsNodeInternalFocus?.(false);\n escapeNodeHandler();\n return;\n }\n\n if (!isNodeInternalFocus) {\n navigationHandler(e);\n }\n }}\n onClick={(e: MouseEvent<HTMLLIElement>) => {\n e.stopPropagation();\n changeFocusHandler(id);\n }}\n tabIndex={isNodeInternalFocus ? -1 : parentNodeTabIndex}\n isNodeInternalFocus={isNodeInternalFocus}\n isFocus={isNodeInternalFocus ? false : parentNodeTabIndex === 0}\n lastNode={lastNode}\n depth={depth}\n >\n <Grid\n container={{\n alignItems: 'center',\n cols: isMediumOrAbove ? '3fr 2fr auto auto' : '2fr 0.5fr',\n colGap: isMediumOrAbove ? 3 : 0,\n rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(3, auto)'\n }}\n as={StyledAssignmentItem}\n >\n <VisuallyHiddenText>{`${t('assignment_announcement_label')}`}</VisuallyHiddenText>\n <Flex\n data-testid={testIds.label}\n container={{ alignItems: 'center' }}\n as={StyledProcessContainer}\n depth={depth}\n >\n <PauseTextNode>\n <AssignmentDetails processName={processName} name={name} />\n </PauseTextNode>\n </Flex>\n <Flex\n data-testid={testIds.assignee}\n container={{ justify: isMediumOrAbove ? 'end' : 'start' }}\n as={StyledAssigneeContainer}\n depth={depth}\n variant='secondary'\n isMediumOrAbove={isMediumOrAbove}\n >\n <Text as={StyledLabelContainer} variant='secondary'>\n {t('assignment_item_assignee')}\n </Text>\n <StyledAssigneeText\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onAssigneeClick(assigneeId, e);\n }}\n variant='link'\n ref={setAssigneeElement}\n tabIndex={childElementsTabIndex}\n >\n <PauseTextNode>{assigneeName}</PauseTextNode>\n </StyledAssigneeText>\n <Tooltip target={assigneeEl} smart>\n {assigneeName}\n </Tooltip>\n </Flex>\n <Flex\n data-testid={testIds.urgency}\n container={{ justify: isMediumOrAbove ? 'end' : 'start' }}\n as={StyledUrgencyTextContainer}\n depth={depth}\n isMediumOrAbove={isMediumOrAbove}\n >\n <Text as={StyledLabelContainer} variant='secondary'>\n {t('assignment_item_urgency')}\n </Text>\n <Text variant='secondary'>\n <PauseTextNode>{urgency}</PauseTextNode>\n </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 tabIndex={childElementsTabIndex}\n >\n {t('go')}\n </Button>\n )}\n </Flex>\n </Grid>\n </StyledNode>\n );\n};\n\nexport default withTestIds(AssignmentItem, getAssignmentTestIds);\n"]}
1
+ {"version":3,"file":"AssignmentItem.js","sourceRoot":"","sources":["../../../../src/components/HierarchicalAssignments/nodeItems/AssignmentItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EACX,UAAU,EACV,GAAG,EACH,YAAY,EACZ,IAAI,EACJ,k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O,YAC7E,CAAC,CAAC,yBAAyB,CAAC,GACxB,EACP,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YACvB,KAAC,aAAa,cAAE,OAAO,GAAiB,GACnC,IACN;yBACJ,GACD,GACG,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,EAC5D,QAAQ,EAAE,qBAAqB,YAE9B,CAAC,CAAC,IAAI,CAAC,GACD,CACV,GACI,IACF,GACI,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useRef, useContext, useCallback } from 'react';\nimport type { MouseEvent, KeyboardEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Grid,\n Flex,\n Button,\n useI18n,\n withTestIds,\n useTestIds,\n cap,\n useDirection,\n Text,\n VisuallyHiddenText,\n useElement,\n Tooltip\n} from '@pega/cosmos-react-core';\n\nimport {\n StyledAssignmentItem,\n StyledProcessContainer,\n StyledActionContainer,\n StyledAssigneeContainer,\n StyledLabelContainer,\n StyledNode,\n StyledAssigneeText,\n StyledAssignmentItemMetaList\n} from '../Assignments.styles';\nimport type { AssignmentProps } from '../HierarchicalAssignments.types';\nimport { getAssignmentTestIds } from '../HierarchicalAssignments.test-ids';\nimport AssignmentTreeContext from '../AssignmentContext';\nimport AssignmentDetails from '../AssignmentDetail';\n\nimport useNodeFocus from './useNodeFocus';\n\ninterface AssignmentItemProps extends AssignmentProps {\n /** Property defines the node's level */\n depth: number;\n}\n\nconst StyledHiddenText = styled(VisuallyHiddenText)`\n width: 0;\n`;\n\nexport const PauseTextNode = ({ children }: { children: ReactNode }) => {\n return (\n <>\n {children}\n <StyledHiddenText>, </StyledHiddenText>\n </>\n );\n};\n\nconst AssignmentItem = ({\n name,\n processName,\n assigneeName,\n urgency,\n sla,\n depth,\n id,\n assigneeId,\n onOpen,\n onAssigneeClick\n}: AssignmentItemProps) => {\n const {\n firstNodeId,\n focusedNodeId,\n lastNodeId,\n changeFocusHandler,\n caseIdExpandList,\n isMediumOrAbove,\n parentRef\n } = useContext(AssignmentTreeContext);\n const assignmentRef = useRef<HTMLLIElement>(null);\n\n const {\n parentNodeTabIndex,\n childElementsTabIndex,\n isNodeInternalFocus,\n lastNode,\n setIsNodeInternalFocus,\n escapeNodeHandler\n } = useNodeFocus(id, assignmentRef, parentRef, {\n firstNodeId,\n focusedNodeId,\n lastNodeId\n });\n\n const { start } = useDirection();\n\n const t = useI18n();\n const [assigneeEl, setAssigneeElement] = useElement<HTMLElement>();\n const testIds = useTestIds('', getAssignmentTestIds);\n\n const navigationHandler = useCallback(\n (e: KeyboardEvent<HTMLElement>) => {\n if (['ArrowUp', 'ArrowDown'].includes(e.key)) e.preventDefault();\n switch (e.key) {\n case 'ArrowUp':\n changeFocusHandler(id, 'up', caseIdExpandList);\n break;\n case 'ArrowDown':\n changeFocusHandler(id, 'down', caseIdExpandList);\n break;\n case `Arrow${cap(start)}`:\n if (depth > 0) {\n changeFocusHandler(id, 'left', caseIdExpandList);\n }\n break;\n case 'Home':\n if (firstNodeId) changeFocusHandler(firstNodeId);\n break;\n case 'End':\n if (lastNodeId) changeFocusHandler(lastNodeId);\n break;\n default:\n }\n },\n [id, firstNodeId, lastNodeId, depth, caseIdExpandList]\n );\n\n return (\n <StyledNode\n data-testid={testIds.root}\n role='treeitem'\n aria-selected={isNodeInternalFocus ? false : parentNodeTabIndex === 0}\n aria-labelledby={id}\n ref={assignmentRef}\n onKeyDown={(e: KeyboardEvent<HTMLElement>) => {\n e.stopPropagation();\n if (e.key === 'Enter' && !isNodeInternalFocus) {\n setIsNodeInternalFocus?.(true);\n return;\n }\n\n if (e.key === 'Escape' && isNodeInternalFocus) {\n changeFocusHandler(id);\n setIsNodeInternalFocus?.(false);\n escapeNodeHandler();\n return;\n }\n\n if (!isNodeInternalFocus) {\n navigationHandler(e);\n }\n }}\n onClick={(e: MouseEvent<HTMLLIElement>) => {\n e.stopPropagation();\n changeFocusHandler(id);\n }}\n tabIndex={isNodeInternalFocus ? -1 : parentNodeTabIndex}\n isNodeInternalFocus={isNodeInternalFocus}\n isFocus={isNodeInternalFocus ? false : parentNodeTabIndex === 0}\n lastNode={lastNode}\n depth={depth}\n >\n <Grid\n container={{\n alignItems: 'center',\n cols: isMediumOrAbove ? '2fr 2fr auto' : '2fr 0.5fr',\n colGap: isMediumOrAbove ? 3 : 0,\n rows: isMediumOrAbove ? 'repeat(1, auto)' : 'repeat(2, auto)'\n }}\n as={StyledAssignmentItem}\n >\n <VisuallyHiddenText>{`${t('assignment_announcement_label')}`}</VisuallyHiddenText>\n <Flex\n data-testid={testIds.label}\n container={{ alignItems: 'center' }}\n as={StyledProcessContainer}\n depth={depth}\n >\n <PauseTextNode>\n <AssignmentDetails processName={processName} name={name} />\n </PauseTextNode>\n </Flex>\n <Flex\n data-testid={testIds.assignee}\n container={{ justify: isMediumOrAbove ? 'end' : 'start' }}\n as={StyledAssigneeContainer}\n depth={depth}\n variant='secondary'\n >\n <StyledAssignmentItemMetaList\n wrapItems\n items={[\n <>\n <StyledAssigneeText\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onAssigneeClick(assigneeId, e);\n }}\n variant='link'\n ref={setAssigneeElement}\n data-testid={testIds.assignee}\n tabIndex={childElementsTabIndex}\n >\n <PauseTextNode>{assigneeName}</PauseTextNode>\n </StyledAssigneeText>\n <Tooltip target={assigneeEl} smart>\n {assigneeName}\n </Tooltip>\n </>,\n sla && (\n <Text variant='secondary' data-testid={testIds.sla}>\n <PauseTextNode>{sla}</PauseTextNode>\n </Text>\n ),\n <>\n <Text variant='secondary' as={StyledLabelContainer} data-testid={testIds.urgency}>\n {t('assignment_item_urgency')}\n </Text>\n <Text variant='secondary'>\n <PauseTextNode>{urgency}</PauseTextNode>\n </Text>\n </>\n ]}\n />\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 tabIndex={childElementsTabIndex}\n >\n {t('go')}\n </Button>\n )}\n </Flex>\n </Grid>\n </StyledNode>\n );\n};\n\nexport default withTestIds(AssignmentItem, getAssignmentTestIds);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "8.0.0-build.28.2",
3
+ "version": "8.0.0-build.28.3",
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": "8.0.0-build.28.2",
23
- "@pega/cosmos-react-rte": "8.0.0-build.28.2",
22
+ "@pega/cosmos-react-core": "8.0.0-build.28.3",
23
+ "@pega/cosmos-react-rte": "8.0.0-build.28.3",
24
24
  "@types/react": "^17.0.62 || ^18.3.3",
25
25
  "@types/react-dom": "^17.0.20 || ^18.3.0",
26
26
  "@types/styled-components": "^5.1.26",