@pega/cosmos-react-work 5.0.0-dev.1.0 → 5.0.0-dev.10.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 (212) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +2 -2
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  4. package/lib/components/Article/Article.d.ts +17 -6
  5. package/lib/components/Article/Article.d.ts.map +1 -1
  6. package/lib/components/Article/Article.js +22 -5
  7. package/lib/components/Article/Article.js.map +1 -1
  8. package/lib/components/Article/ArticleFooter.d.ts +7 -9
  9. package/lib/components/Article/ArticleFooter.d.ts.map +1 -1
  10. package/lib/components/Article/ArticleFooter.js +5 -1
  11. package/lib/components/Article/ArticleFooter.js.map +1 -1
  12. package/lib/components/Article/ArticleMeta.d.ts +2 -6
  13. package/lib/components/Article/ArticleMeta.d.ts.map +1 -1
  14. package/lib/components/Article/ArticleMeta.js +12 -11
  15. package/lib/components/Article/ArticleMeta.js.map +1 -1
  16. package/lib/components/Article/ArticleRating.d.ts +13 -0
  17. package/lib/components/Article/ArticleRating.d.ts.map +1 -0
  18. package/lib/components/Article/ArticleRating.js +43 -0
  19. package/lib/components/Article/ArticleRating.js.map +1 -0
  20. package/lib/components/Article/index.d.ts +2 -0
  21. package/lib/components/Article/index.d.ts.map +1 -1
  22. package/lib/components/Article/index.js +1 -0
  23. package/lib/components/Article/index.js.map +1 -1
  24. package/lib/components/ArticleList/ArticleBuddy.d.ts +9 -0
  25. package/lib/components/ArticleList/ArticleBuddy.d.ts.map +1 -0
  26. package/lib/components/ArticleList/ArticleBuddy.js +68 -0
  27. package/lib/components/ArticleList/ArticleBuddy.js.map +1 -0
  28. package/lib/components/ArticleList/ArticleList.d.ts +3 -3
  29. package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
  30. package/lib/components/ArticleList/ArticleList.js +19 -12
  31. package/lib/components/ArticleList/ArticleList.js.map +1 -1
  32. package/lib/components/ArticleList/ArticleList.types.d.ts +60 -6
  33. package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
  34. package/lib/components/ArticleList/ArticleList.types.js +6 -1
  35. package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
  36. package/lib/components/ArticleList/ArticleListFilter.d.ts +3 -3
  37. package/lib/components/ArticleList/ArticleListFilter.d.ts.map +1 -1
  38. package/lib/components/ArticleList/ArticleListFilter.js.map +1 -1
  39. package/lib/components/ArticleList/ArticleListHeader.d.ts +3 -2
  40. package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
  41. package/lib/components/ArticleList/ArticleListHeader.js +2 -1
  42. package/lib/components/ArticleList/ArticleListHeader.js.map +1 -1
  43. package/lib/components/ArticleList/ArticleSummary.d.ts +3 -3
  44. package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -1
  45. package/lib/components/ArticleList/ArticleSummary.js +10 -3
  46. package/lib/components/ArticleList/ArticleSummary.js.map +1 -1
  47. package/lib/components/ArticleList/index.d.ts +2 -0
  48. package/lib/components/ArticleList/index.d.ts.map +1 -1
  49. package/lib/components/ArticleList/index.js +1 -0
  50. package/lib/components/ArticleList/index.js.map +1 -1
  51. package/lib/components/Assignments/Assignments.d.ts +3 -3
  52. package/lib/components/Assignments/Assignments.d.ts.map +1 -1
  53. package/lib/components/Assignments/Assignments.js.map +1 -1
  54. package/lib/components/Assignments/index.d.ts +2 -1
  55. package/lib/components/Assignments/index.d.ts.map +1 -1
  56. package/lib/components/Assignments/index.js.map +1 -1
  57. package/lib/components/CasePreview/CasePreview.d.ts +4 -4
  58. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  59. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  60. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts +1 -1
  61. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
  62. package/lib/components/CaseView/CaseHeader/CaseHeader.js +15 -7
  63. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
  64. package/lib/components/CaseView/CaseHeader/Summary.d.ts +1 -1
  65. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -1
  66. package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -1
  67. package/lib/components/CaseView/CaseSummary.d.ts +1 -1
  68. package/lib/components/CaseView/CaseSummary.d.ts.map +1 -1
  69. package/lib/components/CaseView/CaseSummary.js.map +1 -1
  70. package/lib/components/CaseView/CaseSummaryFields.d.ts +3 -3
  71. package/lib/components/CaseView/CaseSummaryFields.d.ts.map +1 -1
  72. package/lib/components/CaseView/CaseSummaryFields.js.map +1 -1
  73. package/lib/components/CaseView/CaseView.context.d.ts +1 -1
  74. package/lib/components/CaseView/CaseView.context.d.ts.map +1 -1
  75. package/lib/components/CaseView/CaseView.context.js.map +1 -1
  76. package/lib/components/CaseView/CaseView.d.ts +4 -4
  77. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  78. package/lib/components/CaseView/CaseView.js +3 -1
  79. package/lib/components/CaseView/CaseView.js.map +1 -1
  80. package/lib/components/CaseView/CaseView.styles.d.ts +1 -2
  81. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  82. package/lib/components/CaseView/CaseView.styles.js +1 -22
  83. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  84. package/lib/components/CaseView/CaseView.test-ids.d.ts +1 -1
  85. package/lib/components/CaseView/CaseView.test-ids.d.ts.map +1 -1
  86. package/lib/components/CaseView/CaseView.test-ids.js +1 -0
  87. package/lib/components/CaseView/CaseView.test-ids.js.map +1 -1
  88. package/lib/components/CaseView/CaseView.types.d.ts +11 -9
  89. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  90. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  91. package/lib/components/CaseView/UtilitiesSummary.d.ts +2 -2
  92. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
  93. package/lib/components/CaseView/UtilitiesSummary.js +42 -10
  94. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  95. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts +9 -0
  96. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -0
  97. package/lib/components/CaseView/UtilitySummaryItemDialog.js +33 -0
  98. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -0
  99. package/lib/components/CaseView/index.d.ts +1 -0
  100. package/lib/components/CaseView/index.d.ts.map +1 -1
  101. package/lib/components/CaseView/index.js +1 -0
  102. package/lib/components/CaseView/index.js.map +1 -1
  103. package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts.map +1 -1
  104. package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +1 -1
  105. package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -1
  106. package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
  107. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts +1 -1
  108. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +1 -1
  109. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js.map +1 -1
  110. package/lib/components/Confirmation/Confirmation.d.ts +2 -2
  111. package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
  112. package/lib/components/Confirmation/Confirmation.js.map +1 -1
  113. package/lib/components/Details/Details.d.ts +21 -11
  114. package/lib/components/Details/Details.d.ts.map +1 -1
  115. package/lib/components/Details/Details.js +8 -5
  116. package/lib/components/Details/Details.js.map +1 -1
  117. package/lib/components/Details/Details.styles.d.ts +2 -2
  118. package/lib/components/Details/Details.styles.d.ts.map +1 -1
  119. package/lib/components/Details/Details.styles.js +20 -4
  120. package/lib/components/Details/Details.styles.js.map +1 -1
  121. package/lib/components/Glimpse/Glimpse.d.ts +2 -2
  122. package/lib/components/Glimpse/Glimpse.d.ts.map +1 -1
  123. package/lib/components/Glimpse/Glimpse.js +2 -2
  124. package/lib/components/Glimpse/Glimpse.js.map +1 -1
  125. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +2 -2
  126. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
  127. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
  128. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +2 -2
  129. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -1
  130. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -1
  131. package/lib/components/InteractionNotification/CountdownButton.d.ts +15 -0
  132. package/lib/components/InteractionNotification/CountdownButton.d.ts.map +1 -0
  133. package/lib/components/InteractionNotification/CountdownButton.js +45 -0
  134. package/lib/components/InteractionNotification/CountdownButton.js.map +1 -0
  135. package/lib/components/InteractionNotification/InteractionNotification.d.ts +35 -0
  136. package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -0
  137. package/lib/components/InteractionNotification/InteractionNotification.js +110 -0
  138. package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -0
  139. package/lib/components/InteractionNotification/index.d.ts +2 -0
  140. package/lib/components/InteractionNotification/index.d.ts.map +1 -0
  141. package/lib/components/InteractionNotification/index.js +2 -0
  142. package/lib/components/InteractionNotification/index.js.map +1 -0
  143. package/lib/components/Predictions/Predictions.d.ts +4 -4
  144. package/lib/components/Predictions/Predictions.d.ts.map +1 -1
  145. package/lib/components/Predictions/Predictions.js.map +1 -1
  146. package/lib/components/Predictions/Predictions.types.d.ts +2 -2
  147. package/lib/components/Predictions/Predictions.types.d.ts.map +1 -1
  148. package/lib/components/Predictions/Predictions.types.js.map +1 -1
  149. package/lib/components/SearchResults/Filter.d.ts +1 -1
  150. package/lib/components/SearchResults/Filter.d.ts.map +1 -1
  151. package/lib/components/SearchResults/Filter.js.map +1 -1
  152. package/lib/components/SearchResults/SearchResult.d.ts +1 -1
  153. package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
  154. package/lib/components/SearchResults/SearchResult.js.map +1 -1
  155. package/lib/components/SearchResults/SearchResults.d.ts +3 -3
  156. package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
  157. package/lib/components/SearchResults/SearchResults.js.map +1 -1
  158. package/lib/components/SearchResults/SearchResults.types.d.ts +2 -2
  159. package/lib/components/SearchResults/SearchResults.types.d.ts.map +1 -1
  160. package/lib/components/SearchResults/SearchResults.types.js.map +1 -1
  161. package/lib/components/Stages/StageGlimpse.d.ts +2 -2
  162. package/lib/components/Stages/StageGlimpse.d.ts.map +1 -1
  163. package/lib/components/Stages/StageGlimpse.js.map +1 -1
  164. package/lib/components/Stages/Stages.d.ts +2 -2
  165. package/lib/components/Stages/Stages.d.ts.map +1 -1
  166. package/lib/components/Stages/Stages.js +30 -26
  167. package/lib/components/Stages/Stages.js.map +1 -1
  168. package/lib/components/Stages/Stages.styles.d.ts +3 -1
  169. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  170. package/lib/components/Stages/Stages.styles.js +78 -61
  171. package/lib/components/Stages/Stages.styles.js.map +1 -1
  172. package/lib/components/Stages/Stages.types.d.ts +2 -2
  173. package/lib/components/Stages/Stages.types.d.ts.map +1 -1
  174. package/lib/components/Stages/Stages.types.js.map +1 -1
  175. package/lib/components/Stakeholders/Stakeholders.d.ts +1 -1
  176. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
  177. package/lib/components/Stakeholders/Stakeholders.js +48 -33
  178. package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
  179. package/lib/components/Tags/Tags.d.ts +2 -2
  180. package/lib/components/Tags/Tags.d.ts.map +1 -1
  181. package/lib/components/Tags/Tags.js.map +1 -1
  182. package/lib/components/Tasks/TaskList.d.ts +2 -2
  183. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  184. package/lib/components/Tasks/TaskList.js +10 -1
  185. package/lib/components/Tasks/TaskList.js.map +1 -1
  186. package/lib/components/Tasks/Tasks.d.ts +5 -4
  187. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  188. package/lib/components/Tasks/Tasks.js +19 -3
  189. package/lib/components/Tasks/Tasks.js.map +1 -1
  190. package/lib/components/Tasks/index.d.ts +4 -2
  191. package/lib/components/Tasks/index.d.ts.map +1 -1
  192. package/lib/components/Tasks/index.js.map +1 -1
  193. package/lib/components/Timeline/Timeline.d.ts +2 -2
  194. package/lib/components/Timeline/Timeline.d.ts.map +1 -1
  195. package/lib/components/Timeline/Timeline.js.map +1 -1
  196. package/lib/components/Timeline/Timeline.styles.d.ts.map +1 -1
  197. package/lib/components/Timeline/Timeline.styles.js +6 -3
  198. package/lib/components/Timeline/Timeline.styles.js.map +1 -1
  199. package/lib/components/Timeline/Timeline.types.d.ts +4 -4
  200. package/lib/components/Timeline/Timeline.types.d.ts.map +1 -1
  201. package/lib/components/Timeline/Timeline.types.js.map +1 -1
  202. package/lib/components/Timeline/TimelineItem.d.ts +2 -2
  203. package/lib/components/Timeline/TimelineItem.d.ts.map +1 -1
  204. package/lib/components/Timeline/TimelineItem.js.map +1 -1
  205. package/lib/components/Timeline/TimelineToolbar.d.ts +3 -3
  206. package/lib/components/Timeline/TimelineToolbar.d.ts.map +1 -1
  207. package/lib/components/Timeline/TimelineToolbar.js.map +1 -1
  208. package/lib/index.d.ts +1 -0
  209. package/lib/index.d.ts.map +1 -1
  210. package/lib/index.js +1 -0
  211. package/lib/index.js.map +1 -1
  212. package/package.json +12 -18
