@pega/cosmos-react-work 9.0.0-build.2.9 → 9.0.0-build.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +11 -5
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  5. package/lib/components/Article/ArticleRating.d.ts +1 -1
  6. package/lib/components/Article/ArticleRating.d.ts.map +1 -1
  7. package/lib/components/ArticleList/AIArticleSummary.d.ts +3 -1
  8. package/lib/components/ArticleList/AIArticleSummary.d.ts.map +1 -1
  9. package/lib/components/ArticleList/ArticleBuddy.d.ts +1 -1
  10. package/lib/components/ArticleList/ArticleBuddy.d.ts.map +1 -1
  11. package/lib/components/ArticleList/ArticleBuddy.js +5 -1
  12. package/lib/components/ArticleList/ArticleBuddy.js.map +1 -1
  13. package/lib/components/ArticleList/ArticleBuddyList.d.ts +1 -1
  14. package/lib/components/ArticleList/ArticleBuddyList.d.ts.map +1 -1
  15. package/lib/components/ArticleList/ArticleBuddyResponse.d.ts +189 -3
  16. package/lib/components/ArticleList/ArticleBuddyResponse.d.ts.map +1 -1
  17. package/lib/components/ArticleList/ArticleBuddyResponse.js +1 -1
  18. package/lib/components/ArticleList/ArticleBuddyResponse.js.map +1 -1
  19. package/lib/components/ArticleList/ArticleFeedback.d.ts +3 -1
  20. package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
  21. package/lib/components/ArticleList/ArticleList.d.ts +2 -2
  22. package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
  23. package/lib/components/ArticleList/ArticleList.types.d.ts +17 -2
  24. package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
  25. package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
  26. package/lib/components/ArticleList/ArticleListHeader.d.ts +183 -1
  27. package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
  28. package/lib/components/ArticleList/ArticleSummary.styles.d.ts +2 -2
  29. package/lib/components/ArticleList/ArticleSummary.styles.d.ts.map +1 -1
  30. package/lib/components/ArticleList/ArticleSummaryHeader.d.ts.map +1 -1
  31. package/lib/components/ArticleList/ArticleSummaryHeader.js +3 -1
  32. package/lib/components/ArticleList/ArticleSummaryHeader.js.map +1 -1
  33. package/lib/components/ArticleList/QuestionList.d.ts +5 -3
  34. package/lib/components/ArticleList/QuestionList.d.ts.map +1 -1
  35. package/lib/components/ArticleList/RelatedQuestions.d.ts +4 -2
  36. package/lib/components/ArticleList/RelatedQuestions.d.ts.map +1 -1
  37. package/lib/components/Assignments/Assignments.d.ts.map +1 -1
  38. package/lib/components/Assignments/Assignments.js +1 -1
  39. package/lib/components/Assignments/Assignments.js.map +1 -1
  40. package/lib/components/Assignments/Assignments.styles.d.ts +7 -3
  41. package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -1
  42. package/lib/components/CaseHierarchy/CaseHierarchy.d.ts.map +1 -1
  43. package/lib/components/CaseHierarchy/CaseHierarchy.js +3 -2
  44. package/lib/components/CaseHierarchy/CaseHierarchy.js.map +1 -1
  45. package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts +7 -3
  46. package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts.map +1 -1
  47. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  48. package/lib/components/CasePreview/CasePreview.js +44 -57
  49. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  50. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
  51. package/lib/components/CaseView/CaseHeader/CaseHeader.js +66 -26
  52. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
  53. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -1
  54. package/lib/components/CaseView/CaseHeader/Summary.js +7 -5
  55. package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -1
  56. package/lib/components/CaseView/CaseSummaryFields.js +1 -1
  57. package/lib/components/CaseView/CaseSummaryFields.js.map +1 -1
  58. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  59. package/lib/components/CaseView/CaseView.js +32 -32
  60. package/lib/components/CaseView/CaseView.js.map +1 -1
  61. package/lib/components/CaseView/CaseView.styles.d.ts +83 -46
  62. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  63. package/lib/components/CaseView/CaseView.styles.js +133 -75
  64. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  65. package/lib/components/CaseView/CaseView.types.d.ts +12 -6
  66. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  67. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  68. package/lib/components/CaseView/UtilitiesSummary.d.ts +1 -1
  69. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
  70. package/lib/components/CaseView/UtilitiesSummary.js +13 -4
  71. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  72. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
  73. package/lib/components/CaseView/UtilitySummaryItemDialog.js +10 -4
  74. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
  75. package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -1
  76. package/lib/components/ConfigurableLayout/LayoutCell.js +25 -25
  77. package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
  78. package/lib/components/Details/Details.d.ts.map +1 -1
  79. package/lib/components/Details/Details.js +16 -16
  80. package/lib/components/Details/Details.js.map +1 -1
  81. package/lib/components/Details/Details.styles.d.ts +14 -10
  82. package/lib/components/Details/Details.styles.d.ts.map +1 -1
  83. package/lib/components/Details/Details.styles.js +46 -46
  84. package/lib/components/Details/Details.styles.js.map +1 -1
  85. package/lib/components/Details/DetailsList.d.ts.map +1 -1
  86. package/lib/components/Details/DetailsList.js +1 -1
  87. package/lib/components/Details/DetailsList.js.map +1 -1
  88. package/lib/components/GenAICoach/GenAICoach.d.ts +2 -1
  89. package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
  90. package/lib/components/GenAICoach/GenAICoach.js +420 -63
  91. package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
  92. package/lib/components/GenAICoach/GenAICoach.styles.d.ts +690 -35
  93. package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
  94. package/lib/components/GenAICoach/GenAICoach.styles.js +269 -25
  95. package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
  96. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +1 -1
  97. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
  98. package/lib/components/GenAICoach/GenAICoach.test-ids.js +1 -0
  99. package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
  100. package/lib/components/GenAICoach/GenAICoach.types.d.ts +73 -3
  101. package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
  102. package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
  103. package/lib/components/GenAICoach/GenAIMessage.d.ts +6 -0
  104. package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
  105. package/lib/components/GenAICoach/GenAIMessage.js +48 -45
  106. package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
  107. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts +4 -0
  108. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -0
  109. package/lib/components/GenAICoach/GenAIMessageFeedback.js +95 -0
  110. package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -0
  111. package/lib/components/GenAICoach/GenAIMessageProgress.d.ts +5 -0
  112. package/lib/components/GenAICoach/GenAIMessageProgress.d.ts.map +1 -0
  113. package/lib/components/GenAICoach/GenAIMessageProgress.js +14 -0
  114. package/lib/components/GenAICoach/GenAIMessageProgress.js.map +1 -0
  115. package/lib/components/GenAICoach/InitialSuggestedMessage.d.ts.map +1 -1
  116. package/lib/components/GenAICoach/InitialSuggestedMessage.js +5 -6
  117. package/lib/components/GenAICoach/InitialSuggestedMessage.js.map +1 -1
  118. package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts +4 -0
  119. package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts.map +1 -0
  120. package/lib/components/GenAICoach/ToolConfirmationMessage.js +19 -0
  121. package/lib/components/GenAICoach/ToolConfirmationMessage.js.map +1 -0
  122. package/lib/components/GenAICoach/ToolDetails.d.ts +5 -0
  123. package/lib/components/GenAICoach/ToolDetails.d.ts.map +1 -0
  124. package/lib/components/GenAICoach/ToolDetails.js +91 -0
  125. package/lib/components/GenAICoach/ToolDetails.js.map +1 -0
  126. package/lib/components/GenAICoach/index.d.ts +1 -1
  127. package/lib/components/GenAICoach/index.d.ts.map +1 -1
  128. package/lib/components/GenAICoach/index.js +1 -1
  129. package/lib/components/GenAICoach/index.js.map +1 -1
  130. package/lib/components/HierarchicalAssignments/AssignmentDetail.d.ts +2 -1
  131. package/lib/components/HierarchicalAssignments/AssignmentDetail.d.ts.map +1 -1
  132. package/lib/components/HierarchicalAssignments/AssignmentDetail.js +2 -2
  133. package/lib/components/HierarchicalAssignments/AssignmentDetail.js.map +1 -1
  134. package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts +55 -34
  135. package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
  136. package/lib/components/HierarchicalAssignments/Assignments.styles.js +26 -9
  137. package/lib/components/HierarchicalAssignments/Assignments.styles.js.map +1 -1
  138. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.d.ts.map +1 -1
  139. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js +1 -1
  140. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js.map +1 -1
  141. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
  142. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +5 -2
  143. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
  144. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.d.ts.map +1 -1
  145. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js +2 -2
  146. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js.map +1 -1
  147. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
  148. package/lib/components/IntelligentGuidance/IntelligentGuidance.js +1 -1
  149. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
  150. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -5
  151. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
  152. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +2 -2
  153. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
  154. package/lib/components/InteractionNotification/InteractionNotification.d.ts +31 -8
  155. package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
  156. package/lib/components/InteractionNotification/InteractionNotification.js +17 -10
  157. package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
  158. package/lib/components/Predictions/Predictions.d.ts.map +1 -1
  159. package/lib/components/Predictions/Predictions.js +8 -2
  160. package/lib/components/Predictions/Predictions.js.map +1 -1
  161. package/lib/components/SearchResults/ActiveFilter.d.ts +1 -1
  162. package/lib/components/SearchResults/ActiveFilter.d.ts.map +1 -1
  163. package/lib/components/SearchResults/Filter.d.ts.map +1 -1
  164. package/lib/components/SearchResults/Filter.js +6 -3
  165. package/lib/components/SearchResults/Filter.js.map +1 -1
  166. package/lib/components/SearchResults/SearchResults.styles.d.ts +12 -10
  167. package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -1
  168. package/lib/components/Stages/StageGlimpse.d.ts +1 -1
  169. package/lib/components/Stages/StageGlimpse.d.ts.map +1 -1
  170. package/lib/components/Stages/StageGlimpse.js +4 -3
  171. package/lib/components/Stages/StageGlimpse.js.map +1 -1
  172. package/lib/components/Stages/Stages.d.ts.map +1 -1
  173. package/lib/components/Stages/Stages.js +5 -4
  174. package/lib/components/Stages/Stages.js.map +1 -1
  175. package/lib/components/Stages/Stages.styles.d.ts +19 -15
  176. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  177. package/lib/components/Stages/Stages.styles.js +11 -17
  178. package/lib/components/Stages/Stages.styles.js.map +1 -1
  179. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
  180. package/lib/components/Stakeholders/Stakeholders.js +8 -2
  181. package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
  182. package/lib/components/Tags/Tags.d.ts +2 -2
  183. package/lib/components/Tags/Tags.d.ts.map +1 -1
  184. package/lib/components/Tags/Tags.js +30 -19
  185. package/lib/components/Tags/Tags.js.map +1 -1
  186. package/lib/components/Tasks/TaskList.d.ts +2 -2
  187. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  188. package/lib/components/Tasks/TaskList.js +3 -3
  189. package/lib/components/Tasks/TaskList.js.map +1 -1
  190. package/lib/components/Tasks/Tasks.d.ts +4 -2
  191. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  192. package/lib/components/Tasks/Tasks.js +1 -1
  193. package/lib/components/Tasks/Tasks.js.map +1 -1
  194. package/lib/components/UtilitiesLayout/UtilitiesLayout.d.ts.map +1 -1
  195. package/lib/components/UtilitiesLayout/UtilitiesLayout.js +3 -2
  196. package/lib/components/UtilitiesLayout/UtilitiesLayout.js.map +1 -1
  197. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts +2 -2
  198. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts.map +1 -1
  199. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js +3 -2
  200. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js.map +1 -1
  201. package/lib/index.d.ts +0 -2
  202. package/lib/index.d.ts.map +1 -1
  203. package/lib/index.js +0 -2
  204. package/lib/index.js.map +1 -1
  205. package/package.json +6 -7
  206. package/lib/components/Timeline/Timeline.d.ts +0 -6
  207. package/lib/components/Timeline/Timeline.d.ts.map +0 -1
  208. package/lib/components/Timeline/Timeline.js +0 -29
  209. package/lib/components/Timeline/Timeline.js.map +0 -1
  210. package/lib/components/Timeline/Timeline.styles.d.ts +0 -24
  211. package/lib/components/Timeline/Timeline.styles.d.ts.map +0 -1
  212. package/lib/components/Timeline/Timeline.styles.js +0 -182
  213. package/lib/components/Timeline/Timeline.styles.js.map +0 -1
  214. package/lib/components/Timeline/Timeline.types.d.ts +0 -71
  215. package/lib/components/Timeline/Timeline.types.d.ts.map +0 -1
  216. package/lib/components/Timeline/Timeline.types.js +0 -2
  217. package/lib/components/Timeline/Timeline.types.js.map +0 -1
  218. package/lib/components/Timeline/TimelineItem.d.ts +0 -12
  219. package/lib/components/Timeline/TimelineItem.d.ts.map +0 -1
  220. package/lib/components/Timeline/TimelineItem.js +0 -43
  221. package/lib/components/Timeline/TimelineItem.js.map +0 -1
  222. package/lib/components/Timeline/TimelineToolbar.d.ts +0 -5
  223. package/lib/components/Timeline/TimelineToolbar.d.ts.map +0 -1
  224. package/lib/components/Timeline/TimelineToolbar.js +0 -68
  225. package/lib/components/Timeline/TimelineToolbar.js.map +0 -1
  226. package/lib/components/Timeline/index.d.ts +0 -4
  227. package/lib/components/Timeline/index.d.ts.map +0 -1
  228. package/lib/components/Timeline/index.js +0 -3
  229. package/lib/components/Timeline/index.js.map +0 -1
  230. package/lib/components/Timeline/utils.d.ts +0 -12
  231. package/lib/components/Timeline/utils.d.ts.map +0 -1
  232. package/lib/components/Timeline/utils.js +0 -66
  233. package/lib/components/Timeline/utils.js.map +0 -1
