@pega/cosmos-react-work 7.0.0-build.22.2 → 7.0.0-build.22.21
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/ArticleList/AIArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/AIArticleSummary.js +26 -11
- package/lib/components/ArticleList/AIArticleSummary.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.d.ts +1 -0
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.js +12 -6
- package/lib/components/ArticleList/ArticleList.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.d.ts +23 -6
- package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.js +6 -0
- package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
- package/lib/components/ArticleList/ArticleListFilter.d.ts +2 -1
- package/lib/components/ArticleList/ArticleListFilter.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleListFilter.js +3 -3
- package/lib/components/ArticleList/ArticleListFilter.js.map +1 -1
- package/lib/components/ArticleList/ArticleSemanticSearch.d.ts +5 -0
- package/lib/components/ArticleList/ArticleSemanticSearch.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleSemanticSearch.js +19 -0
- package/lib/components/ArticleList/ArticleSemanticSearch.js.map +1 -0
- package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.js +4 -9
- package/lib/components/ArticleList/ArticleSummary.js.map +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js.map +1 -1
- package/lib/components/ArticleList/ArticleTag.d.ts +7 -0
- package/lib/components/ArticleList/ArticleTag.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleTag.js +17 -0
- package/lib/components/ArticleList/ArticleTag.js.map +1 -0
- package/lib/components/ArticleList/index.d.ts +2 -1
- package/lib/components/ArticleList/index.d.ts.map +1 -1
- package/lib/components/ArticleList/index.js +1 -0
- package/lib/components/ArticleList/index.js.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.js +11 -4
- package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js +3 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +144 -24
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +3 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +23 -10
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +12 -4
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/SearchResults/Filter.d.ts +0 -1
- package/lib/components/SearchResults/Filter.d.ts.map +1 -1
- package/lib/components/SearchResults/Filter.js +1 -1
- package/lib/components/SearchResults/Filter.js.map +1 -1
- package/lib/components/SearchResults/SearchResult.d.ts +0 -1
- package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +1 -1
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSummary.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"ArticleSummary.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG9E,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AAGjD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,cAAc,GAA0D,CAC5E,KAA0B,EAC1B,EAAE;IACF,MAAM,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IACV,OAAO,CACL,MAAC,WAAW,IAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,KAAK,SAAS,aAC/C,KAAC,oBAAoB,IACnB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,GACV,EACF,KAAC,WAAW,cACV,KAAC,IAAI,cAAE,QAAQ,GAAQ,GACX,EACd,MAAC,UAAU,eACR,QAAQ,IAAI,CACX,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EACpC,IAAI,EAAE;4BACJ,IAAI,EAAE,CAAC;4BACP,KAAK,EAAE,MAAM;yBACd,YAED,KAAC,aAAa,IAEV,GAAG,QAAQ;4BACX,UAAU,EAAE,QAAQ,CAAC,EAAE;gCACrB,QAAQ,EAAE,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;4BAC5C,CAAC,GAEH,GACG,CACR,EACA,IAAI,IAAI,KAAC,WAAW,OAAK,IAAI,GAAI,EACjC,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,CAC1C,KAAC,UAAU,IAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,GAAI,CACnF,IACU,IACD,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport { CardContent, CardFooter, Text, Flex } from '@pega/cosmos-react-core';\nimport type { ForwardProps } from '@pega/cosmos-react-core';\n\nimport ArticleRating from '../Article/ArticleRating';\nimport ArticleMeta from '../Article/ArticleMeta';\n\nimport type { ArticleSummaryProps } from './ArticleList.types';\nimport ArticleSummaryHeader from './ArticleSummaryHeader';\nimport { ArticleCard } from './ArticleSummary.styles';\nimport ArticleTag from './ArticleTag';\n\nconst ArticleSummary: FunctionComponent<ArticleSummaryProps & ForwardProps> = (\n props: ArticleSummaryProps\n) => {\n const {\n articleId,\n href,\n title,\n abstract,\n onTitleClick,\n actions,\n meta,\n quickFilters,\n onQuickFilterClick,\n feedback,\n ...restProps\n } = props;\n return (\n <ArticleCard as='li' role='article' {...restProps}>\n <ArticleSummaryHeader\n articleId={articleId}\n title={title}\n actions={actions}\n onTitleClick={onTitleClick}\n href={href}\n />\n <CardContent>\n <Text>{abstract}</Text>\n </CardContent>\n <CardFooter>\n {feedback && (\n <Flex\n container={{ pad: [0.5, undefined] }}\n item={{\n grow: 1,\n basis: '100%'\n }}\n >\n <ArticleRating\n {...{\n ...feedback,\n onReaction: reaction => {\n feedback?.onReaction(articleId, reaction);\n }\n }}\n />\n </Flex>\n )}\n {meta && <ArticleMeta {...meta} />}\n {quickFilters && quickFilters.length > 0 && (\n <ArticleTag quickFilters={quickFilters} onQuickFilterClick={onQuickFilterClick} />\n )}\n </CardFooter>\n </ArticleCard>\n );\n};\n\nexport default ArticleSummary;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Actions, Button, CardHeader, Link } from '@pega/cosmos-react-core';
|
|
3
3
|
const ArticleSummaryHeader = ({ title, onTitleClick, href, actions, articleId }) => {
|
|
4
|
-
return (_jsx(CardHeader, { actions: actions?.length ? _jsx(Actions, { items: actions }) : undefined, children: href ? (_jsx(Link, { href: href, target: '_blank', children: title })) : (_jsx(Button, { variant: 'link', onClick: (e) => {
|
|
4
|
+
return (_jsx(CardHeader, { actions: actions?.length ? _jsx(Actions, { items: actions, compact: true }) : undefined, children: href ? (_jsx(Link, { href: href, target: '_blank', children: title })) : (_jsx(Button, { variant: 'link', onClick: (e) => {
|
|
5
5
|
onTitleClick?.(articleId, e);
|
|
6
6
|
}, children: title })) }));
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSummaryHeader.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummaryHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,IAAI,EAGL,MAAM,yBAAyB,CAAC;AAUjC,MAAM,oBAAoB,GAAiD,CAAC,EAC1E,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,SAAS,EACV,EAAE,EAAE;IACH,OAAO,CACL,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"ArticleSummaryHeader.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummaryHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,IAAI,EAGL,MAAM,yBAAyB,CAAC;AAUjC,MAAM,oBAAoB,GAAiD,CAAC,EAC1E,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,SAAS,EACV,EAAE,EAAE;IACH,OAAO,CACL,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,EAAE,OAAO,SAAG,CAAC,CAAC,CAAC,SAAS,YACnF,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,YAC9B,KAAK,GACD,CACR,CAAC,CAAC,CAAC,CACF,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;gBAC5C,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC/B,CAAC,YAEA,KAAK,GACC,CACV,GACU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import type { FunctionComponent, MouseEvent } from 'react';\n\nimport {\n Actions,\n Button,\n CardHeader,\n Link,\n type NoChildrenProp,\n type WithAttributes\n} from '@pega/cosmos-react-core';\n\nimport type { ArticleSummaryProps } from './ArticleList.types';\n\ntype ArticleSummaryHeaderProps = WithAttributes<\n 'header',\n NoChildrenProp &\n Pick<ArticleSummaryProps, 'articleId' | 'title' | 'href' | 'onTitleClick' | 'actions'>\n>;\n\nconst ArticleSummaryHeader: FunctionComponent<ArticleSummaryHeaderProps> = ({\n title,\n onTitleClick,\n href,\n actions,\n articleId\n}) => {\n return (\n <CardHeader actions={actions?.length ? <Actions items={actions} compact /> : undefined}>\n {href ? (\n <Link href={href} target='_blank'>\n {title}\n </Link>\n ) : (\n <Button\n variant='link'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onTitleClick?.(articleId, e);\n }}\n >\n {title}\n </Button>\n )}\n </CardHeader>\n );\n};\n\nexport default ArticleSummaryHeader;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type NoChildrenProp, type WithAttributes } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { ArticleSummaryProps } from './ArticleList.types';
|
|
4
|
+
export type ArticleTagProps = WithAttributes<'div', NoChildrenProp & Pick<ArticleSummaryProps, 'quickFilters' | 'onQuickFilterClick'>>;
|
|
5
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<ArticleTagProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=ArticleTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleTag.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleTag.tsx"],"names":[],"mappings":";AAGA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,MAAM,MAAM,eAAe,GAAG,cAAc,CAC1C,KAAK,EACL,cAAc,GAAG,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,oBAAoB,CAAC,CAClF,CAAC;;AAEF,wBA8BE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Tag, Flex } from '@pega/cosmos-react-core';
|
|
4
|
+
import { StyledQuickFilters } from './ArticleSummary.styles';
|
|
5
|
+
export default forwardRef(function ArticleTag({ quickFilters, onQuickFilterClick, ...restProps }, ref) {
|
|
6
|
+
return (_jsx(Flex, { ...restProps, container: {
|
|
7
|
+
gap: 0.5,
|
|
8
|
+
wrap: 'wrap',
|
|
9
|
+
pad: [0.5, undefined, undefined]
|
|
10
|
+
}, item: {
|
|
11
|
+
grow: 1,
|
|
12
|
+
basis: '100%'
|
|
13
|
+
}, as: StyledQuickFilters, ref: ref, children: quickFilters &&
|
|
14
|
+
quickFilters.length > 0 &&
|
|
15
|
+
quickFilters.map(({ id, name }) => (_jsx(Tag, { onClick: onQuickFilterClick ? e => onQuickFilterClick?.({ id, name }, e) : undefined, children: name }, id))) }));
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=ArticleTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleTag.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleTag.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAEL,GAAG,EACH,IAAI,EAGL,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,eAAe,UAAU,CACvB,SAAS,UAAU,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG;IACzE,OAAO,CACL,KAAC,IAAI,OACC,SAAS,EACb,SAAS,EAAE;YACT,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC;SACjC,EACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,MAAM;SACd,EACD,EAAE,EAAE,kBAAkB,EACtB,GAAG,EAAE,GAAG,YAEP,YAAY;YACX,YAAY,CAAC,MAAM,GAAG,CAAC;YACvB,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACjC,KAAC,GAAG,IAEF,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,YAEnF,IAAI,IAHA,EAAE,CAIH,CACP,CAAC,GACC,CACR,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import type { PropsWithoutRef } from 'react';\nimport { forwardRef } from 'react';\n\nimport {\n type RefElement,\n Tag,\n Flex,\n type NoChildrenProp,\n type WithAttributes\n} from '@pega/cosmos-react-core';\n\nimport type { ArticleSummaryProps } from './ArticleList.types';\nimport { StyledQuickFilters } from './ArticleSummary.styles';\n\nexport type ArticleTagProps = WithAttributes<\n 'div',\n NoChildrenProp & Pick<ArticleSummaryProps, 'quickFilters' | 'onQuickFilterClick'>\n>;\n\nexport default forwardRef<RefElement<ArticleTagProps>, PropsWithoutRef<ArticleTagProps>>(\n function ArticleTag({ quickFilters, onQuickFilterClick, ...restProps }, ref) {\n return (\n <Flex\n {...restProps}\n container={{\n gap: 0.5,\n wrap: 'wrap',\n pad: [0.5, undefined, undefined]\n }}\n item={{\n grow: 1,\n basis: '100%'\n }}\n as={StyledQuickFilters}\n ref={ref}\n >\n {quickFilters &&\n quickFilters.length > 0 &&\n quickFilters.map(({ id, name }) => (\n <Tag\n key={id}\n onClick={onQuickFilterClick ? e => onQuickFilterClick?.({ id, name }, e) : undefined}\n >\n {name}\n </Tag>\n ))}\n </Flex>\n );\n }\n);\n"]}
|
|
@@ -3,6 +3,7 @@ export type { ArticleListProps } from './ArticleList.types';
|
|
|
3
3
|
export { default as ArticleSummary } from './ArticleSummary';
|
|
4
4
|
export type { ArticleSummaryProps, AIArticleSummaryProps, Articles, QuickFilter } from './ArticleList.types';
|
|
5
5
|
export { default as ArticleListFilter } from './ArticleListFilter';
|
|
6
|
-
export type { ArticleBuddyProps, Reaction, BuddyListProps, BuddyResponseProps, AutoAnsweredItem, DetectedItem, ArticleFeedbackProps } from './ArticleList.types';
|
|
6
|
+
export type { ArticleBuddyProps, Reaction, BuddyListProps, BuddyResponseProps, AutoAnsweredItem, DetectedItem, ArticleFeedbackProps, SearchArticle } from './ArticleList.types';
|
|
7
7
|
export { default as ArticleBuddy } from './ArticleBuddy';
|
|
8
|
+
export { default as ArticleSemanticSearch } from './ArticleSemanticSearch';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -2,4 +2,5 @@ export { default } from './ArticleList';
|
|
|
2
2
|
export { default as ArticleSummary } from './ArticleSummary';
|
|
3
3
|
export { default as ArticleListFilter } from './ArticleListFilter';
|
|
4
4
|
export { default as ArticleBuddy } from './ArticleBuddy';
|
|
5
|
+
export { default as ArticleSemanticSearch } from './ArticleSemanticSearch';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAWnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { default } from './ArticleList';\nexport type { ArticleListProps } from './ArticleList.types';\nexport { default as ArticleSummary } from './ArticleSummary';\nexport type {\n ArticleSummaryProps,\n AIArticleSummaryProps,\n Articles,\n QuickFilter\n} from './ArticleList.types';\nexport { default as ArticleListFilter } from './ArticleListFilter';\nexport type {\n ArticleBuddyProps,\n Reaction,\n BuddyListProps,\n BuddyResponseProps,\n AutoAnsweredItem,\n DetectedItem,\n ArticleFeedbackProps,\n SearchArticle\n} from './ArticleList.types';\nexport { default as ArticleBuddy } from './ArticleBuddy';\nexport { default as ArticleSemanticSearch } from './ArticleSemanticSearch';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UtilitiesSummary.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UtilitiesSummary.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAkB/C,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,sBAAsB,wGAiBlC,CAAC;AA+EF,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAe9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
-
import {
|
|
4
|
+
import { mix } from 'polished';
|
|
5
|
+
import { Button, Card, Count, Flex, Icon, Tooltip, useI18n, VisuallyHiddenText, useElement, tryCatch, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
5
6
|
export const StyledUtilitiesSummary = styled.ul `
|
|
6
7
|
width: 2.75rem;
|
|
7
8
|
list-style: none;
|
|
@@ -20,19 +21,23 @@ export const StyledUtilitiesSummary = styled.ul `
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
`;
|
|
23
|
-
const StyledUtilitySummaryButton = styled(Button)(({ theme }) =>
|
|
24
|
-
|
|
24
|
+
const StyledUtilitySummaryButton = styled(Button)(({ theme: { base: { palette, spacing } } }) => {
|
|
25
|
+
const hoverBackground = tryCatch(() => mix(0.9, palette['primary-background'], palette['foreground-color']));
|
|
26
|
+
return css `
|
|
27
|
+
padding-block: ${spacing};
|
|
25
28
|
padding-inline: 0;
|
|
26
29
|
width: 100%;
|
|
27
30
|
color: currentColor;
|
|
28
31
|
border-radius: unset;
|
|
29
32
|
border: none;
|
|
33
|
+
background: ${palette['primary-background']};
|
|
30
34
|
|
|
31
35
|
& + & {
|
|
32
36
|
margin: 0;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
&:hover {
|
|
40
|
+
background: ${hoverBackground};
|
|
36
41
|
color: currentColor;
|
|
37
42
|
}
|
|
38
43
|
|
|
@@ -49,7 +54,9 @@ const StyledUtilitySummaryButton = styled(Button)(({ theme }) => css `
|
|
|
49
54
|
border-end-start-radius: inherit;
|
|
50
55
|
border-end-end-radius: inherit;
|
|
51
56
|
}
|
|
52
|
-
|
|
57
|
+
`;
|
|
58
|
+
});
|
|
59
|
+
StyledUtilitySummaryButton.defaultProps = defaultThemeProp;
|
|
53
60
|
const UtilitySummary = ({ name, iconName, count, onClick }) => {
|
|
54
61
|
const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement();
|
|
55
62
|
return (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UtilitiesSummary.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":";;AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"UtilitiesSummary.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":";;AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,QAAQ,EACR,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;CAiB9C,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EACjD,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC3B,EACF,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE,CACpC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CACrE,CAAC;IACF,OAAO,GAAG,CAAA;qBACS,OAAO;;;;;;kBAMV,OAAO,CAAC,oBAAoB,CAAC;;;;;;;oBAO3B,eAAe;;;;;;;;;;;;;;;;;GAiBhC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3D,MAAM,cAAc,GAA0C,CAAC,EAC7D,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACR,EAAE,EAAE;IACH,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,UAAU,EAAe,CAAC;IAC9E,OAAO;IACL,2EAA2E;IAC3E,uDAAuD;IACvD,cAAI,IAAI,EAAC,UAAU,aACjB,MAAC,IAAI,IACH,SAAS,EAAE;oBACT,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,QAAQ;oBACpB,GAAG,EAAE,GAAG;iBACT,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,qBAAqB,EAC1B,EAAE,EAAE,0BAA0B,aAE9B,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,GAAI,EACvB,KAAK,KAAK,SAAS,IAAI,KAAC,KAAK,mCAAc,KAAK,GAAS,EAC1D,KAAC,kBAAkB,cAAE,GAAG,KAAK,IAAI,EAAE,IAAI,IAAI,EAAE,GAAsB,IAC9D,EAEP,KAAC,OAAO,IAAC,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,YACnE,IAAI,GACG,IACP,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAA6C,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE;IACpF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EACxD,EAAE,EAAE,sBAAsB,gBACd,CAAC,CAAC,mBAAmB,CAAC,EAClC,IAAI,EAAC,MAAM,YAEV,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,eAAC,cAAc,OAAK,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,GAAI,CACjD,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport {\n Button,\n Card,\n Count,\n Flex,\n Icon,\n Tooltip,\n useI18n,\n VisuallyHiddenText,\n useElement,\n tryCatch,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\n\nimport type { CaseViewProps, UtilitySummaryItem } from './CaseView.types';\n\nexport interface UtilitiesSummaryProps {\n items?: CaseViewProps['utilitiesSummaryItems'];\n}\n\nexport const StyledUtilitiesSummary = styled.ul`\n width: 2.75rem;\n list-style: none;\n\n > li {\n display: contents;\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n`;\n\nconst StyledUtilitySummaryButton = styled(Button)(({\n theme: {\n base: { palette, spacing }\n }\n}) => {\n const hoverBackground = tryCatch(() =>\n mix(0.9, palette['primary-background'], palette['foreground-color'])\n );\n return css`\n padding-block: ${spacing};\n padding-inline: 0;\n width: 100%;\n color: currentColor;\n border-radius: unset;\n border: none;\n background: ${palette['primary-background']};\n\n & + & {\n margin: 0;\n }\n\n &:hover {\n background: ${hoverBackground};\n color: currentColor;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n `;\n});\n\nStyledUtilitySummaryButton.defaultProps = defaultThemeProp;\n\nconst UtilitySummary: FunctionComponent<UtilitySummaryItem> = ({\n name,\n iconName,\n count,\n onClick\n}) => {\n const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement<HTMLElement>();\n return (\n // Default role is removed by \"list-style: none\" on StyledUtilitiesSummary.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li role='listitem'>\n <Flex\n container={{\n direction: 'column',\n alignItems: 'center',\n gap: 0.5\n }}\n onClick={onClick}\n ref={setUtilSummaryTooltip}\n as={StyledUtilitySummaryButton}\n >\n <Icon name={iconName} />\n {count !== undefined && <Count aria-hidden>{count}</Count>}\n <VisuallyHiddenText>{`${count ?? ''} ${name}`}</VisuallyHiddenText>\n </Flex>\n\n <Tooltip target={utilSummaryTooltip} showDelay='none' hideDelay='none'>\n {name}\n </Tooltip>\n </li>\n );\n};\n\nconst UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps> = ({ items = [] }) => {\n const t = useI18n();\n\n return (\n <Card\n container={{ direction: 'column', alignItems: 'center' }}\n as={StyledUtilitiesSummary}\n aria-label={t('utilities_summary')}\n role='list'\n >\n {items.map(item => (\n <UtilitySummary {...item} key={item.iconName} />\n ))}\n </Card>\n );\n};\n\nexport default UtilitiesSummary;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UtilitySummaryItemDialog.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAQlG,KAAK,6BAA6B,GAAG,cAAc,CACjD,KAAK,EACL;IACE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CACF,CAAC;AAEF,QAAA,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"UtilitySummaryItemDialog.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAQlG,KAAK,6BAA6B,GAAG,cAAc,CACjD,KAAK,EACL;IACE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CACF,CAAC;AAEF,QAAA,MAAM,wBAAwB,uIA2C5B,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -18,7 +18,6 @@ const UtilitySummaryItemDialog = forwardRef(function UtilitySummaryItemDialog({
|
|
|
18
18
|
});
|
|
19
19
|
useEscape(() => {
|
|
20
20
|
onDismiss?.();
|
|
21
|
-
target.focus();
|
|
22
21
|
}, dialogRef);
|
|
23
22
|
useFocusTrap(dialogRef, false);
|
|
24
23
|
useEffect(() => {
|
|
@@ -28,6 +27,9 @@ const UtilitySummaryItemDialog = forwardRef(function UtilitySummaryItemDialog({
|
|
|
28
27
|
else if (dialogRef.current) {
|
|
29
28
|
focusHeadingOrContainer(dialogRef.current);
|
|
30
29
|
}
|
|
30
|
+
return () => {
|
|
31
|
+
target.focus();
|
|
32
|
+
};
|
|
31
33
|
}, []);
|
|
32
34
|
const { start } = useDirection();
|
|
33
35
|
return (_jsx(StyledUtilitySummaryItemDialog, { ref: dialogRef, target: target, arrow: true, placement: `${start}-start`, children: children }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UtilitySummaryItemDialog.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,MAAM,MAAM,sDAAsD,CAAC;AAG1E,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;CAEpD,CAAC;AAEF,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAU/D,MAAM,wBAAwB,GAAG,UAAU,CAGzC,SAAS,wBAAwB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG;IACtE,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE1C,aAAa,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE;QAClD,qEAAqE;QACrE,IAAK,CAAC,CAAC,MAAkB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;YAClD,OAAO;SACR;QACD,SAAS,EAAE,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"UtilitySummaryItemDialog.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,MAAM,MAAM,sDAAsD,CAAC;AAG1E,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;CAEpD,CAAC;AAEF,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAU/D,MAAM,wBAAwB,GAAG,UAAU,CAGzC,SAAS,wBAAwB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG;IACtE,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE1C,aAAa,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE;QAClD,qEAAqE;QACrE,IAAK,CAAC,CAAC,MAAkB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;YAClD,OAAO;SACR;QACD,SAAS,EAAE,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,EAAE,CAAC;IAChB,CAAC,EAAE,SAAS,CAAC,CAAC;IAEd,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,UAAU,CAAC,CAAC,CAAC;YAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;aACpC,IAAI,SAAS,CAAC,OAAO,EAAE;YAC1B,uBAAuB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SAC5C;QACD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,OAAO,CACL,KAAC,8BAA8B,IAC7B,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,MAAM,EACd,KAAK,QACL,SAAS,EAAE,GAAG,KAAK,QAAQ,YAE1B,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC","sourcesContent":["import { forwardRef, useEffect } from 'react';\nimport type { PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport {\n defaultThemeProp,\n focusHeadingOrContainer,\n useConsolidatedRef,\n useDirection,\n useFocusTrap,\n useEscape,\n useOuterEvent,\n getFocusables\n} from '@pega/cosmos-react-core';\nimport type { RefElement, WithAttributes } from '@pega/cosmos-react-core';\nimport Dialog from '@pega/cosmos-react-core/lib/components/Dialog/Dialog';\nimport type { BaseDialogProps } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';\n\nconst StyledUtilitySummaryItemDialog = styled(Dialog)`\n width: 25rem;\n`;\n\nStyledUtilitySummaryItemDialog.defaultProps = defaultThemeProp;\n\ntype UtilitySummaryItemDialogProps = WithAttributes<\n 'div',\n {\n target: BaseDialogProps['target'];\n onDismiss?: () => void;\n }\n>;\n\nconst UtilitySummaryItemDialog = forwardRef<\n RefElement<UtilitySummaryItemDialogProps>,\n PropsWithoutRef<UtilitySummaryItemDialogProps>\n>(function UtilitySummaryItemDialog({ children, target, onDismiss }, ref) {\n const dialogRef = useConsolidatedRef(ref);\n\n useOuterEvent('mousedown', [dialogRef, target], e => {\n // FIXME: This targets the modal backdrop. We need a better solution.\n if ((e.target as Element).closest('[opacity=\"1\"]')) {\n return;\n }\n onDismiss?.();\n });\n\n useEscape(() => {\n onDismiss?.();\n }, dialogRef);\n\n useFocusTrap(dialogRef, false);\n\n useEffect(() => {\n const focusables = getFocusables(dialogRef);\n if (focusables[0]) focusables[0].focus();\n else if (dialogRef.current) {\n focusHeadingOrContainer(dialogRef.current);\n }\n return () => {\n target.focus();\n };\n }, []);\n\n const { start } = useDirection();\n\n return (\n <StyledUtilitySummaryItemDialog\n ref={dialogRef}\n target={target}\n arrow\n placement={`${start}-start`}\n >\n {children}\n </StyledUtilitySummaryItemDialog>\n );\n});\n\nexport default UtilitySummaryItemDialog;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionComponent } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type GenAICoachProps } from '.';
|
|
3
3
|
declare const _default: FunctionComponent<GenAICoachProps> & {
|
|
4
4
|
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAICoach.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAICoach.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAyD5D,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,GAAG,CAAC;;;;AA8hBhF,wBAA6D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { Button, Flex, Grid, Icon, MenuButton, Progress, Text, TextArea, createUID, menuHelpers, useBreakpoint, useI18n, useTestIds, useTheme, withTestIds, Card, registerIcon, usePrevious, getFocusables, isMenuGroupProps, ErrorState } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Button, Flex, Grid, Icon, MenuButton, Progress, Text, TextArea, createUID, menuHelpers, useBreakpoint, useI18n, useTestIds, useTheme, withTestIds, Card, registerIcon, usePrevious, getFocusables, isMenuGroupProps, ErrorState, Tooltip, useElement, useArrows, focusableSelector, useLiveLog, useOuterEvent } from '@pega/cosmos-react-core';
|
|
4
4
|
import * as caretUpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-up.icon';
|
|
5
5
|
import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
|
|
6
6
|
import * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';
|
|
@@ -8,23 +8,30 @@ import * as minusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/mi
|
|
|
8
8
|
import * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';
|
|
9
9
|
import CaseViewContext from '../CaseView/CaseView.context';
|
|
10
10
|
import { getGenAICoachTestIds } from './GenAICoach.test-ids';
|
|
11
|
-
import { StyledChatButton, StyledCloseButton, StyledMessagesContainer, StyledDisclaimerText, StyledGenAICoachContainer, StyledGenAIOptionsMenu, StyledInitialMessageContainer, StyledInputContainer, StyledMessageWrapper, StyledStarterMessage, StyledSuggestions } from './GenAICoach.styles';
|
|
12
11
|
import { isCoachMessage, isInUtilities, isUserMessage } from './GenAICoach.utils';
|
|
12
|
+
import { StyledChatButton, StyledCloseButton, StyledMessagesContainer, StyledDisclaimerText, StyledGenAICoachContainer, StyledGenAIOptionsMenu, StyledInitialMessageContainer, StyledInputContainer, StyledStarterMessage, StyledSuggestions, StyledStarterMessageCard, StyledMessagesList } from './GenAICoach.styles';
|
|
13
13
|
import { GenAIMessage, InitialSuggestedMessage } from '.';
|
|
14
14
|
registerIcon(caretUpIcon, timesIcon, caretDownIcon, minusIcon, polarisSolidIcon);
|
|
15
15
|
const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: onCoachChangeProp, messages = [], onSend, initialSuggestedMessages, suggestions, loading, error, starterMessage, variant, onOpen, ...restProps }) => {
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const t = useI18n();
|
|
16
18
|
const elementRef = useRef(null);
|
|
17
19
|
const conversationRef = useRef(null);
|
|
18
20
|
const genAICoachRef = useRef(null);
|
|
21
|
+
const [starterMessageElement, setStarterMessageElement] = useElement(null);
|
|
22
|
+
const focusInMessageListRef = useRef(false);
|
|
23
|
+
const lastFocusedMessageRef = useRef(null);
|
|
24
|
+
const initialFocusedElementRef = useRef(null);
|
|
25
|
+
const messageContainerRef = useRef(null);
|
|
19
26
|
const textAreaRef = useRef(null);
|
|
20
27
|
const [message, setMessage] = useState('');
|
|
21
28
|
const [coachOptions, setCoachOptions] = useState(coachOptionsProps);
|
|
29
|
+
const [arrowKey, setArrowKey] = useState(null);
|
|
22
30
|
const smOrAbove = useBreakpoint('sm', { breakpointRef: genAICoachRef });
|
|
23
|
-
const previousMessages = usePrevious(messages);
|
|
24
|
-
const theme = useTheme();
|
|
25
|
-
const t = useI18n();
|
|
26
31
|
const { setGenAIHeight, aboveLG } = useContext(CaseViewContext);
|
|
32
|
+
const previousMessages = usePrevious(messages);
|
|
27
33
|
const testIds = useTestIds(testId, getGenAICoachTestIds);
|
|
34
|
+
const { announcePolite } = useLiveLog();
|
|
28
35
|
const onCoachChange = (id) => {
|
|
29
36
|
setCoachOptions(cur => {
|
|
30
37
|
return cur.map(coach => {
|
|
@@ -61,11 +68,6 @@ const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: on
|
|
|
61
68
|
const handleTextAreaChange = useCallback((e) => {
|
|
62
69
|
setMessage(e.currentTarget.value);
|
|
63
70
|
}, [setMessage]);
|
|
64
|
-
const scrollToBottom = () => {
|
|
65
|
-
if (conversationRef.current) {
|
|
66
|
-
conversationRef.current.scrollTop = conversationRef.current.scrollHeight;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
71
|
const renderCoachOptions = useMemo(() => {
|
|
70
72
|
if (coachOptions.length === 0 || !selectedCoach) {
|
|
71
73
|
return null;
|
|
@@ -82,6 +84,14 @@ const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: on
|
|
|
82
84
|
const headerContent = useMemo(() => {
|
|
83
85
|
return isInUtilities(variant) && variant.state === 'docked' ? (_jsxs(_Fragment, { children: [_jsxs(Flex, { container: { gap: 1 }, children: [_jsx(Icon, { name: 'polaris-solid', color: theme.base.palette.ai }), _jsx(Text, { variant: 'h3', children: selectedCoach })] }), _jsx(Flex, { container: { alignItems: 'center' }, children: _jsx(Button, { icon: true, label: t('maximize'), "aria-label": t('maximize_gen_ai', [t('coach', ['Pega Gen AI'])]), variant: 'simple', onClick: () => variant.onStateChange('maximized'), children: _jsx(Icon, { name: 'caret-up' }) }) })] })) : (_jsxs(_Fragment, { children: [renderCoachOptions, isInUtilities(variant) && (_jsx(Button, { icon: true, label: t('minimize'), "aria-label": t('minimize_gen_ai', [t('coach', ['Pega Gen AI'])]), variant: 'simple', onClick: () => variant.onStateChange('docked'), children: _jsx(Icon, { name: 'minus' }) })), variant.placement === 'dialog' && (_jsx(Button, { icon: true, label: t('close'), "aria-label": t('close_gen_ai', [t('coach', ['Pega Gen AI'])]), variant: 'simple', onClick: variant.onClose, children: _jsx(Icon, { name: 'times' }) }))] }));
|
|
84
86
|
}, [variant, coachOptions]);
|
|
87
|
+
const setLastFocusableElement = () => {
|
|
88
|
+
focusInMessageListRef.current = false;
|
|
89
|
+
lastFocusedMessageRef.current = conversationRef?.current?.querySelector(':focus') || null;
|
|
90
|
+
if (lastFocusedMessageRef.current &&
|
|
91
|
+
lastFocusedMessageRef.current?.tagName.toLowerCase() !== 'li') {
|
|
92
|
+
lastFocusedMessageRef.current = lastFocusedMessageRef.current.closest('li[type="message"]');
|
|
93
|
+
}
|
|
94
|
+
};
|
|
85
95
|
const onResize = () => {
|
|
86
96
|
if (genAICoachRef.current) {
|
|
87
97
|
const height = genAICoachRef.current.clientHeight;
|
|
@@ -92,18 +102,19 @@ const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: on
|
|
|
92
102
|
if (isInUtilities(variant)) {
|
|
93
103
|
onResize();
|
|
94
104
|
}
|
|
95
|
-
}, [variant]);
|
|
96
|
-
useEffect(() => {
|
|
97
|
-
onResize();
|
|
98
105
|
if (variant.placement !== 'fullpage') {
|
|
99
106
|
textAreaRef.current?.focus();
|
|
107
|
+
elementRef.current = null;
|
|
100
108
|
}
|
|
109
|
+
}, [variant]);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
onResize();
|
|
101
112
|
if (isInUtilities(variant) &&
|
|
102
113
|
variant.state === 'docked' &&
|
|
103
114
|
getFocusables(genAICoachRef).length > 0) {
|
|
104
115
|
getFocusables(genAICoachRef)[0].focus();
|
|
105
116
|
}
|
|
106
|
-
}, [
|
|
117
|
+
}, []);
|
|
107
118
|
useEffect(() => {
|
|
108
119
|
onOpen?.();
|
|
109
120
|
window.addEventListener('resize', onResize);
|
|
@@ -115,41 +126,147 @@ const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: on
|
|
|
115
126
|
if (isInUtilities(variant) && variant.state !== 'maximized' && messages.length > 0) {
|
|
116
127
|
variant.onStateChange('maximized');
|
|
117
128
|
}
|
|
118
|
-
if (messages.length > 0 && previousMessages?.length
|
|
129
|
+
if (messages.length > 0 && previousMessages && previousMessages?.length < messages.length) {
|
|
119
130
|
setTimeout(() => {
|
|
120
|
-
|
|
131
|
+
conversationRef.current?.lastElementChild?.scrollIntoView({
|
|
132
|
+
behavior: 'smooth',
|
|
133
|
+
block: 'start'
|
|
134
|
+
});
|
|
121
135
|
}, 0);
|
|
122
|
-
if (isUserMessage(messages[messages.length - 1]))
|
|
136
|
+
if (isUserMessage(messages[messages.length - 1])) {
|
|
123
137
|
textAreaRef.current?.focus();
|
|
138
|
+
setLastFocusableElement();
|
|
139
|
+
elementRef.current = null;
|
|
140
|
+
setArrowKey(null);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
announcePolite({ message: t('coach', [`${t('new_message')} ${t('from')}`]) });
|
|
144
|
+
}
|
|
124
145
|
}
|
|
125
146
|
}, [messages]);
|
|
126
|
-
|
|
147
|
+
/** Supports arrow key behaviors */
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
const focusables = getFocusables(elementRef);
|
|
150
|
+
if (arrowKey === 'ArrowRight') {
|
|
151
|
+
focusables[0]?.focus();
|
|
152
|
+
}
|
|
153
|
+
else if (arrowKey === 'ArrowLeft') {
|
|
154
|
+
focusables[focusables.length - 1]?.focus();
|
|
155
|
+
}
|
|
156
|
+
}, [arrowKey, elementRef.current]);
|
|
157
|
+
useArrows(conversationRef, {
|
|
158
|
+
cycle: true,
|
|
159
|
+
selector: ':scope > li',
|
|
160
|
+
dir: 'up-down',
|
|
161
|
+
allowTabFocus: true,
|
|
162
|
+
initialFocusElement: initialFocusedElementRef.current
|
|
163
|
+
}, [messages, initialFocusedElementRef.current]);
|
|
164
|
+
useArrows(elementRef, {
|
|
165
|
+
cycle: true,
|
|
166
|
+
selector: `li ${focusableSelector}`,
|
|
167
|
+
dir: 'left-right',
|
|
168
|
+
allowTabFocus: true,
|
|
169
|
+
updateTabIndex: false
|
|
170
|
+
}, [messages, elementRef.current, arrowKey]);
|
|
171
|
+
useOuterEvent('mousedown', [conversationRef.current], () => {
|
|
172
|
+
setArrowKey(null);
|
|
173
|
+
focusInMessageListRef.current = false;
|
|
174
|
+
});
|
|
175
|
+
return (_jsxs(Flex, { container: { direction: 'column' }, as: StyledGenAICoachContainer, "data-testid": testIds.root, variant: variant, starterMessage: starterMessage, ref: genAICoachRef, aboveLG: aboveLG, ...restProps, children: [_jsx(Flex, { container: { justify: 'between', alignItems: 'center', pad: 1 }, children: headerContent }), ((isInUtilities(variant) && variant.state !== 'docked') || !isInUtilities(variant)) && (_jsxs(_Fragment, { children: [_jsx(Flex, { as: StyledMessagesContainer, ref: messageContainerRef, container: starterMessage || loading || error
|
|
127
176
|
? { direction: 'column', pad: [0, 2], justify: 'center' }
|
|
128
|
-
: { direction: 'column', pad: [0, 2] }, item: { grow: 1 }, children: loading || error ? (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, children: loading ? (_jsx(Progress, { variant: 'ring', placement: 'block', message: typeof loading === 'string' ? loading : t('loading') })) : (_jsx(ErrorState, { message: error })) })) : (_jsx(_Fragment, { children: messages.length === 0 ? (_jsx(_Fragment, { children: starterMessage ? (_jsxs(Card, { container: { alignItems: 'center', pad: 1, justify: 'between' }, item: { grow: 0 }, as: StyledStarterMessage, children:
|
|
177
|
+
: { direction: 'column', pad: [0, 2] }, item: { grow: 1 }, children: loading || error ? (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, children: loading ? (_jsx(Progress, { variant: 'ring', placement: 'block', message: typeof loading === 'string' ? loading : t('loading') })) : (_jsx(ErrorState, { message: error })) })) : (_jsx(_Fragment, { children: messages.length === 0 ? (_jsx(_Fragment, { children: starterMessage ? (_jsxs(Card, { container: { alignItems: 'center', pad: 1, justify: 'between' }, item: { grow: 0 }, as: StyledStarterMessageCard, children: [_jsx(StyledStarterMessage, { ref: setStarterMessageElement, children: starterMessage.message }), starterMessage.message && starterMessageElement && (_jsx(Tooltip, { target: starterMessageElement, smart: true, children: starterMessage.message })), _jsx(StyledCloseButton, { icon: true, label: t('close'), "aria-label": `${t('close')} ${t('starter_message')}`, variant: 'simple', onClick: starterMessage.onClose, children: _jsx(Icon, { name: 'times' }) })] })) : (_jsxs(Flex, { as: StyledInitialMessageContainer, container: {
|
|
129
178
|
justify: 'center',
|
|
130
179
|
direction: 'column',
|
|
131
180
|
gap: 8
|
|
132
181
|
}, item: { grow: 1 }, children: [((isInUtilities(variant) && variant.state === 'maximized') ||
|
|
133
182
|
!isInUtilities(variant)) && (_jsxs(Flex, { container: { direction: 'column', alignItems: 'center', gap: 2 }, children: [_jsx(Icon, { name: 'polaris-solid', size: 'l', color: theme.base.palette.ai }), _jsx(Text, { variant: 'h2', children: t('welcome_text') })] })), _jsx(Grid, { container: { cols: smOrAbove ? 'repeat(2, 1fr)' : '1fr', gap: 1.5 }, children: initialSuggestedMessages?.map(initialSuggestedMessage => (_jsx(InitialSuggestedMessage, { ...initialSuggestedMessage, onSend: initialMessage => {
|
|
134
183
|
onSend(initialMessage);
|
|
135
|
-
}, testId: initialSuggestedMessage.id }))) })] })) })) : (_jsx(
|
|
184
|
+
}, testId: initialSuggestedMessage.id }))) })] })) })) : (_jsx(Flex, { as: StyledMessagesList, ref: conversationRef, container: { direction: 'column' }, onFocus: () => {
|
|
185
|
+
if (!focusInMessageListRef.current) {
|
|
186
|
+
if (lastFocusedMessageRef.current) {
|
|
187
|
+
lastFocusedMessageRef.current.focus();
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
/** Focus on the latest message if the chat message list was never focused */
|
|
191
|
+
const lastChild = conversationRef.current && conversationRef.current.lastElementChild;
|
|
192
|
+
if (lastChild instanceof HTMLElement) {
|
|
193
|
+
lastChild.focus();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
focusInMessageListRef.current = true;
|
|
198
|
+
setArrowKey(null);
|
|
199
|
+
}, onKeyDown: (e) => {
|
|
200
|
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
201
|
+
setArrowKey(e.key);
|
|
202
|
+
elementRef.current = null;
|
|
203
|
+
}
|
|
204
|
+
else if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {
|
|
205
|
+
const currentElement = conversationRef.current?.querySelector('li:focus');
|
|
206
|
+
if (currentElement && currentElement instanceof HTMLElement) {
|
|
207
|
+
elementRef.current = currentElement;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
elementRef.current =
|
|
211
|
+
conversationRef.current
|
|
212
|
+
?.querySelector(':focus')
|
|
213
|
+
?.closest('li[type="message"]') || null;
|
|
214
|
+
}
|
|
215
|
+
initialFocusedElementRef.current = elementRef.current;
|
|
216
|
+
if (currentElement && getFocusables(currentElement).length > 0) {
|
|
217
|
+
setArrowKey(e.key);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
else if (e.key === 'Tab') {
|
|
221
|
+
setLastFocusableElement();
|
|
222
|
+
if (e.shiftKey) {
|
|
223
|
+
const prevElement = conversationRef.current?.parentElement?.previousElementSibling;
|
|
224
|
+
if (prevElement) {
|
|
225
|
+
const focusables = getFocusables(prevElement);
|
|
226
|
+
if (focusables.length) {
|
|
227
|
+
e.preventDefault();
|
|
228
|
+
focusables[focusables.length - 1].focus();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
const nextElement = conversationRef.current?.parentElement?.nextElementSibling;
|
|
234
|
+
if (nextElement) {
|
|
235
|
+
const focusables = getFocusables(nextElement);
|
|
236
|
+
if (focusables.length) {
|
|
237
|
+
e.preventDefault();
|
|
238
|
+
focusables[0].focus();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
setArrowKey(null);
|
|
243
|
+
}
|
|
244
|
+
}, children: messages.map(item => {
|
|
136
245
|
const messageProps = isCoachMessage(item)
|
|
137
246
|
? {
|
|
138
247
|
...item,
|
|
139
248
|
onSend
|
|
140
249
|
}
|
|
141
250
|
: item;
|
|
142
|
-
return
|
|
251
|
+
return _jsx(GenAIMessage, { ...messageProps, testId: item.id });
|
|
143
252
|
}) })) })) }), !starterMessage &&
|
|
144
253
|
((isInUtilities(variant) &&
|
|
145
254
|
variant.state !== 'docked' &&
|
|
146
255
|
variant.state !== 'minimized') ||
|
|
147
|
-
!isInUtilities(variant)) && (_jsxs(Flex, { container: { direction: 'column' }, as: StyledInputContainer, children: [_jsx(TextArea, { ref: textAreaRef, label: t('message_pega_gen_ai_coach', [selectedCoach || '']), value: message, onKeyDown: handleEnterKeyDown, onChange: handleTextAreaChange, autoResize: false }), _jsxs(Flex, { container: {
|
|
256
|
+
!isInUtilities(variant)) && (_jsxs(Flex, { container: { direction: 'column' }, as: StyledInputContainer, children: [_jsx(TextArea, { ref: textAreaRef, label: t('message_pega_gen_ai_coach', [selectedCoach || '']), value: message, onKeyDown: handleEnterKeyDown, onChange: handleTextAreaChange, autoResize: false }), _jsxs(Flex, { container: {
|
|
257
|
+
direction: 'row',
|
|
258
|
+
gap: 2,
|
|
259
|
+
justify: 'end',
|
|
260
|
+
pad: 1
|
|
261
|
+
}, children: [suggestions && (_jsx(MenuButton, { text: t('suggestions'), variant: 'text', as: StyledSuggestions, icon: 'polaris-solid', menu: {
|
|
148
262
|
items: suggestions,
|
|
149
263
|
onItemClick: id => {
|
|
150
264
|
const selected = menuHelpers.getItem(suggestions, id);
|
|
151
265
|
if (selected)
|
|
152
|
-
onSend({
|
|
266
|
+
onSend({
|
|
267
|
+
id: selected.id,
|
|
268
|
+
message: selected.primary
|
|
269
|
+
});
|
|
153
270
|
}
|
|
154
271
|
} })), _jsx(Button, { variant: 'primary', onClick: message
|
|
155
272
|
? () => {
|
|
@@ -166,7 +283,10 @@ const GenAICoach = ({ testId, coachOptions: coachOptionsProps, onCoachChange: on
|
|
|
166
283
|
if (isInUtilities(variant))
|
|
167
284
|
variant.onStateChange('maximized');
|
|
168
285
|
if (starterMessage && starterMessage.message) {
|
|
169
|
-
onSend({
|
|
286
|
+
onSend({
|
|
287
|
+
id: starterMessage.id,
|
|
288
|
+
message: starterMessage.message
|
|
289
|
+
});
|
|
170
290
|
}
|
|
171
291
|
}, children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'polaris-solid' }), t('start_chat')] }) }))] }))] }));
|
|
172
292
|
};
|