@@ -1 +1 @@
1
- {"version":3,"file":"Details.styles.js","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EAEpB,UAAU,EAGV,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC;AAkCjC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAEvC,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aAAa,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;IAC5D,MAAM,wBAAwB,GAAG,GAAG,gBAAgB,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC;IAE9E,OAAO,GAAG,CAAA;;QAEN,CAAC,MAAM;QACT,GAAG,CAAA;UACC,gBAAgB;;;;;UAKhB,uBAAuB;;;OAG1B;;;QAGC,MAAM;QACR,GAAG,CAAA;;OAEF;;;QAGC,CAAC,IAAI;QACP,GAAG,CAAA;;8CAEqC,WAAW;+BAC1B,OAAO;wBACd,4BAA4B,MAAM,OAAO;;UAEvD,OAAO;YACT,GAAG,CAAA;;;SAGF;;YAEG,uBAAuB;uBACZ,gBAAgB;;;YAG3B,gBAAgB;4BACA,wBAAwB,eAAe,OAAO;;YAE9D,CAAC,iBAAiB;YACpB,GAAG,CAAA;;WAEF;;;UAGD,iBAAiB;YACnB,GAAG,CAAA;;;gCAGqB,OAAO;uBAChB,gBAAgB;;;;;;;SAO9B;;YAEG,aAAa;;;OAGlB;;;QAGC,IAAI;QACN,GAAG,CAAA;;0BAEiB,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;2BACzB,WAAW,MAAM,OAAO;;qBAE9B,gBAAgB;;UAE3B,CAAC,OAAO;YACV,GAAG,CAAA;;;yBAGc,aAAa;;SAE7B;;YAEG,aAAa;;;OAGlB;;;QAGC,OAAO;QACT,CAAC,iBAAiB;QAClB,GAAG,CAAA;;qCAE4B,4BAA4B,MAAM,OAAO;;OAEvE;;;QAGC,MAAM;QACR,CAAC,OAAO;QACR,CAAC,iBAAiB;QAClB,GAAG,CAAA;8CACqC,WAAW;OAClD;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, DefaultTheme } from 'styled-components';\n\nimport {\n calculateFontSize,\n defaultThemeProp,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledFieldValueList,\n StyledFieldValueListProps,\n StyledIcon,\n FontSize,\n PropsWithDefaults,\n useDirection,\n StyledButton\n} from '@pega/cosmos-react-core';\n\ninterface StyledDetailListProps extends StyledFieldValueListProps {\n /** Whether individual list items all have labels stacks on top */\n stacked?: boolean;\n /** Whether the list is a flex row of other lists */\n flex?: boolean;\n /** Whether the list is nested */\n nested?: boolean;\n /** The character length applied to all list labels */\n labelLength?: number;\n /**\n * Whether the list is wrapped to 1 column\n * @default false\n */\n wrapped?: boolean;\n /**\n * Number of columns in the list\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /**\n * Whether to apply narrow list styles\n * @default false\n */\n narrow?: boolean;\n theme: DefaultTheme;\n}\n\ntype StyledDetailListPropsWithDefaults = PropsWithDefaults<\n StyledDetailListProps,\n 'wrapped' | 'columnCount'\n>;\n\nconst verticalGapSpacingMultiplier = 1;\n\n// colWidth reduces by 20% as column count increases\nexport const colCountChWidth = {\n '1': {\n containerWidth: 100,\n colWidth: 100\n },\n '2': {\n containerWidth: 80 * 2,\n colWidth: 80\n },\n '3': {\n containerWidth: 64 * 3,\n colWidth: 64\n }\n};\n\nexport const flexGapProp = 5.5;\n\nexport const StyledFieldValueGroupLabel = styled.div(({ theme }) => {\n const {\n base: { spacing, animation }\n } = theme;\n const { rtl } = useDirection();\n\n return css`\n width: 100%;\n grid-column-start: 1;\n grid-column-end: -1;\n margin-block-end: calc(0.5 * ${spacing});\n margin-block-start: calc(1.5 * ${spacing});\n\n ${StyledButton} ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n ${StyledButton}[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n ${StyledButton}[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledFieldValueGroupLabel.defaultProps = defaultThemeProp;\n\nexport const StyledDetailDescription = styled.div(({ theme }) => {\n const {\n base: {\n spacing,\n 'content-width': { xl }\n }\n } = theme;\n\n return css`\n max-width: ${xl};\n margin-block: calc(1.5 * ${spacing});\n `;\n});\n\nStyledDetailDescription.defaultProps = defaultThemeProp;\n\nexport const StyledHighlightedDetailList = styled.dl(({ theme }) => {\n const {\n base: { spacing, palette }\n } = theme;\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n max-width: ${colCountChWidth[3].containerWidth}ch;\n padding-block-end: calc(1.5 * ${spacing});\n\n dd {\n font-size: ${fontSize[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n }\n\n + hr {\n border-top: unset;\n border-radius: unset;\n border-style: unset;\n border-bottom: 0.0625rem solid ${palette['border-line']};\n margin-block-end: calc(1.5 * ${spacing});\n }\n `;\n});\n\nStyledHighlightedDetailList.defaultProps = defaultThemeProp;\n\nexport const StyledDetails = styled.div``;\n\nexport const StyledDetailList = styled(StyledFieldValueList)<StyledDetailListPropsWithDefaults>(\n ({\n stacked,\n flex,\n nested,\n labelLength,\n variant,\n theme,\n wrapped = false,\n columnCount = 1,\n narrow = false\n }): any => {\n const {\n base: { spacing }\n } = theme;\n\n const isValueComparison = variant === 'value-comparison';\n const containerWidthCh = colCountChWidth[columnCount].containerWidth;\n const columnWidthCh = colCountChWidth[columnCount].colWidth;\n const containerWidthMinusLabel = `${containerWidthCh - (labelLength ?? 0)}ch`;\n\n return css`\n /* Top Level Styles */\n ${!nested &&\n css`\n ${StyledFieldValue} {\n word-break: break-word;\n overflow: auto;\n }\n\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `}\n\n /* Nested List */\n ${nested &&\n css`\n grid-column: 1 / -1;\n `}\n\n /* As Field Grid */\n ${!flex &&\n css`\n display: grid;\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);\n column-gap: calc(2 * ${spacing});\n row-gap: calc(${verticalGapSpacingMultiplier} * ${spacing});\n\n ${stacked &&\n css`\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n `}\n\n > ${StyledStackedFieldValue} {\n max-width: ${containerWidthCh}ch;\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${containerWidthMinusLabel} - calc(2 * ${spacing}));\n\n ${!isValueComparison &&\n css`\n width: 100%;\n `}\n }\n\n ${isValueComparison &&\n css`\n grid-template-columns: auto auto;\n column-gap: 0;\n row-gap: calc(0.5 * ${spacing});\n max-width: ${containerWidthCh}ch;\n\n > dd {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n `}\n\n > ${StyledDetails} {\n grid-column: 1 / -1;\n }\n `}\n\n /* As Flex Container */\n ${flex &&\n css`\n display: flex;\n flex-direction: ${wrapped ? 'column' : 'row'};\n column-gap: calc(${flexGapProp} * ${spacing});\n align-items: flex-start;\n max-width: ${containerWidthCh}ch;\n\n ${!wrapped &&\n css`\n > * {\n width: 100%;\n max-width: ${columnWidthCh}%;\n }\n `}\n\n > ${StyledDetails} {\n width: 100%;\n }\n `}\n\n /* Key / Group Label Spacing */\n ${stacked &&\n !isValueComparison &&\n css`\n > dt {\n margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});\n }\n `}\n\n /* Responsive behavior */\n ${narrow &&\n !stacked &&\n !isValueComparison &&\n css`\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(50%, 1fr);\n `}\n `;\n }\n);\n\nStyledDetailList.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Details.styles.js","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAuCjC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAEvC,oDAAoD;AACpD,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;8CACqC,WAAW;OAClD;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport {\n calculateFontSize,\n defaultThemeProp,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledFieldValueList,\n StyledIcon,\n useDirection,\n StyledButtonLink\n} from '@pega/cosmos-react-core';\nimport type {\n StyledFieldValueListProps,\n FontSize,\n PropsWithDefaults\n} from '@pega/cosmos-react-core';\n\ninterface StyledDetailListProps extends StyledFieldValueListProps {\n /** Whether individual list items all have labels stacks on top */\n stacked?: boolean;\n /** Whether the list is a flex row of other lists */\n flex?: boolean;\n /** Whether the list is nested */\n nested?: boolean;\n /** The character length applied to all list labels */\n labelLength?: number;\n /**\n * Whether the list is wrapped to 1 column\n * @default false\n */\n wrapped?: boolean;\n /**\n * Number of columns in the list\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /**\n * Whether to apply narrow list styles\n * @default false\n */\n narrow?: boolean;\n theme: DefaultTheme;\n}\n\ntype StyledDetailListPropsWithDefaults = PropsWithDefaults<\n StyledDetailListProps,\n 'wrapped' | 'columnCount'\n>;\n\nconst verticalGapSpacingMultiplier = 1;\n\n// colWidth reduces by 20% as column count increases\nexport const colCountChWidth = {\n '1': {\n containerWidth: 100,\n colWidth: 100\n },\n '2': {\n containerWidth: 80 * 2,\n colWidth: 80\n },\n '3': {\n containerWidth: 64 * 3,\n colWidth: 64\n }\n};\n\nexport const flexGapProp = 5.5;\n\nexport const StyledFieldValueGroupLabel = styled.div(({ theme }) => {\n const {\n base: { spacing, animation }\n } = theme;\n const { rtl } = useDirection();\n\n return css`\n width: 100%;\n grid-column-start: 1;\n grid-column-end: -1;\n margin-block-end: calc(0.5 * ${spacing});\n margin-block-start: calc(1.5 * ${spacing});\n\n ${StyledButtonLink} ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n ${StyledButtonLink}[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n ${StyledButtonLink}[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledFieldValueGroupLabel.defaultProps = defaultThemeProp;\n\nexport const StyledDetailDescription = styled.div(({ theme }) => {\n const {\n base: {\n spacing,\n 'content-width': { xl }\n }\n } = theme;\n\n return css`\n max-width: ${xl};\n margin-block: calc(1.5 * ${spacing});\n `;\n});\n\nStyledDetailDescription.defaultProps = defaultThemeProp;\n\nexport const StyledHighlightedDetailList = styled.dl(({ theme }) => {\n const {\n base: { spacing, palette }\n } = theme;\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n max-width: ${colCountChWidth[3].containerWidth}ch;\n padding-block-end: calc(1.5 * ${spacing});\n\n dd {\n font-size: ${fontSize[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n }\n\n + hr {\n border-top: unset;\n border-radius: unset;\n border-style: unset;\n border-bottom: 0.0625rem solid ${palette['border-line']};\n margin-block-end: calc(1.5 * ${spacing});\n }\n `;\n});\n\nStyledHighlightedDetailList.defaultProps = defaultThemeProp;\n\nexport const StyledDetails = styled.div``;\n\nexport const StyledDetailList = styled(StyledFieldValueList)<StyledDetailListPropsWithDefaults>(\n ({\n stacked,\n flex,\n nested,\n labelLength,\n variant,\n theme,\n wrapped = false,\n columnCount = 1,\n narrow = false\n }): any => {\n const {\n base: { spacing }\n } = theme;\n\n const isValueComparison = variant === 'value-comparison';\n const containerWidthCh = colCountChWidth[columnCount].containerWidth;\n const columnWidthCh = colCountChWidth[columnCount].colWidth;\n const containerWidthMinusLabel = `${containerWidthCh - (labelLength ?? 0)}ch`;\n\n return css`\n /* Top Level Styles */\n ${!nested &&\n css`\n ${StyledFieldValue} {\n word-break: break-word;\n overflow: auto;\n }\n\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `}\n\n /* Nested List */\n ${nested &&\n css`\n grid-column: 1 / -1;\n `}\n\n /* As Field Grid */\n ${!flex &&\n css`\n display: grid;\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);\n column-gap: calc(2 * ${spacing});\n row-gap: calc(${verticalGapSpacingMultiplier} * ${spacing});\n\n ${stacked &&\n css`\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n\n ${!isValueComparison &&\n css`\n > dt,\n ${StyledStackedFieldValue} {\n margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});\n }\n `}\n `}\n\n > ${StyledStackedFieldValue} {\n max-width: ${containerWidthCh}ch;\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${containerWidthMinusLabel} - calc(2 * ${spacing}));\n\n ${!isValueComparison &&\n css`\n width: 100%;\n `}\n }\n\n ${isValueComparison &&\n css`\n grid-template-columns: auto auto;\n column-gap: 0;\n row-gap: calc(0.5 * ${spacing});\n max-width: ${containerWidthCh}ch;\n\n > dd {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n `}\n\n > ${StyledDetails} {\n grid-column: 1 / -1;\n }\n `}\n\n /* As Flex Container */\n ${flex &&\n css`\n display: flex;\n flex-direction: ${wrapped ? 'column' : 'row'};\n column-gap: calc(${flexGapProp} * ${spacing});\n align-items: flex-start;\n max-width: ${containerWidthCh}ch;\n\n ${!wrapped &&\n css`\n > * {\n width: 100%;\n max-width: ${columnWidthCh}%;\n }\n `}\n\n > ${StyledDetails} {\n width: 100%;\n\n ${wrapped &&\n !stacked &&\n css`\n + ${StyledDetails} > ${StyledDetailList}:first-child {\n margin-block-start: ${theme.base.spacing};\n }\n `}\n }\n `}\n\n /* Key / Group Label Spacing */\n ${stacked &&\n !isValueComparison &&\n css`\n > dt {\n margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});\n }\n `}\n\n /* Responsive behavior */\n ${narrow &&\n !stacked &&\n !isValueComparison &&\n css`\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(50%, 1fr);\n `}\n `;\n }\n);\n\nStyledDetailList.defaultProps = defaultThemeProp;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, MouseEventHandler, Ref } from 'react';
2
- import { BaseProps, ButtonProps, FieldValueListProps, ForwardProps, InfoDialogProps, NoChildrenProp, OmitStrict } from '@pega/cosmos-react-core';
1
+ import type { FunctionComponent, MouseEventHandler, Ref } from 'react';
2
+ import type { BaseProps, ButtonProps, FieldValueListProps, ForwardProps, InfoDialogProps, NoChildrenProp, OmitStrict } from '@pega/cosmos-react-core';
3
3
  type InfoDialogSummaryHeading = Extract<InfoDialogProps['heading'], object>;
4
4
  export interface GlimpseProps extends BaseProps, OmitStrict<InfoDialogProps, 'children'>, NoChildrenProp {
5
5
  /** The unique id for the operator. */
@@ -1 +1 @@
1
- {"version":3,"file":"Glimpse.d.ts","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,iBAAiB,EAEjB,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,SAAS,EAET,WAAW,EAEX,mBAAmB,EAEnB,YAAY,EAEZ,eAAe,EACf,cAAc,EACd,UAAU,EAEX,MAAM,yBAAyB,CAAC;AAEjC,KAAK,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAE5E,MAAM,WAAW,YACf,SAAQ,SAAS,EACf,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,EACvC,cAAc;IAChB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,qDAAqD;IACrD,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC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 +3,10 @@ import { forwardRef } from 'react';
3
3
  import { Button, FieldValueList, Flex, InfoDialog, useI18n } from '@pega/cosmos-react-core';
4
4
  const Glimpse = forwardRef(function Glimpse({ heading, fields = [], target, onDismiss, href, progress, onViewProfile, ...restProps }, ref) {
5
5
  const t = useI18n();
6
- return (_jsx(InfoDialog, { ...restProps, target: target, heading: heading, progress: progress, onDismiss: onDismiss, ref: ref, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [fields.length > 0 && _jsx(FieldValueList, { fields: fields }), (onViewProfile || href) && (_jsx(Button, { href: href, onClick: (e) => {
6
+ return (_jsx(InfoDialog, { ...restProps, target: target, heading: heading, progress: progress, onDismiss: onDismiss, ref: ref, children: !heading || progress || fields.length || onViewProfile || href ? (_jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [fields.length > 0 && _jsx(FieldValueList, { fields: fields }), (onViewProfile || href) && (_jsx(Button, { href: href, onClick: (e) => {
7
7
  onViewProfile?.(e);
8
8
  onDismiss();
9
- }, children: t('view_profile') }))] }) }));
9
+ }, children: t('view_profile') }))] })) : null }));
10
10
  });