@@ -21,7 +21,7 @@ export interface AppAnnouncementProps extends BaseProps, NoChildrenProp {
21
21
  onDismiss?: () => void;
22
22
  ref?: Ref<HTMLElement>;
23
23
  }
24
- export declare const StyledAppAnnouncement: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, Pick<AppAnnouncementProps, "image" | "fitToParent">, never>;
24
+ export declare const StyledAppAnnouncement: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, Pick<AppAnnouncementProps, "image" | "fitToParent">>> & string;
25
25
  declare const AppAnnouncement: ForwardRefForwardPropsComponent<AppAnnouncementProps>;
26
26
  export default AppAnnouncement;
27
27
  //# sourceMappingURL=AppAnnouncement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppAnnouncement.d.ts","sourceRoot":"","sources":["../../../src/components/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAclD,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACf,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc;IACrE,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAOD,eAAO,MAAM,qBAAqB,8JAuFhC,CAAC;AAIH,QAAA,MAAM,eAAe,EAAE,+BAA+B,CAAC,oBAAoB,CAkD1E,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"AppAnnouncement.d.ts","sourceRoot":"","sources":["../../../src/components/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAelD,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACf,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc;IACrE,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAOD,eAAO,MAAM,qBAAqB,kRA4FhC,CAAC;AAIH,QAAA,MAAM,eAAe,EAAE,+BAA+B,CAAC,oBAAoB,CAsD1E,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { Button, StyledButton, Text, Icon, registerIcon, useI18n, defaultThemeProp, useDirection, calculateForegroundColor } from '@pega/cosmos-react-core';
