@pega/cosmos-react-work 9.0.0-build.29.3 → 9.0.0-build.29.5
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/CasePreview/CasePreview.js +1 -1
- package/lib/components/CasePreview/CasePreview.js.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.js +20 -3
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +1 -1
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.styles.js +1 -1
- package/lib/components/CaseView/CaseView.styles.js.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +9 -3
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.js.map +1 -1
- package/package.json +3 -3
|
@@ -94,7 +94,7 @@ const CasePreview = forwardRef(function CasePreview(props, ref) {
|
|
|
94
94
|
const metadata = {
|
|
95
95
|
previewProps: {
|
|
96
96
|
testId: testIds.root,
|
|
97
|
-
previewLabel: heading,
|
|
97
|
+
previewLabel: typeof heading === 'string' ? heading : heading?.text,
|
|
98
98
|
onBeforeOpen,
|
|
99
99
|
onAfterOpen,
|
|
100
100
|
onBeforeClose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CasePreview.js","sourceRoot":"","sources":["../../../src/components/CasePreview/CasePreview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,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,iBAAiB,CAAC,OAAO,GAAG,SAAS,CAAC;wBACxC,CAAC;oBACH,CAAC;oBACD,EAAE,EAAE,uBAAuB;oBAC3B,GAAG,EAAE,UAAU;oBACf,QAAQ;oBACR,GAAG,SAAS;iBACb;aACF,CAAC;YACF,IAAI,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBAC9B,iBAAiB,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YAClE,CAAC;iBAAM,CAAC;gBACN,iBAAiB,CAAC,OAAO,GAAG,aAAa,CAAC,kBAAkB,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;YACxF,CAAC;QACH,CAAC;aAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACjB,+DAA+D;YAC/D,iBAAiB,CAAC,OAAO,GAAG,SAAS,CAAC;QACxC,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,cAAc,CAAC,CAAC,CAAC;IAE7F,OAAO,IAAI,CAAC;AACd,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { forwardRef, useEffect, useState, useRef } from 'react';\nimport type { PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n registerIcon,\n defaultThemeProp,\n useBreakpoint,\n useI18n,\n useTestIds,\n withTestIds,\n ErrorState,\n useConsolidatedRef,\n StyledPreviewDrawer,\n usePreviewManager\n} from '@pega/cosmos-react-core';\nimport type {\n ForwardRefForwardPropsComponent,\n BaseProps,\n TestIdProp,\n NoChildrenProp,\n ErrorStateProps,\n PreviewMethods\n} from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nimport CaseView, { StyledCaseView, StyledCaseViewContent, StyledSummaryRegion } from '../CaseView';\nimport type { CaseViewProps } from '../CaseView';\nimport type { CaseViewContextValue } from '../CaseView/CaseView.types';\nimport { StyledGenAICoachContainer } from '../GenAICoach/GenAICoach.styles';\nimport { StyledSummaryPrimaryList, StyledSummarySecondaryList } from '../CaseView/CaseView.styles';\n\nimport { getCasePreviewTestIds } from './CasePreview.test-ids';\n\nregisterIcon(timesIcon);\n\nexport interface CasePreviewProps\n extends Pick<\n CaseViewProps,\n | 'caseId'\n | 'caseType'\n | 'heading'\n | 'subheading'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'actions'\n | 'promotedActions'\n | 'onEdit'\n | 'summaryFields'\n | 'tabs'\n | 'tabContent'\n | 'stages'\n | 'tasks'\n | 'banners'\n | 'utilities'\n | 'utilitiesSummaryItems'\n >,\n NoChildrenProp,\n TestIdProp,\n BaseProps {\n /** A set of props including an href that will be forwarded to the case preview's heading and subheading. */\n caseLink?: CaseViewContextValue['caseLink'];\n /** If true, the Case Preview will be visible. */\n open: boolean;\n /** If true, the Case Preview will render in a progress state. */\n progress?: boolean;\n /** If true, the Case Preview will render in an error state. */\n error?: boolean;\n /** Callback fired when \"Try again\" button is clicked in an error state. */\n onErrorRetry?: ErrorStateProps['onRetry'];\n /** Callback fired before Case Preview opens. */\n onBeforeOpen?: () => void;\n /** Callback fired after Case Preview opens. */\n onAfterOpen?: () => void;\n /** Callback fired before Case Preview closes. */\n onBeforeClose?: () => void;\n /** Callback fired after Case Preview closes. */\n onAfterClose?: () => void;\n /** Callback fired when a click action occurs outside of the Case Preview. */\n onOuterClick?: () => void;\n /** Reference to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledCasePreviewDrawer = styled(StyledPreviewDrawer)(({ theme }) => {\n return css`\n ${StyledSummaryPrimaryList} {\n padding: unset;\n }\n\n ${StyledSummarySecondaryList} {\n padding-block-start: unset;\n padding-inline: unset;\n }\n\n ${StyledCaseView} {\n height: calc(100vh - ${theme.base.spacing} - ${theme.base['hit-area']['mouse-min']});\n z-index: 1;\n\n @media (pointer: coarse) {\n height: calc(100vh - ${theme.base.spacing} - ${theme.base['hit-area']['finger-min']});\n }\n\n ${StyledSummaryRegion} {\n position: relative;\n top: 0;\n }\n }\n\n ${StyledCaseViewContent} {\n overflow-y: auto;\n\n & > :last-child {\n padding-bottom: calc(2 * ${theme.base.spacing});\n }\n }\n\n ${StyledGenAICoachContainer} {\n width: unset;\n min-width: unset;\n }\n `;\n});\n\nStyledCasePreviewDrawer.defaultProps = defaultThemeProp;\n\ntype CasePreviewContentProps = Pick<\n CasePreviewProps,\n | 'error'\n | 'onErrorRetry'\n | 'caseId'\n | 'caseType'\n | 'heading'\n | 'subheading'\n | 'caseLink'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'summaryFields'\n | 'tabs'\n | 'tabContent'\n | 'stages'\n | 'tasks'\n | 'banners'\n | 'utilities'\n | 'utilitiesSummaryItems'\n | 'actions'\n | 'onEdit'\n>;\n\nconst CasePreviewContent = ({\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit\n}: CasePreviewContentProps) => {\n const t = useI18n();\n\n if (error) {\n return <ErrorState message={t('preview_error')} onRetry={onErrorRetry} />;\n }\n\n return (\n <CaseView\n caseId={caseId}\n caseType={caseType}\n parentCases={parentCases}\n heading={heading}\n subheading={subheading}\n caseLink={caseLink}\n icon={icon}\n followed={followed}\n onFollowedChange={onFollowedChange}\n summaryFields={summaryFields}\n tabs={tabs}\n stages={stages}\n tasks={tasks}\n tabContent={tabContent}\n utilities={utilities}\n utilitiesSummaryItems={utilitiesSummaryItems}\n actions={actions}\n banners={banners}\n onEdit={onEdit}\n isPreview\n />\n );\n};\n\nconst CasePreview: ForwardRefForwardPropsComponent<CasePreviewProps> = forwardRef(\n function CasePreview(props: PropsWithoutRef<CasePreviewProps>, ref: CasePreviewProps['ref']) {\n const {\n testId,\n open: openProp,\n progress,\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose,\n ...restProps\n } = props;\n const testIds = useTestIds(testId, getCasePreviewTestIds);\n\n const { createPreview } = usePreviewManager();\n const previewMethodsRef = useRef<PreviewMethods | undefined>(undefined);\n const previewRef = useConsolidatedRef(ref);\n const isSmallOrAbove = useBreakpoint('sm');\n\n const [open, setOpen] = useState(openProp);\n\n useEffect(() => {\n setOpen(openProp);\n }, [openProp]);\n\n useEffect(() => {\n if (open && isSmallOrAbove) {\n const contentProps = {\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit\n };\n\n const metadata = {\n previewProps: {\n testId: testIds.root,\n previewLabel: heading,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose: () => {\n onAfterClose?.();\n setOpen(false);\n if (previewMethodsRef.current) {\n previewMethodsRef.current.unmountPreview();\n previewMethodsRef.current = undefined;\n }\n },\n as: StyledCasePreviewDrawer,\n ref: previewRef,\n progress,\n ...restProps\n }\n };\n if (previewMethodsRef.current) {\n previewMethodsRef.current.updatePreview(contentProps, metadata);\n } else {\n previewMethodsRef.current = createPreview(CasePreviewContent, contentProps, metadata);\n }\n } else if (!open) {\n // This branch is needed for controlled component via open prop\n previewMethodsRef.current = undefined;\n }\n }, [open, progress, error, tabs, banners, utilities, utilitiesSummaryItems, isSmallOrAbove]);\n\n return null;\n }\n);\n\nexport default withTestIds(CasePreview, getCasePreviewTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"CasePreview.js","sourceRoot":"","sources":["../../../src/components/CasePreview/CasePreview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAE1F,OAAO,QAAQ,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,YAAY,CAAC,SAAS,CAAC,CAAC;AAoDxB,MAAM,uBAAuB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACxE,OAAO,GAAG,CAAA;MACN,wBAAwB;;;;MAIxB,0BAA0B;;;;;MAK1B,cAAc;6BACS,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;;;;+BAIzD,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC;;;QAGnF,mBAAmB;;;;;;MAMrB,qBAAqB;;;;mCAIQ,KAAK,CAAC,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":["import { forwardRef, useEffect, useState, useRef } from 'react';\nimport type { PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n registerIcon,\n defaultThemeProp,\n useBreakpoint,\n useI18n,\n useTestIds,\n withTestIds,\n ErrorState,\n useConsolidatedRef,\n StyledPreviewDrawer,\n usePreviewManager\n} from '@pega/cosmos-react-core';\nimport type {\n ForwardRefForwardPropsComponent,\n BaseProps,\n TestIdProp,\n NoChildrenProp,\n ErrorStateProps,\n PreviewMethods\n} from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nimport CaseView, { StyledCaseView, StyledCaseViewContent, StyledSummaryRegion } from '../CaseView';\nimport type { CaseViewProps } from '../CaseView';\nimport type { CaseViewContextValue } from '../CaseView/CaseView.types';\nimport { StyledGenAICoachContainer } from '../GenAICoach/GenAICoach.styles';\nimport { StyledSummaryPrimaryList, StyledSummarySecondaryList } from '../CaseView/CaseView.styles';\n\nimport { getCasePreviewTestIds } from './CasePreview.test-ids';\n\nregisterIcon(timesIcon);\n\nexport interface CasePreviewProps\n extends Pick<\n CaseViewProps,\n | 'caseId'\n | 'caseType'\n | 'heading'\n | 'subheading'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'actions'\n | 'promotedActions'\n | 'onEdit'\n | 'summaryFields'\n | 'tabs'\n | 'tabContent'\n | 'stages'\n | 'tasks'\n | 'banners'\n | 'utilities'\n | 'utilitiesSummaryItems'\n >,\n NoChildrenProp,\n TestIdProp,\n BaseProps {\n /** A set of props including an href that will be forwarded to the case preview's heading and subheading. */\n caseLink?: CaseViewContextValue['caseLink'];\n /** If true, the Case Preview will be visible. */\n open: boolean;\n /** If true, the Case Preview will render in a progress state. */\n progress?: boolean;\n /** If true, the Case Preview will render in an error state. */\n error?: boolean;\n /** Callback fired when \"Try again\" button is clicked in an error state. */\n onErrorRetry?: ErrorStateProps['onRetry'];\n /** Callback fired before Case Preview opens. */\n onBeforeOpen?: () => void;\n /** Callback fired after Case Preview opens. */\n onAfterOpen?: () => void;\n /** Callback fired before Case Preview closes. */\n onBeforeClose?: () => void;\n /** Callback fired after Case Preview closes. */\n onAfterClose?: () => void;\n /** Callback fired when a click action occurs outside of the Case Preview. */\n onOuterClick?: () => void;\n /** Reference to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledCasePreviewDrawer = styled(StyledPreviewDrawer)(({ theme }) => {\n return css`\n ${StyledSummaryPrimaryList} {\n padding: unset;\n }\n\n ${StyledSummarySecondaryList} {\n padding-block-start: unset;\n padding-inline: unset;\n }\n\n ${StyledCaseView} {\n height: calc(100vh - ${theme.base.spacing} - ${theme.base['hit-area']['mouse-min']});\n z-index: 1;\n\n @media (pointer: coarse) {\n height: calc(100vh - ${theme.base.spacing} - ${theme.base['hit-area']['finger-min']});\n }\n\n ${StyledSummaryRegion} {\n position: relative;\n top: 0;\n }\n }\n\n ${StyledCaseViewContent} {\n overflow-y: auto;\n\n & > :last-child {\n padding-bottom: calc(2 * ${theme.base.spacing});\n }\n }\n\n ${StyledGenAICoachContainer} {\n width: unset;\n min-width: unset;\n }\n `;\n});\n\nStyledCasePreviewDrawer.defaultProps = defaultThemeProp;\n\ntype CasePreviewContentProps = Pick<\n CasePreviewProps,\n | 'error'\n | 'onErrorRetry'\n | 'caseId'\n | 'caseType'\n | 'heading'\n | 'subheading'\n | 'caseLink'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'summaryFields'\n | 'tabs'\n | 'tabContent'\n | 'stages'\n | 'tasks'\n | 'banners'\n | 'utilities'\n | 'utilitiesSummaryItems'\n | 'actions'\n | 'onEdit'\n>;\n\nconst CasePreviewContent = ({\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit\n}: CasePreviewContentProps) => {\n const t = useI18n();\n\n if (error) {\n return <ErrorState message={t('preview_error')} onRetry={onErrorRetry} />;\n }\n\n return (\n <CaseView\n caseId={caseId}\n caseType={caseType}\n parentCases={parentCases}\n heading={heading}\n subheading={subheading}\n caseLink={caseLink}\n icon={icon}\n followed={followed}\n onFollowedChange={onFollowedChange}\n summaryFields={summaryFields}\n tabs={tabs}\n stages={stages}\n tasks={tasks}\n tabContent={tabContent}\n utilities={utilities}\n utilitiesSummaryItems={utilitiesSummaryItems}\n actions={actions}\n banners={banners}\n onEdit={onEdit}\n isPreview\n />\n );\n};\n\nconst CasePreview: ForwardRefForwardPropsComponent<CasePreviewProps> = forwardRef(\n function CasePreview(props: PropsWithoutRef<CasePreviewProps>, ref: CasePreviewProps['ref']) {\n const {\n testId,\n open: openProp,\n progress,\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose,\n ...restProps\n } = props;\n const testIds = useTestIds(testId, getCasePreviewTestIds);\n\n const { createPreview } = usePreviewManager();\n const previewMethodsRef = useRef<PreviewMethods | undefined>(undefined);\n const previewRef = useConsolidatedRef(ref);\n const isSmallOrAbove = useBreakpoint('sm');\n\n const [open, setOpen] = useState(openProp);\n\n useEffect(() => {\n setOpen(openProp);\n }, [openProp]);\n\n useEffect(() => {\n if (open && isSmallOrAbove) {\n const contentProps = {\n error,\n onErrorRetry,\n caseId,\n caseType,\n heading,\n subheading,\n caseLink,\n parentCases,\n icon,\n followed,\n onFollowedChange,\n summaryFields,\n tabs,\n stages,\n tasks,\n tabContent,\n utilities,\n utilitiesSummaryItems,\n actions,\n banners,\n onEdit\n };\n\n const metadata = {\n previewProps: {\n testId: testIds.root,\n previewLabel: typeof heading === 'string' ? heading : heading?.text,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose: () => {\n onAfterClose?.();\n setOpen(false);\n if (previewMethodsRef.current) {\n previewMethodsRef.current.unmountPreview();\n previewMethodsRef.current = undefined;\n }\n },\n as: StyledCasePreviewDrawer,\n ref: previewRef,\n progress,\n ...restProps\n }\n };\n if (previewMethodsRef.current) {\n previewMethodsRef.current.updatePreview(contentProps, metadata);\n } else {\n previewMethodsRef.current = createPreview(CasePreviewContent, contentProps, metadata);\n }\n } else if (!open) {\n // This branch is needed for controlled component via open prop\n previewMethodsRef.current = undefined;\n }\n }, [open, progress, error, tabs, banners, utilities, utilitiesSummaryItems, isSmallOrAbove]);\n\n return null;\n }\n);\n\nexport default withTestIds(CasePreview, getCasePreviewTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseView/CaseHeader/CaseHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseView/CaseHeader/CaseHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AA6C5C,QAAA,MAAM,UAAU,EAAE,EAgZjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { parseToHsl } from 'polished';
|
|
4
|
-
import { Breadcrumbs, Flex, getEdge, Icon, registerIcon, Text, Link, Button, throttle, useDirection, useI18n, useAfterInitialEffect, useTheme, tryCatch, Actions, StyledIconShape, useToaster, readableColor } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Breadcrumbs, Flex, getEdge, Icon, registerIcon, Text, Link, Button, throttle, useDirection, useI18n, useAfterInitialEffect, useTheme, tryCatch, Actions, StyledIconShape, useToaster, readableColor, InlineEdit } from '@pega/cosmos-react-core';
|
|
5
5
|
import * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pencil.icon';
|
|
6
6
|
import * as moreIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/more.icon';
|
|
7
7
|
import { StyledCaseHeader, StyledCaseHeaderText, StyledExpandCollapseSummaryButton, StyledSubheading, StyledHeaderActions, StyledCaseHeaderPromotedAction, StyledCaseViewImage, StyledCaseViewIcon, resolveCaseTypeColor } from '../CaseView.styles';
|
|
@@ -142,6 +142,8 @@ const CaseHeader = () => {
|
|
|
142
142
|
useEffect(() => {
|
|
143
143
|
setHasBrokenImage(undefined);
|
|
144
144
|
}, [typeof icon === 'string' ? icon : icon?.href]);
|
|
145
|
+
const headingText = typeof heading !== 'string' ? heading.text : heading;
|
|
146
|
+
const subheadingText = subheading && typeof subheading !== 'string' ? subheading.text : subheading;
|
|
145
147
|
return (_jsxs(Flex, { "data-testid": testIds.header, as: StyledCaseHeader, container: { direction: 'column', gap: 1 }, children: [_jsxs(Flex, { container: true, ref: contentsEl, children: [showExpandCollapse && onToggleSummary && !persistentUtility && (_jsx(StyledExpandCollapseSummaryButton, { ref: toggleButtonRef, onClick: onToggleSummary, label: t(summaryExpanded ? 'collapse' : 'expand'), "aria-label": t(summaryExpanded ? 'collapse_summary' : 'expand_summary'), icon: true, compact: true, children: _jsx(Icon, { name: summaryExpanded ? `arrow-micro-${start}` : 'arrow-micro-down' }) })), showIcon && (_jsx(Flex, { container: { pad: [1, 0, 0] }, item: { shrink: 0 }, children: (() => {
|
|
146
148
|
if (typeof icon === 'string') {
|
|
147
149
|
return (_jsx(StyledCaseViewIcon, { "data-testid": testIds.icon, "aria-label": t('case_type_icon', [caseType ?? t('case_type')]), name: icon, foreground: iconForeground, background: iconBackground }));
|
|
@@ -158,7 +160,22 @@ const CaseHeader = () => {
|
|
|
158
160
|
justify: 'center'
|
|
159
161
|
}, item: aboveSM
|
|
160
162
|
? { shrink: wrapPromotedActions || !hasPromotedActions ? 1 : 0 }
|
|
161
|
-
: { shrink: 1, grow: 1 }, ref: headerGroupEl, children: [
|
|
163
|
+
: { shrink: 1, grow: 1 }, ref: headerGroupEl, children: [(() => {
|
|
164
|
+
const headingContent = caseLink ? (_jsx(Link, { ...caseLink, children: headingText })) : (headingText);
|
|
165
|
+
const textEl = (_jsx(Text, { "data-testid": testIds.heading, variant: 'h1', children: headingContent }));
|
|
166
|
+
if (typeof heading !== 'string') {
|
|
167
|
+
return (_jsx(InlineEdit, { contextualLabel: headingText, ...heading.inlineEdit, children: textEl }));
|
|
168
|
+
}
|
|
169
|
+
return textEl;
|
|
170
|
+
})(), subheading &&
|
|
171
|
+
(!parentCases || subheadingText !== caseId) &&
|
|
172
|
+
(() => {
|
|
173
|
+
const subheadEl = (_jsx(StyledSubheading, { "data-testid": testIds.subheading, children: subheadingText }));
|
|
174
|
+
if (typeof subheading !== 'string') {
|
|
175
|
+
return (_jsx(InlineEdit, { contextualLabel: subheading.text, ...subheading.inlineEdit, children: subheadEl }));
|
|
176
|
+
}
|
|
177
|
+
return subheadEl;
|
|
178
|
+
})(), parentCases && (_jsx(Breadcrumbs, { forwardedAs: 'p', path: [
|
|
162
179
|
...parentCases,
|
|
163
180
|
{
|
|
164
181
|
...caseLink,
|
|
@@ -169,7 +186,7 @@ const CaseHeader = () => {
|
|
|
169
186
|
], leafOnly: true }))] }), collapsedMainHeader && !wrapPromotedActions && (_jsx(Summary, { siblingRef: actionsContainerEl }, summaryResetID)), _jsxs(Flex, { as: StyledHeaderActions, item: { shrink: 0 }, container: { alignItems: 'start', pad: [0, 0, 0, 2] }, offsetEnd: !summaryExpanded, ref: actionsContainerEl, children: [collapsedMainHeader &&
|
|
170
187
|
!wrapPromotedActions &&
|
|
171
188
|
promotedActions &&
|
|
172
|
-
promotedActions.length > 0 ? (_jsx(_Fragment, { children: promotedActions.map(promotedAction => (_jsx(StyledCaseHeaderPromotedAction, { variant: 'secondary', onClick: (e) => promotedAction.onClick?.(promotedAction.id, e), children: promotedAction.text }, promotedAction.id))) })) : null, onEdit && (_jsx(Button, { "data-testid": testIds.edit, icon: true, variant: 'simple', onClick: onEdit, label: t('edit'), "aria-label": `${t('edit')} - ${
|
|
189
|
+
promotedActions.length > 0 ? (_jsx(_Fragment, { children: promotedActions.map(promotedAction => (_jsx(StyledCaseHeaderPromotedAction, { variant: 'secondary', onClick: (e) => promotedAction.onClick?.(promotedAction.id, e), children: promotedAction.text }, promotedAction.id))) })) : null, onEdit && (_jsx(Button, { "data-testid": testIds.edit, icon: true, variant: 'simple', onClick: onEdit, label: t('edit'), "aria-label": `${t('edit')} - ${headingText}`, children: _jsx(Icon, { name: 'pencil' }) })), (actionsLoading || caseActions.length > 0) && (_jsx(Actions, { contextualLabel: typeof heading === 'string' ? heading : heading.text, "data-testid": testIds.actions, iconOnly: true, progress: actionsLoading, items: caseActions, menuAt: actionsLoading ? 0 : 1, filterAt: 5, scrollAt: Infinity }))] })] }), (!collapsedMainHeader || wrapPromotedActions || !aboveSM) &&
|
|
173
190
|
promotedActions &&
|
|
174
191
|
promotedActions.length > 0 ? (_jsx(Flex, { "data-testid": testIds.promotedActions, container: { justify: 'start', wrap: 'wrap', gap: 1, pad: [0, 0, 0.5] }, children: promotedActions.map(({ id, text, onClick }) => (_jsx("div", { children: _jsx(StyledCaseHeaderPromotedAction, { variant: 'secondary', onClick: (e) => onClick?.(id, e), children: text }) }, text))) })) : null, collaboration] }));
|
|
175
192
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHeader.js","sourceRoot":"","sources":["../../../../src/components/CaseView/CaseHeader/CaseHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO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E,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,YAEtE,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC9C,wBACE,KAAC,8BAA8B,IAC7B,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,YAE9D,IAAI,GAC0B,IANzB,IAAI,CAOR,CACP,CAAC,GACG,CACR,CAAC,CAAC,CAAC,IAAI,EAEP,aAAa,IACT,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport type { FC, MouseEvent } from 'react';\nimport { parseToHsl } from 'polished';\n\nimport {\n Breadcrumbs,\n Flex,\n getEdge,\n Icon,\n registerIcon,\n Text,\n Link,\n Button,\n throttle,\n useDirection,\n useI18n,\n useAfterInitialEffect,\n useTheme,\n tryCatch,\n Actions,\n StyledIconShape,\n useToaster,\n readableColor\n} from '@pega/cosmos-react-core';\nimport type { Action } from '@pega/cosmos-react-core';\nimport * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pencil.icon';\nimport * as moreIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/more.icon';\n\nimport {\n StyledCaseHeader,\n StyledCaseHeaderText,\n StyledExpandCollapseSummaryButton,\n StyledSubheading,\n StyledHeaderActions,\n StyledCaseHeaderPromotedAction,\n StyledCaseViewImage,\n StyledCaseViewIcon,\n resolveCaseTypeColor\n} from '../CaseView.styles';\nimport { useCaseViewContext } from '../CaseView.context';\n\nimport Summary from './Summary';\n\nregisterIcon(pencilIcon, moreIcon);\n\nconst CaseHeader: FC = () => {\n const t = useI18n();\n const { ltr, start } = useDirection();\n const theme = useTheme();\n\n const {\n testIds,\n caseId,\n icon,\n color,\n heading,\n subheading,\n caseType,\n actions,\n caseLink,\n parentCases,\n onEdit,\n followed,\n onFollowedChange,\n promotedActions,\n summaryExpanded,\n onToggleSummary,\n isPreview,\n aboveSM,\n aboveMD,\n persistentUtility,\n collaboration\n } = useCaseViewContext();\n const { push } = useToaster();\n\n const [wrapPromotedActions, setWrapPromotedActions] = useState(false);\n const [summaryResetID, setSummaryResetID] = useState<number | undefined>(Math.random());\n\n const wrapActionsBreakpoint = useRef<number | null>(null);\n\n const hasPromotedActions = (promotedActions?.length ?? 0) > 0;\n\n let iconForeground =\n theme.components['case-view'].icon.color !== 'auto'\n ? theme.components['case-view'].icon.color\n : theme.components['case-view'].header['foreground-color'];\n\n const iconBackground = useMemo(() => {\n if (theme.components['case-view'].icon.background !== 'auto') {\n return theme.components['case-view'].icon.background;\n }\n return tryCatch(\n () => {\n const { lightness } = parseToHsl(theme.components['case-view'].header['background-color']);\n return lightness > 0.35 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)';\n },\n () => 'transparent'\n );\n }, [theme]);\n\n // Fall back to readable color if theme icon color and header foreground color are both 'auto'\n if (iconForeground === 'auto') {\n const caseTypeIconColor =\n color && theme.base['case-type-colors'] !== 'ignored'\n ? resolveCaseTypeColor(theme, color)\n : iconBackground;\n iconForeground = readableColor(caseTypeIconColor, { mode: 'light', level: 'AANonText' });\n }\n\n const [hasBrokenImage, setHasBrokenImage] = useState<undefined | boolean>();\n const showIcon = !!icon && !hasBrokenImage;\n\n const contentsEl = useRef<HTMLDivElement>(null);\n const headerGroupEl = useRef<HTMLElement>(null);\n const actionsContainerEl = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n\n let actionsItems: Action[];\n let actionsLoading: boolean;\n\n if (Array.isArray(actions)) {\n actionsItems = actions;\n actionsLoading = false;\n } else if (actions) {\n actionsItems = actions.items ?? [];\n actionsLoading = !!actions.progress;\n } else {\n actionsItems = [];\n actionsLoading = false;\n }\n\n const caseActions: Action[] = actionsLoading\n ? []\n : [\n ...(onFollowedChange\n ? [\n {\n id: 'follow',\n text: followed ? t('unfollow') : t('follow'),\n onClick: () => {\n onFollowedChange(!followed);\n push({\n content: followed\n ? t('case_unfollowed', [caseId])\n : t('case_followed', [caseId])\n });\n }\n }\n ]\n : []),\n ...actionsItems.map(action => ({\n ...action,\n text: action.text,\n visual: action.icon ? <Icon name={action.icon} /> : null\n }))\n ];\n\n const showExpandCollapse = !isPreview && aboveMD;\n const collapsedMainHeader =\n (!isPreview && !aboveMD && aboveSM) || (showExpandCollapse && !summaryExpanded);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the summary changes layout.\n useAfterInitialEffect(() => {\n if (toggleButtonRef.current && toggleButtonRef.current === document.activeElement) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 0);\n }\n }, [summaryExpanded]);\n\n // Actions wrapping\n useLayoutEffect(() => {\n if (\n !wrapPromotedActions &&\n contentsEl.current &&\n headerGroupEl.current &&\n actionsContainerEl.current\n ) {\n const contentStart = getEdge({\n el: contentsEl.current,\n side: 'leading',\n ltr\n });\n const headerGroupEnd = getEdge({\n el: headerGroupEl.current,\n side: 'trailing',\n ltr\n });\n const actionsContainerWidth = actionsContainerEl.current.getBoundingClientRect().width;\n\n wrapActionsBreakpoint.current =\n Math.ceil(headerGroupEnd) - Math.ceil(contentStart) + Math.ceil(actionsContainerWidth);\n }\n\n const promotedActionsWrapHandler = () => {\n if (wrapActionsBreakpoint.current && contentsEl.current) {\n setWrapPromotedActions(\n Math.ceil(contentsEl.current.offsetWidth) < wrapActionsBreakpoint.current\n );\n }\n };\n\n const resizeObserver = new ResizeObserver(throttle(promotedActionsWrapHandler, 30));\n\n promotedActionsWrapHandler();\n\n if (contentsEl.current) {\n resizeObserver.observe(contentsEl.current, { box: 'border-box' });\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [\n contentsEl,\n headerGroupEl,\n actionsContainerEl,\n promotedActions,\n heading,\n subheading,\n wrapPromotedActions\n ]);\n\n // Reset summary\n useEffect(() => {\n setSummaryResetID(Math.random());\n }, [heading, promotedActions]);\n\n useEffect(() => {\n setHasBrokenImage(undefined);\n }, [typeof icon === 'string' ? icon : icon?.href]);\n\n return (\n <Flex\n data-testid={testIds.header}\n as={StyledCaseHeader}\n container={{ direction: 'column', gap: 1 }}\n >\n <Flex container ref={contentsEl}>\n {showExpandCollapse && onToggleSummary && !persistentUtility && (\n <StyledExpandCollapseSummaryButton\n ref={toggleButtonRef}\n onClick={onToggleSummary}\n label={t(summaryExpanded ? 'collapse' : 'expand')}\n aria-label={t(summaryExpanded ? 'collapse_summary' : 'expand_summary')}\n icon\n compact\n >\n <Icon name={summaryExpanded ? `arrow-micro-${start}` : 'arrow-micro-down'} />\n </StyledExpandCollapseSummaryButton>\n )}\n\n {showIcon && (\n <Flex container={{ pad: [1, 0, 0] }} item={{ shrink: 0 }}>\n {(() => {\n if (typeof icon === 'string') {\n return (\n <StyledCaseViewIcon\n data-testid={testIds.icon}\n aria-label={t('case_type_icon', [caseType ?? t('case_type')])}\n name={icon}\n foreground={iconForeground}\n background={iconBackground}\n />\n );\n }\n\n return (\n <StyledIconShape background={iconBackground} data-testid={testIds.icon}>\n <StyledCaseViewImage\n src={icon.href}\n alt={t('case_image')}\n onLoad={() => {\n setHasBrokenImage(false);\n }}\n onError={() => {\n setHasBrokenImage(true);\n }}\n />\n </StyledIconShape>\n );\n })()}\n </Flex>\n )}\n\n {/* header group */}\n <Flex\n as={StyledCaseHeaderText}\n container={{\n direction: 'column',\n pad: [0.5, 2, 0.5, showIcon ? 1 : undefined],\n alignItems: 'start',\n justify: 'center'\n }}\n item={\n aboveSM\n ? { shrink: wrapPromotedActions || !hasPromotedActions ? 1 : 0 }\n : { shrink: 1, grow: 1 }\n }\n ref={headerGroupEl}\n >\n <Text data-testid={testIds.heading} variant='h1'>\n {caseLink ? <Link {...caseLink}>{heading}</Link> : heading}\n </Text>\n\n {subheading && (!parentCases || subheading !== caseId) && (\n <StyledSubheading data-testid={testIds.subheading}>{subheading}</StyledSubheading>\n )}\n\n {parentCases && (\n <Breadcrumbs\n forwardedAs='p'\n path={[\n ...parentCases,\n {\n ...caseLink,\n id: caseId,\n primary: caseId,\n href: caseLink?.href\n }\n ]}\n leafOnly\n />\n )}\n </Flex>\n {/* summary */}\n {collapsedMainHeader && !wrapPromotedActions && (\n <Summary siblingRef={actionsContainerEl} key={summaryResetID} />\n )}\n {/* inline actions */}\n <Flex\n as={StyledHeaderActions}\n item={{ shrink: 0 }}\n container={{ alignItems: 'start', pad: [0, 0, 0, 2] }}\n offsetEnd={!summaryExpanded}\n ref={actionsContainerEl}\n >\n {collapsedMainHeader &&\n !wrapPromotedActions &&\n promotedActions &&\n promotedActions.length > 0 ? (\n <>\n {promotedActions.map(promotedAction => (\n <StyledCaseHeaderPromotedAction\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) =>\n promotedAction.onClick?.(promotedAction.id, e)\n }\n key={promotedAction.id}\n >\n {promotedAction.text}\n </StyledCaseHeaderPromotedAction>\n ))}\n </>\n ) : null}\n\n {onEdit && (\n <Button\n data-testid={testIds.edit}\n icon\n variant='simple'\n onClick={onEdit}\n label={t('edit')}\n aria-label={`${t('edit')} - ${heading}`}\n >\n <Icon name='pencil' />\n </Button>\n )}\n\n {(actionsLoading || caseActions.length > 0) && (\n <Actions\n contextualLabel={heading}\n data-testid={testIds.actions}\n iconOnly\n progress={actionsLoading}\n items={caseActions}\n menuAt={actionsLoading ? 0 : 1}\n filterAt={5}\n scrollAt={Infinity}\n />\n )}\n </Flex>\n </Flex>\n\n {/* wrapped promoted actions */}\n {(!collapsedMainHeader || wrapPromotedActions || !aboveSM) &&\n promotedActions &&\n promotedActions.length > 0 ? (\n <Flex\n data-testid={testIds.promotedActions}\n container={{ justify: 'start', wrap: 'wrap', gap: 1, pad: [0, 0, 0.5] }}\n >\n {promotedActions.map(({ id, text, onClick }) => (\n <div key={text}>\n <StyledCaseHeaderPromotedAction\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => onClick?.(id, e)}\n >\n {text}\n </StyledCaseHeaderPromotedAction>\n </div>\n ))}\n </Flex>\n ) : null}\n\n {collaboration}\n </Flex>\n );\n};\n\nexport default CaseHeader;\n"]}
|
|
1
|
+
{"version":3,"file":"CaseHeader.js","sourceRoot":"","sources":["../../../../src/components/CaseView/CaseHeader/CaseHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,qBAAqB,EACrB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,UAAU,MAAM,+DAA+D,CAAC;AAC5F,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,iCAAiC,EACjC,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEnC,MAAM,UAAU,GAAO,GAAG,EAAE;IAC1B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,EA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B,KAAC,IAAI,mBACU,OAAO,CAAC,eAAe,EACpC,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,YAEtE,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC9C,wBACE,KAAC,8BAA8B,IAC7B,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,YAE9D,IAAI,GAC0B,IANzB,IAAI,CAOR,CACP,CAAC,GACG,CACR,CAAC,CAAC,CAAC,IAAI,EAEP,aAAa,IACT,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport type { FC, MouseEvent } from 'react';\nimport { parseToHsl } from 'polished';\n\nimport {\n Breadcrumbs,\n Flex,\n getEdge,\n Icon,\n registerIcon,\n Text,\n Link,\n Button,\n throttle,\n useDirection,\n useI18n,\n useAfterInitialEffect,\n useTheme,\n tryCatch,\n Actions,\n StyledIconShape,\n useToaster,\n readableColor,\n InlineEdit\n} from '@pega/cosmos-react-core';\nimport type { Action } from '@pega/cosmos-react-core';\nimport * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pencil.icon';\nimport * as moreIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/more.icon';\n\nimport {\n StyledCaseHeader,\n StyledCaseHeaderText,\n StyledExpandCollapseSummaryButton,\n StyledSubheading,\n StyledHeaderActions,\n StyledCaseHeaderPromotedAction,\n StyledCaseViewImage,\n StyledCaseViewIcon,\n resolveCaseTypeColor\n} from '../CaseView.styles';\nimport { useCaseViewContext } from '../CaseView.context';\n\nimport Summary from './Summary';\n\nregisterIcon(pencilIcon, moreIcon);\n\nconst CaseHeader: FC = () => {\n const t = useI18n();\n const { ltr, start } = useDirection();\n const theme = useTheme();\n\n const {\n testIds,\n caseId,\n icon,\n color,\n heading,\n subheading,\n caseType,\n actions,\n caseLink,\n parentCases,\n onEdit,\n followed,\n onFollowedChange,\n promotedActions,\n summaryExpanded,\n onToggleSummary,\n isPreview,\n aboveSM,\n aboveMD,\n persistentUtility,\n collaboration\n } = useCaseViewContext();\n const { push } = useToaster();\n\n const [wrapPromotedActions, setWrapPromotedActions] = useState(false);\n const [summaryResetID, setSummaryResetID] = useState<number | undefined>(Math.random());\n\n const wrapActionsBreakpoint = useRef<number | null>(null);\n\n const hasPromotedActions = (promotedActions?.length ?? 0) > 0;\n\n let iconForeground =\n theme.components['case-view'].icon.color !== 'auto'\n ? theme.components['case-view'].icon.color\n : theme.components['case-view'].header['foreground-color'];\n\n const iconBackground = useMemo(() => {\n if (theme.components['case-view'].icon.background !== 'auto') {\n return theme.components['case-view'].icon.background;\n }\n return tryCatch(\n () => {\n const { lightness } = parseToHsl(theme.components['case-view'].header['background-color']);\n return lightness > 0.35 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)';\n },\n () => 'transparent'\n );\n }, [theme]);\n\n // Fall back to readable color if theme icon color and header foreground color are both 'auto'\n if (iconForeground === 'auto') {\n const caseTypeIconColor =\n color && theme.base['case-type-colors'] !== 'ignored'\n ? resolveCaseTypeColor(theme, color)\n : iconBackground;\n iconForeground = readableColor(caseTypeIconColor, { mode: 'light', level: 'AANonText' });\n }\n\n const [hasBrokenImage, setHasBrokenImage] = useState<undefined | boolean>();\n const showIcon = !!icon && !hasBrokenImage;\n\n const contentsEl = useRef<HTMLDivElement>(null);\n const headerGroupEl = useRef<HTMLElement>(null);\n const actionsContainerEl = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n\n let actionsItems: Action[];\n let actionsLoading: boolean;\n\n if (Array.isArray(actions)) {\n actionsItems = actions;\n actionsLoading = false;\n } else if (actions) {\n actionsItems = actions.items ?? [];\n actionsLoading = !!actions.progress;\n } else {\n actionsItems = [];\n actionsLoading = false;\n }\n\n const caseActions: Action[] = actionsLoading\n ? []\n : [\n ...(onFollowedChange\n ? [\n {\n id: 'follow',\n text: followed ? t('unfollow') : t('follow'),\n onClick: () => {\n onFollowedChange(!followed);\n push({\n content: followed\n ? t('case_unfollowed', [caseId])\n : t('case_followed', [caseId])\n });\n }\n }\n ]\n : []),\n ...actionsItems.map(action => ({\n ...action,\n text: action.text,\n visual: action.icon ? <Icon name={action.icon} /> : null\n }))\n ];\n\n const showExpandCollapse = !isPreview && aboveMD;\n const collapsedMainHeader =\n (!isPreview && !aboveMD && aboveSM) || (showExpandCollapse && !summaryExpanded);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the summary changes layout.\n useAfterInitialEffect(() => {\n if (toggleButtonRef.current && toggleButtonRef.current === document.activeElement) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 0);\n }\n }, [summaryExpanded]);\n\n // Actions wrapping\n useLayoutEffect(() => {\n if (\n !wrapPromotedActions &&\n contentsEl.current &&\n headerGroupEl.current &&\n actionsContainerEl.current\n ) {\n const contentStart = getEdge({\n el: contentsEl.current,\n side: 'leading',\n ltr\n });\n const headerGroupEnd = getEdge({\n el: headerGroupEl.current,\n side: 'trailing',\n ltr\n });\n const actionsContainerWidth = actionsContainerEl.current.getBoundingClientRect().width;\n\n wrapActionsBreakpoint.current =\n Math.ceil(headerGroupEnd) - Math.ceil(contentStart) + Math.ceil(actionsContainerWidth);\n }\n\n const promotedActionsWrapHandler = () => {\n if (wrapActionsBreakpoint.current && contentsEl.current) {\n setWrapPromotedActions(\n Math.ceil(contentsEl.current.offsetWidth) < wrapActionsBreakpoint.current\n );\n }\n };\n\n const resizeObserver = new ResizeObserver(throttle(promotedActionsWrapHandler, 30));\n\n promotedActionsWrapHandler();\n\n if (contentsEl.current) {\n resizeObserver.observe(contentsEl.current, { box: 'border-box' });\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [\n contentsEl,\n headerGroupEl,\n actionsContainerEl,\n promotedActions,\n heading,\n subheading,\n wrapPromotedActions\n ]);\n\n // Reset summary\n useEffect(() => {\n setSummaryResetID(Math.random());\n }, [heading, promotedActions]);\n\n useEffect(() => {\n setHasBrokenImage(undefined);\n }, [typeof icon === 'string' ? icon : icon?.href]);\n\n const headingText = typeof heading !== 'string' ? heading.text : heading;\n const subheadingText =\n subheading && typeof subheading !== 'string' ? subheading.text : subheading;\n\n return (\n <Flex\n data-testid={testIds.header}\n as={StyledCaseHeader}\n container={{ direction: 'column', gap: 1 }}\n >\n <Flex container ref={contentsEl}>\n {showExpandCollapse && onToggleSummary && !persistentUtility && (\n <StyledExpandCollapseSummaryButton\n ref={toggleButtonRef}\n onClick={onToggleSummary}\n label={t(summaryExpanded ? 'collapse' : 'expand')}\n aria-label={t(summaryExpanded ? 'collapse_summary' : 'expand_summary')}\n icon\n compact\n >\n <Icon name={summaryExpanded ? `arrow-micro-${start}` : 'arrow-micro-down'} />\n </StyledExpandCollapseSummaryButton>\n )}\n\n {showIcon && (\n <Flex container={{ pad: [1, 0, 0] }} item={{ shrink: 0 }}>\n {(() => {\n if (typeof icon === 'string') {\n return (\n <StyledCaseViewIcon\n data-testid={testIds.icon}\n aria-label={t('case_type_icon', [caseType ?? t('case_type')])}\n name={icon}\n foreground={iconForeground}\n background={iconBackground}\n />\n );\n }\n\n return (\n <StyledIconShape background={iconBackground} data-testid={testIds.icon}>\n <StyledCaseViewImage\n src={icon.href}\n alt={t('case_image')}\n onLoad={() => {\n setHasBrokenImage(false);\n }}\n onError={() => {\n setHasBrokenImage(true);\n }}\n />\n </StyledIconShape>\n );\n })()}\n </Flex>\n )}\n\n {/* header group */}\n <Flex\n as={StyledCaseHeaderText}\n container={{\n direction: 'column',\n pad: [0.5, 2, 0.5, showIcon ? 1 : undefined],\n alignItems: 'start',\n justify: 'center'\n }}\n item={\n aboveSM\n ? { shrink: wrapPromotedActions || !hasPromotedActions ? 1 : 0 }\n : { shrink: 1, grow: 1 }\n }\n ref={headerGroupEl}\n >\n {(() => {\n const headingContent = caseLink ? (\n <Link {...caseLink}>{headingText}</Link>\n ) : (\n headingText\n );\n const textEl = (\n <Text data-testid={testIds.heading} variant='h1'>\n {headingContent}\n </Text>\n );\n\n if (typeof heading !== 'string') {\n return (\n <InlineEdit contextualLabel={headingText} {...heading.inlineEdit}>\n {textEl}\n </InlineEdit>\n );\n }\n return textEl;\n })()}\n\n {subheading &&\n (!parentCases || subheadingText !== caseId) &&\n (() => {\n const subheadEl = (\n <StyledSubheading data-testid={testIds.subheading}>\n {subheadingText}\n </StyledSubheading>\n );\n if (typeof subheading !== 'string') {\n return (\n <InlineEdit contextualLabel={subheading.text} {...subheading.inlineEdit}>\n {subheadEl}\n </InlineEdit>\n );\n }\n return subheadEl;\n })()}\n\n {parentCases && (\n <Breadcrumbs\n forwardedAs='p'\n path={[\n ...parentCases,\n {\n ...caseLink,\n id: caseId,\n primary: caseId,\n href: caseLink?.href\n }\n ]}\n leafOnly\n />\n )}\n </Flex>\n {/* summary */}\n {collapsedMainHeader && !wrapPromotedActions && (\n <Summary siblingRef={actionsContainerEl} key={summaryResetID} />\n )}\n {/* inline actions */}\n <Flex\n as={StyledHeaderActions}\n item={{ shrink: 0 }}\n container={{ alignItems: 'start', pad: [0, 0, 0, 2] }}\n offsetEnd={!summaryExpanded}\n ref={actionsContainerEl}\n >\n {collapsedMainHeader &&\n !wrapPromotedActions &&\n promotedActions &&\n promotedActions.length > 0 ? (\n <>\n {promotedActions.map(promotedAction => (\n <StyledCaseHeaderPromotedAction\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) =>\n promotedAction.onClick?.(promotedAction.id, e)\n }\n key={promotedAction.id}\n >\n {promotedAction.text}\n </StyledCaseHeaderPromotedAction>\n ))}\n </>\n ) : null}\n\n {onEdit && (\n <Button\n data-testid={testIds.edit}\n icon\n variant='simple'\n onClick={onEdit}\n label={t('edit')}\n aria-label={`${t('edit')} - ${headingText}`}\n >\n <Icon name='pencil' />\n </Button>\n )}\n\n {(actionsLoading || caseActions.length > 0) && (\n <Actions\n contextualLabel={typeof heading === 'string' ? heading : heading.text}\n data-testid={testIds.actions}\n iconOnly\n progress={actionsLoading}\n items={caseActions}\n menuAt={actionsLoading ? 0 : 1}\n filterAt={5}\n scrollAt={Infinity}\n />\n )}\n </Flex>\n </Flex>\n\n {/* wrapped promoted actions */}\n {(!collapsedMainHeader || wrapPromotedActions || !aboveSM) &&\n promotedActions &&\n promotedActions.length > 0 ? (\n <Flex\n data-testid={testIds.promotedActions}\n container={{ justify: 'start', wrap: 'wrap', gap: 1, pad: [0, 0, 0.5] }}\n >\n {promotedActions.map(({ id, text, onClick }) => (\n <div key={text}>\n <StyledCaseHeaderPromotedAction\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => onClick?.(id, e)}\n >\n {text}\n </StyledCaseHeaderPromotedAction>\n </div>\n ))}\n </Flex>\n ) : null}\n\n {collaboration}\n </Flex>\n );\n};\n\nexport default CaseHeader;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA8BhC,OAAO,KAAK,EAAE,YAAY,EAAO,MAAM,yBAAyB,CAAC;AAmCjE,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"CaseView.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA8BhC,OAAO,KAAK,EAAE,YAAY,EAAO,MAAM,yBAAyB,CAAC;AAmCjE,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;;;;AA44B5E,wBAAyD"}
|
|
@@ -105,7 +105,7 @@ genAICoachProps, collaboration, ...restProps }) => {
|
|
|
105
105
|
if (!caseViewRef.current)
|
|
106
106
|
return;
|
|
107
107
|
if (loadedRef.current) {
|
|
108
|
-
focusHeadingOrContainer(caseViewRef.current, heading);
|
|
108
|
+
focusHeadingOrContainer(caseViewRef.current, typeof heading === 'string' ? heading : heading.text);
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
111
|
loadedRef.current = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1F,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,UAAU,EACV,IAAI,EACJ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,kBAAkB,MAAM,yEAAyE,CAAC;AAC9G,OAAO,KAAK,iBAAiB,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,gBAAgB,MAAM,sEAAsE,CAAC;AACzG,OAAO,KAAK,mBAAmB,MAAM,0EAA0E,CAAC;AAChH,OAAO,KAAK,kBAAkB,MAAM,yEAAyE,CAAC;AAC9G,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;A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,CAAC,IAAI,CAC5D,KAAC,gBAAgB,IACf,KAAK,EAAE,qBAAqB,EAC5B,UAAU,EAAE,iBAAiB,GAC7B,CACH,EAEA,eAAe,IAAI,CAClB,KAAC,iBAAiB,IAChB,QAAQ,QACR,OAAO,EAAC,SAAS,EACjB,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EACxC,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC,GACxB,CACH,IACA,CACJ,IACI,CACR,EACA,mBAAmB,CAAC,OAAO,IAAI,eAAe,IAAI,SAAS,IAAI,CAC9D,KAAC,wBAAwB,IACvB,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC,EACvB,MAAM,EAAE,mBAAmB,CAAC,OAAO,EACnC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAEpC,KAAC,UAAU,OACL,eAAe,EACnB,OAAO,EAAE;oCACP,SAAS,EAAE,QAAQ;oCACnB,OAAO,EAAE,GAAG,EAAE;wCACZ,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;wCAC5B,YAAY,CAAC,KAAK,CAAC,CAAC;wCACpB,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;oCACvC,CAAC;iCACF,GACD,GACuB,CAC5B,IACI,GACkB,EAC1B,mBAAmB,IACnB,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { useEffect, useMemo, useRef, useLayoutEffect, useState, useContext } from 'react';\nimport type { FC } from 'react';\n\nimport {\n Flex,\n Grid,\n Icon,\n registerIcon,\n Text,\n TabPanel,\n useBreakpoint,\n useScrollStick,\n useElement,\n Card,\n Drawer,\n useI18n,\n useDirection,\n useAfterInitialEffect,\n windowIsAvailable,\n focusHeadingOrContainer,\n useConfiguration,\n useRefMap,\n useTestIds,\n withTestIds,\n AppShellContext,\n useConsolidatedRef,\n Tabs,\n CardHeader,\n useTheme,\n usePrevious\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps, Tab } from '@pega/cosmos-react-core';\nimport type { ScrollStickOptions } from '@pega/cosmos-react-core/lib/hooks/useScrollStick';\nimport * as moveRightSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/move-right-solid.icon';\nimport * as moveLeftSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/move-left-solid.icon';\nimport * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport * as arrowMicroRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-micro-right.icon';\nimport * as arrowMicroLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-micro-left.icon';\nimport * as dockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/dock.icon';\nimport * as unDockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/undock.icon';\n\nimport GenAICoach from '../GenAICoach';\nimport type { State } from '../GenAICoach/GenAICoach.types';\n\nimport CaseSummary from './CaseSummary';\nimport UtilitiesSummary from './UtilitiesSummary';\nimport {\n StyledCaseDrawer,\n StyledCaseDrawerContent,\n StyledCaseView,\n StyledWorkArea,\n StyledPersistentUtility,\n StyledPersistentContainer,\n StyledSummary,\n StyledSummaryTabContent,\n StyledUtilities,\n StyledExpandCollapseUtilitiesButton,\n StyledUtilitiesHeading,\n StyledCoachButton,\n StyledUtilitiesWrapper,\n StyledPersistentContent,\n StyledSummaryHeading,\n StyledTasks,\n StyledTabPanelWrapper,\n StyledBannersStagesTasksContainer\n} from './CaseView.styles';\nimport type { CaseViewContextValue, CaseViewProps } from './CaseView.types';\nimport CaseViewContext from './CaseView.context';\nimport CaseSummaryFields from './CaseSummaryFields';\nimport { getCaseViewTestIds } from './CaseView.test-ids';\nimport UtilitySummaryItemDialog from './UtilitySummaryItemDialog';\n\nregisterIcon(\n moveRightSolidIcon,\n moveLeftSolidIcon,\n polarisSolidIcon,\n arrowMicroRightIcon,\n arrowMicroLeftIcon,\n dockIcon,\n unDockIcon\n);\n\n// This function is responsible for auto sizing table height in case tab panels.\nconst resizeTable = (tabPanelEl: HTMLDivElement, workAreaEl: HTMLDivElement) => {\n tabPanelEl.style.removeProperty('--content-height-in-view');\n\n // .rs-wrapper is currently the class used by the table component which needs to be targeted.\n const tables = Array.from(tabPanelEl.querySelectorAll('.rs-wrapper')).filter(\n table => table.getBoundingClientRect().width !== 0\n );\n\n // Only perform this logic when there is a single table in a tab's panel.\n if (tables.length !== 1) return;\n\n // This selector finds the table's root element as they are always wrapped in a Card.\n const table = tables[0].closest('article');\n\n if (!table) return;\n\n const tabPanelRect = tabPanelEl.getBoundingClientRect();\n const tableRect = table.getBoundingClientRect();\n const vpHeight = document.documentElement.clientHeight;\n const tableRectOffsetTop = tableRect.top + window.scrollY;\n const workAreaPaddingBlockEnd =\n // px unit are required for proper CSS calc calculation.\n window.getComputedStyle(workAreaEl).getPropertyValue('padding-block-end') || '0px';\n\n // Accounts for content rendered after the table.\n const tableBottomToTabPanelBottom = tabPanelRect.bottom - tableRect.bottom;\n\n // Sets a CSS variable for available height based on screen size and view state.\n // Defines an available minimum height of ~600px.\n tabPanelEl.style.setProperty(\n '--content-height-in-view',\n `max(calc(${\n vpHeight - tableRectOffsetTop - tableBottomToTabPanelBottom\n }px - ${workAreaPaddingBlockEnd}), 37.5rem)`\n );\n};\n\nconst CaseView: FC<CaseViewProps & ForwardProps> = ({\n testId,\n\n // Case data mostly visually related to the case header\n caseId,\n heading,\n subheading,\n caseType,\n caseLink,\n parentCases,\n icon,\n color,\n followed,\n onFollowedChange,\n onEdit,\n actions,\n promotedActions,\n\n // Summary content and state props\n summaryFields,\n summaryExpanded: summaryExpandedProp = true,\n onToggleSummary,\n\n // Case tabs\n tabs: { currentTabId, items: tabItemsProp, onClick: onTabClick },\n\n // Workarea related content props\n banners,\n stages,\n tasks,\n tabContent: tabContentProp = [],\n\n // Utilities content and state props\n utilities,\n utilitiesSummaryItems,\n utilitiesExpanded: utilitiesExpandedProp = true,\n onToggleUtilities,\n\n // Etc...\n persistentUtility,\n intelligentGuidance,\n isPreview = false,\n // Gen AI coach props\n genAICoachProps,\n collaboration,\n ...restProps\n}: CaseViewProps) => {\n const testIds = useTestIds(testId, getCaseViewTestIds);\n\n // General util hooks\n const t = useI18n();\n const theme = useTheme();\n const { previewActive } = useContext(AppShellContext);\n const { start, end } = useDirection();\n const { loadedRef } = useConfiguration();\n\n // Element refs\n const [caseViewEl, setCaseViewEl] = useElement<HTMLDivElement>();\n const caseViewRef = useConsolidatedRef(setCaseViewEl);\n const summaryRef = useRef<HTMLDivElement>(null);\n // undefined used to allow ref to be mutable. Element set below in ref callback for scroll stick.\n const workAreaRef = useRef<HTMLDivElement | undefined>();\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const persistentUtilityButtonRef = useRef<HTMLButtonElement>(null);\n const isToggleButtonFocused = useRef(false);\n const isPersistentUtilityButtonFocused = useRef(false);\n const tabsRef = useRef<HTMLElement>(null);\n // Tab content\n const [tabContentEl, setTabContentEl] = useElement<HTMLElement>(null);\n // Gen AI coach state\n const genAICoachButtonRef = useRef<HTMLButtonElement>(null);\n const [showCoach, setShowCoach] = useState(false);\n const [genAIState, setGenAIState] = useState<State>('minimized');\n\n // Breakpoint booleans\n const smOrAbove = useBreakpoint('sm');\n const mdOrAbove = useBreakpoint('md', { breakpointRef: caseViewRef });\n const lgOrAbove = useBreakpoint('lg', { breakpointRef: caseViewRef });\n const xlOrAbove = useBreakpoint('xl', { breakpointRef: caseViewRef });\n\n // DOM ids\n const initialTabId = tabItemsProp[0]?.id;\n const summaryTabId = `summary-${caseId}`;\n const utilitiesTabId = `utilities-${caseId}`;\n const persistentUtilityTabId = `persistent-utility-${caseId}`;\n const genAICoachTabId = `gen-ai-coach-${caseId}`;\n\n // Summary state handling\n let summaryExpanded = !isPreview && !!summaryExpandedProp;\n\n const [summaryHeightPx, setSummaryHeightPx] = useState(0);\n const prevSummaryHeightPx = usePrevious(summaryHeightPx);\n\n if (persistentUtility) {\n summaryExpanded = xlOrAbove;\n }\n\n const [persistentUtilityExpanded, setPersistentUtilityExpanded] = useState(false);\n\n // Focus heading on initial mount\n useEffect(() => {\n if (!caseViewRef.current) return;\n\n if (loadedRef.current) {\n focusHeadingOrContainer(caseViewRef.current, heading);\n } else {\n loadedRef.current = true;\n }\n }, [caseId]);\n\n // Utilities state handling\n\n // Used in coordination with a layoutEffect below to determine the utilities state on initial render.\n // Attempted with a ref but it did not work. Using state and enforcing a render in addition to the change render for lgOrAbove seems to fix...\n const [obeyUtilitiesExpandedProp, setObeyUtilitiesExpandedProp] = useState(lgOrAbove);\n\n // Allow the utilitiesExpandedProp to drive the utilities' state after the initial render\n useLayoutEffect(() => {\n if (lgOrAbove) setObeyUtilitiesExpandedProp(true);\n }, [lgOrAbove]);\n\n // Tracks whether a resize forced the onToggleUtilities to close the utilities when it's a drawer\n const utilitiesToggledByResize = useRef(false);\n\n // FIXME: Necessary to avoid utilitiesAndGenAI being mounted for a single render frame ⬇\n // only to be unmounted the next frame. This occurs with the utilities drawer in either direction.\n // Augments what obeyUtilitiesExpandedProp is already doing but we can not set that state ⬇\n // fast enough prior to the render. A larger refactor of state to a reducer could clean some of this up. Yuck.\n const previousLgOrAbove = usePrevious(lgOrAbove);\n const previousMdOrAbove = usePrevious(mdOrAbove);\n const justWentFromLGtoMD = previousLgOrAbove === true && lgOrAbove === false;\n const justWentFromSMtoMD = previousMdOrAbove === false && mdOrAbove === true;\n\n // If the initial render is within the MD size, where the utility drawer renders, it must begin collapsed. In CasePreview utilities should always remain collapsed.\n const utilitiesExpanded =\n !isPreview && obeyUtilitiesExpandedProp && !justWentFromLGtoMD && !justWentFromSMtoMD\n ? utilitiesExpandedProp\n : false;\n\n // Handles utilities state based on breakpoint changes.\n useAfterInitialEffect(() => {\n // If we change into the MD breakpoint range and the utilities state is expanded call the toggle prop to collapse it with controlled state\n if (mdOrAbove && !lgOrAbove && utilitiesExpandedProp) {\n onToggleUtilities?.();\n utilitiesToggledByResize.current = true;\n }\n\n if (lgOrAbove) {\n if (utilitiesToggledByResize.current && !utilitiesExpandedProp) {\n onToggleUtilities?.();\n }\n\n utilitiesToggledByResize.current = false;\n }\n // Purposely not listing utilitiesExpanded as a dependency as it is not a trigger and will be captured when BPs change\n }, [mdOrAbove, lgOrAbove]);\n\n // Handles focus of toggle button when toggled in drawer mode and when browser is resized\n useEffect(() => {\n if (isToggleButtonFocused.current) {\n toggleButtonRef.current?.focus();\n }\n\n if (!toggleButtonRef.current) {\n // Toggle button is not on DOM.\n isToggleButtonFocused.current = false;\n }\n }, [utilitiesExpanded, mdOrAbove, lgOrAbove]);\n\n useEffect(() => {\n if (isPersistentUtilityButtonFocused.current) {\n persistentUtilityButtonRef.current?.focus();\n }\n\n if (!persistentUtilityButtonRef.current) {\n isPersistentUtilityButtonFocused.current = false;\n }\n }, [persistentUtilityExpanded, mdOrAbove, lgOrAbove]);\n\n // Prepare tabs\n const [tabItems, tabContent] = useMemo(() => {\n const summaryTab = { id: summaryTabId, name: t('summary') };\n const summaryTabContent = {\n id: summaryTabId,\n content: (\n <Card>\n <StyledSummaryTabContent>\n <StyledSummaryHeading variant='h2'>{summaryTab.name}</StyledSummaryHeading>\n <CaseSummaryFields {...summaryFields} />\n </StyledSummaryTabContent>\n </Card>\n )\n };\n\n let items = tabItemsProp;\n let content = tabContentProp;\n\n if (mdOrAbove && !isPreview) {\n if (!summaryExpanded || (persistentUtility && !xlOrAbove)) {\n items = [summaryTab, ...tabItemsProp];\n content = [summaryTabContent, ...tabContentProp];\n }\n\n return [items, content];\n }\n\n const utilityTabsItems = [];\n const utilityTabsContent = [];\n\n if (utilities) {\n utilityTabsItems.push({ id: utilitiesTabId, name: t('utilities') });\n utilityTabsContent.push({\n id: utilitiesTabId,\n content: <Flex container={{ direction: 'column', gap: 2 }}>{utilities}</Flex>\n });\n }\n\n if (persistentUtility) {\n utilityTabsItems.push({ id: persistentUtilityTabId, name: persistentUtility.title });\n utilityTabsContent.push({ id: persistentUtilityTabId, content: persistentUtility?.content });\n }\n\n items = [summaryTab, ...tabItemsProp, ...utilityTabsItems];\n content = [summaryTabContent, ...tabContentProp, ...utilityTabsContent];\n\n if (genAICoachProps) {\n const genAICoachTabItem: Tab = { id: genAICoachTabId, name: t('chat_with_ai') };\n items.push(genAICoachTabItem);\n content.push({\n id: genAICoachTabId,\n content: <GenAICoach {...genAICoachProps} variant={{ placement: 'fullpage' }} />\n });\n }\n\n return [items, content];\n }, [\n tabItemsProp,\n summaryTabId,\n mdOrAbove,\n summaryExpanded,\n persistentUtility,\n xlOrAbove,\n tabContentProp,\n utilities,\n utilitiesTabId,\n persistentUtilityTabId\n ]);\n\n // Grid layout props\n let caseViewGridContainer = {\n cols: 'minmax(0, 1fr)',\n colGap: 0,\n rows: 'minmax(0, max-content) auto',\n areas: `\n \"summary\"\n \"work-area\"\n `\n };\n\n const sharedGridProps = {\n colGap: 2,\n rows: caseViewGridContainer.rows\n };\n\n if (persistentUtility) {\n if (xlOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: persistentUtilityExpanded\n ? 'minmax(0, max-content) repeat(2, minmax(0, 1fr)) minmax(0, max-content)'\n : 'minmax(0, max-content) minmax(0, 1fr) repeat(2, minmax(0, max-content))',\n\n areas: '\"summary work-area persistentUtility utilities\"'\n };\n } else if (mdOrAbove) {\n if (persistentUtilityExpanded) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'repeat(2, minmax(0, 1fr)) minmax(0, max-content)', // Work-area and PersistentUtility take equal space\n areas: `\n \"summary summary summary\"\n \"work-area persistentUtility utilities\"\n `\n };\n } else {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, 1fr) repeat(2, minmax(0, max-content))',\n areas: `\n \"summary summary summary\"\n \"work-area persistentUtility utilities\"\n `\n };\n }\n }\n } else if (summaryExpanded) {\n if (mdOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, max-content) minmax(0, 1fr) minmax(0, max-content)',\n areas: '\"summary work-area utilities\"'\n };\n }\n } else if (mdOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, 1fr) minmax(0, max-content)',\n areas: `\n \"summary summary\"\n \"work-area utilities\"\n `\n };\n }\n // Apply sticky columns\n const scrollStickOptions = useRef<ScrollStickOptions>({\n elements: [null, null]\n });\n\n const stickOffset = useMemo(() => {\n if (!windowIsAvailable || !caseViewEl) return 0;\n\n const styles = window.getComputedStyle(caseViewEl);\n const rootStyles = getComputedStyle(document.documentElement);\n const stickyOffsetRaw = parseFloat(styles.getPropertyValue('--appshell-sticky-offset'));\n const topOffsetRaw = parseFloat(rootStyles.getPropertyValue('--appshell-top-offset'));\n const appshellOffset =\n (!Number.isNaN(stickyOffsetRaw) && stickyOffsetRaw >= 0\n ? stickyOffsetRaw\n : parseFloat(styles.getPropertyValue('--appshell-offset')) || 0) +\n (!Number.isNaN(topOffsetRaw) ? topOffsetRaw : 0);\n\n const spacingStr = theme.base.spacing;\n const spacingPx = parseFloat(spacingStr) * parseFloat(rootStyles.fontSize);\n\n return appshellOffset + summaryHeightPx + 2 * spacingPx;\n }, [caseViewEl, summaryHeightPx, theme.base.spacing]);\n\n useScrollStick(\n // isMediumOrAbove means side by side columns | | |\n mdOrAbove ? { ...scrollStickOptions.current, offset: stickOffset } : undefined\n );\n\n // Preview set summary tab active\n useEffect(() => {\n if (isPreview) {\n onTabClick(summaryTabId);\n }\n }, []);\n\n // Initial tab selection\n useEffect(() => {\n if (\n mdOrAbove &&\n summaryExpanded &&\n !persistentUtility &&\n (currentTabId === summaryTabId || currentTabId === utilitiesTabId)\n ) {\n onTabClick(tabItemsProp[0]?.id);\n }\n // Toggle utilities tab selection\n if (mdOrAbove && [utilitiesTabId, persistentUtilityTabId].includes(currentTabId)) {\n onTabClick(initialTabId);\n }\n }, [mdOrAbove]);\n\n // Initial / summary tab selection\n useEffect(() => {\n if (!smOrAbove && currentTabId === initialTabId) {\n onTabClick(summaryTabId);\n } else if (smOrAbove && currentTabId === summaryTabId) {\n onTabClick(initialTabId);\n }\n }, [smOrAbove]);\n\n // Summary tab selection\n useEffect(() => {\n if (isPreview) {\n onTabClick(summaryTabId);\n }\n }, [isPreview]);\n\n // Initial tab selection\n useEffect(() => {\n if (summaryExpanded && currentTabId === summaryTabId) {\n onTabClick(initialTabId);\n }\n }, [summaryExpanded]);\n\n // Handles scrolling to tab content for newly clicked tab\n useEffect(() => {\n if (!tabContentEl) return;\n const scrollPos = window.scrollY;\n const windowHeight = document.documentElement.clientHeight;\n const bottomPos = scrollPos + windowHeight * 0.8;\n const tabContentPos = tabContentEl.offsetTop;\n if (tabContentPos > bottomPos) {\n const top = tabContentPos - windowHeight * 0.2;\n window.scrollTo({ top, behavior: 'smooth' });\n }\n }, [currentTabId]);\n\n // We need a css variable for the height of the case summary when it is collapsed into a header like layout\n useLayoutEffect(() => {\n const rafId = requestAnimationFrame(() => {\n if (!caseViewRef.current || !summaryRef.current) return;\n\n const newHeight = summaryExpanded ? 0 : summaryRef.current.offsetHeight;\n caseViewRef.current.style.setProperty('--summary-height', `${newHeight}px`);\n setSummaryHeightPx(newHeight);\n });\n\n return () => cancelAnimationFrame(rafId);\n }, [summaryExpanded, collaboration, prevSummaryHeightPx]);\n\n const utilitiesAndGenAI = (\n <>\n <Flex as={StyledUtilitiesWrapper} container={{ gap: 2, direction: 'column' }}>\n {utilities}\n </Flex>\n {genAICoachProps && (\n <GenAICoach\n {...genAICoachProps}\n variant={{\n placement: 'utilities',\n state: genAIState,\n onStateChange: (state: State) => {\n genAICoachProps.onStateChange?.(state);\n setGenAIState(state);\n }\n }}\n />\n )}\n </>\n );\n\n // CaseView context value\n // Choosing not to memo for now due to extent of deps and how often they change. Optimize as needed.\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const ctxValue: CaseViewContextValue = {\n testIds,\n caseId,\n heading,\n subheading,\n caseType,\n caseLink,\n parentCases,\n icon,\n color,\n followed,\n onFollowedChange,\n actions,\n promotedActions,\n onEdit,\n summaryFields,\n tabs: {\n items: tabItems,\n onClick: onTabClick,\n currentTabId\n },\n stages,\n tasks,\n persistentUtility,\n intelligentGuidance,\n collaboration,\n summaryExpanded,\n utilitiesExpanded,\n onToggleSummary,\n isPreview,\n hasGenAICoach: !!genAICoachProps,\n aboveSM: smOrAbove,\n aboveMD: mdOrAbove,\n aboveLG: lgOrAbove,\n aboveXL: xlOrAbove\n };\n\n const [tabPanelEls, getTabPanelCbRef] = useRefMap<HTMLDivElement>();\n\n // The following effects are dedicated to resizeTable handling.\n useLayoutEffect(() => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n const currentTabPanelEl = tabPanelEls.get(currentTabId)!;\n const workAreaEl = workAreaRef.current;\n\n resizeTable(currentTabPanelEl, workAreaEl);\n\n const onTabChange = () => {\n resizeTable(currentTabPanelEl, workAreaEl);\n };\n\n // TODO: optimize\n const mo = new MutationObserver(() => {\n resizeTable(currentTabPanelEl, workAreaEl);\n });\n\n mo.observe(currentTabPanelEl, { childList: true, subtree: true });\n\n currentTabPanelEl.addEventListener('cosmos-tab-changed', onTabChange);\n\n return () => {\n mo.disconnect();\n currentTabPanelEl.removeEventListener('cosmos-tab-changed', onTabChange);\n };\n });\n\n const [bannersStagesTasksEl, setBannersStagesTasksEl] = useElement<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!bannersStagesTasksEl) return;\n\n const observer = new ResizeObserver(() => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n resizeTable(tabPanelEls.get(currentTabId)!, workAreaRef.current);\n });\n\n observer.observe(bannersStagesTasksEl);\n\n return () => {\n observer.disconnect();\n };\n }, [bannersStagesTasksEl, currentTabId]);\n\n useEffect(() => {\n const onResize = () => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n resizeTable(tabPanelEls.get(currentTabId)!, workAreaRef.current);\n };\n\n window.addEventListener('resize', onResize);\n\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, [currentTabId]);\n\n const utilitiesHeading = (\n <StyledUtilitiesHeading variant='h2'>{t('utilities')}</StyledUtilitiesHeading>\n );\n\n const utilitiesToggleButton = !isPreview && (\n <StyledExpandCollapseUtilitiesButton\n compact\n icon\n label={t(utilitiesExpanded ? 'collapse' : 'expand')}\n aria-label={t(utilitiesExpanded ? 'collapse_utilities_panel' : 'expand_utilities_panel')}\n onClick={() => {\n if (!obeyUtilitiesExpandedProp && utilitiesExpandedProp) {\n setObeyUtilitiesExpandedProp(true);\n } else {\n onToggleUtilities?.();\n }\n }}\n onFocus={() => {\n isToggleButtonFocused.current = true;\n }}\n onBlur={() => {\n isToggleButtonFocused.current = false;\n }}\n ref={toggleButtonRef}\n >\n <Icon name={utilitiesExpanded ? `arrow-micro-${end}` : `arrow-micro-${start}`} />\n </StyledExpandCollapseUtilitiesButton>\n );\n\n const persistentUtilityToggleButton = persistentUtility && (\n <StyledExpandCollapseUtilitiesButton\n compact\n icon\n label={t(persistentUtilityExpanded ? 'collapse' : 'expand')}\n aria-label={t(persistentUtilityExpanded ? 'collapse_noun' : 'expand_noun', [\n persistentUtility.title\n ])}\n onClick={() => {\n setPersistentUtilityExpanded(prevState => !prevState);\n if (utilitiesExpanded) {\n onToggleUtilities?.();\n }\n }}\n onFocus={() => {\n isPersistentUtilityButtonFocused.current = true;\n }}\n onBlur={() => {\n isPersistentUtilityButtonFocused.current = false;\n }}\n ref={persistentUtilityButtonRef}\n >\n <Icon name={persistentUtilityExpanded ? 'dock' : 'undock'} />\n </StyledExpandCollapseUtilitiesButton>\n );\n\n const shouldRenderMobileTabs =\n !mdOrAbove || (persistentUtility && !xlOrAbove) || !summaryExpanded;\n // Here we go...\n return (\n <>\n <CaseViewContext.Provider value={ctxValue}>\n {/* Root element */}\n <Grid\n data-testid={testIds.root}\n {...restProps}\n as={StyledCaseView}\n ref={caseViewRef}\n container={caseViewGridContainer}\n item={{ area: 'case-view' }}\n >\n {/* Summary */}\n <Grid\n as={StyledSummary}\n item={{ area: 'summary' }}\n desktop={mdOrAbove && (!persistentUtility || xlOrAbove) && !summaryExpanded}\n isLargeOrAbove={lgOrAbove}\n ref={summaryRef}\n >\n <CaseSummary tabsRef={tabsRef} />\n </Grid>\n\n {/* Work area */}\n <Flex\n container={{\n direction: 'column',\n alignContent: 'start',\n rowGap: 2\n }}\n as={StyledWorkArea}\n persistentUtility={Boolean(persistentUtility)}\n ref={(el: HTMLDivElement) => {\n workAreaRef.current = el;\n scrollStickOptions.current.elements[0] = el;\n }}\n data-app-region\n aria-label={t('case_work_area')}\n >\n {(banners || stages || tasks) && (\n <Flex\n container={{\n direction: 'column',\n alignContent: 'start',\n rowGap: 2\n }}\n as={StyledBannersStagesTasksContainer}\n ref={setBannersStagesTasksEl}\n >\n {banners && <div data-testid={testIds.banners}>{banners}</div>}\n {stages && <div data-testid={testIds.stages}>{stages}</div>}\n {tasks && (\n <StyledTasks\n onFocus={e => {\n if (e.target?.matches('[data-focusable-form-heading]')) {\n window.scrollTo({\n top: 0,\n behavior: 'smooth'\n });\n }\n }}\n data-testid={testIds.tasks}\n >\n {tasks}\n </StyledTasks>\n )}\n </Flex>\n )}\n\n <Flex container={{ direction: 'column', alignContent: 'start' }}>\n {shouldRenderMobileTabs && (\n <Tabs\n data-testid={testIds.tabs}\n tabs={tabItems}\n onTabClick={onTabClick}\n currentTabId={currentTabId}\n aria-label={t(isPreview ? 'case_preview_tabs' : 'case_tabs')}\n ref={tabsRef}\n />\n )}\n\n <StyledTabPanelWrapper ref={setTabContentEl}>\n {tabContent?.map(({ id, content }) => (\n <TabPanel\n data-testid={currentTabId === id ? testIds.tabContent : undefined}\n currentTabId={currentTabId}\n tabId={id}\n key={id}\n ref={getTabPanelCbRef(id)}\n tablistRef={tabsRef}\n tablistType={shouldRenderMobileTabs ? 'horizontal' : 'vertical'}\n >\n {content}\n </TabPanel>\n ))}\n </StyledTabPanelWrapper>\n </Flex>\n </Flex>\n\n {/* Persistent utility column */}\n {persistentUtility && mdOrAbove && (\n <Grid\n as={StyledPersistentUtility}\n item={{ area: 'persistentUtility' }}\n data-app-region\n aria-label={t('utilities_label')}\n persistentUtilityExpanded={persistentUtilityExpanded}\n >\n {persistentUtility.showExpand ? (\n <Flex\n container={{\n direction: 'column',\n gap: persistentUtilityExpanded ? undefined : 2\n }}\n as={StyledPersistentContainer}\n >\n {persistentUtilityExpanded ? (\n <Card as={StyledPersistentContainer}>\n <CardHeader>\n <Text variant='h2'>{persistentUtility.title}</Text>\n {persistentUtilityToggleButton}\n </CardHeader>\n <Flex container={{ direction: 'column' }} as={StyledPersistentContent}>\n {persistentUtility.content}\n </Flex>\n </Card>\n ) : (\n <>\n <Flex\n container={{\n justify: 'between',\n alignItems: 'center',\n pad: [undefined, 0.5, undefined, undefined]\n }}\n >\n <Text variant='h2'>{persistentUtility.title}</Text>\n {persistentUtilityToggleButton}\n </Flex>\n <Flex container={{ direction: 'column' }} as={StyledPersistentContent}>\n {persistentUtility.content}\n </Flex>\n </>\n )}\n </Flex>\n ) : (\n <>{persistentUtility.content}</>\n )}\n </Grid>\n )}\n\n {/* Utility drawer */}\n {(utilities || genAICoachProps) && mdOrAbove && !lgOrAbove && utilitiesExpanded && (\n <Drawer\n as={StyledCaseDrawer}\n open={utilitiesExpanded}\n previewActive={previewActive}\n position='fixed'\n placement={end}\n shadow\n nullWhenClosed\n utilitiesExpanded={!!utilitiesExpanded}\n hasPersistentUtility={!!persistentUtility}\n >\n <Flex\n as={StyledCaseDrawerContent}\n container={{ direction: 'column', gap: 2 }}\n data-app-region\n aria-label={t('utilities_label')}\n >\n <Flex container={{ alignItems: 'center', justify: 'between' }}>\n {utilitiesHeading}\n {utilitiesToggleButton}\n </Flex>\n {utilitiesAndGenAI}\n </Flex>\n </Drawer>\n )}\n\n {/* Utilities */}\n {(utilities || genAICoachProps) && mdOrAbove && !isPreview && (\n <Grid\n data-testid={testIds.utilities}\n ref={(el: HTMLDivElement) => {\n scrollStickOptions.current.elements[1] = el;\n }}\n as={StyledUtilities}\n container={{\n cols: 'minmax(0, 1fr)',\n rowGap: 2\n }}\n item={{\n area: 'utilities'\n }}\n data-app-region={lgOrAbove || !utilitiesExpanded || undefined}\n aria-label={t('utilities_label')}\n >\n <Flex\n container={{\n alignItems: 'center',\n justify: utilitiesExpanded ? 'between' : 'center'\n }}\n >\n {utilitiesHeading}\n {!lgOrAbove && utilitiesExpanded ? null : utilitiesToggleButton}\n </Flex>\n\n {utilitiesExpanded && lgOrAbove && utilitiesAndGenAI}\n\n {(!utilitiesExpanded || (mdOrAbove && !lgOrAbove)) && (\n <>\n {utilitiesSummaryItems && utilitiesSummaryItems.length > 0 && (\n <UtilitiesSummary\n items={utilitiesSummaryItems}\n isExpanded={utilitiesExpanded}\n />\n )}\n\n {genAICoachProps && (\n <StyledCoachButton\n iconOnly\n variant='primary'\n ref={genAICoachButtonRef}\n onClick={() => setShowCoach(cur => !cur)}\n label={t('chat_with_ai')}\n />\n )}\n </>\n )}\n </Grid>\n )}\n {genAICoachButtonRef.current && genAICoachProps && showCoach && (\n <UtilitySummaryItemDialog\n name={t('chat_with_ai')}\n target={genAICoachButtonRef.current}\n onDismiss={() => setShowCoach(false)}\n >\n <GenAICoach\n {...genAICoachProps}\n variant={{\n placement: 'dialog',\n onClose: () => {\n genAICoachProps.onClose?.();\n setShowCoach(false);\n genAICoachButtonRef.current?.focus();\n }\n }}\n />\n </UtilitySummaryItemDialog>\n )}\n </Grid>\n </CaseViewContext.Provider>\n {intelligentGuidance}\n </>\n );\n};\n\nexport default withTestIds(CaseView, getCaseViewTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"CaseView.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE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EAAE,mBAAmB,CAAC,OAAO,EACnC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAEpC,KAAC,UAAU,OACL,eAAe,EACnB,OAAO,EAAE;oCACP,SAAS,EAAE,QAAQ;oCACnB,OAAO,EAAE,GAAG,EAAE;wCACZ,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;wCAC5B,YAAY,CAAC,KAAK,CAAC,CAAC;wCACpB,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;oCACvC,CAAC;iCACF,GACD,GACuB,CAC5B,IACI,GACkB,EAC1B,mBAAmB,IACnB,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { useEffect, useMemo, useRef, useLayoutEffect, useState, useContext } from 'react';\nimport type { FC } from 'react';\n\nimport {\n Flex,\n Grid,\n Icon,\n registerIcon,\n Text,\n TabPanel,\n useBreakpoint,\n useScrollStick,\n useElement,\n Card,\n Drawer,\n useI18n,\n useDirection,\n useAfterInitialEffect,\n windowIsAvailable,\n focusHeadingOrContainer,\n useConfiguration,\n useRefMap,\n useTestIds,\n withTestIds,\n AppShellContext,\n useConsolidatedRef,\n Tabs,\n CardHeader,\n useTheme,\n usePrevious\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps, Tab } from '@pega/cosmos-react-core';\nimport type { ScrollStickOptions } from '@pega/cosmos-react-core/lib/hooks/useScrollStick';\nimport * as moveRightSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/move-right-solid.icon';\nimport * as moveLeftSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/move-left-solid.icon';\nimport * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport * as arrowMicroRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-micro-right.icon';\nimport * as arrowMicroLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-micro-left.icon';\nimport * as dockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/dock.icon';\nimport * as unDockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/undock.icon';\n\nimport GenAICoach from '../GenAICoach';\nimport type { State } from '../GenAICoach/GenAICoach.types';\n\nimport CaseSummary from './CaseSummary';\nimport UtilitiesSummary from './UtilitiesSummary';\nimport {\n StyledCaseDrawer,\n StyledCaseDrawerContent,\n StyledCaseView,\n StyledWorkArea,\n StyledPersistentUtility,\n StyledPersistentContainer,\n StyledSummary,\n StyledSummaryTabContent,\n StyledUtilities,\n StyledExpandCollapseUtilitiesButton,\n StyledUtilitiesHeading,\n StyledCoachButton,\n StyledUtilitiesWrapper,\n StyledPersistentContent,\n StyledSummaryHeading,\n StyledTasks,\n StyledTabPanelWrapper,\n StyledBannersStagesTasksContainer\n} from './CaseView.styles';\nimport type { CaseViewContextValue, CaseViewProps } from './CaseView.types';\nimport CaseViewContext from './CaseView.context';\nimport CaseSummaryFields from './CaseSummaryFields';\nimport { getCaseViewTestIds } from './CaseView.test-ids';\nimport UtilitySummaryItemDialog from './UtilitySummaryItemDialog';\n\nregisterIcon(\n moveRightSolidIcon,\n moveLeftSolidIcon,\n polarisSolidIcon,\n arrowMicroRightIcon,\n arrowMicroLeftIcon,\n dockIcon,\n unDockIcon\n);\n\n// This function is responsible for auto sizing table height in case tab panels.\nconst resizeTable = (tabPanelEl: HTMLDivElement, workAreaEl: HTMLDivElement) => {\n tabPanelEl.style.removeProperty('--content-height-in-view');\n\n // .rs-wrapper is currently the class used by the table component which needs to be targeted.\n const tables = Array.from(tabPanelEl.querySelectorAll('.rs-wrapper')).filter(\n table => table.getBoundingClientRect().width !== 0\n );\n\n // Only perform this logic when there is a single table in a tab's panel.\n if (tables.length !== 1) return;\n\n // This selector finds the table's root element as they are always wrapped in a Card.\n const table = tables[0].closest('article');\n\n if (!table) return;\n\n const tabPanelRect = tabPanelEl.getBoundingClientRect();\n const tableRect = table.getBoundingClientRect();\n const vpHeight = document.documentElement.clientHeight;\n const tableRectOffsetTop = tableRect.top + window.scrollY;\n const workAreaPaddingBlockEnd =\n // px unit are required for proper CSS calc calculation.\n window.getComputedStyle(workAreaEl).getPropertyValue('padding-block-end') || '0px';\n\n // Accounts for content rendered after the table.\n const tableBottomToTabPanelBottom = tabPanelRect.bottom - tableRect.bottom;\n\n // Sets a CSS variable for available height based on screen size and view state.\n // Defines an available minimum height of ~600px.\n tabPanelEl.style.setProperty(\n '--content-height-in-view',\n `max(calc(${\n vpHeight - tableRectOffsetTop - tableBottomToTabPanelBottom\n }px - ${workAreaPaddingBlockEnd}), 37.5rem)`\n );\n};\n\nconst CaseView: FC<CaseViewProps & ForwardProps> = ({\n testId,\n\n // Case data mostly visually related to the case header\n caseId,\n heading,\n subheading,\n caseType,\n caseLink,\n parentCases,\n icon,\n color,\n followed,\n onFollowedChange,\n onEdit,\n actions,\n promotedActions,\n\n // Summary content and state props\n summaryFields,\n summaryExpanded: summaryExpandedProp = true,\n onToggleSummary,\n\n // Case tabs\n tabs: { currentTabId, items: tabItemsProp, onClick: onTabClick },\n\n // Workarea related content props\n banners,\n stages,\n tasks,\n tabContent: tabContentProp = [],\n\n // Utilities content and state props\n utilities,\n utilitiesSummaryItems,\n utilitiesExpanded: utilitiesExpandedProp = true,\n onToggleUtilities,\n\n // Etc...\n persistentUtility,\n intelligentGuidance,\n isPreview = false,\n // Gen AI coach props\n genAICoachProps,\n collaboration,\n ...restProps\n}: CaseViewProps) => {\n const testIds = useTestIds(testId, getCaseViewTestIds);\n\n // General util hooks\n const t = useI18n();\n const theme = useTheme();\n const { previewActive } = useContext(AppShellContext);\n const { start, end } = useDirection();\n const { loadedRef } = useConfiguration();\n\n // Element refs\n const [caseViewEl, setCaseViewEl] = useElement<HTMLDivElement>();\n const caseViewRef = useConsolidatedRef(setCaseViewEl);\n const summaryRef = useRef<HTMLDivElement>(null);\n // undefined used to allow ref to be mutable. Element set below in ref callback for scroll stick.\n const workAreaRef = useRef<HTMLDivElement | undefined>();\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const persistentUtilityButtonRef = useRef<HTMLButtonElement>(null);\n const isToggleButtonFocused = useRef(false);\n const isPersistentUtilityButtonFocused = useRef(false);\n const tabsRef = useRef<HTMLElement>(null);\n // Tab content\n const [tabContentEl, setTabContentEl] = useElement<HTMLElement>(null);\n // Gen AI coach state\n const genAICoachButtonRef = useRef<HTMLButtonElement>(null);\n const [showCoach, setShowCoach] = useState(false);\n const [genAIState, setGenAIState] = useState<State>('minimized');\n\n // Breakpoint booleans\n const smOrAbove = useBreakpoint('sm');\n const mdOrAbove = useBreakpoint('md', { breakpointRef: caseViewRef });\n const lgOrAbove = useBreakpoint('lg', { breakpointRef: caseViewRef });\n const xlOrAbove = useBreakpoint('xl', { breakpointRef: caseViewRef });\n\n // DOM ids\n const initialTabId = tabItemsProp[0]?.id;\n const summaryTabId = `summary-${caseId}`;\n const utilitiesTabId = `utilities-${caseId}`;\n const persistentUtilityTabId = `persistent-utility-${caseId}`;\n const genAICoachTabId = `gen-ai-coach-${caseId}`;\n\n // Summary state handling\n let summaryExpanded = !isPreview && !!summaryExpandedProp;\n\n const [summaryHeightPx, setSummaryHeightPx] = useState(0);\n const prevSummaryHeightPx = usePrevious(summaryHeightPx);\n\n if (persistentUtility) {\n summaryExpanded = xlOrAbove;\n }\n\n const [persistentUtilityExpanded, setPersistentUtilityExpanded] = useState(false);\n\n // Focus heading on initial mount\n useEffect(() => {\n if (!caseViewRef.current) return;\n\n if (loadedRef.current) {\n focusHeadingOrContainer(\n caseViewRef.current,\n typeof heading === 'string' ? heading : heading.text\n );\n } else {\n loadedRef.current = true;\n }\n }, [caseId]);\n\n // Utilities state handling\n\n // Used in coordination with a layoutEffect below to determine the utilities state on initial render.\n // Attempted with a ref but it did not work. Using state and enforcing a render in addition to the change render for lgOrAbove seems to fix...\n const [obeyUtilitiesExpandedProp, setObeyUtilitiesExpandedProp] = useState(lgOrAbove);\n\n // Allow the utilitiesExpandedProp to drive the utilities' state after the initial render\n useLayoutEffect(() => {\n if (lgOrAbove) setObeyUtilitiesExpandedProp(true);\n }, [lgOrAbove]);\n\n // Tracks whether a resize forced the onToggleUtilities to close the utilities when it's a drawer\n const utilitiesToggledByResize = useRef(false);\n\n // FIXME: Necessary to avoid utilitiesAndGenAI being mounted for a single render frame ⬇\n // only to be unmounted the next frame. This occurs with the utilities drawer in either direction.\n // Augments what obeyUtilitiesExpandedProp is already doing but we can not set that state ⬇\n // fast enough prior to the render. A larger refactor of state to a reducer could clean some of this up. Yuck.\n const previousLgOrAbove = usePrevious(lgOrAbove);\n const previousMdOrAbove = usePrevious(mdOrAbove);\n const justWentFromLGtoMD = previousLgOrAbove === true && lgOrAbove === false;\n const justWentFromSMtoMD = previousMdOrAbove === false && mdOrAbove === true;\n\n // If the initial render is within the MD size, where the utility drawer renders, it must begin collapsed. In CasePreview utilities should always remain collapsed.\n const utilitiesExpanded =\n !isPreview && obeyUtilitiesExpandedProp && !justWentFromLGtoMD && !justWentFromSMtoMD\n ? utilitiesExpandedProp\n : false;\n\n // Handles utilities state based on breakpoint changes.\n useAfterInitialEffect(() => {\n // If we change into the MD breakpoint range and the utilities state is expanded call the toggle prop to collapse it with controlled state\n if (mdOrAbove && !lgOrAbove && utilitiesExpandedProp) {\n onToggleUtilities?.();\n utilitiesToggledByResize.current = true;\n }\n\n if (lgOrAbove) {\n if (utilitiesToggledByResize.current && !utilitiesExpandedProp) {\n onToggleUtilities?.();\n }\n\n utilitiesToggledByResize.current = false;\n }\n // Purposely not listing utilitiesExpanded as a dependency as it is not a trigger and will be captured when BPs change\n }, [mdOrAbove, lgOrAbove]);\n\n // Handles focus of toggle button when toggled in drawer mode and when browser is resized\n useEffect(() => {\n if (isToggleButtonFocused.current) {\n toggleButtonRef.current?.focus();\n }\n\n if (!toggleButtonRef.current) {\n // Toggle button is not on DOM.\n isToggleButtonFocused.current = false;\n }\n }, [utilitiesExpanded, mdOrAbove, lgOrAbove]);\n\n useEffect(() => {\n if (isPersistentUtilityButtonFocused.current) {\n persistentUtilityButtonRef.current?.focus();\n }\n\n if (!persistentUtilityButtonRef.current) {\n isPersistentUtilityButtonFocused.current = false;\n }\n }, [persistentUtilityExpanded, mdOrAbove, lgOrAbove]);\n\n // Prepare tabs\n const [tabItems, tabContent] = useMemo(() => {\n const summaryTab = { id: summaryTabId, name: t('summary') };\n const summaryTabContent = {\n id: summaryTabId,\n content: (\n <Card>\n <StyledSummaryTabContent>\n <StyledSummaryHeading variant='h2'>{summaryTab.name}</StyledSummaryHeading>\n <CaseSummaryFields {...summaryFields} />\n </StyledSummaryTabContent>\n </Card>\n )\n };\n\n let items = tabItemsProp;\n let content = tabContentProp;\n\n if (mdOrAbove && !isPreview) {\n if (!summaryExpanded || (persistentUtility && !xlOrAbove)) {\n items = [summaryTab, ...tabItemsProp];\n content = [summaryTabContent, ...tabContentProp];\n }\n\n return [items, content];\n }\n\n const utilityTabsItems = [];\n const utilityTabsContent = [];\n\n if (utilities) {\n utilityTabsItems.push({ id: utilitiesTabId, name: t('utilities') });\n utilityTabsContent.push({\n id: utilitiesTabId,\n content: <Flex container={{ direction: 'column', gap: 2 }}>{utilities}</Flex>\n });\n }\n\n if (persistentUtility) {\n utilityTabsItems.push({ id: persistentUtilityTabId, name: persistentUtility.title });\n utilityTabsContent.push({ id: persistentUtilityTabId, content: persistentUtility?.content });\n }\n\n items = [summaryTab, ...tabItemsProp, ...utilityTabsItems];\n content = [summaryTabContent, ...tabContentProp, ...utilityTabsContent];\n\n if (genAICoachProps) {\n const genAICoachTabItem: Tab = { id: genAICoachTabId, name: t('chat_with_ai') };\n items.push(genAICoachTabItem);\n content.push({\n id: genAICoachTabId,\n content: <GenAICoach {...genAICoachProps} variant={{ placement: 'fullpage' }} />\n });\n }\n\n return [items, content];\n }, [\n tabItemsProp,\n summaryTabId,\n mdOrAbove,\n summaryExpanded,\n persistentUtility,\n xlOrAbove,\n tabContentProp,\n utilities,\n utilitiesTabId,\n persistentUtilityTabId\n ]);\n\n // Grid layout props\n let caseViewGridContainer = {\n cols: 'minmax(0, 1fr)',\n colGap: 0,\n rows: 'minmax(0, max-content) auto',\n areas: `\n \"summary\"\n \"work-area\"\n `\n };\n\n const sharedGridProps = {\n colGap: 2,\n rows: caseViewGridContainer.rows\n };\n\n if (persistentUtility) {\n if (xlOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: persistentUtilityExpanded\n ? 'minmax(0, max-content) repeat(2, minmax(0, 1fr)) minmax(0, max-content)'\n : 'minmax(0, max-content) minmax(0, 1fr) repeat(2, minmax(0, max-content))',\n\n areas: '\"summary work-area persistentUtility utilities\"'\n };\n } else if (mdOrAbove) {\n if (persistentUtilityExpanded) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'repeat(2, minmax(0, 1fr)) minmax(0, max-content)', // Work-area and PersistentUtility take equal space\n areas: `\n \"summary summary summary\"\n \"work-area persistentUtility utilities\"\n `\n };\n } else {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, 1fr) repeat(2, minmax(0, max-content))',\n areas: `\n \"summary summary summary\"\n \"work-area persistentUtility utilities\"\n `\n };\n }\n }\n } else if (summaryExpanded) {\n if (mdOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, max-content) minmax(0, 1fr) minmax(0, max-content)',\n areas: '\"summary work-area utilities\"'\n };\n }\n } else if (mdOrAbove) {\n caseViewGridContainer = {\n ...sharedGridProps,\n cols: 'minmax(0, 1fr) minmax(0, max-content)',\n areas: `\n \"summary summary\"\n \"work-area utilities\"\n `\n };\n }\n // Apply sticky columns\n const scrollStickOptions = useRef<ScrollStickOptions>({\n elements: [null, null]\n });\n\n const stickOffset = useMemo(() => {\n if (!windowIsAvailable || !caseViewEl) return 0;\n\n const styles = window.getComputedStyle(caseViewEl);\n const rootStyles = getComputedStyle(document.documentElement);\n const stickyOffsetRaw = parseFloat(styles.getPropertyValue('--appshell-sticky-offset'));\n const topOffsetRaw = parseFloat(rootStyles.getPropertyValue('--appshell-top-offset'));\n const appshellOffset =\n (!Number.isNaN(stickyOffsetRaw) && stickyOffsetRaw >= 0\n ? stickyOffsetRaw\n : parseFloat(styles.getPropertyValue('--appshell-offset')) || 0) +\n (!Number.isNaN(topOffsetRaw) ? topOffsetRaw : 0);\n\n const spacingStr = theme.base.spacing;\n const spacingPx = parseFloat(spacingStr) * parseFloat(rootStyles.fontSize);\n\n return appshellOffset + summaryHeightPx + 2 * spacingPx;\n }, [caseViewEl, summaryHeightPx, theme.base.spacing]);\n\n useScrollStick(\n // isMediumOrAbove means side by side columns | | |\n mdOrAbove ? { ...scrollStickOptions.current, offset: stickOffset } : undefined\n );\n\n // Preview set summary tab active\n useEffect(() => {\n if (isPreview) {\n onTabClick(summaryTabId);\n }\n }, []);\n\n // Initial tab selection\n useEffect(() => {\n if (\n mdOrAbove &&\n summaryExpanded &&\n !persistentUtility &&\n (currentTabId === summaryTabId || currentTabId === utilitiesTabId)\n ) {\n onTabClick(tabItemsProp[0]?.id);\n }\n // Toggle utilities tab selection\n if (mdOrAbove && [utilitiesTabId, persistentUtilityTabId].includes(currentTabId)) {\n onTabClick(initialTabId);\n }\n }, [mdOrAbove]);\n\n // Initial / summary tab selection\n useEffect(() => {\n if (!smOrAbove && currentTabId === initialTabId) {\n onTabClick(summaryTabId);\n } else if (smOrAbove && currentTabId === summaryTabId) {\n onTabClick(initialTabId);\n }\n }, [smOrAbove]);\n\n // Summary tab selection\n useEffect(() => {\n if (isPreview) {\n onTabClick(summaryTabId);\n }\n }, [isPreview]);\n\n // Initial tab selection\n useEffect(() => {\n if (summaryExpanded && currentTabId === summaryTabId) {\n onTabClick(initialTabId);\n }\n }, [summaryExpanded]);\n\n // Handles scrolling to tab content for newly clicked tab\n useEffect(() => {\n if (!tabContentEl) return;\n const scrollPos = window.scrollY;\n const windowHeight = document.documentElement.clientHeight;\n const bottomPos = scrollPos + windowHeight * 0.8;\n const tabContentPos = tabContentEl.offsetTop;\n if (tabContentPos > bottomPos) {\n const top = tabContentPos - windowHeight * 0.2;\n window.scrollTo({ top, behavior: 'smooth' });\n }\n }, [currentTabId]);\n\n // We need a css variable for the height of the case summary when it is collapsed into a header like layout\n useLayoutEffect(() => {\n const rafId = requestAnimationFrame(() => {\n if (!caseViewRef.current || !summaryRef.current) return;\n\n const newHeight = summaryExpanded ? 0 : summaryRef.current.offsetHeight;\n caseViewRef.current.style.setProperty('--summary-height', `${newHeight}px`);\n setSummaryHeightPx(newHeight);\n });\n\n return () => cancelAnimationFrame(rafId);\n }, [summaryExpanded, collaboration, prevSummaryHeightPx]);\n\n const utilitiesAndGenAI = (\n <>\n <Flex as={StyledUtilitiesWrapper} container={{ gap: 2, direction: 'column' }}>\n {utilities}\n </Flex>\n {genAICoachProps && (\n <GenAICoach\n {...genAICoachProps}\n variant={{\n placement: 'utilities',\n state: genAIState,\n onStateChange: (state: State) => {\n genAICoachProps.onStateChange?.(state);\n setGenAIState(state);\n }\n }}\n />\n )}\n </>\n );\n\n // CaseView context value\n // Choosing not to memo for now due to extent of deps and how often they change. Optimize as needed.\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const ctxValue: CaseViewContextValue = {\n testIds,\n caseId,\n heading,\n subheading,\n caseType,\n caseLink,\n parentCases,\n icon,\n color,\n followed,\n onFollowedChange,\n actions,\n promotedActions,\n onEdit,\n summaryFields,\n tabs: {\n items: tabItems,\n onClick: onTabClick,\n currentTabId\n },\n stages,\n tasks,\n persistentUtility,\n intelligentGuidance,\n collaboration,\n summaryExpanded,\n utilitiesExpanded,\n onToggleSummary,\n isPreview,\n hasGenAICoach: !!genAICoachProps,\n aboveSM: smOrAbove,\n aboveMD: mdOrAbove,\n aboveLG: lgOrAbove,\n aboveXL: xlOrAbove\n };\n\n const [tabPanelEls, getTabPanelCbRef] = useRefMap<HTMLDivElement>();\n\n // The following effects are dedicated to resizeTable handling.\n useLayoutEffect(() => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n const currentTabPanelEl = tabPanelEls.get(currentTabId)!;\n const workAreaEl = workAreaRef.current;\n\n resizeTable(currentTabPanelEl, workAreaEl);\n\n const onTabChange = () => {\n resizeTable(currentTabPanelEl, workAreaEl);\n };\n\n // TODO: optimize\n const mo = new MutationObserver(() => {\n resizeTable(currentTabPanelEl, workAreaEl);\n });\n\n mo.observe(currentTabPanelEl, { childList: true, subtree: true });\n\n currentTabPanelEl.addEventListener('cosmos-tab-changed', onTabChange);\n\n return () => {\n mo.disconnect();\n currentTabPanelEl.removeEventListener('cosmos-tab-changed', onTabChange);\n };\n });\n\n const [bannersStagesTasksEl, setBannersStagesTasksEl] = useElement<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!bannersStagesTasksEl) return;\n\n const observer = new ResizeObserver(() => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n resizeTable(tabPanelEls.get(currentTabId)!, workAreaRef.current);\n });\n\n observer.observe(bannersStagesTasksEl);\n\n return () => {\n observer.disconnect();\n };\n }, [bannersStagesTasksEl, currentTabId]);\n\n useEffect(() => {\n const onResize = () => {\n if (!tabPanelEls.has(currentTabId) || !workAreaRef.current) return;\n\n resizeTable(tabPanelEls.get(currentTabId)!, workAreaRef.current);\n };\n\n window.addEventListener('resize', onResize);\n\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, [currentTabId]);\n\n const utilitiesHeading = (\n <StyledUtilitiesHeading variant='h2'>{t('utilities')}</StyledUtilitiesHeading>\n );\n\n const utilitiesToggleButton = !isPreview && (\n <StyledExpandCollapseUtilitiesButton\n compact\n icon\n label={t(utilitiesExpanded ? 'collapse' : 'expand')}\n aria-label={t(utilitiesExpanded ? 'collapse_utilities_panel' : 'expand_utilities_panel')}\n onClick={() => {\n if (!obeyUtilitiesExpandedProp && utilitiesExpandedProp) {\n setObeyUtilitiesExpandedProp(true);\n } else {\n onToggleUtilities?.();\n }\n }}\n onFocus={() => {\n isToggleButtonFocused.current = true;\n }}\n onBlur={() => {\n isToggleButtonFocused.current = false;\n }}\n ref={toggleButtonRef}\n >\n <Icon name={utilitiesExpanded ? `arrow-micro-${end}` : `arrow-micro-${start}`} />\n </StyledExpandCollapseUtilitiesButton>\n );\n\n const persistentUtilityToggleButton = persistentUtility && (\n <StyledExpandCollapseUtilitiesButton\n compact\n icon\n label={t(persistentUtilityExpanded ? 'collapse' : 'expand')}\n aria-label={t(persistentUtilityExpanded ? 'collapse_noun' : 'expand_noun', [\n persistentUtility.title\n ])}\n onClick={() => {\n setPersistentUtilityExpanded(prevState => !prevState);\n if (utilitiesExpanded) {\n onToggleUtilities?.();\n }\n }}\n onFocus={() => {\n isPersistentUtilityButtonFocused.current = true;\n }}\n onBlur={() => {\n isPersistentUtilityButtonFocused.current = false;\n }}\n ref={persistentUtilityButtonRef}\n >\n <Icon name={persistentUtilityExpanded ? 'dock' : 'undock'} />\n </StyledExpandCollapseUtilitiesButton>\n );\n\n const shouldRenderMobileTabs =\n !mdOrAbove || (persistentUtility && !xlOrAbove) || !summaryExpanded;\n // Here we go...\n return (\n <>\n <CaseViewContext.Provider value={ctxValue}>\n {/* Root element */}\n <Grid\n data-testid={testIds.root}\n {...restProps}\n as={StyledCaseView}\n ref={caseViewRef}\n container={caseViewGridContainer}\n item={{ area: 'case-view' }}\n >\n {/* Summary */}\n <Grid\n as={StyledSummary}\n item={{ area: 'summary' }}\n desktop={mdOrAbove && (!persistentUtility || xlOrAbove) && !summaryExpanded}\n isLargeOrAbove={lgOrAbove}\n ref={summaryRef}\n >\n <CaseSummary tabsRef={tabsRef} />\n </Grid>\n\n {/* Work area */}\n <Flex\n container={{\n direction: 'column',\n alignContent: 'start',\n rowGap: 2\n }}\n as={StyledWorkArea}\n persistentUtility={Boolean(persistentUtility)}\n ref={(el: HTMLDivElement) => {\n workAreaRef.current = el;\n scrollStickOptions.current.elements[0] = el;\n }}\n data-app-region\n aria-label={t('case_work_area')}\n >\n {(banners || stages || tasks) && (\n <Flex\n container={{\n direction: 'column',\n alignContent: 'start',\n rowGap: 2\n }}\n as={StyledBannersStagesTasksContainer}\n ref={setBannersStagesTasksEl}\n >\n {banners && <div data-testid={testIds.banners}>{banners}</div>}\n {stages && <div data-testid={testIds.stages}>{stages}</div>}\n {tasks && (\n <StyledTasks\n onFocus={e => {\n if (e.target?.matches('[data-focusable-form-heading]')) {\n window.scrollTo({\n top: 0,\n behavior: 'smooth'\n });\n }\n }}\n data-testid={testIds.tasks}\n >\n {tasks}\n </StyledTasks>\n )}\n </Flex>\n )}\n\n <Flex container={{ direction: 'column', alignContent: 'start' }}>\n {shouldRenderMobileTabs && (\n <Tabs\n data-testid={testIds.tabs}\n tabs={tabItems}\n onTabClick={onTabClick}\n currentTabId={currentTabId}\n aria-label={t(isPreview ? 'case_preview_tabs' : 'case_tabs')}\n ref={tabsRef}\n />\n )}\n\n <StyledTabPanelWrapper ref={setTabContentEl}>\n {tabContent?.map(({ id, content }) => (\n <TabPanel\n data-testid={currentTabId === id ? testIds.tabContent : undefined}\n currentTabId={currentTabId}\n tabId={id}\n key={id}\n ref={getTabPanelCbRef(id)}\n tablistRef={tabsRef}\n tablistType={shouldRenderMobileTabs ? 'horizontal' : 'vertical'}\n >\n {content}\n </TabPanel>\n ))}\n </StyledTabPanelWrapper>\n </Flex>\n </Flex>\n\n {/* Persistent utility column */}\n {persistentUtility && mdOrAbove && (\n <Grid\n as={StyledPersistentUtility}\n item={{ area: 'persistentUtility' }}\n data-app-region\n aria-label={t('utilities_label')}\n persistentUtilityExpanded={persistentUtilityExpanded}\n >\n {persistentUtility.showExpand ? (\n <Flex\n container={{\n direction: 'column',\n gap: persistentUtilityExpanded ? undefined : 2\n }}\n as={StyledPersistentContainer}\n >\n {persistentUtilityExpanded ? (\n <Card as={StyledPersistentContainer}>\n <CardHeader>\n <Text variant='h2'>{persistentUtility.title}</Text>\n {persistentUtilityToggleButton}\n </CardHeader>\n <Flex container={{ direction: 'column' }} as={StyledPersistentContent}>\n {persistentUtility.content}\n </Flex>\n </Card>\n ) : (\n <>\n <Flex\n container={{\n justify: 'between',\n alignItems: 'center',\n pad: [undefined, 0.5, undefined, undefined]\n }}\n >\n <Text variant='h2'>{persistentUtility.title}</Text>\n {persistentUtilityToggleButton}\n </Flex>\n <Flex container={{ direction: 'column' }} as={StyledPersistentContent}>\n {persistentUtility.content}\n </Flex>\n </>\n )}\n </Flex>\n ) : (\n <>{persistentUtility.content}</>\n )}\n </Grid>\n )}\n\n {/* Utility drawer */}\n {(utilities || genAICoachProps) && mdOrAbove && !lgOrAbove && utilitiesExpanded && (\n <Drawer\n as={StyledCaseDrawer}\n open={utilitiesExpanded}\n previewActive={previewActive}\n position='fixed'\n placement={end}\n shadow\n nullWhenClosed\n utilitiesExpanded={!!utilitiesExpanded}\n hasPersistentUtility={!!persistentUtility}\n >\n <Flex\n as={StyledCaseDrawerContent}\n container={{ direction: 'column', gap: 2 }}\n data-app-region\n aria-label={t('utilities_label')}\n >\n <Flex container={{ alignItems: 'center', justify: 'between' }}>\n {utilitiesHeading}\n {utilitiesToggleButton}\n </Flex>\n {utilitiesAndGenAI}\n </Flex>\n </Drawer>\n )}\n\n {/* Utilities */}\n {(utilities || genAICoachProps) && mdOrAbove && !isPreview && (\n <Grid\n data-testid={testIds.utilities}\n ref={(el: HTMLDivElement) => {\n scrollStickOptions.current.elements[1] = el;\n }}\n as={StyledUtilities}\n container={{\n cols: 'minmax(0, 1fr)',\n rowGap: 2\n }}\n item={{\n area: 'utilities'\n }}\n data-app-region={lgOrAbove || !utilitiesExpanded || undefined}\n aria-label={t('utilities_label')}\n >\n <Flex\n container={{\n alignItems: 'center',\n justify: utilitiesExpanded ? 'between' : 'center'\n }}\n >\n {utilitiesHeading}\n {!lgOrAbove && utilitiesExpanded ? null : utilitiesToggleButton}\n </Flex>\n\n {utilitiesExpanded && lgOrAbove && utilitiesAndGenAI}\n\n {(!utilitiesExpanded || (mdOrAbove && !lgOrAbove)) && (\n <>\n {utilitiesSummaryItems && utilitiesSummaryItems.length > 0 && (\n <UtilitiesSummary\n items={utilitiesSummaryItems}\n isExpanded={utilitiesExpanded}\n />\n )}\n\n {genAICoachProps && (\n <StyledCoachButton\n iconOnly\n variant='primary'\n ref={genAICoachButtonRef}\n onClick={() => setShowCoach(cur => !cur)}\n label={t('chat_with_ai')}\n />\n )}\n </>\n )}\n </Grid>\n )}\n {genAICoachButtonRef.current && genAICoachProps && showCoach && (\n <UtilitySummaryItemDialog\n name={t('chat_with_ai')}\n target={genAICoachButtonRef.current}\n onDismiss={() => setShowCoach(false)}\n >\n <GenAICoach\n {...genAICoachProps}\n variant={{\n placement: 'dialog',\n onClose: () => {\n genAICoachProps.onClose?.();\n setShowCoach(false);\n genAICoachButtonRef.current?.focus();\n }\n }}\n />\n </UtilitySummaryItemDialog>\n )}\n </Grid>\n </CaseViewContext.Provider>\n {intelligentGuidance}\n </>\n );\n};\n\nexport default withTestIds(CaseView, getCaseViewTestIds);\n"]}
|
|
@@ -761,7 +761,7 @@ StyledUtilities.defaultProps = defaultThemeProp;
|
|
|
761
761
|
export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints, 'z-index': zIndex, palette: { 'app-background': appBackground } }, components: { 'app-shell': { nav: { background: navBackground } }, 'case-view': { summary: { detached: summaryDetached }, utilities: { detached: utilitiesDetached } } } } }) => {
|
|
762
762
|
const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } = useCaseViewContext();
|
|
763
763
|
const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;
|
|
764
|
-
const inlineStartPadding = navBackground === appBackground ? `${spacing}` : `calc(${spacing} * 2)`;
|
|
764
|
+
const inlineStartPadding = navBackground === appBackground && summaryExpanded ? `${spacing}` : `calc(${spacing} * 2)`;
|
|
765
765
|
return css `
|
|
766
766
|
top: ${summaryExpanded
|
|
767
767
|
? 'var(--top-offset)'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.styles.js","sourceRoot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GACzB,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,WAAW;QAC9C,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,iBAAiB,CAAC;IACvD,MAAM,qBAAqB,GACzB,qBAAqB,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhG,OAAO,GAAG,CAAA;oBACQ,qBAAqB,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;;;;;MAKzE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,MAAM;QACrD,GAAG,CAAA;eACQ,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK;KAClD;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM;QAC1D,GAAG,CAAA;oBACa,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU;KAC5D;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM;QAC1D,qBAAqB;QACrB,qBAAqB;QACrB,GAAG,CAAA;oBACa,qBAAqB;KACpC;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,MAAM;QAC7D,GAAG,CAAA;oBACa,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;KAC/D;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport {\n getContrast,\n hideVisually,\n meetsContrastGuidelines,\n mix,\n rgba,\n transparentize\n} from 'polished';\nimport { useContext } from 'react';\n\nimport {\n Button,\n calculateFontSize,\n CardContent,\n defaultThemeProp,\n resolveSupplementalColor,\n StyledBreadcrumbs,\n StyledButtonLink,\n StyledFieldValue,\n StyledInlineFieldValueRow,\n StyledStackedFieldValue,\n StyledIcon,\n StyledLabel,\n StyledPopover,\n StyledText,\n StyledTooltip,\n tryCatch,\n FieldValueList,\n StyledLink,\n readableHue,\n StyledCard,\n Text,\n readableColor,\n AppShellContext,\n AIButton,\n StyledButton,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n isSolidColor,\n StyledSummaryListItem,\n StyledProgressBackdrop,\n Image,\n Icon,\n animations,\n useDirection\n} from '@pega/cosmos-react-core';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\nimport type { AppShellContextValue } from '@pega/cosmos-react-core/lib/components/AppShell/AppShellContext';\nimport { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport {\n StyledAllTabsWrapper,\n StyledTabs,\n StylesAllTabsButtonWrapper\n} from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport {\n resizeDrawerMinWidth,\n resizeDrawerMaxWidth,\n resizeDrawerDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nimport { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';\nimport { StyledAssignments } from '../Assignments/Assignments.styles';\nimport { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';\nimport {\n StyledGenAICoachContainer,\n StyledInitialMessageContainer\n} from '../GenAICoach/GenAICoach.styles';\nimport { StyledTaskList } from '../Tasks/TaskList';\nimport { oneColumnDetailsColumnWidth } from '../Details/Details.styles';\n\nimport { useCaseViewContext } from './CaseView.context';\n\nconst labelWidth = '16ch';\nconst inlineEndButtonOffset = '0.375rem';\n\nexport const resolveCaseTypeColor = (theme: DefaultTheme, color: string): string => {\n const supplementalColor = resolveSupplementalColor(theme, color);\n if (supplementalColor !== undefined) return supplementalColor;\n return color;\n};\n\nconst mixCaseColorWithBackground = (color: string, background: string) =>\n mix(0.85, background, color);\n\nconst getCaseTypeHeaderColors = (\n theme: DefaultTheme,\n color: string | undefined\n): { caseTypeColor: string; headerBackground: string } | null => {\n if (color === undefined) return null;\n const resolvedCaseTypeColor = resolveCaseTypeColor(theme, color);\n if (theme.base['case-type-colors'] !== 'header-and-icon') {\n return null;\n }\n const headerBackground = isSolidColor(theme.components.card.background)\n ? mixCaseColorWithBackground(resolvedCaseTypeColor, theme.components.card.background)\n : theme.components.card.background;\n return { caseTypeColor: resolvedCaseTypeColor, headerBackground };\n};\n\nexport const StyledSummaryPrimaryList = styled(FieldValueList)<{\n wrapped?: boolean;\n}>(({ theme, wrapped }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const detached = theme.components['field-value-list'].inline.detached;\n\n return css`\n ${wrapped\n ? css`\n grid-template-columns: minmax(0, 1fr);\n `\n : css`\n ${detached &&\n css`\n gap: calc(${theme.base.spacing});\n `}\n grid-template-columns: ${labelWidth} auto;\n `}\n ${StyledFieldValue} {\n font-size: ${fontSizes[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n\n > ${StyledButtonLink} {\n font-weight: inherit;\n }\n }\n `;\n});\n\nStyledSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledSummarySecondaryList = styled(FieldValueList)(() => {\n return css`\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `;\n});\n\nexport const StyledCaseSummaryFields = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n }\n }\n } = theme;\n\n return (\n detached &&\n css`\n ${StyledSummaryPrimaryList} {\n padding-block-start: calc(${theme.components.card.padding} * 2);\n padding-inline: calc(${theme.components.card.padding} * 2);\n }\n\n ${StyledSummarySecondaryList} {\n padding: calc(${theme.components.card.padding} * 2);\n }\n `\n );\n});\n\nStyledCaseSummaryFields.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryTabContent = styled(CardContent)(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n return css`\n ${StyledSummarySecondaryList} {\n > ${StyledStackedFieldValue} {\n max-width: ${oneColumnDetailsColumnWidth};\n }\n\n > ${StyledFieldValue}, > ${StyledInlineFieldValueRow} > ${StyledFieldValue} {\n max-width: calc(${oneColumnDetailsColumnWidth} - ${labelWidth} - 2 * ${spacing});\n }\n }\n `;\n});\n\nStyledSummaryTabContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryHeading = styled(Text)(({ theme }) => {\n return css`\n margin-block-end: ${theme.base.spacing};\n `;\n});\n\nStyledSummaryHeading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewImage = styled(Image)`\n max-height: 100%;\n`;\n\nexport const StyledCaseHeader = styled.div(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': caseHeaderForegroundColor, background },\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n },\n base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette }\n } = theme;\n const { aboveSM, aboveMD, color, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const caseHeaderBorderRadius = shouldRenderMobileTabs\n ? `0 0 ${utilitiesDetached ? borderRadius : 0} ${borderRadius}`\n : `${borderRadius} ${borderRadius} 0 0`;\n\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, color);\n const headerBackgroundColor = caseTypeHeaderColors?.headerBackground ?? background;\n\n const foregroundColor = caseTypeHeaderColors\n ? readableColor(headerBackgroundColor)\n : calculateForegroundColor(headerBackgroundColor, caseHeaderForegroundColor);\n\n return css`\n background: ${headerBackgroundColor};\n color: ${foregroundColor};\n padding: ${spacing} calc(2 * ${spacing});\n position: relative;\n\n ${summaryDetached &&\n css`\n border-bottom: 0.0625rem solid ${palette['border-line']};\n `}\n ${summaryDetached &&\n !isPreview &&\n aboveSM &&\n css`\n border-radius: ${caseHeaderBorderRadius};\n `}\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${shadow.focus};\n }\n\n ${StyledMenu} {\n color: ${palette['foreground-color']};\n z-index: ${zIndex.popover + 1};\n }\n `;\n});\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledFollowIconWrap = styled.label`\n font-size: 1.25rem;\n\n input {\n ${hideVisually}\n }\n\n input:focus + svg {\n box-shadow: ${({ theme }) => theme.base.shadow.focus};\n }\n`;\n\nStyledFollowIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledSubheading = styled.p``;\n\nStyledSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { background, 'foreground-color': foregroundColor }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? background;\n const textColor = calculateForegroundColor(headerBg, foregroundColor);\n\n const isGradientBackground = !isSolidColor(headerBg);\n const backgroundColor = isGradientBackground ? readableColor(textColor) : headerBg;\n const interactiveUsable = getContrast(backgroundColor, interactive) >= 4.5;\n const color = !isGradientBackground && interactiveUsable ? interactive : textColor;\n\n let hoverBackground = rgba(color, 0.15);\n if (!isGradientBackground && interactiveUsable) {\n hoverBackground = readableHue(interactive, color);\n }\n return css`\n --button-background-color: ${backgroundColor};\n color: ${color};\n background-color: transparent;\n border-color: ${color};\n\n @media (hover: hover) {\n &:hover {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n }\n `;\n});\n\nStyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderActions = styled.div<{ offsetEnd: boolean }>(({ offsetEnd, theme }) => {\n return css`\n margin-inline-start: auto;\n padding-block: ${theme.base.spacing};\n padding-inline-start: calc(2 * ${theme.base.spacing});\n\n ${offsetEnd &&\n css`\n padding-inline-end: ${inlineEndButtonOffset};\n `};\n\n ${StyledButton}:not(${StyledCaseHeaderPromotedAction}) {\n margin-inline-start: 0;\n }\n\n ${StyledCaseHeaderPromotedAction}:not(:has(+ ${StyledCaseHeaderPromotedAction})) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledHeaderActions.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderText = styled.hgroup(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background: caseHeaderBackground }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? caseHeaderBackground;\n const color = calculateForegroundColor(headerBg, foregroundColor);\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const idStyle = css`\n color: ${color};\n font-size: ${fontSize.s};\n font-weight: normal;\n `;\n\n return css`\n word-break: break-word;\n\n ${StyledSubheading} {\n ${idStyle}\n }\n\n ${StyledBreadcrumbs} {\n max-width: 100%;\n\n > a,\n > span,\n > button,\n > svg {\n ${idStyle}\n }\n\n > a,\n > button {\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${theme.base.palette['foreground-color']};\n }\n }\n\n > ${StyledText} > ${StyledLink} {\n color: ${color};\n }\n\n + ${StyledHeaderActions} {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledCaseHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryBlock = styled.div<{ hasItems: boolean }>(({ hasItems, theme }) => {\n const {\n base: {\n spacing,\n palette: { 'brand-primary': primary }\n }\n } = theme;\n\n const color = readableColor(primary);\n const transparentColor = tryCatch(() => transparentize(0.5, color));\n\n return css`\n ${hasItems &&\n css`\n border-inline-start: 0.0625rem solid ${transparentColor};\n `}\n ${StyledStackedFieldValue}:first-child {\n margin-inline-start: calc(2 * ${spacing});\n }\n `;\n});\n\nStyledHeaderSummaryBlock.defaultProps = defaultThemeProp;\n\nconst popoverColorReset = (theme: DefaultTheme) => {\n const {\n base: {\n palette: { interactive, light, 'foreground-color': baseForeground }\n }\n } = theme;\n\n return css`\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${baseForeground};\n\n ${StyledButtonLink},\n ${StyledLink} {\n color: ${interactive};\n text-decoration: none;\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow:\n inset 0 0 0 0.0625rem ${light},\n 0 0 0.125rem 0.0625rem ${interactive};\n }\n }\n }\n `;\n};\n\nexport const StyledHeaderSummary = styled.dl(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? background;\n const color = calculateForegroundColor(headerBg, foregroundColor);\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(headerBg, foregroundColor);\n const interactiveUsable = meetsContrastGuidelines(backgroundColor, interactive).AA;\n\n return css`\n max-width: 100%;\n min-width: 0;\n\n > ${StyledStackedFieldValue} {\n > ${StyledLabel} {\n color: ${color};\n white-space: nowrap;\n }\n\n > ${StyledFieldValue} {\n color: ${color};\n white-space: nowrap;\n }\n\n ${StyledButtonLink},\n ${StyledLink} {\n &:focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${color};\n }\n\n ${!interactiveUsable &&\n css`\n color: ${color};\n text-decoration: underline;\n `}\n }\n\n ${popoverColorReset(theme)}\n }\n `;\n});\n\nStyledHeaderSummary.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryValue = styled(StyledFieldValue)<{\n bold?: boolean;\n truncate?: boolean;\n theme: DefaultTheme;\n}>(({ bold, truncate, theme }) => {\n const {\n base: {\n 'content-width': { xs }\n },\n components: {\n text: {\n h1: { 'font-weight': h1Weight }\n }\n }\n } = theme;\n\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n\n ${truncate &&\n css`\n max-width: ${xs};\n `}\n ${bold &&\n css`\n font-weight: ${h1Weight};\n `}\n /*\n * :not([hidden]) necessary to prevent hidden span with preview a11y instructions from\n * factoring into scrollWidth of element when determining truncation.\n */\n > :not([hidden]) {\n display: inline;\n }\n `;\n});\n\nStyledHeaderSummaryValue.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryInfo = styled.div(\n ({\n theme: {\n base: { 'border-radius': borderRadius },\n components: {\n tabs: { detached: tabsDetached },\n card: { background }\n }\n }\n }) => {\n const { intelligentGuidance } = useCaseViewContext();\n\n return css`\n overflow: auto;\n flex: 1;\n ${tabsDetached &&\n css`\n background: ${background};\n border-radius: ${borderRadius};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n `}\n ${intelligentGuidance &&\n css`\n /* Accounts for collapsed intelligentGuidance list covering summary panel content when fully scrolled. */\n padding-block-end: 4rem;\n `}\n `;\n }\n);\n\nStyledCaseSummaryInfo.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryContainer = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n },\n card: { background }\n }\n } = theme;\n return css`\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n\n ${detached &&\n css`\n padding: 0;\n background: ${background};\n `}\n `;\n});\n\nStyledCaseSummaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseButton = styled(Button)(() => {\n return css`\n border: none;\n\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n }\n `;\n});\n\nStyledExpandCollapseButton.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButton)(({ theme }) => {\n const { summaryExpanded } = useCaseViewContext();\n\n return css`\n --half-compact-btn-height: calc(${theme.base['hit-area'].compact} / 2);\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].mouse} - ${theme.base['hit-area'].compact}) / 2\n );\n --half-case-icon-compact-difference: calc(\n ((4 * ${theme.base.spacing}) - ${theme.base['hit-area'].compact}) / 2\n );\n @media (pointer: coarse) {\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].finger} - ${theme.base['hit-area'].compact}) / 2\n );\n }\n position: absolute;\n z-index: 1;\n box-shadow: ${theme.base.shadow.low};\n\n ${summaryExpanded\n ? css`\n inset-block-start: calc(2 * ${theme.base.spacing} + var(--half-btn-compact-difference));\n inset-inline-start: calc(100% - var(--half-compact-btn-height));\n `\n : css`\n inset-block-end: calc(var(--half-compact-btn-height) * -1);\n inset-inline-start: calc(\n 2 * ${theme.base.spacing} + var(--half-case-icon-compact-difference)\n );\n `}\n `;\n});\n\nStyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummary = styled.div(\n ({\n theme,\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine },\n 'border-radius': borderRadius,\n 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin }\n },\n components: {\n 'case-view': {\n summary: { detached }\n },\n card: { background: cardBackground },\n tabs: { detached: tabsDetached }\n }\n }\n }) => {\n const { summaryExpanded, aboveMD, color } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, color);\n\n return css`\n background: ${cardBackground};\n position: relative;\n height: 100%;\n ${aboveMD &&\n summaryExpanded &&\n css`\n width: 25rem;\n `}\n\n ${detached &&\n css`\n border-radius: ${borderRadius};\n --border-radius: calc(${borderRadius} * 0.5);\n `}\n\n ${tabsDetached &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical'] {\n padding-top: calc(1.5 * ${spacing});\n border-block-start: 0.0625rem solid ${borderLine};\n\n & ${StyledTab} {\n height: ${mouseMin};\n\n @media (pointer: coarse) {\n height: ${fingerMin};\n }\n }\n }\n }\n `}\n\n ${caseTypeHeaderColors &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical']::after {\n background: ${caseTypeHeaderColors.caseTypeColor};\n }\n\n &[aria-orientation='vertical']::before {\n background: ${caseTypeHeaderColors.headerBackground};\n }\n }\n\n & ${StyledTab}[aria-selected='true'] {\n background-color: ${caseTypeHeaderColors.headerBackground};\n }\n `}\n `;\n }\n);\n\nStyledCaseSummary.defaultProps = defaultThemeProp;\n\nexport const StyledTasks = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n &:not(:has(${StyledCard})) {\n /* Add negative top margin to compensate extra row-gap due to empty Tasks container */\n margin-block-start: calc(-2 * ${spacing});\n }\n `;\n }\n);\nStyledTasks.defaultProps = defaultThemeProp;\n\nexport const StyledTabPanelWrapper = styled.div(\n ({\n theme: {\n base: {\n animation: { speed, timing }\n },\n components: {\n card: { 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { start } = useDirection();\n\n return css`\n ${StyledTabPanel} {\n ${StyledProgressBackdrop} {\n border-radius: ${cardBorderRadius};\n }\n }\n\n /* Top-level horizontal tabs (with or without overflow \"All tabs\" button) - slide in from top */\n ${StyledTabs} ~ &,\n ${StyledAllTabsWrapper} ~ & {\n position: relative;\n z-index: 0;\n\n > ${StyledTabPanel} {\n --reveal-from: 0.7;\n --slide-in-y-start-offset: -0.8rem;\n animation-name: ${animations.reveal}, ${animations.slideInYStart};\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n }\n\n /* Top-level vertical tabs - slide in from start*/\n &:not(${StyledTabs} ~ &):not(${StyledAllTabsWrapper} ~ &) > ${StyledTabPanel} {\n ${start === 'right'\n ? css`\n --slide-in-x-end-offset: 1.5rem;\n animation-name: ${animations.reveal}, ${animations.slideInXEnd};\n `\n : css`\n --slide-in-x-start-offset: -1.5rem;\n animation-name: ${animations.reveal}, ${animations.slideInXStart};\n `}\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n\n /* Nested tab panels - always fade only */\n ${StyledTabPanel} & ${StyledTabPanel} {\n --reveal-from: 0.7;\n animation-name: ${animations.reveal};\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n `;\n }\n);\n\nStyledTabPanelWrapper.defaultProps = defaultThemeProp;\n\n// This component defintion was primarily required to conditionally hide empty div and avoid unnecessary row gap in work area.\nexport const StyledBannersStagesTasksContainer = styled.div(() => {\n return css`\n &:has(> ${StyledTasks}:only-child > :only-child:empty[data-flow]) {\n display: none;\n }\n `;\n});\n\nexport const StyledWorkArea = styled.div(\n ({\n theme: {\n base: {\n palette: { 'border-line': borderLine },\n spacing,\n 'border-radius': borderRadius,\n breakpoints\n },\n components: {\n 'case-view': {\n assignments: {\n detached: assignmentDetached,\n background: assignmentBackground,\n 'foreground-color': assignmentForegroundColor\n }\n },\n tabs: { detached: tabsDetached },\n card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const foregroundColorForAssignment = calculateForegroundColor(\n assignmentBackground,\n assignmentForegroundColor\n );\n const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();\n let pbeRem = 0;\n\n if (intelligentGuidance) {\n pbeRem = aboveMD && !summaryExpanded ? 4 : 6;\n }\n\n return css`\n grid-area: work-area;\n padding: calc(2 * ${spacing});\n @media (width < ${breakpoints.sm}) {\n padding: calc(2 * ${spacing}) calc(0.75 * ${spacing});\n }\n\n /* Prevents unnecessary gap when case view has neither stages nor assignments */\n &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {\n ${StyledBannersStagesTasksContainer} {\n display: none;\n }\n }\n\n ${aboveMD &&\n css`\n padding: calc(2 * ${spacing}) 0;\n\n /* This is required to make scrollStick work. */\n ${!isPreview &&\n css`\n height: max-content;\n `}\n\n ${!summaryExpanded &&\n css`\n margin-inline-start: calc(2 * ${spacing});\n `}\n `}\n /* Order of style here is necessary for overriding styles above. */\n ${pbeRem > 0 &&\n css`\n /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */\n padding-block-end: ${pbeRem}rem;\n `}\n &:has(${StyledAssignments}),\n &:has(${StyledHierarchicalAssignments}) {\n ${StyledStages} {\n border-block-end: 0.0625rem solid ${borderLine};\n\n &,\n ${StyledStageContainer}:first-of-type > ${StyledStage} {\n border-end-start-radius: 0;\n }\n\n &,\n ${StyledStageContainer}:last-of-type > ${StyledStage} {\n border-end-end-radius: 0;\n }\n }\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n border-start-start-radius: ${cardBorderRadius};\n border-start-end-radius: ${cardBorderRadius};\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n }\n\n ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {\n border-start-start-radius: inherit;\n }\n }\n `}\n\n /* Ensure horizontal tabs stay above sliding tab content */\n ${StyledTabs}[aria-orientation='horizontal'],\n ${StyledAllTabsWrapper} {\n z-index: 1;\n }\n\n &:has(${StyledStages}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n margin-block-start: calc(-2 * ${spacing});\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n }\n\n &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),\n &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n background: ${assignmentBackground};\n color: ${foregroundColorForAssignment};\n ${assignmentDetached &&\n css`\n ${StyledTaskList} {\n background-color: ${backgroundColor};\n border: solid 0.0625rem ${borderLine};\n border-radius: var(--border-radius, ${borderRadius});\n\n ${StyledSummaryListItem} {\n padding: calc(${spacing} / 2) ${spacing};\n }\n }\n `}\n }\n }\n }\n `;\n }\n);\n\nStyledWorkArea.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeading = styled(Text)``;\n\nexport const StyledExpandCollapseUtilitiesButton = styled(StyledExpandCollapseButton)(() => {\n const { utilitiesExpanded } = useCaseViewContext();\n\n return css`\n /* Centers button over the utilities summary */\n margin-inline-end: ${utilitiesExpanded && '0.625rem'};\n `;\n});\n\nStyledExpandCollapseUtilitiesButton.defaultProps = defaultThemeProp;\n\nconst genAICoachReservedSpace = '4rem';\n\nexport const StyledUtilities = styled.div(({ theme }) => {\n const { utilitiesExpanded, aboveLG, aboveMD, hasGenAICoach } = useCaseViewContext();\n\n return css`\n height: max-content;\n margin-block: calc(2 * ${theme.base.spacing});\n\n ${StyledCardContent} ${StyledProgressBackdrop} {\n border-radius: ${theme.components.card['border-radius']};\n }\n\n /* If utilities are in an expanded drawer. */\n\n ${utilitiesExpanded &&\n aboveMD &&\n !aboveLG &&\n css`\n /* Maintains the column width to avoid page content shift. */\n visibility: hidden;\n `}\n ${aboveLG &&\n utilitiesExpanded &&\n css`\n width: 25rem;\n `}\n /* Selects the h2 in the utilities column, not the drawer. */\n ${StyledUtilitiesHeading} {\n /* Hide the utilities h2 under certain conditions.*/\n ${((aboveMD && !utilitiesExpanded) || (aboveMD && utilitiesExpanded && !aboveLG)) &&\n hideVisually()}\n }\n\n /* Reserve space below so the docked GenAI coach doesn't overlap utility items. */\n ${hasGenAICoach &&\n css`\n margin-block-end: ${genAICoachReservedSpace};\n `}\n `;\n});\n\nStyledUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledSummary = styled.div(\n ({\n theme: {\n base: {\n spacing,\n breakpoints,\n 'z-index': zIndex,\n palette: { 'app-background': appBackground }\n },\n components: {\n 'app-shell': {\n nav: { background: navBackground }\n },\n 'case-view': {\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n }\n }\n }) => {\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const inlineStartPadding =\n navBackground === appBackground ? `${spacing}` : `calc(${spacing} * 2)`;\n\n return css`\n top: ${summaryExpanded\n ? 'var(--top-offset)'\n : 'calc(var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--appshell-top-offset, 0rem))'};\n width: 100%;\n z-index: ${zIndex.popover};\n\n ${aboveMD &&\n summaryExpanded &&\n css`\n height: var(--case-view-height);\n `}\n\n ${summaryDetached &&\n aboveSM &&\n css`\n padding-inline-start: ${inlineStartPadding};\n padding-inline-end: ${utilitiesDetached && shouldRenderMobileTabs\n ? `calc(2 * ${spacing})`\n : 0};\n padding-block: ${shouldRenderMobileTabs ? 0 : `calc(2 * ${spacing})`};\n `}\n\n ${isPreview &&\n css`\n padding: 0;\n `}\n\n ${aboveMD\n ? css`\n position: sticky;\n `\n : css`\n @media (min-height: ${breakpoints.sm}) {\n position: sticky;\n }\n `}\n `;\n }\n);\n\nStyledSummary.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div<{\n previewActive?: AppShellContextValue['previewActive'];\n utilitiesExpanded?: boolean;\n}>(({ previewActive, utilitiesExpanded, theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(\n 100dvh - var(--appshell-offset, ${headerHeight}) - var(--appshell-top-offset, 0rem) - var(\n --appshell-bottom-offset,\n 0rem\n )\n );\n inset-block-start: calc(\n var(--appshell-offset, ${headerHeight}) + var(--appshell-top-offset, 0rem)\n );\n z-index: ${theme.base['z-index'].drawer - 1};\n max-width: ${resizeDrawerMinWidth};\n\n ${previewActive &&\n css`\n @media (min-width: ${theme.base.breakpoints.md}) {\n inset-inline-end: ${resizeDrawerDefaultWidth};\n ${utilitiesExpanded &&\n css`\n inset-inline-end: var(--resize-drawer-width);\n `}\n }\n `}\n ${StyledGenAICoachContainer} {\n width: calc(${resizeDrawerMinWidth} - 2rem);\n }\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing\n }\n }\n }) => {\n const { hasGenAICoach } = useCaseViewContext();\n\n return css`\n background: ${appBackground};\n padding: calc(2 * ${spacing});\n height: 100%;\n overflow: auto;\n\n /* Reserve scroll space so the docked GenAI coach doesn't overlap utility items. */\n ${hasGenAICoach &&\n css`\n padding-block-end: ${genAICoachReservedSpace};\n `}\n `;\n }\n);\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div<{ persistentUtilityExpanded?: boolean }>(\n ({ theme, persistentUtilityExpanded }) => {\n return css`\n width: ${persistentUtilityExpanded ? '100%' : theme.base['content-width'].md};\n overflow: auto;\n position: sticky;\n z-index: 1;\n height: var(--case-view-height);\n inset-block-start: var(--top-offset);\n inset-block-end: var(--bottom-offset);\n padding-block: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n\n &&& ${StyledCardHeader} {\n padding-inline-start: ${theme.base.spacing};\n }\n `;\n});\n\nStyledPersistentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContent = styled.div(({ theme }) => {\n return css`\n height: calc(100% - calc(4 * ${theme.base.spacing}));\n `;\n});\n\nStyledPersistentContent.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledCaseView = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n utilities: {\n detached: utilitiesDetached,\n background: utilitiesBackground,\n 'foreground-color': utilitiesForegroundColor\n },\n summary: { detached: summaryDetached }\n }\n }\n }\n }) => {\n const utilitiesForegroundComputed = calculateForegroundColor(\n utilitiesBackground,\n utilitiesForegroundColor\n );\n const { aboveSM, aboveMD, isPreview } = useCaseViewContext();\n\n return css`\n --top-offset: calc(\n var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--summary-height) +\n ${aboveSM ? 'var(--appshell-top-offset, 0rem)' : '0rem'}\n );\n /* stylelint-disable-next-line length-zero-no-unit */\n --bottom-offset: var(--appshell-bottom-offset, 0rem);\n /* stylelint-disable-next-line unit-allowed-list */\n --case-view-height: calc(100dvh - var(--top-offset) - var(--bottom-offset));\n position: relative;\n min-height: var(--case-view-height);\n background: ${appBackground};\n\n ${aboveMD &&\n css`\n ${StyledUtilities}:last-child {\n margin-inline-end: calc(2 * ${spacing});\n color: ${utilitiesForegroundComputed};\n\n ${!utilitiesDetached &&\n css`\n background: ${utilitiesBackground};\n margin-inline-end: 0;\n padding: calc(2 * ${spacing});\n padding-inline-end: 0;\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n ${StyledCard},\n ${StyledGenAICoachContainer} {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n ${StyledGenAICoachContainer} {\n inset-inline-end: 0;\n }\n `}\n }\n `}\n\n ${aboveSM &&\n summaryDetached &&\n !isPreview &&\n css`\n &:not(:has(${StyledUtilities})) {\n ${StyledSummary} {\n padding-inline-end: calc(2 * ${spacing});\n }\n\n ${StyledCaseHeader} {\n border-end-end-radius: ${borderRadius};\n }\n }\n `}\n\n ${!aboveMD &&\n css`\n ${StyledGenAICoachContainer} {\n height: 42.5rem;\n\n ${StyledInitialMessageContainer} {\n justify-content: center;\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeader = styled(Text)`\n align-self: center;\n\n &:not(:focus) {\n ${hideVisually}\n }\n`;\n\nStyledUtilitiesHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCoachButton = styled(AIButton)(({\n theme: {\n base: { spacing, breakpoints }\n }\n}) => {\n const { previewActive } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n width: 2.75rem;\n height: 2.75rem;\n inset-block-end: calc(\n var(--footer-height, var(--appshell-bottom-offset, 0rem)) + 2 * ${spacing}\n );\n inset-inline-end: calc(2 * ${spacing});\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.md}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n `;\n});\n\nStyledCoachButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesWrapper = styled.div``;\n\nexport const StyledCaseViewIcon = styled(Icon)(({ theme }) => {\n const { color } = useCaseViewContext();\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor =\n caseTypeColorsEnabled && color !== undefined ? resolveCaseTypeColor(theme, color) : undefined;\n\n return css`\n --icon-color: ${resolvedCaseTypeColor ?? theme.base.palette['brand-accent']};\n --gradient-start: oklch(from var(--icon-color) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--icon-color) l c h);\n --gradient-end: oklch(from var(--icon-color) calc(l + 0.5) calc(c * 1.5) h);\n\n ${theme.components['case-view'].icon.color !== 'auto' &&\n css`\n color: ${theme.components['case-view'].icon.color};\n `}\n\n ${theme.components['case-view'].icon.background !== 'auto' &&\n css`\n background: ${theme.components['case-view'].icon.background};\n `}\n\n ${theme.components['case-view'].icon.background === 'auto' &&\n caseTypeColorsEnabled &&\n resolvedCaseTypeColor &&\n css`\n background: ${resolvedCaseTypeColor};\n `}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto' &&\n css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `}\n `;\n});\n\nStyledCaseViewIcon.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,GAAG,EACH,IAAI,EACJ,cAAc,EACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EAC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K,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK;KAClD;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM;QAC1D,GAAG,CAAA;oBACa,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU;KAC5D;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM;QAC1D,qBAAqB;QACrB,qBAAqB;QACrB,GAAG,CAAA;oBACa,qBAAqB;KACpC;;MAEC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,MAAM;QAC7D,GAAG,CAAA;oBACa,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;KAC/D;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport {\n getContrast,\n hideVisually,\n meetsContrastGuidelines,\n mix,\n rgba,\n transparentize\n} from 'polished';\nimport { useContext } from 'react';\n\nimport {\n Button,\n calculateFontSize,\n CardContent,\n defaultThemeProp,\n resolveSupplementalColor,\n StyledBreadcrumbs,\n StyledButtonLink,\n StyledFieldValue,\n StyledInlineFieldValueRow,\n StyledStackedFieldValue,\n StyledIcon,\n StyledLabel,\n StyledPopover,\n StyledText,\n StyledTooltip,\n tryCatch,\n FieldValueList,\n StyledLink,\n readableHue,\n StyledCard,\n Text,\n readableColor,\n AppShellContext,\n AIButton,\n StyledButton,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n isSolidColor,\n StyledSummaryListItem,\n StyledProgressBackdrop,\n Image,\n Icon,\n animations,\n useDirection\n} from '@pega/cosmos-react-core';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\nimport type { AppShellContextValue } from '@pega/cosmos-react-core/lib/components/AppShell/AppShellContext';\nimport { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport {\n StyledAllTabsWrapper,\n StyledTabs,\n StylesAllTabsButtonWrapper\n} from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport {\n resizeDrawerMinWidth,\n resizeDrawerMaxWidth,\n resizeDrawerDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nimport { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';\nimport { StyledAssignments } from '../Assignments/Assignments.styles';\nimport { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';\nimport {\n StyledGenAICoachContainer,\n StyledInitialMessageContainer\n} from '../GenAICoach/GenAICoach.styles';\nimport { StyledTaskList } from '../Tasks/TaskList';\nimport { oneColumnDetailsColumnWidth } from '../Details/Details.styles';\n\nimport { useCaseViewContext } from './CaseView.context';\n\nconst labelWidth = '16ch';\nconst inlineEndButtonOffset = '0.375rem';\n\nexport const resolveCaseTypeColor = (theme: DefaultTheme, color: string): string => {\n const supplementalColor = resolveSupplementalColor(theme, color);\n if (supplementalColor !== undefined) return supplementalColor;\n return color;\n};\n\nconst mixCaseColorWithBackground = (color: string, background: string) =>\n mix(0.85, background, color);\n\nconst getCaseTypeHeaderColors = (\n theme: DefaultTheme,\n color: string | undefined\n): { caseTypeColor: string; headerBackground: string } | null => {\n if (color === undefined) return null;\n const resolvedCaseTypeColor = resolveCaseTypeColor(theme, color);\n if (theme.base['case-type-colors'] !== 'header-and-icon') {\n return null;\n }\n const headerBackground = isSolidColor(theme.components.card.background)\n ? mixCaseColorWithBackground(resolvedCaseTypeColor, theme.components.card.background)\n : theme.components.card.background;\n return { caseTypeColor: resolvedCaseTypeColor, headerBackground };\n};\n\nexport const StyledSummaryPrimaryList = styled(FieldValueList)<{\n wrapped?: boolean;\n}>(({ theme, wrapped }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const detached = theme.components['field-value-list'].inline.detached;\n\n return css`\n ${wrapped\n ? css`\n grid-template-columns: minmax(0, 1fr);\n `\n : css`\n ${detached &&\n css`\n gap: calc(${theme.base.spacing});\n `}\n grid-template-columns: ${labelWidth} auto;\n `}\n ${StyledFieldValue} {\n font-size: ${fontSizes[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n\n > ${StyledButtonLink} {\n font-weight: inherit;\n }\n }\n `;\n});\n\nStyledSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledSummarySecondaryList = styled(FieldValueList)(() => {\n return css`\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `;\n});\n\nexport const StyledCaseSummaryFields = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n }\n }\n } = theme;\n\n return (\n detached &&\n css`\n ${StyledSummaryPrimaryList} {\n padding-block-start: calc(${theme.components.card.padding} * 2);\n padding-inline: calc(${theme.components.card.padding} * 2);\n }\n\n ${StyledSummarySecondaryList} {\n padding: calc(${theme.components.card.padding} * 2);\n }\n `\n );\n});\n\nStyledCaseSummaryFields.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryTabContent = styled(CardContent)(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n return css`\n ${StyledSummarySecondaryList} {\n > ${StyledStackedFieldValue} {\n max-width: ${oneColumnDetailsColumnWidth};\n }\n\n > ${StyledFieldValue}, > ${StyledInlineFieldValueRow} > ${StyledFieldValue} {\n max-width: calc(${oneColumnDetailsColumnWidth} - ${labelWidth} - 2 * ${spacing});\n }\n }\n `;\n});\n\nStyledSummaryTabContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryHeading = styled(Text)(({ theme }) => {\n return css`\n margin-block-end: ${theme.base.spacing};\n `;\n});\n\nStyledSummaryHeading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewImage = styled(Image)`\n max-height: 100%;\n`;\n\nexport const StyledCaseHeader = styled.div(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': caseHeaderForegroundColor, background },\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n },\n base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette }\n } = theme;\n const { aboveSM, aboveMD, color, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const caseHeaderBorderRadius = shouldRenderMobileTabs\n ? `0 0 ${utilitiesDetached ? borderRadius : 0} ${borderRadius}`\n : `${borderRadius} ${borderRadius} 0 0`;\n\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, color);\n const headerBackgroundColor = caseTypeHeaderColors?.headerBackground ?? background;\n\n const foregroundColor = caseTypeHeaderColors\n ? readableColor(headerBackgroundColor)\n : calculateForegroundColor(headerBackgroundColor, caseHeaderForegroundColor);\n\n return css`\n background: ${headerBackgroundColor};\n color: ${foregroundColor};\n padding: ${spacing} calc(2 * ${spacing});\n position: relative;\n\n ${summaryDetached &&\n css`\n border-bottom: 0.0625rem solid ${palette['border-line']};\n `}\n ${summaryDetached &&\n !isPreview &&\n aboveSM &&\n css`\n border-radius: ${caseHeaderBorderRadius};\n `}\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${shadow.focus};\n }\n\n ${StyledMenu} {\n color: ${palette['foreground-color']};\n z-index: ${zIndex.popover + 1};\n }\n `;\n});\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledFollowIconWrap = styled.label`\n font-size: 1.25rem;\n\n input {\n ${hideVisually}\n }\n\n input:focus + svg {\n box-shadow: ${({ theme }) => theme.base.shadow.focus};\n }\n`;\n\nStyledFollowIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledSubheading = styled.p``;\n\nStyledSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { background, 'foreground-color': foregroundColor }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? background;\n const textColor = calculateForegroundColor(headerBg, foregroundColor);\n\n const isGradientBackground = !isSolidColor(headerBg);\n const backgroundColor = isGradientBackground ? readableColor(textColor) : headerBg;\n const interactiveUsable = getContrast(backgroundColor, interactive) >= 4.5;\n const color = !isGradientBackground && interactiveUsable ? interactive : textColor;\n\n let hoverBackground = rgba(color, 0.15);\n if (!isGradientBackground && interactiveUsable) {\n hoverBackground = readableHue(interactive, color);\n }\n return css`\n --button-background-color: ${backgroundColor};\n color: ${color};\n background-color: transparent;\n border-color: ${color};\n\n @media (hover: hover) {\n &:hover {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n }\n `;\n});\n\nStyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderActions = styled.div<{ offsetEnd: boolean }>(({ offsetEnd, theme }) => {\n return css`\n margin-inline-start: auto;\n padding-block: ${theme.base.spacing};\n padding-inline-start: calc(2 * ${theme.base.spacing});\n\n ${offsetEnd &&\n css`\n padding-inline-end: ${inlineEndButtonOffset};\n `};\n\n ${StyledButton}:not(${StyledCaseHeaderPromotedAction}) {\n margin-inline-start: 0;\n }\n\n ${StyledCaseHeaderPromotedAction}:not(:has(+ ${StyledCaseHeaderPromotedAction})) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledHeaderActions.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderText = styled.hgroup(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background: caseHeaderBackground }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? caseHeaderBackground;\n const color = calculateForegroundColor(headerBg, foregroundColor);\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const idStyle = css`\n color: ${color};\n font-size: ${fontSize.s};\n font-weight: normal;\n `;\n\n return css`\n word-break: break-word;\n\n ${StyledSubheading} {\n ${idStyle}\n }\n\n ${StyledBreadcrumbs} {\n max-width: 100%;\n\n > a,\n > span,\n > button,\n > svg {\n ${idStyle}\n }\n\n > a,\n > button {\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${theme.base.palette['foreground-color']};\n }\n }\n\n > ${StyledText} > ${StyledLink} {\n color: ${color};\n }\n\n + ${StyledHeaderActions} {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledCaseHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryBlock = styled.div<{ hasItems: boolean }>(({ hasItems, theme }) => {\n const {\n base: {\n spacing,\n palette: { 'brand-primary': primary }\n }\n } = theme;\n\n const color = readableColor(primary);\n const transparentColor = tryCatch(() => transparentize(0.5, color));\n\n return css`\n ${hasItems &&\n css`\n border-inline-start: 0.0625rem solid ${transparentColor};\n `}\n ${StyledStackedFieldValue}:first-child {\n margin-inline-start: calc(2 * ${spacing});\n }\n `;\n});\n\nStyledHeaderSummaryBlock.defaultProps = defaultThemeProp;\n\nconst popoverColorReset = (theme: DefaultTheme) => {\n const {\n base: {\n palette: { interactive, light, 'foreground-color': baseForeground }\n }\n } = theme;\n\n return css`\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${baseForeground};\n\n ${StyledButtonLink},\n ${StyledLink} {\n color: ${interactive};\n text-decoration: none;\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow:\n inset 0 0 0 0.0625rem ${light},\n 0 0 0.125rem 0.0625rem ${interactive};\n }\n }\n }\n `;\n};\n\nexport const StyledHeaderSummary = styled.dl(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background }\n }\n }\n } = theme;\n\n const { color: caseTypeColor } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const headerBg = caseTypeHeaderColors?.headerBackground ?? background;\n const color = calculateForegroundColor(headerBg, foregroundColor);\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(headerBg, foregroundColor);\n const interactiveUsable = meetsContrastGuidelines(backgroundColor, interactive).AA;\n\n return css`\n max-width: 100%;\n min-width: 0;\n\n > ${StyledStackedFieldValue} {\n > ${StyledLabel} {\n color: ${color};\n white-space: nowrap;\n }\n\n > ${StyledFieldValue} {\n color: ${color};\n white-space: nowrap;\n }\n\n ${StyledButtonLink},\n ${StyledLink} {\n &:focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${color};\n }\n\n ${!interactiveUsable &&\n css`\n color: ${color};\n text-decoration: underline;\n `}\n }\n\n ${popoverColorReset(theme)}\n }\n `;\n});\n\nStyledHeaderSummary.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryValue = styled(StyledFieldValue)<{\n bold?: boolean;\n truncate?: boolean;\n theme: DefaultTheme;\n}>(({ bold, truncate, theme }) => {\n const {\n base: {\n 'content-width': { xs }\n },\n components: {\n text: {\n h1: { 'font-weight': h1Weight }\n }\n }\n } = theme;\n\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n\n ${truncate &&\n css`\n max-width: ${xs};\n `}\n ${bold &&\n css`\n font-weight: ${h1Weight};\n `}\n /*\n * :not([hidden]) necessary to prevent hidden span with preview a11y instructions from\n * factoring into scrollWidth of element when determining truncation.\n */\n > :not([hidden]) {\n display: inline;\n }\n `;\n});\n\nStyledHeaderSummaryValue.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryInfo = styled.div(\n ({\n theme: {\n base: { 'border-radius': borderRadius },\n components: {\n tabs: { detached: tabsDetached },\n card: { background }\n }\n }\n }) => {\n const { intelligentGuidance } = useCaseViewContext();\n\n return css`\n overflow: auto;\n flex: 1;\n ${tabsDetached &&\n css`\n background: ${background};\n border-radius: ${borderRadius};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n `}\n ${intelligentGuidance &&\n css`\n /* Accounts for collapsed intelligentGuidance list covering summary panel content when fully scrolled. */\n padding-block-end: 4rem;\n `}\n `;\n }\n);\n\nStyledCaseSummaryInfo.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryContainer = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n },\n card: { background }\n }\n } = theme;\n return css`\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n\n ${detached &&\n css`\n padding: 0;\n background: ${background};\n `}\n `;\n});\n\nStyledCaseSummaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseButton = styled(Button)(() => {\n return css`\n border: none;\n\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n }\n `;\n});\n\nStyledExpandCollapseButton.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButton)(({ theme }) => {\n const { summaryExpanded } = useCaseViewContext();\n\n return css`\n --half-compact-btn-height: calc(${theme.base['hit-area'].compact} / 2);\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].mouse} - ${theme.base['hit-area'].compact}) / 2\n );\n --half-case-icon-compact-difference: calc(\n ((4 * ${theme.base.spacing}) - ${theme.base['hit-area'].compact}) / 2\n );\n @media (pointer: coarse) {\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].finger} - ${theme.base['hit-area'].compact}) / 2\n );\n }\n position: absolute;\n z-index: 1;\n box-shadow: ${theme.base.shadow.low};\n\n ${summaryExpanded\n ? css`\n inset-block-start: calc(2 * ${theme.base.spacing} + var(--half-btn-compact-difference));\n inset-inline-start: calc(100% - var(--half-compact-btn-height));\n `\n : css`\n inset-block-end: calc(var(--half-compact-btn-height) * -1);\n inset-inline-start: calc(\n 2 * ${theme.base.spacing} + var(--half-case-icon-compact-difference)\n );\n `}\n `;\n});\n\nStyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummary = styled.div(\n ({\n theme,\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine },\n 'border-radius': borderRadius,\n 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin }\n },\n components: {\n 'case-view': {\n summary: { detached }\n },\n card: { background: cardBackground },\n tabs: { detached: tabsDetached }\n }\n }\n }) => {\n const { summaryExpanded, aboveMD, color } = useCaseViewContext();\n const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, color);\n\n return css`\n background: ${cardBackground};\n position: relative;\n height: 100%;\n ${aboveMD &&\n summaryExpanded &&\n css`\n width: 25rem;\n `}\n\n ${detached &&\n css`\n border-radius: ${borderRadius};\n --border-radius: calc(${borderRadius} * 0.5);\n `}\n\n ${tabsDetached &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical'] {\n padding-top: calc(1.5 * ${spacing});\n border-block-start: 0.0625rem solid ${borderLine};\n\n & ${StyledTab} {\n height: ${mouseMin};\n\n @media (pointer: coarse) {\n height: ${fingerMin};\n }\n }\n }\n }\n `}\n\n ${caseTypeHeaderColors &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical']::after {\n background: ${caseTypeHeaderColors.caseTypeColor};\n }\n\n &[aria-orientation='vertical']::before {\n background: ${caseTypeHeaderColors.headerBackground};\n }\n }\n\n & ${StyledTab}[aria-selected='true'] {\n background-color: ${caseTypeHeaderColors.headerBackground};\n }\n `}\n `;\n }\n);\n\nStyledCaseSummary.defaultProps = defaultThemeProp;\n\nexport const StyledTasks = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n &:not(:has(${StyledCard})) {\n /* Add negative top margin to compensate extra row-gap due to empty Tasks container */\n margin-block-start: calc(-2 * ${spacing});\n }\n `;\n }\n);\nStyledTasks.defaultProps = defaultThemeProp;\n\nexport const StyledTabPanelWrapper = styled.div(\n ({\n theme: {\n base: {\n animation: { speed, timing }\n },\n components: {\n card: { 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { start } = useDirection();\n\n return css`\n ${StyledTabPanel} {\n ${StyledProgressBackdrop} {\n border-radius: ${cardBorderRadius};\n }\n }\n\n /* Top-level horizontal tabs (with or without overflow \"All tabs\" button) - slide in from top */\n ${StyledTabs} ~ &,\n ${StyledAllTabsWrapper} ~ & {\n position: relative;\n z-index: 0;\n\n > ${StyledTabPanel} {\n --reveal-from: 0.7;\n --slide-in-y-start-offset: -0.8rem;\n animation-name: ${animations.reveal}, ${animations.slideInYStart};\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n }\n\n /* Top-level vertical tabs - slide in from start*/\n &:not(${StyledTabs} ~ &):not(${StyledAllTabsWrapper} ~ &) > ${StyledTabPanel} {\n ${start === 'right'\n ? css`\n --slide-in-x-end-offset: 1.5rem;\n animation-name: ${animations.reveal}, ${animations.slideInXEnd};\n `\n : css`\n --slide-in-x-start-offset: -1.5rem;\n animation-name: ${animations.reveal}, ${animations.slideInXStart};\n `}\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n\n /* Nested tab panels - always fade only */\n ${StyledTabPanel} & ${StyledTabPanel} {\n --reveal-from: 0.7;\n animation-name: ${animations.reveal};\n animation-duration: max(calc(${speed} * 2), 1ms);\n animation-timing-function: ${timing.ease};\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n }\n `;\n }\n);\n\nStyledTabPanelWrapper.defaultProps = defaultThemeProp;\n\n// This component defintion was primarily required to conditionally hide empty div and avoid unnecessary row gap in work area.\nexport const StyledBannersStagesTasksContainer = styled.div(() => {\n return css`\n &:has(> ${StyledTasks}:only-child > :only-child:empty[data-flow]) {\n display: none;\n }\n `;\n});\n\nexport const StyledWorkArea = styled.div(\n ({\n theme: {\n base: {\n palette: { 'border-line': borderLine },\n spacing,\n 'border-radius': borderRadius,\n breakpoints\n },\n components: {\n 'case-view': {\n assignments: {\n detached: assignmentDetached,\n background: assignmentBackground,\n 'foreground-color': assignmentForegroundColor\n }\n },\n tabs: { detached: tabsDetached },\n card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const foregroundColorForAssignment = calculateForegroundColor(\n assignmentBackground,\n assignmentForegroundColor\n );\n const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();\n let pbeRem = 0;\n\n if (intelligentGuidance) {\n pbeRem = aboveMD && !summaryExpanded ? 4 : 6;\n }\n\n return css`\n grid-area: work-area;\n padding: calc(2 * ${spacing});\n @media (width < ${breakpoints.sm}) {\n padding: calc(2 * ${spacing}) calc(0.75 * ${spacing});\n }\n\n /* Prevents unnecessary gap when case view has neither stages nor assignments */\n &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {\n ${StyledBannersStagesTasksContainer} {\n display: none;\n }\n }\n\n ${aboveMD &&\n css`\n padding: calc(2 * ${spacing}) 0;\n\n /* This is required to make scrollStick work. */\n ${!isPreview &&\n css`\n height: max-content;\n `}\n\n ${!summaryExpanded &&\n css`\n margin-inline-start: calc(2 * ${spacing});\n `}\n `}\n /* Order of style here is necessary for overriding styles above. */\n ${pbeRem > 0 &&\n css`\n /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */\n padding-block-end: ${pbeRem}rem;\n `}\n &:has(${StyledAssignments}),\n &:has(${StyledHierarchicalAssignments}) {\n ${StyledStages} {\n border-block-end: 0.0625rem solid ${borderLine};\n\n &,\n ${StyledStageContainer}:first-of-type > ${StyledStage} {\n border-end-start-radius: 0;\n }\n\n &,\n ${StyledStageContainer}:last-of-type > ${StyledStage} {\n border-end-end-radius: 0;\n }\n }\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n border-start-start-radius: ${cardBorderRadius};\n border-start-end-radius: ${cardBorderRadius};\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n }\n\n ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {\n border-start-start-radius: inherit;\n }\n }\n `}\n\n /* Ensure horizontal tabs stay above sliding tab content */\n ${StyledTabs}[aria-orientation='horizontal'],\n ${StyledAllTabsWrapper} {\n z-index: 1;\n }\n\n &:has(${StyledStages}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n margin-block-start: calc(-2 * ${spacing});\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n }\n\n &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),\n &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n background: ${assignmentBackground};\n color: ${foregroundColorForAssignment};\n ${assignmentDetached &&\n css`\n ${StyledTaskList} {\n background-color: ${backgroundColor};\n border: solid 0.0625rem ${borderLine};\n border-radius: var(--border-radius, ${borderRadius});\n\n ${StyledSummaryListItem} {\n padding: calc(${spacing} / 2) ${spacing};\n }\n }\n `}\n }\n }\n }\n `;\n }\n);\n\nStyledWorkArea.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeading = styled(Text)``;\n\nexport const StyledExpandCollapseUtilitiesButton = styled(StyledExpandCollapseButton)(() => {\n const { utilitiesExpanded } = useCaseViewContext();\n\n return css`\n /* Centers button over the utilities summary */\n margin-inline-end: ${utilitiesExpanded && '0.625rem'};\n `;\n});\n\nStyledExpandCollapseUtilitiesButton.defaultProps = defaultThemeProp;\n\nconst genAICoachReservedSpace = '4rem';\n\nexport const StyledUtilities = styled.div(({ theme }) => {\n const { utilitiesExpanded, aboveLG, aboveMD, hasGenAICoach } = useCaseViewContext();\n\n return css`\n height: max-content;\n margin-block: calc(2 * ${theme.base.spacing});\n\n ${StyledCardContent} ${StyledProgressBackdrop} {\n border-radius: ${theme.components.card['border-radius']};\n }\n\n /* If utilities are in an expanded drawer. */\n\n ${utilitiesExpanded &&\n aboveMD &&\n !aboveLG &&\n css`\n /* Maintains the column width to avoid page content shift. */\n visibility: hidden;\n `}\n ${aboveLG &&\n utilitiesExpanded &&\n css`\n width: 25rem;\n `}\n /* Selects the h2 in the utilities column, not the drawer. */\n ${StyledUtilitiesHeading} {\n /* Hide the utilities h2 under certain conditions.*/\n ${((aboveMD && !utilitiesExpanded) || (aboveMD && utilitiesExpanded && !aboveLG)) &&\n hideVisually()}\n }\n\n /* Reserve space below so the docked GenAI coach doesn't overlap utility items. */\n ${hasGenAICoach &&\n css`\n margin-block-end: ${genAICoachReservedSpace};\n `}\n `;\n});\n\nStyledUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledSummary = styled.div(\n ({\n theme: {\n base: {\n spacing,\n breakpoints,\n 'z-index': zIndex,\n palette: { 'app-background': appBackground }\n },\n components: {\n 'app-shell': {\n nav: { background: navBackground }\n },\n 'case-view': {\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n }\n }\n }) => {\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const inlineStartPadding =\n navBackground === appBackground && summaryExpanded ? `${spacing}` : `calc(${spacing} * 2)`;\n\n return css`\n top: ${summaryExpanded\n ? 'var(--top-offset)'\n : 'calc(var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--appshell-top-offset, 0rem))'};\n width: 100%;\n z-index: ${zIndex.popover};\n\n ${aboveMD &&\n summaryExpanded &&\n css`\n height: var(--case-view-height);\n `}\n\n ${summaryDetached &&\n aboveSM &&\n css`\n padding-inline-start: ${inlineStartPadding};\n padding-inline-end: ${utilitiesDetached && shouldRenderMobileTabs\n ? `calc(2 * ${spacing})`\n : 0};\n padding-block: ${shouldRenderMobileTabs ? 0 : `calc(2 * ${spacing})`};\n `}\n\n ${isPreview &&\n css`\n padding: 0;\n `}\n\n ${aboveMD\n ? css`\n position: sticky;\n `\n : css`\n @media (min-height: ${breakpoints.sm}) {\n position: sticky;\n }\n `}\n `;\n }\n);\n\nStyledSummary.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div<{\n previewActive?: AppShellContextValue['previewActive'];\n utilitiesExpanded?: boolean;\n}>(({ previewActive, utilitiesExpanded, theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(\n 100dvh - var(--appshell-offset, ${headerHeight}) - var(--appshell-top-offset, 0rem) - var(\n --appshell-bottom-offset,\n 0rem\n )\n );\n inset-block-start: calc(\n var(--appshell-offset, ${headerHeight}) + var(--appshell-top-offset, 0rem)\n );\n z-index: ${theme.base['z-index'].drawer - 1};\n max-width: ${resizeDrawerMinWidth};\n\n ${previewActive &&\n css`\n @media (min-width: ${theme.base.breakpoints.md}) {\n inset-inline-end: ${resizeDrawerDefaultWidth};\n ${utilitiesExpanded &&\n css`\n inset-inline-end: var(--resize-drawer-width);\n `}\n }\n `}\n ${StyledGenAICoachContainer} {\n width: calc(${resizeDrawerMinWidth} - 2rem);\n }\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing\n }\n }\n }) => {\n const { hasGenAICoach } = useCaseViewContext();\n\n return css`\n background: ${appBackground};\n padding: calc(2 * ${spacing});\n height: 100%;\n overflow: auto;\n\n /* Reserve scroll space so the docked GenAI coach doesn't overlap utility items. */\n ${hasGenAICoach &&\n css`\n padding-block-end: ${genAICoachReservedSpace};\n `}\n `;\n }\n);\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div<{ persistentUtilityExpanded?: boolean }>(\n ({ theme, persistentUtilityExpanded }) => {\n return css`\n width: ${persistentUtilityExpanded ? '100%' : theme.base['content-width'].md};\n overflow: auto;\n position: sticky;\n z-index: 1;\n height: var(--case-view-height);\n inset-block-start: var(--top-offset);\n inset-block-end: var(--bottom-offset);\n padding-block: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n\n &&& ${StyledCardHeader} {\n padding-inline-start: ${theme.base.spacing};\n }\n `;\n});\n\nStyledPersistentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContent = styled.div(({ theme }) => {\n return css`\n height: calc(100% - calc(4 * ${theme.base.spacing}));\n `;\n});\n\nStyledPersistentContent.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledCaseView = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n utilities: {\n detached: utilitiesDetached,\n background: utilitiesBackground,\n 'foreground-color': utilitiesForegroundColor\n },\n summary: { detached: summaryDetached }\n }\n }\n }\n }) => {\n const utilitiesForegroundComputed = calculateForegroundColor(\n utilitiesBackground,\n utilitiesForegroundColor\n );\n const { aboveSM, aboveMD, isPreview } = useCaseViewContext();\n\n return css`\n --top-offset: calc(\n var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--summary-height) +\n ${aboveSM ? 'var(--appshell-top-offset, 0rem)' : '0rem'}\n );\n /* stylelint-disable-next-line length-zero-no-unit */\n --bottom-offset: var(--appshell-bottom-offset, 0rem);\n /* stylelint-disable-next-line unit-allowed-list */\n --case-view-height: calc(100dvh - var(--top-offset) - var(--bottom-offset));\n position: relative;\n min-height: var(--case-view-height);\n background: ${appBackground};\n\n ${aboveMD &&\n css`\n ${StyledUtilities}:last-child {\n margin-inline-end: calc(2 * ${spacing});\n color: ${utilitiesForegroundComputed};\n\n ${!utilitiesDetached &&\n css`\n background: ${utilitiesBackground};\n margin-inline-end: 0;\n padding: calc(2 * ${spacing});\n padding-inline-end: 0;\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n ${StyledCard},\n ${StyledGenAICoachContainer} {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n ${StyledGenAICoachContainer} {\n inset-inline-end: 0;\n }\n `}\n }\n `}\n\n ${aboveSM &&\n summaryDetached &&\n !isPreview &&\n css`\n &:not(:has(${StyledUtilities})) {\n ${StyledSummary} {\n padding-inline-end: calc(2 * ${spacing});\n }\n\n ${StyledCaseHeader} {\n border-end-end-radius: ${borderRadius};\n }\n }\n `}\n\n ${!aboveMD &&\n css`\n ${StyledGenAICoachContainer} {\n height: 42.5rem;\n\n ${StyledInitialMessageContainer} {\n justify-content: center;\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeader = styled(Text)`\n align-self: center;\n\n &:not(:focus) {\n ${hideVisually}\n }\n`;\n\nStyledUtilitiesHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCoachButton = styled(AIButton)(({\n theme: {\n base: { spacing, breakpoints }\n }\n}) => {\n const { previewActive } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n width: 2.75rem;\n height: 2.75rem;\n inset-block-end: calc(\n var(--footer-height, var(--appshell-bottom-offset, 0rem)) + 2 * ${spacing}\n );\n inset-inline-end: calc(2 * ${spacing});\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.md}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n `;\n});\n\nStyledCoachButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesWrapper = styled.div``;\n\nexport const StyledCaseViewIcon = styled(Icon)(({ theme }) => {\n const { color } = useCaseViewContext();\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor =\n caseTypeColorsEnabled && color !== undefined ? resolveCaseTypeColor(theme, color) : undefined;\n\n return css`\n --icon-color: ${resolvedCaseTypeColor ?? theme.base.palette['brand-accent']};\n --gradient-start: oklch(from var(--icon-color) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--icon-color) l c h);\n --gradient-end: oklch(from var(--icon-color) calc(l + 0.5) calc(c * 1.5) h);\n\n ${theme.components['case-view'].icon.color !== 'auto' &&\n css`\n color: ${theme.components['case-view'].icon.color};\n `}\n\n ${theme.components['case-view'].icon.background !== 'auto' &&\n css`\n background: ${theme.components['case-view'].icon.background};\n `}\n\n ${theme.components['case-view'].icon.background === 'auto' &&\n caseTypeColorsEnabled &&\n resolvedCaseTypeColor &&\n css`\n background: ${resolvedCaseTypeColor};\n `}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto' &&\n css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `}\n `;\n});\n\nStyledCaseViewIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode, MouseEvent, MouseEventHandler, ReactElement } from 'react';
|
|
2
|
-
import type { Tab, NoChildrenProp, FieldValueListItemProps, ForwardProps, MenuItemProps, Action, BaseProps, TestIdProp } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { Tab, NoChildrenProp, FieldValueListItemProps, ForwardProps, MenuItemProps, Action, BaseProps, TestIdProp, InlineEditProps, OmitStrict } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { State, UtilitiesGenAICoachProps } from '../GenAICoach/GenAICoach.types';
|
|
4
4
|
import type { getCaseViewTestIds } from './CaseView.test-ids';
|
|
5
5
|
export type CaseSummaryFieldsProps = {
|
|
@@ -30,9 +30,15 @@ export interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp {
|
|
|
30
30
|
/** A unique identifier for the case instance. */
|
|
31
31
|
caseId: string;
|
|
32
32
|
/** Text to quickly identify a case instance. */
|
|
33
|
-
heading: string
|
|
33
|
+
heading: string | {
|
|
34
|
+
text: string;
|
|
35
|
+
inlineEdit: OmitStrict<InlineEditProps, 'children' | 'contextualLabel' | 'ref'>;
|
|
36
|
+
};
|
|
34
37
|
/** Supplemental text to identify a case instance. */
|
|
35
|
-
subheading?: string
|
|
38
|
+
subheading?: string | {
|
|
39
|
+
text: string;
|
|
40
|
+
inlineEdit: OmitStrict<InlineEditProps, 'children' | 'contextualLabel' | 'ref'>;
|
|
41
|
+
};
|
|
36
42
|
/** Text to identify a case type. */
|
|
37
43
|
caseType?: string;
|
|
38
44
|
/** A set of Link props representing the case parents, rendered as Breadc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OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAO/B,yBAAyB;IACzB,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAE1C,kDAAkD;IAClD,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,aAAa,EACX,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,UAAU,GACV,aAAa,GACb,MAAM,GACN,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,MAAM,GACN,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,QAAQ,GACR,OAAO,GACP,mBAAmB,GACnB,qBAAqB,GACrB,eAAe,CAClB;IACD,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,YAAY,CAAC;CAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.types.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, MouseEvent, MouseEventHandler, ReactElement } from 'react';\n\nimport type {\n Tab,\n NoChildrenProp,\n FieldValueListItemProps,\n ForwardProps,\n MenuItemProps,\n Action,\n BaseProps,\n TestIdProp\n} from '@pega/cosmos-react-core';\n\nimport type { State, UtilitiesGenAICoachProps } from '../GenAICoach/GenAICoach.types';\n\nimport type { getCaseViewTestIds } from './CaseView.test-ids';\n\nexport type CaseSummaryFieldsProps = {\n primary?: SummaryField[];\n secondary?: SummaryField[];\n inSummaryPanel?: boolean;\n};\n\nexport type SummaryField = {\n name: FieldValueListItemProps['name'];\n value: FieldValueListItemProps['value'];\n simpleValue?: string | number | ReactNode;\n variant?: FieldValueListItemProps['variant'];\n} & TestIdProp;\n\nexport type UtilitySummaryItem = {\n id: string;\n iconName: string;\n iconColor?: string;\n name: string;\n count?: number;\n showNotification?: boolean;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n};\n\nexport interface CaseViewGenAICoachProps extends UtilitiesGenAICoachProps {\n /** Called when the state of the coach in utilities is changed */\n onStateChange?: (state: State) => void;\n}\n\nexport interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp {\n /** A unique identifier for the case instance. */\n caseId: string;\n\n /** Text to quickly identify a case instance. */\n heading: string;\n\n /** Supplemental text to identify a case instance. */\n subheading
|
|
1
|
+
{"version":3,"file":"CaseView.types.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, MouseEvent, MouseEventHandler, ReactElement } from 'react';\n\nimport type {\n Tab,\n NoChildrenProp,\n FieldValueListItemProps,\n ForwardProps,\n MenuItemProps,\n Action,\n BaseProps,\n TestIdProp,\n InlineEditProps,\n OmitStrict\n} from '@pega/cosmos-react-core';\n\nimport type { State, UtilitiesGenAICoachProps } from '../GenAICoach/GenAICoach.types';\n\nimport type { getCaseViewTestIds } from './CaseView.test-ids';\n\nexport type CaseSummaryFieldsProps = {\n primary?: SummaryField[];\n secondary?: SummaryField[];\n inSummaryPanel?: boolean;\n};\n\nexport type SummaryField = {\n name: FieldValueListItemProps['name'];\n value: FieldValueListItemProps['value'];\n simpleValue?: string | number | ReactNode;\n variant?: FieldValueListItemProps['variant'];\n} & TestIdProp;\n\nexport type UtilitySummaryItem = {\n id: string;\n iconName: string;\n iconColor?: string;\n name: string;\n count?: number;\n showNotification?: boolean;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n};\n\nexport interface CaseViewGenAICoachProps extends UtilitiesGenAICoachProps {\n /** Called when the state of the coach in utilities is changed */\n onStateChange?: (state: State) => void;\n}\n\nexport interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp {\n /** A unique identifier for the case instance. */\n caseId: string;\n\n /** Text to quickly identify a case instance. */\n heading:\n | string\n | {\n text: string;\n inlineEdit: OmitStrict<InlineEditProps, 'children' | 'contextualLabel' | 'ref'>;\n };\n\n /** Supplemental text to identify a case instance. */\n subheading?:\n | string\n | {\n text: string;\n inlineEdit: OmitStrict<InlineEditProps, 'children' | 'contextualLabel' | 'ref'>;\n };\n\n /** Text to identify a case type. */\n caseType?: string;\n\n /** @internal */\n caseLink?: CaseViewContextValue['caseLink'];\n\n /** A set of Link props representing the case parents, rendered as Breadcrumbs. */\n parentCases?: MenuItemProps[];\n\n /** An icon name to render as a visual in the case view header. */\n icon?: string | URL;\n\n /** A contextual color for the case type. */\n color?: string;\n\n /** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */\n followed?: boolean;\n\n /** Called when user chooses to follow or unfollow the case. Use this to update followed. */\n onFollowedChange?: (following: boolean) => void;\n\n /** Case level actions available in an action menu. Accepts either an array or an object ({ items, progress }). */\n actions?: Action[] | { items: Action[]; progress: boolean };\n\n /** Visually promoted case level actions available outside the menu. */\n promotedActions?: Action[];\n\n /** A callback for when the edit button is clicked */\n onEdit?: () => void;\n\n /** Field data to render in summary areas. */\n summaryFields: CaseSummaryFieldsProps;\n\n /**\n * Determines the layout state of the summary region.\n * @default true\n */\n summaryExpanded?: boolean;\n\n /** Callback to toggle the case summary's layout. */\n onToggleSummary?: () => void;\n\n /** An object handling the rendering and functionality of the Tabs in CaseSummary. */\n tabs: {\n items: Tab[];\n onClick: (id: string, event?: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n currentTabId: string;\n };\n\n /** A region within the center column that is controlled by tabs in CaseSummary. */\n tabContent?: { content: ReactNode; id: string }[];\n\n /** A region to hold a Stages component. */\n stages?: ReactNode;\n\n /** A region to hold a Tasks component. */\n tasks?: ReactNode;\n\n /** A region above the center column to display banners. */\n banners?: ReactNode;\n\n /** A region to the right reserved for persistent utilities. */\n persistentUtility?: {\n content: ReactNode;\n title: string;\n showExpand?: boolean;\n };\n\n /** Provide an instance of IntelligentGuidance to be rendered for a case. */\n intelligentGuidance?: ReactNode;\n\n /** A region for case widgets. */\n utilities?: ReactNode;\n\n /** An indicator of case widgets when the utilities are collapsed. */\n utilitiesSummaryItems?: UtilitySummaryItem[];\n\n /**\n * Determines the layout state of the utilities.\n * @default true\n */\n utilitiesExpanded?: boolean;\n\n /** Callback to toggle the utilities. */\n onToggleUtilities?: () => void;\n\n /**\n * Indicates CaseView is rendered within a CasePreview.\n * @internal\n */\n isPreview?: boolean;\n /** Gen AI Coach Props */\n genAICoachProps?: CaseViewGenAICoachProps;\n\n /** An instance of the Collaboration component. */\n collaboration?: ReactElement;\n}\n\nexport interface CaseViewContextValue\n extends Pick<\n CaseViewProps,\n | 'caseId'\n | 'heading'\n | 'subheading'\n | 'caseType'\n | 'parentCases'\n | 'icon'\n | 'color'\n | 'followed'\n | 'onFollowedChange'\n | 'actions'\n | 'promotedActions'\n | 'onEdit'\n | 'tabs'\n | 'summaryExpanded'\n | 'summaryFields'\n | 'onToggleSummary'\n | 'utilitiesExpanded'\n | 'stages'\n | 'tasks'\n | 'persistentUtility'\n | 'intelligentGuidance'\n | 'collaboration'\n > {\n testIds: Partial<ReturnType<typeof getCaseViewTestIds>>;\n aboveSM: boolean;\n aboveMD: boolean;\n aboveLG: boolean;\n aboveXL: boolean;\n isPreview: boolean;\n /** True when a GenAI coach is configured to render in the utilities panel. */\n hasGenAICoach?: boolean;\n caseLink?: { href: string } & ForwardProps;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-work",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-core": "9.0.0-build.29.
|
|
18
|
-
"@pega/cosmos-react-rte": "9.0.0-build.29.
|
|
17
|
+
"@pega/cosmos-react-core": "9.0.0-build.29.5",
|
|
18
|
+
"@pega/cosmos-react-rte": "9.0.0-build.29.5",
|
|
19
19
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
20
20
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
21
21
|
"polished": "^4.1.0",
|