11
11
  export default Glimpse;
12
12
  //# sourceMappingURL=Glimpse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Glimpse.js","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAMX,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,MAAM,EAEN,cAAc,EAEd,IAAI,EAEJ,UAAU,EAIV,OAAO,EACR,MAAM,yBAAyB,CAAC;AAsBjC,MAAM,OAAO,GAAmD,UAAU,CAAC,SAAS,OAAO,CACzF,EACE,OAAO,EACP,MAAM,GAAG,EAAE,EACX,MAAM,EACN,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,GAAG,SAAS,EACkB,EAChC,GAAwB;IAExB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,UAAU,OACL,SAAS,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,GAAG,YAER,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,aAClE,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,EAEvD,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAC1B,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;wBAC5C,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;wBACnB,SAAS,EAAE,CAAC;oBACd,CAAC,YAEA,CAAC,CAAC,cAAc,CAAC,GACX,CACV,IACI,GACI,CACd,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MouseEvent,\n MouseEventHandler,\n PropsWithoutRef,\n Ref\n} from 'react';\n\nimport {\n BaseProps,\n Button,\n ButtonProps,\n FieldValueList,\n FieldValueListProps,\n Flex,\n ForwardProps,\n InfoDialog,\n InfoDialogProps,\n NoChildrenProp,\n OmitStrict,\n useI18n\n} from '@pega/cosmos-react-core';\n\ntype InfoDialogSummaryHeading = Extract<InfoDialogProps['heading'], object>;\n\nexport interface GlimpseProps\n extends BaseProps,\n OmitStrict<InfoDialogProps, 'children'>,\n NoChildrenProp {\n /** The unique id for the operator. */\n id: string;\n /** Primary, secondary and avatar for the glimpse. */\n heading?: InfoDialogSummaryHeading;\n /** The set of field values to render in the list. */\n fields?: FieldValueListProps['fields'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n /** Callback for click event on View profile button. Passing this will render View profile button */\n onViewProfile?: MouseEventHandler<HTMLButtonElement>;\n /** A URL location to navigate to. Passing an href will render View profile button as a link. */\n href?: ButtonProps['href'];\n}\n\nconst Glimpse: FunctionComponent<GlimpseProps & ForwardProps> = forwardRef(function Glimpse(\n {\n heading,\n fields = [],\n target,\n onDismiss,\n href,\n progress,\n onViewProfile,\n ...restProps\n }: PropsWithoutRef<GlimpseProps>,\n ref: GlimpseProps['ref']\n) {\n const t = useI18n();\n\n return (\n <InfoDialog\n {...restProps}\n target={target}\n heading={heading}\n progress={progress}\n onDismiss={onDismiss}\n ref={ref}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n {fields.length > 0 && <FieldValueList fields={fields} />}\n\n {(onViewProfile || href) && (\n <Button\n href={href}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onViewProfile?.(e);\n onDismiss();\n }}\n >\n {t('view_profile')}\n </Button>\n )}\n </Flex>\n </InfoDialog>\n );\n});\n\nexport default Glimpse;\n"]}