4
+ import { Button, StyledButton, Text, Icon, registerIcon, useI18n, defaultThemeProp, useDirection, calculateForegroundColor, HTML } from '@pega/cosmos-react-core';
5
5
  import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
6
6
  registerIcon(timesIcon);
7
7
  const StyledDismissButton = styled.button `
@@ -40,7 +40,6 @@ export const StyledAppAnnouncement = styled.article(props => {
40
40
  h2 {
41
41
  position: relative;
42
42
  z-index: 2;
43
- margin-bottom: ${spacing};
44
43
  }
45
44
 
46
45
  ${StyledDismissButton} {
@@ -58,19 +57,25 @@ export const StyledAppAnnouncement = styled.article(props => {
58
57
  }
59
58
 
60
59
  > div {
61
- width: 75%;
62
60
  position: relative;
63
61
  z-index: 2;
64
62
 
65
63
  p,
66
64
  ul {
67
65
  padding-top: calc(2 * ${spacing});
66
+ line-height: 1.4;
68
67
  }
69
68
 
70
69
  ul {
71
70
  padding-inline-start: calc(2 * ${spacing});
72
71
  }
73
72
 
73
+ li {
74
+ &:not(:last-child) {
75
+ margin-block-end: ${spacing};
76
+ }
77
+ }
78
+
74
79
  ${StyledButton} {
75
80
  margin-top: calc(2 * ${spacing});
76
81
  white-space: normal;
@@ -87,9 +92,10 @@ StyledAppAnnouncement.defaultProps = defaultThemeProp;
87
92
  const AppAnnouncement = forwardRef(function AppAnnouncement(props, ref) {
88
93
  const t = useI18n();
89
94
  const { heading, description, details, whatsNewLink, whatsNewText = t('app_announcement_whats_new_button_label'), image, onDismiss, ...restProps } = props;
90
- return (_jsxs(StyledAppAnnouncement, { ...restProps, ref: ref, image: image, children: [onDismiss && (_jsx(Button, { as: StyledDismissButton, variant: 'simple', icon: true, onClick: onDismiss, "aria-label": t('app_announcement_dismiss_button_label_a11y'), children: _jsx(Icon, { name: 'times' }) })), _jsx(Text, { variant: 'h2', children: heading || t('app_announcement_details_list_header') }), _jsxs("div", { children: [description && _jsx("p", { children: description }), details && (_jsx("ul", { children: details.map((item, index) => {
95
+ return (_jsxs(StyledAppAnnouncement, { ...restProps, ref: ref, image: image, children: [onDismiss && (_jsx(Button, { as: StyledDismissButton, variant: 'simple', icon: true, onClick: onDismiss, "aria-label": t('app_announcement_dismiss_button_label_a11y'), children: _jsx(Icon, { name: 'times' }) })), _jsx(Text, { variant: 'h2', children: heading || t('app_announcement_details_list_header') }), _jsxs("div", { children: [description && _jsx(HTML, { as: 'p', content: description }), details && (_jsx("ul", { children: details.map((item, index) => {
96
+ return (
91
97
  // eslint-disable-next-line react/no-array-index-key
92
- return _jsx("li", { children: item }, index);
98
+ _jsx("li", { children: _jsx(HTML, { content: item }) }, index));
93
99
  }) })), whatsNewLink && (_jsx(Button, { variant: 'secondary', href: whatsNewLink, target: '_blank', children: whatsNewText }))] })] }));
94
100
  });
95
101
  export default AppAnnouncement;
@@ -1 +1 @@
1
- {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../src/components/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAE1F,YAAY,CAAC,SAAS,CAAC,CAAC;AAwBxB,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAA;;;CAGxC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAEjD,KAAK,CAAC,EAAE;IACR,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EACzB,UAAU,EAAE,EACV,IAAI,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,EACvC,YAAY,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAClE,EACF,EACD,KAAK,EACN,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAA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AAK,EACnC,OAAO,IAAI,CACV,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;4BAC3B,oDAAoD;4BACpD,OAAO,uBAAiB,IAAI,IAAZ,KAAK,CAAa,CAAC;wBACrC,CAAC,CAAC,GACC,CACN,EACA,YAAY,IAAI,CACf,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAC,QAAQ,YAC5D,YAAY,GACN,CACV,IACG,IACgB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n StyledButton,\n Text,\n Icon,\n registerIcon,\n useI18n,\n defaultThemeProp,\n useDirection,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\nimport type {\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nregisterIcon(timesIcon);\n\nexport interface AppAnnouncementProps extends BaseProps, NoChildrenProp {\n /** Heading text for the announcement. */\n heading?: string;\n /** Description text for the announcement. */\n description?: string;\n /** Announcement details to be displayed in form of bulleted list. */\n details?: string[];\n /** Url to open with What's new link. */\n whatsNewLink?: string;\n /** Content to populate the announcement button. */\n whatsNewText?: string;\n /** An image source for the decorative background. */\n image?: string;\n /**\n * Whether to fit AppAnnouncement widget in the parent element.\n */\n fitToParent?: boolean;\n /** Callback when user dismisses the announcements. */\n onDismiss?: () => void;\n ref?: Ref<HTMLElement>;\n}\n\nconst StyledDismissButton = styled.button`\n font-size: 1.25rem;\n border: none;\n`;\n\nexport const StyledAppAnnouncement = styled.article<\n Pick<AppAnnouncementProps, 'image' | 'fitToParent'>\n>(props => {\n const {\n theme: {\n base: { shadow, spacing },\n components: {\n card: { 'border-radius': borderRadius },\n announcement: { background, 'foreground-color': foregroundColor }\n }\n },\n image\n } = props;\n\n const { end } = useDirection();\n const color = calculateForegroundColor(background, foregroundColor);\n\n return css`\n padding: calc(2 * ${spacing});\n background: ${background};\n border-radius: ${borderRadius};\n color: ${color};\n position: relative;\n\n ${props.fitToParent && 'block-size: 100%;'};\n\n &::after {\n background: url('${image}') no-repeat;\n background-position: ${end} bottom;\n background-size: contain;\n background-origin: content-box;\n opacity: 0.2;\n content: '';\n display: block;\n position: absolute;\n width: 50%;\n height: 100%;\n inset-inline-end: 0;\n bottom: 0;\n padding: calc(2 * ${spacing});\n }\n\n h2 {\n position: relative;\n z-index: 2;\n margin-bottom: ${spacing};\n }\n\n ${StyledDismissButton} {\n position: absolute;\n top: 0.75rem;\n inset-inline-end: 0.75rem;\n color: inherit;\n z-index: 3;\n &:enabled:hover {\n background: #ffffff19;\n }\n &:enabled:focus {\n box-shadow: ${shadow.focus};\n }\n }\n\n > div {\n width: 75%;\n position: relative;\n z-index: 2;\n\n p,\n ul {\n padding-top: calc(2 * ${spacing});\n }\n\n ul {\n padding-inline-start: calc(2 * ${spacing});\n }\n\n ${StyledButton} {\n margin-top: calc(2 * ${spacing});\n white-space: normal;\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${shadow.focus};\n }\n }\n }\n `;\n});\n\nStyledAppAnnouncement.defaultProps = defaultThemeProp;\n\nconst AppAnnouncement: ForwardRefForwardPropsComponent<AppAnnouncementProps> = forwardRef(\n function AppAnnouncement(\n props: PropsWithoutRef<AppAnnouncementProps>,\n ref: AppAnnouncementProps['ref']\n ) {\n const t = useI18n();\n const {\n heading,\n description,\n details,\n whatsNewLink,\n whatsNewText = t('app_announcement_whats_new_button_label'),\n image,\n onDismiss,\n ...restProps\n } = props;\n\n return (\n <StyledAppAnnouncement {...restProps} ref={ref} image={image}>\n {onDismiss && (\n <Button\n as={StyledDismissButton}\n variant='simple'\n icon\n onClick={onDismiss}\n aria-label={t('app_announcement_dismiss_button_label_a11y')}\n >\n <Icon name='times' />\n </Button>\n )}\n <Text variant='h2'>{heading || t('app_announcement_details_list_header')}</Text>\n <div>\n {description && <p>{description}</p>}\n {details && (\n <ul>\n {details.map((item, index) => {\n // eslint-disable-next-line react/no-array-index-key\n return <li key={index}>{item}</li>;\n })}\n </ul>\n )}\n {whatsNewLink && (\n <Button variant='secondary' href={whatsNewLink} target='_blank'>\n {whatsNewText}\n </Button>\n )}\n </div>\n </StyledAppAnnouncement>\n );\n }\n);\n\nexport default AppAnnouncement;\n"]}
1
+ {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../src/components/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,wBAAwB,EACxB,IAAI,EACL,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAE1F,YAAY,CAAC,SAAS,CAAC,CAAC;AAwBxB,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAA;;;CAGxC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAEjD,KAAK,CAAC,EAAE;IACR,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EACzB,UAAU,EAAE,EACV,IAAI,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,EACvC,YAAY,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAClE,EACF,EACD,KAAK,EACN,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,GAAG,EAAE,GAAG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AAI,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,OAAO,EAAE,WAAW,GAAI,EACpD,OAAO,IAAI,CACV,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;4BAC3B,OAAO;4BACL,oDAAoD;4BACpD,uBACE,KAAC,IAAI,IAAC,OAAO,EAAE,IAAI,GAAI,IADhB,KAAK,CAET,CACN,CAAC;wBACJ,CAAC,CAAC,GACC,CACN,EACA,YAAY,IAAI,CACf,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAC,QAAQ,YAC5D,YAAY,GACN,CACV,IACG,IACgB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n StyledButton,\n Text,\n Icon,\n registerIcon,\n useI18n,\n defaultThemeProp,\n useDirection,\n calculateForegroundColor,\n HTML\n} from '@pega/cosmos-react-core';\nimport type {\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nregisterIcon(timesIcon);\n\nexport interface AppAnnouncementProps extends BaseProps, NoChildrenProp {\n /** Heading text for the announcement. */\n heading?: string;\n /** Description text for the announcement. */\n description?: string;\n /** Announcement details to be displayed in form of bulleted list. */\n details?: string[];\n /** Url to open with What's new link. */\n whatsNewLink?: string;\n /** Content to populate the announcement button. */\n whatsNewText?: string;\n /** An image source for the decorative background. */\n image?: string;\n /**\n * Whether to fit AppAnnouncement widget in the parent element.\n */\n fitToParent?: boolean;\n /** Callback when user dismisses the announcements. */\n onDismiss?: () => void;\n ref?: Ref<HTMLElement>;\n}\n\nconst StyledDismissButton = styled.button`\n font-size: 1.25rem;\n border: none;\n`;\n\nexport const StyledAppAnnouncement = styled.article<\n Pick<AppAnnouncementProps, 'image' | 'fitToParent'>\n>(props => {\n const {\n theme: {\n base: { shadow, spacing },\n components: {\n card: { 'border-radius': borderRadius },\n announcement: { background, 'foreground-color': foregroundColor }\n }\n },\n image\n } = props;\n\n const { end } = useDirection();\n const color = calculateForegroundColor(background, foregroundColor);\n\n return css`\n padding: calc(2 * ${spacing});\n background: ${background};\n border-radius: ${borderRadius};\n color: ${color};\n position: relative;\n\n ${props.fitToParent && 'block-size: 100%;'};\n\n &::after {\n background: url('${image}') no-repeat;\n background-position: ${end} bottom;\n background-size: contain;\n background-origin: content-box;\n opacity: 0.2;\n content: '';\n display: block;\n position: absolute;\n width: 50%;\n height: 100%;\n inset-inline-end: 0;\n bottom: 0;\n padding: calc(2 * ${spacing});\n }\n\n h2 {\n position: relative;\n z-index: 2;\n }\n\n ${StyledDismissButton} {\n position: absolute;\n top: 0.75rem;\n inset-inline-end: 0.75rem;\n color: inherit;\n z-index: 3;\n &:enabled:hover {\n background: #ffffff19;\n }\n &:enabled:focus {\n box-shadow: ${shadow.focus};\n }\n }\n\n > div {\n position: relative;\n z-index: 2;\n\n p,\n ul {\n padding-top: calc(2 * ${spacing});\n line-height: 1.4;\n }\n\n ul {\n padding-inline-start: calc(2 * ${spacing});\n }\n\n li {\n &:not(:last-child) {\n margin-block-end: ${spacing};\n }\n }\n\n ${StyledButton} {\n margin-top: calc(2 * ${spacing});\n white-space: normal;\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${shadow.focus};\n }\n }\n }\n `;\n});\n\nStyledAppAnnouncement.defaultProps = defaultThemeProp;\n\nconst AppAnnouncement: ForwardRefForwardPropsComponent<AppAnnouncementProps> = forwardRef(\n function AppAnnouncement(\n props: PropsWithoutRef<AppAnnouncementProps>,\n ref: AppAnnouncementProps['ref']\n ) {\n const t = useI18n();\n const {\n heading,\n description,\n details,\n whatsNewLink,\n whatsNewText = t('app_announcement_whats_new_button_label'),\n image,\n onDismiss,\n ...restProps\n } = props;\n\n return (\n <StyledAppAnnouncement {...restProps} ref={ref} image={image}>\n {onDismiss && (\n <Button\n as={StyledDismissButton}\n variant='simple'\n icon\n onClick={onDismiss}\n aria-label={t('app_announcement_dismiss_button_label_a11y')}\n >\n <Icon name='times' />\n </Button>\n )}\n <Text variant='h2'>{heading || t('app_announcement_details_list_header')}</Text>\n <div>\n {description && <HTML as='p' content={description} />}\n {details && (\n <ul>\n {details.map((item, index) => {\n return (\n // eslint-disable-next-line react/no-array-index-key\n <li key={index}>\n <HTML content={item} />\n </li>\n );\n })}\n </ul>\n )}\n {whatsNewLink && (\n <Button variant='secondary' href={whatsNewLink} target='_blank'>\n {whatsNewText}\n </Button>\n )}\n </div>\n </StyledAppAnnouncement>\n );\n }\n);\n\nexport default AppAnnouncement;\n"]}
@@ -7,7 +7,7 @@ export interface ArticleRatingProps {
7
7
  reaction?: 'liked' | 'disliked';
8
8
  onReaction: (reaction: ArticleRatingProps['reaction']) => void;
9
9
  }
10
- export declare const StyledReactedPercentage: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
10
+ export declare const StyledReactedPercentage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
11
11
  declare const ArticleRating: FunctionComponent<ArticleRatingProps>;
12
12
  export default ArticleRating;
13
13
  //# sourceMappingURL=ArticleRating.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleRating.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAqB/C,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,uBAAuB,0GAEnC,CAAC;AAIF,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CAsFxD,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ArticleRating.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAqB/C,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,uBAAuB,+NAEnC,CAAC;AAIF,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CAsFxD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { AIArticleSummaryProps } from './ArticleList.types';
2
- export declare const StyledAbstract: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledAbstract: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").TextProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement | HTMLSpanElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
3
+ ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHeadingElement | HTMLSpanElement> | null | undefined;
4
+ }, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, keyof import("react").Component<any, {}, any>>;
3
5
  declare const _default: import("react").ForwardRefExoticComponent<Omit<AIArticleSummaryProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
4
6
  export default _default;
5
7
  //# sourceMappingURL=AIArticleSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AIArticleSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/AIArticleSummary.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AA4BjE,eAAO,MAAM,cAAc,kNAIzB,CAAC;;AAIH,wBAuDG"}
1
+ {"version":3,"file":"AIArticleSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/AIArticleSummary.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AA4BjE,eAAO,MAAM,cAAc;;yLAIzB,CAAC;;AAIH,wBAuDG"}
@@ -1,7 +1,7 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import type { ForwardProps } from '@pega/cosmos-react-core';
3
3
  import type { ArticleBuddyProps } from './ArticleList.types';
4
- export declare const StyledQueryContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledQueryContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
5
  declare const ArticleBuddy: FunctionComponent<ArticleBuddyProps & ForwardProps>;
6
6
  export default ArticleBuddy;
7
7
  //# sourceMappingURL=ArticleBuddy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleBuddy.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddy.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,OAAO,CAAC;AAgB9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,eAAO,MAAM,oBAAoB,yGAUhC,CAAC;AAQF,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAsGrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ArticleBuddy.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddy.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,OAAO,CAAC;AAgB9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,eAAO,MAAM,oBAAoB,6NAUhC,CAAC;AAQF,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAuHrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
4
  import { Flex, defaultThemeProp, useI18n, Button, useLiveLog, TextArea, AIButton, Progress, getFocusables, MenuButton, AdditionalInfo } from '@pega/cosmos-react-core';
5
+ import GenAICoach from '../GenAICoach';
5
6
  import ArticleBuddyResponse from './ArticleBuddyResponse';
6
7
  export const StyledQueryContainer = styled.div(({ theme: { base: { spacing } } }) => {
7
8
  return css `
@@ -12,7 +13,7 @@ StyledQueryContainer.defaultProps = defaultThemeProp;
12
13
  const StyledBuddyContainer = styled(Flex) `
13
14
  height: 100%;
14
15
  `;
15
- const ArticleBuddy = ({ query, onClear, onSubmit, buddyOptions, response, list, loading, ...restProps }) => {
16
+ const ArticleBuddy = ({ query, onClear, onSubmit, buddyOptions, response, list, loading, renderAgent, agentOptions, ...restProps }) => {
16
17
  const t = useI18n();
17
18
  const buddyRef = useRef(null);
18
19
  const queryRef = useRef(null);
@@ -34,6 +35,9 @@ const ArticleBuddy = ({ query, onClear, onSubmit, buddyOptions, response, list,
34
35
  queryRef.current?.focus();
35
36
  }
36
37
  }, [response?.content, loading, announceResult]);
38
+ if (renderAgent) {
39
+ return (_jsx(Flex, { ...restProps, ref: buddyRef, container: { direction: 'column' }, as: StyledBuddyContainer, children: _jsx(GenAICoach, { ...agentOptions }) }));
40
+ }
37
41
  return (_jsxs(Flex, { ...restProps, container: { direction: 'column' }, ref: buddyRef, "aria-busy": loading, as: StyledBuddyContainer, children: [_jsxs(Flex, { as: StyledQueryContainer, container: { direction: 'column', gap: 1 }, children: [buddyOptions && (_jsxs(Flex, { container: { gap: 0.5 }, children: [_jsx(MenuButton, { ...buddyOptions.list, ...(buddyOptions.list.contextualLabel && {
38
42
  'aria-label': buddyOptions.list.contextualLabel
39
43
  }) }), buddyOptions.buddyInfo?.title && (_jsx(AdditionalInfo, { heading: buddyOptions.buddyInfo.title, children: buddyOptions.buddyInfo.description }))] })), _jsx(TextArea, { ...query, "aria-label": query.placeholder || t('ask_buddy'), ref: queryRef, autoResize: false, onKeyDown: (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleBuddy.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddy.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAA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styled, { css } from 'styled-components';\n\nimport {\n Flex,\n defaultThemeProp,\n useI18n,\n Button,\n useLiveLog,\n TextArea,\n AIButton,\n Progress,\n getFocusables,\n MenuButton,\n AdditionalInfo\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps } from '@pega/cosmos-react-core';\n\nimport type { ArticleBuddyProps } from './ArticleList.types';\nimport ArticleBuddyResponse from './ArticleBuddyResponse';\n\nexport const StyledQueryContainer = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding: calc(2 * ${spacing});\n `;\n }\n);\n\nStyledQueryContainer.defaultProps = defaultThemeProp;\n\nconst StyledBuddyContainer = styled(Flex)`\n height: 100%;\n`;\n\nconst ArticleBuddy: FunctionComponent<ArticleBuddyProps & ForwardProps> = ({\n query,\n onClear,\n onSubmit,\n buddyOptions,\n response,\n list,\n loading,\n ...restProps\n}) => {\n const t = useI18n();\n const buddyRef = useRef<HTMLDivElement>(null);\n const queryRef = useRef<HTMLTextAreaElement>(null);\n const { announcePolite } = useLiveLog();\n const [announceResult, setannounceResult] = useState(false);\n\n useEffect(() => {\n const focusables = getFocusables(buddyRef);\n if (focusables.length > 0) {\n focusables[0].focus();\n }\n }, []);\n\n useEffect(() => {\n if (response?.content && !loading && announceResult) {\n announcePolite({\n message: t('result_available'),\n type: 'acknowledgement'\n });\n setannounceResult(false);\n queryRef.current?.focus();\n }\n }, [response?.content, loading, announceResult]);\n\n return (\n <Flex\n {...restProps}\n container={{ direction: 'column' }}\n ref={buddyRef}\n aria-busy={loading}\n as={StyledBuddyContainer}\n >\n <Flex as={StyledQueryContainer} container={{ direction: 'column', gap: 1 }}>\n {buddyOptions && (\n <Flex container={{ gap: 0.5 }}>\n <MenuButton\n {...buddyOptions.list}\n {...(buddyOptions.list.contextualLabel && {\n 'aria-label': buddyOptions.list.contextualLabel\n })}\n />\n {buddyOptions.buddyInfo?.title && (\n <AdditionalInfo heading={buddyOptions.buddyInfo.title}>\n {buddyOptions.buddyInfo.description}\n </AdditionalInfo>\n )}\n </Flex>\n )}\n <TextArea\n {...query}\n aria-label={query.placeholder || t('ask_buddy')}\n ref={queryRef}\n autoResize={false}\n onKeyDown={(e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (query.value?.trim()) {\n setannounceResult(true);\n onSubmit();\n }\n }\n }}\n />\n\n <Flex container={{ gap: 1, justify: 'end' }}>\n {query.value && onClear && (\n <Button\n variant='link'\n onClick={() => {\n onClear();\n }}\n >\n {t('clear')}\n </Button>\n )}\n <AIButton\n label={t('ask')}\n disabled={loading}\n aria-label={t('ask_buddy')}\n onClick={() => {\n setannounceResult(true);\n queryRef.current?.focus();\n onSubmit();\n }}\n />\n </Flex>\n </Flex>\n <Progress visible={!!loading} placement='block' message={t('loading')} focusOnVisible />\n\n {!loading && response && <ArticleBuddyResponse {...response} />}\n </Flex>\n );\n};\n\nexport default ArticleBuddy;\n"]}
1
+ {"version":3,"file":"ArticleBuddy.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddy.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,UAAU,EACV,cAAc,EACf,MAAM,yBAAyB,CAAC;AAGjC,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAC5C,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG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Ac,EAAE,CAAC;gCACnB,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;oCACxB,iBAAiB,CAAC,IAAI,CAAC,CAAC;oCACxB,QAAQ,EAAE,CAAC;gCACb,CAAC;4BACH,CAAC;wBACH,CAAC,GACD,EAEF,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aACxC,KAAK,CAAC,KAAK,IAAI,OAAO,IAAI,CACzB,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oCACZ,OAAO,EAAE,CAAC;gCACZ,CAAC,YAEA,CAAC,CAAC,OAAO,CAAC,GACJ,CACV,EACD,KAAC,QAAQ,IACP,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EACf,QAAQ,EAAE,OAAO,gBACL,CAAC,CAAC,WAAW,CAAC,EAC1B,OAAO,EAAE,GAAG,EAAE;oCACZ,iBAAiB,CAAC,IAAI,CAAC,CAAC;oCACxB,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;oCAC1B,QAAQ,EAAE,CAAC;gCACb,CAAC,GACD,IACG,IACF,EAEP,KAAC,QAAQ,IAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,cAAc,SAAG,EAEvF,CAAC,OAAO,IAAI,QAAQ,IAAI,KAAC,oBAAoB,OAAK,QAAQ,GAAI,IAC1D,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport type { FunctionComponent, KeyboardEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n defaultThemeProp,\n useI18n,\n Button,\n useLiveLog,\n TextArea,\n AIButton,\n Progress,\n getFocusables,\n MenuButton,\n AdditionalInfo\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps } from '@pega/cosmos-react-core';\n\nimport GenAICoach from '../GenAICoach';\n\nimport type { ArticleBuddyProps } from './ArticleList.types';\nimport ArticleBuddyResponse from './ArticleBuddyResponse';\n\nexport const StyledQueryContainer = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n padding: calc(2 * ${spacing});\n `;\n }\n);\n\nStyledQueryContainer.defaultProps = defaultThemeProp;\n\nconst StyledBuddyContainer = styled(Flex)`\n height: 100%;\n`;\n\nconst ArticleBuddy: FunctionComponent<ArticleBuddyProps & ForwardProps> = ({\n query,\n onClear,\n onSubmit,\n buddyOptions,\n response,\n list,\n loading,\n renderAgent,\n agentOptions,\n ...restProps\n}) => {\n const t = useI18n();\n const buddyRef = useRef<HTMLDivElement>(null);\n const queryRef = useRef<HTMLTextAreaElement>(null);\n const { announcePolite } = useLiveLog();\n const [announceResult, setannounceResult] = useState(false);\n\n useEffect(() => {\n const focusables = getFocusables(buddyRef);\n if (focusables.length > 0) {\n focusables[0].focus();\n }\n }, []);\n\n useEffect(() => {\n if (response?.content && !loading && announceResult) {\n announcePolite({\n message: t('result_available'),\n type: 'acknowledgement'\n });\n setannounceResult(false);\n queryRef.current?.focus();\n }\n }, [response?.content, loading, announceResult]);\n\n if (renderAgent) {\n return (\n <Flex\n {...restProps}\n ref={buddyRef}\n container={{ direction: 'column' }}\n as={StyledBuddyContainer}\n >\n <GenAICoach {...agentOptions} />\n </Flex>\n );\n }\n\n return (\n <Flex\n {...restProps}\n container={{ direction: 'column' }}\n ref={buddyRef}\n aria-busy={loading}\n as={StyledBuddyContainer}\n >\n <Flex as={StyledQueryContainer} container={{ direction: 'column', gap: 1 }}>\n {buddyOptions && (\n <Flex container={{ gap: 0.5 }}>\n <MenuButton\n {...buddyOptions.list}\n {...(buddyOptions.list.contextualLabel && {\n 'aria-label': buddyOptions.list.contextualLabel\n })}\n />\n {buddyOptions.buddyInfo?.title && (\n <AdditionalInfo heading={buddyOptions.buddyInfo.title}>\n {buddyOptions.buddyInfo.description}\n </AdditionalInfo>\n )}\n </Flex>\n )}\n\n <TextArea\n {...query}\n aria-label={query.placeholder || t('ask_buddy')}\n ref={queryRef}\n autoResize={false}\n onKeyDown={(e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (query.value?.trim()) {\n setannounceResult(true);\n onSubmit();\n }\n }\n }}\n />\n\n <Flex container={{ gap: 1, justify: 'end' }}>\n {query.value && onClear && (\n <Button\n variant='link'\n onClick={() => {\n onClear();\n }}\n >\n {t('clear')}\n </Button>\n )}\n <AIButton\n label={t('ask')}\n disabled={loading}\n aria-label={t('ask_buddy')}\n onClick={() => {\n setannounceResult(true);\n queryRef.current?.focus();\n onSubmit();\n }}\n />\n </Flex>\n </Flex>\n\n <Progress visible={!!loading} placement='block' message={t('loading')} focusOnVisible />\n\n {!loading && response && <ArticleBuddyResponse {...response} />}\n </Flex>\n );\n};\n\nexport default ArticleBuddy;\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { BuddySuggestedArticlesProps } from './ArticleList.types';
2
- export declare const StyledListContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<BuddySuggestedArticlesProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
4
4
  export default _default;
5
5
  //# sourceMappingURL=ArticleBuddyList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleBuddyList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddyList.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGvE,eAAO,MAAM,mBAAmB,yGAQ9B,CAAC;;AAIH,wBAqDG"}
1
+ {"version":3,"file":"ArticleBuddyList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleBuddyList.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGvE,eAAO,MAAM,mBAAmB,6NAQ9B,CAAC;;AAIH,wBAqDG"}