1
+ {"version":3,"file":"Glimpse.js","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AA+B5F,MAAM,OAAO,GAAmD,UAAU,CAAC,SAAS,OAAO,CACzF,EACE,OAAO,EACP,MAAM,GAAG,EAAE,EACX,MAAM,EACN,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,GAAG,SAAS,EACkB,EAChC,GAAwB;IAExB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,UAAU,OACL,SAAS,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,GAAG,YAEP,CAAC,OAAO,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,IAAI,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,CAChE,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,aAClE,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,EACvD,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAC1B,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;wBAC5C,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;wBACnB,SAAS,EAAE,CAAC;oBACd,CAAC,YAEA,CAAC,CAAC,cAAc,CAAC,GACX,CACV,IACI,CACR,CAAC,CAAC,CAAC,IAAI,GACG,CACd,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, MouseEvent, MouseEventHandler, PropsWithoutRef, Ref } from 'react';\n\nimport { Button, FieldValueList, Flex, InfoDialog, useI18n } from '@pega/cosmos-react-core';\nimport type {\n BaseProps,\n ButtonProps,\n FieldValueListProps,\n ForwardProps,\n InfoDialogProps,\n NoChildrenProp,\n OmitStrict\n} from '@pega/cosmos-react-core';\n\ntype InfoDialogSummaryHeading = Extract<InfoDialogProps['heading'], object>;\n\nexport interface GlimpseProps\n extends BaseProps,\n OmitStrict<InfoDialogProps, 'children'>,\n NoChildrenProp {\n /** The unique id for the operator. */\n id: string;\n /** Primary, secondary and avatar for the glimpse. */\n heading?: InfoDialogSummaryHeading;\n /** The set of field values to render in the list. */\n fields?: FieldValueListProps['fields'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n /** Callback for click event on View profile button. Passing this will render View profile button */\n onViewProfile?: MouseEventHandler<HTMLButtonElement>;\n /** A URL location to navigate to. Passing an href will render View profile button as a link. */\n href?: ButtonProps['href'];\n}\n\nconst Glimpse: FunctionComponent<GlimpseProps & ForwardProps> = forwardRef(function Glimpse(\n {\n heading,\n fields = [],\n target,\n onDismiss,\n href,\n progress,\n onViewProfile,\n ...restProps\n }: PropsWithoutRef<GlimpseProps>,\n ref: GlimpseProps['ref']\n) {\n const t = useI18n();\n\n return (\n <InfoDialog\n {...restProps}\n target={target}\n heading={heading}\n progress={progress}\n onDismiss={onDismiss}\n ref={ref}\n >\n {!heading || progress || fields.length || onViewProfile || href ? (\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n {fields.length > 0 && <FieldValueList fields={fields} />}\n {(onViewProfile || href) && (\n <Button\n href={href}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onViewProfile?.(e);\n onDismiss();\n }}\n >\n {t('view_profile')}\n </Button>\n )}\n </Flex>\n ) : null}\n </InfoDialog>\n );\n});\n\nexport default Glimpse;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '@pega/cosmos-react-core';
3
3
  import type IntelligentGuidanceProps from './IntelligentGuidance.types';
4
4
  declare const IntelligentGuidance: FunctionComponent<IntelligentGuidanceProps & ForwardProps>;
5
5
  export default IntelligentGuidance;
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,YAAY,EAYb,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,wBAAwB,GAAG,YAAY,CA8InF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"IntelligentGuidance.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,iBAAiB,EAAkC,MAAM,OAAO,CAAC;AAc9F,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,yBAAyB,CAAC;AAQ7E,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,wBAAwB,GAAG,YAAY,CA8InF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAIV,eAAe,EACf,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,IAAI,EAEJ,OAAO,EACP,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,mBAAmB,GAA+D,UAAU,CAChG,SAAS,mBAAmB,CAC1B,EACE,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,GAAG,SAAS,EAC8B,EAC5C,GAAoC;IAEpC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,SAAS,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,IAChE,CACJ,CAAC,CAAC,CAAC,CACF,uBAAuB,CACxB,IACyB,CAC7B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import {\n CSSProperties,\n forwardRef,\n FunctionComponent,\n KeyboardEvent,\n PropsWithoutRef,\n useLayoutEffect,\n useRef,\n useState\n} from 'react';\n\nimport {\n ForwardProps,\n Icon,\n SummaryListItem,\n useI18n,\n useAfterInitialEffect,\n Text,\n Tabs,\n CardHeader,\n TabPanel,\n Flex,\n Count,\n Actions\n} from '@pega/cosmos-react-core';\n\nimport {\n StyledIntelligentGuidanceList,\n StyledIntelligentGuidance,\n StyledNew,\n StyledBorderLine\n} from './IntelligentGuidance.styles';\nimport type IntelligentGuidanceProps from './IntelligentGuidance.types';\n\nconst IntelligentGuidance: FunctionComponent<IntelligentGuidanceProps & ForwardProps> = forwardRef(\n function IntelligentGuidance(\n {\n items,\n previousItems,\n heading,\n isCollapsed,\n onExpandCollapse,\n ...restProps\n }: PropsWithoutRef<IntelligentGuidanceProps>,\n ref: IntelligentGuidanceProps['ref']\n ) {\n const t = useI18n();\n const headerRef = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const [currentTab, setCurrentTab] = useState('current');\n\n const listItems: SummaryListItem[] = (\n currentTab === 'current' ? items : previousItems ?? []\n ).map(item => {\n return {\n id: item.id,\n visual: <Icon name={item.icon} />,\n primary: (\n <>\n {item.label}\n {item.new && (\n <>\n <StyledNew>{t('new')}</StyledNew>\n {/* Can remove StyledBorderLine when Firefox supports :has selector. */}\n <StyledBorderLine />\n </>\n )}\n </>\n ),\n secondary: <Text variant='secondary'>{item.type}</Text>,\n contextualLabel: item.label,\n actions: item.onDismiss\n ? [\n {\n text: t('dismiss'),\n id: item.id,\n icon: 'times',\n onClick: (id, e) => {\n e.stopPropagation();\n item.onDismiss?.(id, e);\n }\n }\n ]\n : undefined,\n container: { colGap: 1 },\n role: 'button',\n tabIndex: 0,\n 'aria-label': t('continue_label_a11y', [item.label]),\n onClick: item.onClick,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n item.onClick(e);\n }\n }\n };\n });\n\n const [headerHeight, setHeaderHeight] = useState(0);\n\n useLayoutEffect(() => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current?.offsetHeight || 0);\n }\n }, [headerRef.current]);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the list is toggled.\n useAfterInitialEffect(() => {\n if (toggleButtonRef.current && toggleButtonRef.current === document.activeElement) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 1000);\n }\n }, [isCollapsed]);\n\n const intelligentGuidanceList = (\n <StyledIntelligentGuidanceList items={listItems} noItemsText={t('no_recommendations')} />\n );\n\n return (\n <StyledIntelligentGuidance\n {...restProps}\n ref={ref}\n role='region'\n aria-live='polite'\n aria-relevant='all'\n isCollapsed={isCollapsed}\n hasItems={!!items.length}\n style={{ '--headerHeight': `${headerHeight}px` } as CSSProperties}\n >\n <CardHeader ref={headerRef}>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Text variant='h2'>{heading}</Text>\n <Count>{items.length + (previousItems?.length ?? 0)}</Count>\n </Flex>\n <Actions\n items={[\n {\n text: t(isCollapsed ? 'expand' : 'collapse'),\n id: 'IntelligentGuidanceButton',\n icon: 'caret-down',\n 'aria-label': isCollapsed\n ? t('expand_noun', [heading])\n : t('collapse_noun', [heading]),\n onClick: onExpandCollapse,\n ref: toggleButtonRef\n }\n ]}\n />\n </CardHeader>\n {previousItems ? (\n <>\n <Tabs\n tabs={[\n {\n id: 'current',\n name: t('current'),\n count: items.filter(item => item.new).length || undefined\n },\n {\n id: 'previous',\n name: t('previous'),\n count: previousItems.filter(item => item.new).length || undefined\n }\n ]}\n currentTabId={currentTab}\n onTabClick={setCurrentTab}\n />\n <TabPanel tabId={currentTab}>{intelligentGuidanceList}</TabPanel>\n </>\n ) : (\n intelligentGuidanceList\n )}\n </StyledIntelligentGuidance>\n );\n }\n);\n\nexport default IntelligentGuidance;\n"]}
1
+ {"version":3,"file":"IntelligentGuidance.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EACL,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,EACR,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,mBAAmB,GAA+D,UAAU,CAChG,SAAS,mBAAmB,CAC1B,EACE,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,GAAG,SAAS,EAC8B,EAC5C,GAAoC;IAEpC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAExD,MAAM,SAAS,GAAsB,CACnC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,IAAI,EAAE,CACvD,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACX,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;YACjC,OAAO,EAAE,CACP,8BACG,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,GA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AAU,CAAC;gCAC5C,EAAE,EAAE,2BAA2B;gCAC/B,IAAI,EAAE,YAAY;gCAClB,YAAY,EAAE,WAAW;oCACvB,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC;oCAC7B,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC;gCACjC,OAAO,EAAE,gBAAgB;gCACzB,GAAG,EAAE,eAAe;6BACrB;yBACF,GACD,IACS,EACZ,aAAa,CAAC,CAAC,CAAC,CACf,8BACE,KAAC,IAAI,IACH,IAAI,EAAE;4BACJ;gCACE,EAAE,EAAE,SAAS;gCACb,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;gCAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS;6BAC1D;4BACD;gCACE,EAAE,EAAE,UAAU;gCACd,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC;gCACnB,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS;6BAClE;yBACF,EACD,YAAY,EAAE,UAAU,EACxB,UAAU,EAAE,aAAa,GACzB,EACF,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAAG,uBAAuB,GAAY,IAChE,CACJ,CAAC,CAAC,CAAC,CACF,uBAAuB,CACxB,IACyB,CAC7B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState } from 'react';\nimport type { CSSProperties, FunctionComponent, KeyboardEvent, PropsWithoutRef } from 'react';\n\nimport {\n Icon,\n useI18n,\n useAfterInitialEffect,\n Text,\n Tabs,\n CardHeader,\n TabPanel,\n Flex,\n Count,\n Actions\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps, SummaryListItem } from '@pega/cosmos-react-core';\n\nimport {\n StyledIntelligentGuidanceList,\n StyledIntelligentGuidance,\n StyledNew,\n StyledBorderLine\n} from './IntelligentGuidance.styles';\nimport type IntelligentGuidanceProps from './IntelligentGuidance.types';\n\nconst IntelligentGuidance: FunctionComponent<IntelligentGuidanceProps & ForwardProps> = forwardRef(\n function IntelligentGuidance(\n {\n items,\n previousItems,\n heading,\n isCollapsed,\n onExpandCollapse,\n ...restProps\n }: PropsWithoutRef<IntelligentGuidanceProps>,\n ref: IntelligentGuidanceProps['ref']\n ) {\n const t = useI18n();\n const headerRef = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const [currentTab, setCurrentTab] = useState('current');\n\n const listItems: SummaryListItem[] = (\n currentTab === 'current' ? items : previousItems ?? []\n ).map(item => {\n return {\n id: item.id,\n visual: <Icon name={item.icon} />,\n primary: (\n <>\n {item.label}\n {item.new && (\n <>\n <StyledNew>{t('new')}</StyledNew>\n {/* Can remove StyledBorderLine when Firefox supports :has selector. */}\n <StyledBorderLine />\n </>\n )}\n </>\n ),\n secondary: <Text variant='secondary'>{item.type}</Text>,\n contextualLabel: item.label,\n actions: item.onDismiss\n ? [\n {\n text: t('dismiss'),\n id: item.id,\n icon: 'times',\n onClick: (id, e) => {\n e.stopPropagation();\n item.onDismiss?.(id, e);\n }\n }\n ]\n : undefined,\n container: { colGap: 1 },\n role: 'button',\n tabIndex: 0,\n 'aria-label': t('continue_label_a11y', [item.label]),\n onClick: item.onClick,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n item.onClick(e);\n }\n }\n };\n });\n\n const [headerHeight, setHeaderHeight] = useState(0);\n\n useLayoutEffect(() => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current?.offsetHeight || 0);\n }\n }, [headerRef.current]);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the list is toggled.\n useAfterInitialEffect(() => {\n if (toggleButtonRef.current && toggleButtonRef.current === document.activeElement) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 1000);\n }\n }, [isCollapsed]);\n\n const intelligentGuidanceList = (\n <StyledIntelligentGuidanceList items={listItems} noItemsText={t('no_recommendations')} />\n );\n\n return (\n <StyledIntelligentGuidance\n {...restProps}\n ref={ref}\n role='region'\n aria-live='polite'\n aria-relevant='all'\n isCollapsed={isCollapsed}\n hasItems={!!items.length}\n style={{ '--headerHeight': `${headerHeight}px` } as CSSProperties}\n >\n <CardHeader ref={headerRef}>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Text variant='h2'>{heading}</Text>\n <Count>{items.length + (previousItems?.length ?? 0)}</Count>\n </Flex>\n <Actions\n items={[\n {\n text: t(isCollapsed ? 'expand' : 'collapse'),\n id: 'IntelligentGuidanceButton',\n icon: 'caret-down',\n 'aria-label': isCollapsed\n ? t('expand_noun', [heading])\n : t('collapse_noun', [heading]),\n onClick: onExpandCollapse,\n ref: toggleButtonRef\n }\n ]}\n />\n </CardHeader>\n {previousItems ? (\n <>\n <Tabs\n tabs={[\n {\n id: 'current',\n name: t('current'),\n count: items.filter(item => item.new).length || undefined\n },\n {\n id: 'previous',\n name: t('previous'),\n count: previousItems.filter(item => item.new).length || undefined\n }\n ]}\n currentTabId={currentTab}\n onTabClick={setCurrentTab}\n />\n <TabPanel tabId={currentTab}>{intelligentGuidanceList}</TabPanel>\n </>\n ) : (\n intelligentGuidanceList\n )}\n </StyledIntelligentGuidance>\n );\n }\n);\n\nexport default IntelligentGuidance;\n"]}
@@ -1,5 +1,5 @@
1
- import { MouseEvent, KeyboardEvent, Ref } from 'react';
2
- import { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';
1
+ import type { MouseEvent, KeyboardEvent, Ref } from 'react';
2
+ import type { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';
3
3
  export interface IntelligentGuidanceItemProps {
4
4
  /** Unique id for item */
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACtC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC,KACpE,IAAI,CAAC;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,SAAS,EAAE,cAAc;IACjF,8BAA8B;IAC9B,KAAK,EAAE,4BAA4B,EAAE,CAAC;IACtC,uCAAuC;IACvC,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
1
+ {"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpF,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACtC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC,KACpE,IAAI,CAAC;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,SAAS,EAAE,cAAc;IACjF,8BAA8B;IAC9B,KAAK,EAAE,4BAA4B,EAAE,CAAC;IACtC,uCAAuC;IACvC,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.types.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface IntelligentGuidanceItemProps {\n /** Unique id for item */\n id: string;\n /** The label text of the item. */\n label: string;\n /** Name of the icon (to be selected from default Pega icon set) */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /** Click handler for the action button. */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /** Dismiss handler for the action button. */\n onDismiss?: (\n id: IntelligentGuidanceItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Flag that indicates if item is new\n * @default false\n */\n new?: boolean;\n}\n\nexport default interface IntelligentGuidanceProps extends BaseProps, NoChildrenProp {\n /** List of guidance items. */\n items: IntelligentGuidanceItemProps[];\n /** List of guidance previous items. */\n previousItems?: IntelligentGuidanceItemProps[];\n /** Header text. */\n heading: string;\n /** Flag that indicates if intelligent guidance is collapsed */\n isCollapsed: boolean;\n /** Callback when expand/collapse button is clicked */\n onExpandCollapse: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"IntelligentGuidance.types.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport type { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface IntelligentGuidanceItemProps {\n /** Unique id for item */\n id: string;\n /** The label text of the item. */\n label: string;\n /** Name of the icon (to be selected from default Pega icon set) */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /** Click handler for the action button. */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /** Dismiss handler for the action button. */\n onDismiss?: (\n id: IntelligentGuidanceItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Flag that indicates if item is new\n * @default false\n */\n new?: boolean;\n}\n\nexport default interface IntelligentGuidanceProps extends BaseProps, NoChildrenProp {\n /** List of guidance items. */\n items: IntelligentGuidanceItemProps[];\n /** List of guidance previous items. */\n previousItems?: IntelligentGuidanceItemProps[];\n /** Header text. */\n heading: string;\n /** Flag that indicates if intelligent guidance is collapsed */\n isCollapsed: boolean;\n /** Callback when expand/collapse button is clicked */\n onExpandCollapse: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
+ import type { ButtonProps, ForwardProps } from '@pega/cosmos-react-core';
3
+ export interface CountdownButtonProps extends ButtonProps {
4
+ /** Text or content for the Button. */
5
+ children: ReactNode;
6
+ /** Start time of incoming Interaction. */
7
+ startTime: Date | number;
8
+ /** The time the user has to accept the call in seconds. */
9
+ timeout: number;
10
+ /** Callback invoked when timeout ends. */
11
+ onTimerEnd?: () => void;
12
+ }
13
+ declare const CountdownButton: FunctionComponent<CountdownButtonProps & ForwardProps>;
14
+ export default CountdownButton;
15
+ //# sourceMappingURL=CountdownButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CountdownButton.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionNotification/CountdownButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAW/D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,0CAA0C;IAC1C,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAeD,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CAqD3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { forwardRef, useEffect, useState } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { useI18n, Text, VisuallyHiddenText, useUID, Button, defaultThemeProp } from '@pega/cosmos-react-core';
5
+ const formatDuration = (millis) => {
6
+ const seconds = Math.round(millis / 1000);
7
+ return `${Math.floor(seconds / 60)}:${(seconds % 60).toString().padStart(2, '0')}`;
8
+ };
9
+ const StyledAcceptButton = styled(Button)(({ theme }) => css `
10
+ gap: ${theme.base.spacing};
11
+ `);
12
+ StyledAcceptButton.defaultProps = defaultThemeProp;
13
+ const CountdownButton = forwardRef(function CountdownButton({ startTime, timeout, onTimerEnd, children, ...restProps }, ref) {
14
+ const timeoutMs = timeout * 1000;
15
+ const start = Number(startTime);
16
+ const endTime = start + timeoutMs;
17
+ const [msRemaining, setMsRemaining] = useState(() => endTime - Date.now());
18
+ const secondsRemaining = Math.round(msRemaining / 1000);
19
+ const t = useI18n();
20
+ const descriptionId = useUID();
21
+ useEffect(() => {
22
+ let timeoutId;
23
+ if (msRemaining > 0) {
24
+ timeoutId = window.setTimeout(() => {
25
+ setMsRemaining(endTime - Date.now());
26
+ }, 1000);
27
+ }
28
+ else {
29
+ onTimerEnd?.();
30
+ }
31
+ return () => clearTimeout(timeoutId);
32
+ },
33
+ // Omitting onTimerEnd as an effect trigger on purpose.
34
+ // An unstable function definition in the prop causes the effect to run more than necessary.
35
+ // The proper definition will be captured and used with any changes to msRemaining.
36
+ [msRemaining]);
37
+ const timer = msRemaining > 0 ? formatDuration(msRemaining) : '0:00';
38
+ return (_jsxs(_Fragment, { children: [_jsxs(StyledAcceptButton, { ...restProps, "aria-describedby": descriptionId, ref: ref, children: [children, _jsx(Text, { "aria-hidden": 'true', children: timer })] }), _jsx(VisuallyHiddenText, { "aria-hidden": 'true', id: descriptionId, children: msRemaining > 0
39
+ ? t('interaction_time_remaining', [secondsRemaining], {
40
+ count: secondsRemaining
41
+ })
42
+ : t('interaction_time_expired') })] }));
43
+ });
44
+ export default CountdownButton;
45
+ //# sourceMappingURL=CountdownButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CountdownButton.js","sourceRoot":"","sources":["../../../src/components/InteractionNotification/CountdownButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,OAAO,EACP,IAAI,EACJ,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAcjC,MAAM,cAAc,GAAG,CAAC,MAAc,EAAU,EAAE;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1C,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACrF,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CACvC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;WACT,KAAK,CAAC,IAAI,CAAC,OAAO;GAC1B,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EAAE,SAAS,EAAE,O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rB,KAAC,kBAAkB,mBAAa,MAAM,EAAC,EAAE,EAAE,aAAa,YACrD,WAAW,GAAG,CAAC;oBACd,CAAC,CAAC,CAAC,CAAC,4BAA4B,EAAE,CAAC,gBAAgB,CAAC,EAAE;wBAClD,KAAK,EAAE,gBAAgB;qBACxB,CAAC;oBACJ,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,GACd,IACpB,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, useEffect, useState } from 'react';\nimport type { FunctionComponent, ReactNode, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useI18n,\n Text,\n VisuallyHiddenText,\n useUID,\n Button,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport type { ButtonProps, ForwardProps } from '@pega/cosmos-react-core';\n\nexport interface CountdownButtonProps extends ButtonProps {\n /** Text or content for the Button. */\n children: ReactNode;\n /** Start time of incoming Interaction. */\n startTime: Date | number;\n /** The time the user has to accept the call in seconds. */\n timeout: number;\n /** Callback invoked when timeout ends. */\n onTimerEnd?: () => void;\n}\n\nconst formatDuration = (millis: number): string => {\n const seconds = Math.round(millis / 1000);\n return `${Math.floor(seconds / 60)}:${(seconds % 60).toString().padStart(2, '0')}`;\n};\n\nconst StyledAcceptButton = styled(Button)(\n ({ theme }) => css`\n gap: ${theme.base.spacing};\n `\n);\n\nStyledAcceptButton.defaultProps = defaultThemeProp;\n\nconst CountdownButton: FunctionComponent<CountdownButtonProps & ForwardProps> = forwardRef(\n function CountdownButton(\n { startTime, timeout, onTimerEnd, children, ...restProps }: CountdownButtonProps & ForwardProps,\n ref: Ref<HTMLButtonElement>\n ) {\n const timeoutMs = timeout * 1000;\n const start = Number(startTime);\n const endTime = start + timeoutMs;\n const [msRemaining, setMsRemaining] = useState(() => endTime - Date.now());\n\n const secondsRemaining = Math.round(msRemaining / 1000);\n\n const t = useI18n();\n const descriptionId = useUID();\n\n useEffect(\n () => {\n let timeoutId: number;\n\n if (msRemaining > 0) {\n timeoutId = window.setTimeout(() => {\n setMsRemaining(endTime - Date.now());\n }, 1000);\n } else {\n onTimerEnd?.();\n }\n\n return () => clearTimeout(timeoutId);\n },\n // Omitting onTimerEnd as an effect trigger on purpose.\n // An unstable function definition in the prop causes the effect to run more than necessary.\n // The proper definition will be captured and used with any changes to msRemaining.\n [msRemaining]\n );\n\n const timer = msRemaining > 0 ? formatDuration(msRemaining) : '0:00';\n\n return (\n <>\n <StyledAcceptButton {...restProps} aria-describedby={descriptionId} ref={ref}>\n {children}\n <Text aria-hidden='true'>{timer}</Text>\n </StyledAcceptButton>\n <VisuallyHiddenText aria-hidden='true' id={descriptionId}>\n {msRemaining > 0\n ? t('interaction_time_remaining', [secondsRemaining], {\n count: secondsRemaining\n })\n : t('interaction_time_expired')}\n </VisuallyHiddenText>\n </>\n );\n }\n);\n\nexport default CountdownButton;\n"]}
@@ -0,0 +1,35 @@
1
+ import type { FunctionComponent, Ref } from 'react';
2
+ import type { StatusProps, ForwardProps, FieldValueListProps, NoChildrenProp, RequireAtLeastOne } from '@pega/cosmos-react-core';
3
+ import type { CountdownButtonProps } from './CountdownButton';
4
+ export type InteractionNotificationProps = RequireAtLeastOne<NoChildrenProp & {
5
+ /** Ref to Component. */
6
+ ref?: Ref<HTMLDivElement>;
7
+ /** Name of the icon used in header. */
8
+ icon: string;
9
+ /** Interaction title. */
10
+ title: string;
11
+ /** Primary information of the notification. For example caller name . */
12
+ primaryText: string;
13
+ /** Secondary information of the notification. For example phone number of the caller */
14
+ secondaryText?: string;
15
+ /** Represents the current status of interaction. */
16
+ status: {
17
+ variant: StatusProps['variant'];
18
+ text: string;
19
+ };
20
+ /** Information structured as field values to be displayed below main section. */
21
+ fields?: FieldValueListProps['fields'];
22
+ /** Timeout definition */
23
+ incomingNotificationTimeout?: {
24
+ startTime: CountdownButtonProps['startTime'];
25
+ answerTimeout: CountdownButtonProps['timeout'];
26
+ onTimerEnd?: CountdownButtonProps['onTimerEnd'];
27
+ };
28
+ /** Callback when accept button is clicked. */
29
+ onAccept?: () => void;
30
+ /** Callback when decline or 'x' button is clicked. */
31
+ onDismiss?: () => void;
32
+ }, 'onAccept' | 'onDismiss'>;
33
+ declare const InteractionNotification: FunctionComponent<InteractionNotificationProps & ForwardProps>;
34
+ export default InteractionNotification;
35
+ //# sourceMappingURL=InteractionNotification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionNotification.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AA0BrE,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAC1D,cAAc,GAAG;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,MAAM,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,iFAAiF;IACjF,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,yBAAyB;IACzB,2BAA2B,CAAC,EAAE;QAC5B,SAAS,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAC7C,aAAa,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAC/C,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;KACjD,CAAC;IACF,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,EACD,UAAU,GAAG,WAAW,CACzB,CAAC;AAgFF,QAAA,MAAM,uBAAuB,EAAE,iBAAiB,CAAC,4BAA4B,GAAG,YAAY,CA2GxF,CAAC;AAEL,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useEffect, useRef } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { Button, Card, CardContent, CardHeader, Status, Text, defaultThemeProp, Flex, StyledText, FieldValueList, StyledFieldValueList, useI18n, useDirection, Icon, StyledLabel, useLiveLog, registerAction, useShortcut, useConsolidatedRef, useEscape, CardFooter } from '@pega/cosmos-react-core';
5
+ import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
6
+ import CountdownButton from './CountdownButton';
7
+ const StyledInteractionNotification = styled(Card)(({ theme: { base } }) => {
8
+ const { rtl } = useDirection();
9
+ return css `
10
+ position: fixed;
11
+ inset-block-start: calc(2 * ${base.spacing});
12
+ inset-inline-end: calc(2 * ${base.spacing});
13
+ width: min(calc(100% - 2rem), ${base['content-width'].md});
14
+ max-height: calc(100vh - 2rem);
15
+ z-index: ${base['z-index'].modal};
16
+ color: ${base.colors.white};
17
+ animation: SlideIn calc(4 * ${base.animation.speed});
18
+ padding: calc(0.75 * ${base.spacing}) 0;
19
+ box-shadow: ${base.shadow.low};
20
+
21
+ &&& {
22
+ background-color: ${base.colors.slate['extra-dark']};
23
+ }
24
+
25
+ @keyframes SlideIn {
26
+ 0% {
27
+ ${rtl
28
+ ? css `
29
+ transform: translateX(calc(-100% - 1rem));
30
+ `
31
+ : css `
32
+ transform: translateX(calc(100% + 1rem));
33
+ `}
34
+ }
35
+
36
+ 100% {
37
+ transform: translateX(0);
38
+ }
39
+ }
40
+
41
+ ${StyledCardContent} {
42
+ margin: calc(2 * ${base.spacing}) 0;
43
+ overflow: auto;
44
+
45
+ ${StyledText} {
46
+ color: ${base.colors.white};
47
+ white-space: nowrap;
48
+ overflow: hidden;
49
+ text-overflow: ellipsis;
50
+ width: 100%;
51
+ text-align: center;
52
+ }
53
+ }
54
+
55
+ ${StyledFieldValueList} {
56
+ border-block-start: solid 0.0625rem ${base.palette['border-line']};
57
+ padding-block-start: calc(2 * ${base.spacing});
58
+ color: ${base.colors.white};
59
+
60
+ ${StyledLabel} {
61
+ color: ${base.colors.white};
62
+ }
63
+ }
64
+
65
+ @media (min-width: calc(${base.breakpoints.md})) {
66
+ inset-block-start: calc(8 * ${base.spacing});
67
+ max-height: initial;
68
+ }
69
+ `;
70
+ });
71
+ StyledInteractionNotification.defaultProps = defaultThemeProp;
72
+ registerAction({
73
+ id: 'GoToIncomingInteraction',
74
+ defaultKeyBinding: 'Alt+Enter'
75
+ }, {
76
+ id: 'DismissIncomingInteraction',
77
+ defaultKeyBinding: 'Alt+Q'
78
+ });
79
+ const InteractionNotification = forwardRef(function InteractionNotification({ icon, title, primaryText, secondaryText, status, fields, incomingNotificationTimeout, onAccept, onDismiss }, ref) {
80
+ const t = useI18n();
81
+ const { announceAssertive } = useLiveLog();
82
+ const containerRef = useConsolidatedRef(ref);
83
+ const returnRef = useRef();
84
+ const acceptButtonRef = useRef(null);
85
+ const { binding: goToBinding } = useShortcut('GoToIncomingInteraction', () => {
86
+ if (containerRef.current) {
87
+ returnRef.current = document.activeElement ?? undefined;
88
+ acceptButtonRef.current?.focus();
89
+ }
90
+ });
91
+ const { binding: dismissBinding } = useShortcut('DismissIncomingInteraction', () => {
92
+ onDismiss?.();
93
+ });
94
+ useEscape(() => {
95
+ returnRef.current?.focus();
96
+ onDismiss?.();
97
+ }, containerRef.current, [onDismiss]);
98
+ useEffect(() => {
99
+ announceAssertive({
100
+ message: `${title} ${primaryText} ${t('status')} ${status.text}. ${goToBinding ? t('interaction_shortcut_goto_info', [goToBinding]) : ''}${dismissBinding && onDismiss
101
+ ? t('interaction_shortcut_dismiss_info', [dismissBinding])
102
+ : ''}`,
103
+ type: 'alert'
104
+ });
105
+ }, []);
106
+ const acceptButton = incomingNotificationTimeout ? (_jsx(CountdownButton, { variant: 'primary', onClick: onAccept, startTime: incomingNotificationTimeout.startTime, timeout: incomingNotificationTimeout.answerTimeout, onTimerEnd: incomingNotificationTimeout.onTimerEnd ?? onDismiss, ref: acceptButtonRef, children: t('accept') })) : (_jsx(Button, { variant: 'primary', onClick: onAccept, ref: acceptButtonRef, children: t('accept') }));
107
+ return (_jsxs(StyledInteractionNotification, { ref: containerRef, "data-app-region": true, children: [_jsx(CardHeader, { children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: icon }), _jsx(Text, { variant: 'h2', children: title })] }) }), _jsxs(CardContent, { container: { gap: 2 }, children: [_jsxs(Flex, { container: { direction: 'column', alignItems: 'center', gap: 1 }, children: [_jsx(Text, { variant: 'h1', as: 'span', children: primaryText }), secondaryText && (_jsx(Text, { variant: 'h5', as: 'span', children: secondaryText })), _jsx(Status, { variant: status.variant, children: status.text })] }), fields && fields.length !== 0 && _jsx(FieldValueList, { variant: 'inline', fields: fields })] }), onAccept ? (_jsxs(CardFooter, { justify: onDismiss ? 'between' : 'end', children: [onDismiss && _jsx(Button, { onClick: onDismiss, children: t('decline') }), acceptButton] })) : (_jsx(CardFooter, { justify: 'end', children: _jsx(Button, { variant: 'primary', onClick: onDismiss, children: t('close') }) }))] }));
108
+ });
109
+ export default InteractionNotification;
110
+ //# sourceMappingURL=InteractionNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionNotification.js","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA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C6B,CACjC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,eAAe,uBAAuB,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n CardContent,\n CardHeader,\n Status,\n Text,\n defaultThemeProp,\n Flex,\n StyledText,\n FieldValueList,\n StyledFieldValueList,\n useI18n,\n useDirection,\n Icon,\n StyledLabel,\n useLiveLog,\n registerAction,\n useShortcut,\n useConsolidatedRef,\n useEscape,\n CardFooter\n} from '@pega/cosmos-react-core';\nimport type {\n StatusProps,\n ForwardProps,\n FieldValueListProps,\n NoChildrenProp,\n RequireAtLeastOne\n} from '@pega/cosmos-react-core';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nimport CountdownButton from './CountdownButton';\nimport type { CountdownButtonProps } from './CountdownButton';\n\nexport type InteractionNotificationProps = RequireAtLeastOne<\n NoChildrenProp & {\n /** Ref to Component. */\n ref?: Ref<HTMLDivElement>;\n /** Name of the icon used in header. */\n icon: string;\n /** Interaction title. */\n title: string;\n /** Primary information of the notification. For example caller name . */\n primaryText: string;\n /** Secondary information of the notification. For example phone number of the caller */\n secondaryText?: string;\n /** Represents the current status of interaction. */\n status: { variant: StatusProps['variant']; text: string };\n /** Information structured as field values to be displayed below main section. */\n fields?: FieldValueListProps['fields'];\n /** Timeout definition */\n incomingNotificationTimeout?: {\n startTime: CountdownButtonProps['startTime'];\n answerTimeout: CountdownButtonProps['timeout'];\n onTimerEnd?: CountdownButtonProps['onTimerEnd'];\n };\n /** Callback when accept button is clicked. */\n onAccept?: () => void;\n /** Callback when decline or 'x' button is clicked. */\n onDismiss?: () => void;\n },\n 'onAccept' | 'onDismiss'\n>;\n\nconst StyledInteractionNotification = styled(Card)(({ theme: { base } }) => {\n const { rtl } = useDirection();\n return css`\n position: fixed;\n inset-block-start: calc(2 * ${base.spacing});\n inset-inline-end: calc(2 * ${base.spacing});\n width: min(calc(100% - 2rem), ${base['content-width'].md});\n max-height: calc(100vh - 2rem);\n z-index: ${base['z-index'].modal};\n color: ${base.colors.white};\n animation: SlideIn calc(4 * ${base.animation.speed});\n padding: calc(0.75 * ${base.spacing}) 0;\n box-shadow: ${base.shadow.low};\n\n &&& {\n background-color: ${base.colors.slate['extra-dark']};\n }\n\n @keyframes SlideIn {\n 0% {\n ${rtl\n ? css`\n transform: translateX(calc(-100% - 1rem));\n `\n : css`\n transform: translateX(calc(100% + 1rem));\n `}\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n ${StyledCardContent} {\n margin: calc(2 * ${base.spacing}) 0;\n overflow: auto;\n\n ${StyledText} {\n color: ${base.colors.white};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n text-align: center;\n }\n }\n\n ${StyledFieldValueList} {\n border-block-start: solid 0.0625rem ${base.palette['border-line']};\n padding-block-start: calc(2 * ${base.spacing});\n color: ${base.colors.white};\n\n ${StyledLabel} {\n color: ${base.colors.white};\n }\n }\n\n @media (min-width: calc(${base.breakpoints.md})) {\n inset-block-start: calc(8 * ${base.spacing});\n max-height: initial;\n }\n `;\n});\n\nStyledInteractionNotification.defaultProps = defaultThemeProp;\n\nregisterAction(\n {\n id: 'GoToIncomingInteraction',\n defaultKeyBinding: 'Alt+Enter'\n },\n {\n id: 'DismissIncomingInteraction',\n defaultKeyBinding: 'Alt+Q'\n }\n);\n\nconst InteractionNotification: FunctionComponent<InteractionNotificationProps & ForwardProps> =\n forwardRef(function InteractionNotification(\n {\n icon,\n title,\n primaryText,\n secondaryText,\n status,\n fields,\n incomingNotificationTimeout,\n onAccept,\n onDismiss\n }: PropsWithoutRef<InteractionNotificationProps>,\n ref: InteractionNotificationProps['ref']\n ) {\n const t = useI18n();\n const { announceAssertive } = useLiveLog();\n const containerRef = useConsolidatedRef(ref);\n const returnRef = useRef<HTMLElement>();\n const acceptButtonRef = useRef<HTMLButtonElement>(null);\n\n const { binding: goToBinding } = useShortcut('GoToIncomingInteraction', () => {\n if (containerRef.current) {\n returnRef.current = (document.activeElement as HTMLElement) ?? undefined;\n acceptButtonRef.current?.focus();\n }\n });\n const { binding: dismissBinding } = useShortcut('DismissIncomingInteraction', () => {\n onDismiss?.();\n });\n\n useEscape(\n () => {\n returnRef.current?.focus();\n onDismiss?.();\n },\n containerRef.current,\n [onDismiss]\n );\n\n useEffect(() => {\n announceAssertive({\n message: `${title} ${primaryText} ${t('status')} ${status.text}. ${\n goToBinding ? t('interaction_shortcut_goto_info', [goToBinding]) : ''\n }${\n dismissBinding && onDismiss\n ? t('interaction_shortcut_dismiss_info', [dismissBinding])\n : ''\n }`,\n type: 'alert'\n });\n }, []);\n\n const acceptButton = incomingNotificationTimeout ? (\n <CountdownButton\n variant='primary'\n onClick={onAccept}\n startTime={incomingNotificationTimeout.startTime}\n timeout={incomingNotificationTimeout.answerTimeout}\n onTimerEnd={incomingNotificationTimeout.onTimerEnd ?? onDismiss}\n ref={acceptButtonRef}\n >\n {t('accept')}\n </CountdownButton>\n ) : (\n <Button variant='primary' onClick={onAccept} ref={acceptButtonRef}>\n {t('accept')}\n </Button>\n );\n\n return (\n <StyledInteractionNotification ref={containerRef} data-app-region>\n <CardHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Icon name={icon} />\n <Text variant='h2'>{title}</Text>\n </Flex>\n </CardHeader>\n <CardContent container={{ gap: 2 }}>\n <Flex container={{ direction: 'column', alignItems: 'center', gap: 1 }}>\n <Text variant='h1' as='span'>\n {primaryText}\n </Text>\n {secondaryText && (\n <Text variant='h5' as='span'>\n {secondaryText}\n </Text>\n )}\n <Status variant={status.variant}>{status.text}</Status>\n </Flex>\n {fields && fields.length !== 0 && <FieldValueList variant='inline' fields={fields} />}\n </CardContent>\n\n {onAccept ? (\n <CardFooter justify={onDismiss ? 'between' : 'end'}>\n {onDismiss && <Button onClick={onDismiss}>{t('decline')}</Button>}\n {acceptButton}\n </CardFooter>\n ) : (\n <CardFooter justify='end'>\n <Button variant='primary' onClick={onDismiss}>\n {t('close')}\n </Button>\n </CardFooter>\n )}\n </StyledInteractionNotification>\n );\n });\n\nexport default InteractionNotification;\n"]}
@@ -0,0 +1,2 @@
1
+ export { default } from './InteractionNotification';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionNotification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './InteractionNotification';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InteractionNotification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { default } from './InteractionNotification';\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import PredictionsProps from './Predictions.types';
4
- declare const Predictions: FunctionComponent<PredictionsProps & ForwardProps>;
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps } from '@pega/cosmos-react-core';
3
+ import type PredictionsProps from './Predictions.types';
4
+ declare const Predictions: FC<PredictionsProps & ForwardProps>;
5
5
  export default Predictions;
6
6
  //# sourceMappingURL=Predictions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Predictions.d.ts","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,YAAY,EAab,MAAM,yBAAyB,CAAC;AAIjC,OAAO,gBAAoC,MAAM,qBAAqB,CAAC;AA6FvE,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CAqCnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"Predictions.d.ts","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAc7D,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AA8FxD,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,GAAG,YAAY,CAmCnD,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Predictions.js","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAIV,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,YAAY,EACZ,OAAO,EACP,KAAK,EAEL,eAAe,EAEf,UAAU,EAEV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,WAAW,MAAM,gEAAgE,CAAC;AAC9F,OAAO,KAAK,eAAe,MAAM,oEAAoE,CAAC;AAItG,YAAY,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,iCAAiC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzE,OAAO,GAAG,CAAA;qBACS,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;GAChD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iCAAiC,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElE,MAAM,eAAe,GAEjB,UAAU,CAAC,SAAS,e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I,EAAE,CAAC,CAAC,aAAa,CAAC,EACtB,UAAU,EAAC,IAAI,EACf,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,GAAG,EAAE;YACd,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC,uBAAuB,EAAE;gBACxD,KAAK;gBACL,QAAQ;gBACR,KAAK;aACN,CAAC,CAAC;QACL,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import {\n FC,\n forwardRef,\n FunctionComponent,\n MouseEvent,\n PropsWithoutRef,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n ForwardProps,\n registerIcon,\n useI18n,\n Modal,\n SummaryListProps,\n useModalManager,\n SummaryListItem,\n InfoDialog,\n ModalMethods,\n StyledLabel,\n Text,\n SummaryList,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport * as polarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris.icon';\nimport * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';\n\nimport PredictionsProps, { PredictionItem } from './Predictions.types';\n\nregisterIcon(polarisIcon, informationIcon);\n\n// Expand minimum width to ensure the chart is readable enough\nconst StyledPredictionExplanationDialog = styled(InfoDialog)(({ theme }) => {\n return css`\n min-width: min(${theme.base['content-width'].md}, calc(100vw - 2rem));\n `;\n});\n\nStyledPredictionExplanationDialog.defaultProps = defaultThemeProp;\n\nconst PredictionsList: FC<\n PredictionsProps & Pick<SummaryListProps, 'onViewAll' | 'name' | 'icon'> & ForwardProps\n> = forwardRef(function PredictionsList(\n {\n items: itemsProp,\n progress,\n ...restProps\n }: PropsWithoutRef<PredictionsProps & Pick<SummaryListProps, 'onViewAll' | 'name' | 'icon'>>,\n ref: PredictionsProps['ref']\n) {\n const t = useI18n();\n const [currentItemIdTarget, setCurrentItemIdTarget] = useState<\n | {\n id: PredictionItem['id'];\n target: HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n }\n | undefined\n >();\n const currentItem = itemsProp?.find(({ id }) => id === currentItemIdTarget?.id);\n\n const items: SummaryListItem[] = useMemo(\n () =>\n (itemsProp ?? []).map(item => ({\n id: item.id,\n primary: <StyledLabel forwardedAs='span'>{item.label}</StyledLabel>,\n secondary: (\n <Text variant='h1' as='span'>\n {item.value}\n </Text>\n ),\n overflowStrategy: 'ellipsis',\n actions: item.additionalInfo\n ? [\n {\n id: item.id,\n text: t('learn_more'),\n icon: 'information',\n onClick: (\n id: string,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => {\n setCurrentItemIdTarget({\n id: item.id,\n target: e.currentTarget\n });\n }\n }\n ]\n : undefined\n })),\n [itemsProp]\n );\n\n return (\n <>\n <SummaryList {...restProps} loading={progress} ref={ref} items={items} />\n {currentItemIdTarget && currentItem?.additionalInfo && (\n <StyledPredictionExplanationDialog\n heading={currentItem.label}\n target={currentItemIdTarget.target}\n onDismiss={() => {\n setCurrentItemIdTarget(undefined);\n }}\n >\n {currentItem.additionalInfo}\n </StyledPredictionExplanationDialog>\n )}\n </>\n );\n});\n\nconst PredictionsViewAllModal = ({ count, progress, ...restProps }: PredictionsProps) => {\n const t = useI18n();\n return (\n <Modal heading={t('all_predictions')} count={count} progress={progress}>\n <PredictionsList {...restProps} />\n </Modal>\n );\n};\n\nconst Predictions: FunctionComponent<PredictionsProps & ForwardProps> = forwardRef(\n function Predictions(\n { count, items, progress, ...restProps }: PropsWithoutRef<PredictionsProps>,\n ref: PredictionsProps['ref']\n ) {\n const t = useI18n();\n const { create } = useModalManager();\n const viewAllModalRef = useRef<ModalMethods<PredictionsProps>>();\n\n useEffect(() => {\n viewAllModalRef.current?.update({\n items,\n progress,\n count\n });\n }, [items, progress, count]);\n\n return (\n <PredictionsList\n {...restProps}\n ref={ref}\n name={t('predictions')}\n headingTag='h3'\n icon='polaris'\n count={count}\n items={items?.slice(0, 3)}\n progress={progress}\n onViewAll={() => {\n viewAllModalRef.current = create(PredictionsViewAllModal, {\n items,\n progress,\n count\n });\n }}\n />\n );\n }\n);\n\nexport default Predictions;\n"]}
1
+ {"version":3,"file":"Predictions.js","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,WAAW,MAAM,gEAAgE,CAAC;AAC9F,OAAO,KAAK,eAAe,MAAM,oEAAoE,CAAC;AAKtG,YAAY,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,iCAAiC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzE,OAAO,GAAG,CAAA;qBACS,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;GAChD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iCAAiC,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElE,MAAM,eAAe,GAEjB,UAAU,CAAC,SAAS,eAAe,CACrC,EACE,KAAK,EAAE,SAAS,EAChB,QAAQ,EACR,GAAG,SAAS,EAC8E,EAC5F,GAA4B;IAE5B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,G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AQ,EAAE,QAAQ,EAClB,SAAS,EAAE,GAAG,EAAE;YACd,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC,uBAAuB,EAAE;gBACxD,KAAK;gBACL,QAAQ;gBACR,KAAK;aACN,CAAC,CAAC;QACL,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport type { FC, MouseEvent, PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n registerIcon,\n useI18n,\n Modal,\n useModalManager,\n InfoDialog,\n StyledLabel,\n Text,\n SummaryList,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport type {\n ForwardProps,\n SummaryListProps,\n SummaryListItem,\n ModalMethods\n} from '@pega/cosmos-react-core';\nimport * as polarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris.icon';\nimport * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';\n\nimport type PredictionsProps from './Predictions.types';\nimport type { PredictionItem } from './Predictions.types';\n\nregisterIcon(polarisIcon, informationIcon);\n\n// Expand minimum width to ensure the chart is readable enough\nconst StyledPredictionExplanationDialog = styled(InfoDialog)(({ theme }) => {\n return css`\n min-width: min(${theme.base['content-width'].md}, calc(100vw - 2rem));\n `;\n});\n\nStyledPredictionExplanationDialog.defaultProps = defaultThemeProp;\n\nconst PredictionsList: FC<\n PredictionsProps & Pick<SummaryListProps, 'onViewAll' | 'name' | 'icon'> & ForwardProps\n> = forwardRef(function PredictionsList(\n {\n items: itemsProp,\n progress,\n ...restProps\n }: PropsWithoutRef<PredictionsProps & Pick<SummaryListProps, 'onViewAll' | 'name' | 'icon'>>,\n ref: PredictionsProps['ref']\n) {\n const t = useI18n();\n const [currentItemIdTarget, setCurrentItemIdTarget] = useState<\n | {\n id: PredictionItem['id'];\n target: HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n }\n | undefined\n >();\n const currentItem = itemsProp?.find(({ id }) => id === currentItemIdTarget?.id);\n\n const items: SummaryListItem[] = useMemo(\n () =>\n (itemsProp ?? []).map(item => ({\n id: item.id,\n primary: <StyledLabel forwardedAs='span'>{item.label}</StyledLabel>,\n secondary: (\n <Text variant='h1' as='span'>\n {item.value}\n </Text>\n ),\n overflowStrategy: 'ellipsis',\n actions: item.additionalInfo\n ? [\n {\n id: item.id,\n text: t('learn_more'),\n icon: 'information',\n onClick: (\n id: string,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => {\n setCurrentItemIdTarget({\n id: item.id,\n target: e.currentTarget\n });\n }\n }\n ]\n : undefined\n })),\n [itemsProp]\n );\n\n return (\n <>\n <SummaryList {...restProps} loading={progress} ref={ref} items={items} />\n {currentItemIdTarget && currentItem?.additionalInfo && (\n <StyledPredictionExplanationDialog\n heading={currentItem.label}\n target={currentItemIdTarget.target}\n onDismiss={() => {\n setCurrentItemIdTarget(undefined);\n }}\n >\n {currentItem.additionalInfo}\n </StyledPredictionExplanationDialog>\n )}\n </>\n );\n});\n\nconst PredictionsViewAllModal = ({ count, progress, ...restProps }: PredictionsProps) => {\n const t = useI18n();\n return (\n <Modal heading={t('all_predictions')} count={count} progress={progress}>\n <PredictionsList {...restProps} />\n </Modal>\n );\n};\n\nconst Predictions: FC<PredictionsProps & ForwardProps> = forwardRef(function Predictions(\n { count, items, progress, ...restProps }: PropsWithoutRef<PredictionsProps>,\n ref: PredictionsProps['ref']\n) {\n const t = useI18n();\n const { create } = useModalManager();\n const viewAllModalRef = useRef<ModalMethods<PredictionsProps>>();\n\n useEffect(() => {\n viewAllModalRef.current?.update({\n items,\n progress,\n count\n });\n }, [items, progress, count]);\n\n return (\n <PredictionsList\n {...restProps}\n ref={ref}\n name={t('predictions')}\n headingTag='h3'\n icon='polaris'\n count={count}\n items={items?.slice(0, 3)}\n progress={progress}\n onViewAll={() => {\n viewAllModalRef.current = create(PredictionsViewAllModal, {\n items,\n progress,\n count\n });\n }}\n />\n );\n});\n\nexport default Predictions;\n"]}
@@ -1,5 +1,5 @@
1
- import { ReactNode, Ref } from 'react';
2
- import { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';
1
+ import type { ReactNode, Ref } from 'react';
2
+ import type { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';
3
3
  export interface PredictionItem {
4
4
  /** A unique id to represent the item. */
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Predictions.types.d.ts","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACzE,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oKAAoK;IACpK,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
1
+ {"version":3,"file":"Predictions.types.d.ts","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACzE,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oKAAoK;IACpK,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Predictions.types.js","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref } from 'react';\n\nimport { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface PredictionItem {\n /** A unique id to represent the item. */\n id: string;\n /** Label for the prediction item. */\n label: string;\n /** Value for the prediction item. */\n value: string;\n /** Additional prediction information rendered in a dialog. */\n additionalInfo?: ReactNode;\n}\n\nexport default interface PredictionsProps extends BaseProps, NoChildrenProp {\n /** Integer representing the total count of items. */\n count?: number;\n /** An array of PredictionItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items?: PredictionItem[];\n /** Show a progress indicator when initially fetching list data. */\n progress?: boolean;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"Predictions.types.js","sourceRoot":"","sources":["../../../src/components/Predictions/Predictions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface PredictionItem {\n /** A unique id to represent the item. */\n id: string;\n /** Label for the prediction item. */\n label: string;\n /** Value for the prediction item. */\n value: string;\n /** Additional prediction information rendered in a dialog. */\n additionalInfo?: ReactNode;\n}\n\nexport default interface PredictionsProps extends BaseProps, NoChildrenProp {\n /** Integer representing the total count of items. */\n count?: number;\n /** An array of PredictionItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items?: PredictionItem[];\n /** Show a progress indicator when initially fetching list data. */\n progress?: boolean;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { FilterProps, SearchResultsProps } from './SearchResults.types';
1
+ import type { FilterProps, SearchResultsProps } from './SearchResults.types';
2
2
  interface FilterComponentProps {
3
3
  onFilterChange?: SearchResultsProps['onFilterChange'];
4
4
  onClearFilter?: SearchResultsProps['onClearFilter'];
@@ -1 +1 @@
1
- {"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../src/components/SearchResults/Filter.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAyB,MAAM,uBAAuB,CAAC;AAK/F,UAAU,oBAAoB;IAC5B,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,aAAa,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CACrD;AAED,QAAA,MAAM,MAAM,kEAMT,WAAW,GAAG,oBAAoB,KAAG,WA6EvC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../src/components/SearchResults/Filter.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAyB,MAAM,uBAAuB,CAAC;AAKpG,UAAU,oBAAoB;IAC5B,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,aAAa,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CACrD;AAED,QAAA,MAAM,MAAM,kEAMT,WAAW,GAAG,oBAAoB,KAAG,WA6EvC,CAAC;AAEF,eAAe,MAAM,CAAC"}