@atlaskit/smart-card 22.2.0 → 22.2.1

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 (329) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client/package.json +8 -1
  3. package/dist/cjs/state/helpers.js +2 -1
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -5
  6. package/dist/es2019/state/helpers.js +2 -1
  7. package/dist/es2019/version.json +1 -1
  8. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -5
  9. package/dist/esm/state/helpers.js +2 -1
  10. package/dist/esm/version.json +1 -1
  11. package/dist/esm/view/EmbedModal/components/embed-content/index.js +1 -4
  12. package/dist/types/extractors/common/__mocks__/jsonld.d.ts +2 -2
  13. package/dist/types-ts4.0/__fixtures__/flexible-ui-data-context.d.ts +3 -0
  14. package/dist/types-ts4.0/__tests_external__/index.d.ts +6 -0
  15. package/dist/types-ts4.0/__tests_external__/page-objects/BaseCard.d.ts +16 -0
  16. package/dist/types-ts4.0/__tests_external__/page-objects/BlockCard.d.ts +6 -0
  17. package/dist/types-ts4.0/__tests_external__/page-objects/EmbedCard.d.ts +6 -0
  18. package/dist/types-ts4.0/__tests_external__/page-objects/InlineCard.d.ts +6 -0
  19. package/dist/types-ts4.0/__tests_external__/test-cases/card.d.ts +3 -0
  20. package/dist/types-ts4.0/__tests_external__/test-cases/embed.d.ts +3 -0
  21. package/dist/types-ts4.0/__tests_external__/test-cases/inline.d.ts +3 -0
  22. package/dist/types-ts4.0/__tests_external__/test-cases/types.d.ts +5 -0
  23. package/dist/types-ts4.0/classNames.d.ts +11 -0
  24. package/dist/types-ts4.0/client/index.d.ts +1 -0
  25. package/dist/types-ts4.0/constants.d.ts +185 -0
  26. package/dist/types-ts4.0/extractors/block/index.d.ts +9 -0
  27. package/dist/types-ts4.0/extractors/block/types.d.ts +14 -0
  28. package/dist/types-ts4.0/extractors/common/__mocks__/jsonld.d.ts +232 -0
  29. package/dist/types-ts4.0/extractors/common/__mocks__/render.d.ts +2 -0
  30. package/dist/types-ts4.0/extractors/common/actions/extractActions.d.ts +4 -0
  31. package/dist/types-ts4.0/extractors/common/actions/extractPreviewAction.d.ts +9 -0
  32. package/dist/types-ts4.0/extractors/common/byline/extractByline.d.ts +3 -0
  33. package/dist/types-ts4.0/extractors/common/context/extractAccessContext.d.ts +7 -0
  34. package/dist/types-ts4.0/extractors/common/context/index.d.ts +1 -0
  35. package/dist/types-ts4.0/extractors/common/detail/extractCommentCount.d.ts +4 -0
  36. package/dist/types-ts4.0/extractors/common/detail/extractDownloadUrl.d.ts +2 -0
  37. package/dist/types-ts4.0/extractors/common/detail/extractProgrammingLanguage.d.ts +4 -0
  38. package/dist/types-ts4.0/extractors/common/detail/extractSubscriberCount.d.ts +4 -0
  39. package/dist/types-ts4.0/extractors/common/detail/index.d.ts +7 -0
  40. package/dist/types-ts4.0/extractors/common/detail/types.d.ts +5 -0
  41. package/dist/types-ts4.0/extractors/common/icon/extractFileFormat.d.ts +2 -0
  42. package/dist/types-ts4.0/extractors/common/icon/extractIcon.d.ts +14 -0
  43. package/dist/types-ts4.0/extractors/common/icon/extractIconFromDocument.d.ts +4 -0
  44. package/dist/types-ts4.0/extractors/common/icon/extractIconFromTask.d.ts +3 -0
  45. package/dist/types-ts4.0/extractors/common/icon/index.d.ts +4 -0
  46. package/dist/types-ts4.0/extractors/common/icon/priority.d.ts +4 -0
  47. package/dist/types-ts4.0/extractors/common/lozenge/extractLozenge.d.ts +3 -0
  48. package/dist/types-ts4.0/extractors/common/lozenge/extractState.d.ts +3 -0
  49. package/dist/types-ts4.0/extractors/common/lozenge/extractTag.d.ts +3 -0
  50. package/dist/types-ts4.0/extractors/common/lozenge/extractTaskStatus.d.ts +3 -0
  51. package/dist/types-ts4.0/extractors/common/lozenge/extractTaskType.d.ts +7 -0
  52. package/dist/types-ts4.0/extractors/common/lozenge/index.d.ts +5 -0
  53. package/dist/types-ts4.0/extractors/common/lozenge/types.d.ts +8 -0
  54. package/dist/types-ts4.0/extractors/common/lozenge/utils.d.ts +4 -0
  55. package/dist/types-ts4.0/extractors/common/meta/extractIsTrusted.d.ts +2 -0
  56. package/dist/types-ts4.0/extractors/common/primitives/extractSummary.d.ts +2 -0
  57. package/dist/types-ts4.0/extractors/common/primitives/extractTitleTextColor.d.ts +2 -0
  58. package/dist/types-ts4.0/extractors/common/primitives/extractVisitUrl.d.ts +2 -0
  59. package/dist/types-ts4.0/extractors/common/primitives/index.d.ts +2 -0
  60. package/dist/types-ts4.0/extractors/common/title-prefix/extractTitlePrefix.d.ts +5 -0
  61. package/dist/types-ts4.0/extractors/common/title-prefix/index.d.ts +1 -0
  62. package/dist/types-ts4.0/extractors/constants.d.ts +12 -0
  63. package/dist/types-ts4.0/extractors/embed/index.d.ts +3 -0
  64. package/dist/types-ts4.0/extractors/flexible/collaboratorGroup/index.d.ts +4 -0
  65. package/dist/types-ts4.0/extractors/flexible/extract-preview.d.ts +4 -0
  66. package/dist/types-ts4.0/extractors/flexible/extract-priority.d.ts +4 -0
  67. package/dist/types-ts4.0/extractors/flexible/icon/extract-document-type-icon.d.ts +3 -0
  68. package/dist/types-ts4.0/extractors/flexible/icon/extract-file-formatIcon.d.ts +3 -0
  69. package/dist/types-ts4.0/extractors/flexible/icon/extract-icon-renderer.d.ts +4 -0
  70. package/dist/types-ts4.0/extractors/flexible/icon/extract-jira-task-icon.d.ts +3 -0
  71. package/dist/types-ts4.0/extractors/flexible/icon/extract-jsonld-data-icon.d.ts +4 -0
  72. package/dist/types-ts4.0/extractors/flexible/icon/extract-provider-icon.d.ts +4 -0
  73. package/dist/types-ts4.0/extractors/flexible/icon/extract-url-icon.d.ts +4 -0
  74. package/dist/types-ts4.0/extractors/flexible/icon/index.d.ts +17 -0
  75. package/dist/types-ts4.0/extractors/flexible/icon/types.d.ts +6 -0
  76. package/dist/types-ts4.0/extractors/flexible/index.d.ts +5 -0
  77. package/dist/types-ts4.0/extractors/flexible/latest-commit/index.d.ts +2 -0
  78. package/dist/types-ts4.0/extractors/flexible/utils.d.ts +12 -0
  79. package/dist/types-ts4.0/extractors/hover/extractMetadata.d.ts +3 -0
  80. package/dist/types-ts4.0/extractors/index.d.ts +14 -0
  81. package/dist/types-ts4.0/extractors/inline/index.d.ts +6 -0
  82. package/dist/types-ts4.0/hooks.d.ts +2 -0
  83. package/dist/types-ts4.0/i18n/cs.d.ts +71 -0
  84. package/dist/types-ts4.0/i18n/da.d.ts +71 -0
  85. package/dist/types-ts4.0/i18n/de.d.ts +71 -0
  86. package/dist/types-ts4.0/i18n/en.d.ts +71 -0
  87. package/dist/types-ts4.0/i18n/en_GB.d.ts +71 -0
  88. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +38 -0
  89. package/dist/types-ts4.0/i18n/es.d.ts +71 -0
  90. package/dist/types-ts4.0/i18n/et.d.ts +94 -0
  91. package/dist/types-ts4.0/i18n/fi.d.ts +71 -0
  92. package/dist/types-ts4.0/i18n/fr.d.ts +71 -0
  93. package/dist/types-ts4.0/i18n/hu.d.ts +71 -0
  94. package/dist/types-ts4.0/i18n/index.d.ts +35 -0
  95. package/dist/types-ts4.0/i18n/is.d.ts +70 -0
  96. package/dist/types-ts4.0/i18n/it.d.ts +71 -0
  97. package/dist/types-ts4.0/i18n/ja.d.ts +71 -0
  98. package/dist/types-ts4.0/i18n/ko.d.ts +71 -0
  99. package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
  100. package/dist/types-ts4.0/i18n/nb.d.ts +71 -0
  101. package/dist/types-ts4.0/i18n/nl.d.ts +71 -0
  102. package/dist/types-ts4.0/i18n/pl.d.ts +71 -0
  103. package/dist/types-ts4.0/i18n/pt_BR.d.ts +71 -0
  104. package/dist/types-ts4.0/i18n/pt_PT.d.ts +94 -0
  105. package/dist/types-ts4.0/i18n/ro.d.ts +70 -0
  106. package/dist/types-ts4.0/i18n/ru.d.ts +71 -0
  107. package/dist/types-ts4.0/i18n/sk.d.ts +94 -0
  108. package/dist/types-ts4.0/i18n/sv.d.ts +71 -0
  109. package/dist/types-ts4.0/i18n/th.d.ts +71 -0
  110. package/dist/types-ts4.0/i18n/tr.d.ts +71 -0
  111. package/dist/types-ts4.0/i18n/uk.d.ts +71 -0
  112. package/dist/types-ts4.0/i18n/vi.d.ts +71 -0
  113. package/dist/types-ts4.0/i18n/zh.d.ts +71 -0
  114. package/dist/types-ts4.0/i18n/zh_TW.d.ts +71 -0
  115. package/dist/types-ts4.0/in-product.d.ts +1 -0
  116. package/dist/types-ts4.0/index.d.ts +22 -0
  117. package/dist/types-ts4.0/messages.d.ts +8 -0
  118. package/dist/types-ts4.0/model/invoke-handler.d.ts +3 -0
  119. package/dist/types-ts4.0/model/invoke-opts.d.ts +17 -0
  120. package/dist/types-ts4.0/ssr.d.ts +6 -0
  121. package/dist/types-ts4.0/state/actions/constants.d.ts +6 -0
  122. package/dist/types-ts4.0/state/actions/index.d.ts +12 -0
  123. package/dist/types-ts4.0/state/actions/types.d.ts +2 -0
  124. package/dist/types-ts4.0/state/analytics/index.d.ts +3 -0
  125. package/dist/types-ts4.0/state/analytics/types.d.ts +9 -0
  126. package/dist/types-ts4.0/state/analytics/ufoExperiences.d.ts +7 -0
  127. package/dist/types-ts4.0/state/analytics/useSmartLinkAnalytics.d.ts +195 -0
  128. package/dist/types-ts4.0/state/config/index.d.ts +2 -0
  129. package/dist/types-ts4.0/state/flexible-ui-context/index.d.ts +8 -0
  130. package/dist/types-ts4.0/state/flexible-ui-context/types.d.ts +159 -0
  131. package/dist/types-ts4.0/state/helpers.d.ts +16 -0
  132. package/dist/types-ts4.0/state/hooks/index.d.ts +2 -0
  133. package/dist/types-ts4.0/state/hooks/usePrefetch.d.ts +1 -0
  134. package/dist/types-ts4.0/state/hooks/useSmartLink.d.ts +50 -0
  135. package/dist/types-ts4.0/state/hooks-external/useSmartLinkActions.d.ts +49 -0
  136. package/dist/types-ts4.0/state/hooks-external/useSmartLinkReload.d.ts +19 -0
  137. package/dist/types-ts4.0/state/index.d.ts +5 -0
  138. package/dist/types-ts4.0/state/reducers/types.d.ts +4 -0
  139. package/dist/types-ts4.0/state/renderers/index.d.ts +2 -0
  140. package/dist/types-ts4.0/state/store/index.d.ts +3 -0
  141. package/dist/types-ts4.0/state/types.d.ts +1 -0
  142. package/dist/types-ts4.0/types.d.ts +20 -0
  143. package/dist/types-ts4.0/utils/analytics/__mocks__/analytics.d.ts +2 -0
  144. package/dist/types-ts4.0/utils/analytics/analytics.d.ts +32 -0
  145. package/dist/types-ts4.0/utils/analytics/index.d.ts +4 -0
  146. package/dist/types-ts4.0/utils/analytics/types.d.ts +93 -0
  147. package/dist/types-ts4.0/utils/flexible.d.ts +5 -0
  148. package/dist/types-ts4.0/utils/index.d.ts +12 -0
  149. package/dist/types-ts4.0/utils/jsonld.d.ts +3 -0
  150. package/dist/types-ts4.0/utils/mocks.d.ts +74 -0
  151. package/dist/types-ts4.0/utils/performance.d.ts +8 -0
  152. package/dist/types-ts4.0/utils/test-utils.d.ts +4 -0
  153. package/dist/types-ts4.0/utils/token.d.ts +16 -0
  154. package/dist/types-ts4.0/utils/types.d.ts +14 -0
  155. package/dist/types-ts4.0/view/BlockCard/actions/AuthorizeAction.d.ts +2 -0
  156. package/dist/types-ts4.0/view/BlockCard/actions/DownloadAction.d.ts +8 -0
  157. package/dist/types-ts4.0/view/BlockCard/actions/ForbiddenAction.d.ts +2 -0
  158. package/dist/types-ts4.0/view/BlockCard/actions/PreviewAction.d.ts +32 -0
  159. package/dist/types-ts4.0/view/BlockCard/actions/RetryAction.d.ts +2 -0
  160. package/dist/types-ts4.0/view/BlockCard/actions/ViewAction.d.ts +8 -0
  161. package/dist/types-ts4.0/view/BlockCard/components/Action.d.ts +11 -0
  162. package/dist/types-ts4.0/view/BlockCard/components/ActionIcon.d.ts +12 -0
  163. package/dist/types-ts4.0/view/BlockCard/components/ActionList.d.ts +6 -0
  164. package/dist/types-ts4.0/view/BlockCard/components/CollaboratorList.d.ts +13 -0
  165. package/dist/types-ts4.0/view/BlockCard/components/Content.d.ts +7 -0
  166. package/dist/types-ts4.0/view/BlockCard/components/ContentFooter.d.ts +7 -0
  167. package/dist/types-ts4.0/view/BlockCard/components/ContentHeader.d.ts +8 -0
  168. package/dist/types-ts4.0/view/BlockCard/components/Emoji.d.ts +5 -0
  169. package/dist/types-ts4.0/view/BlockCard/components/Frame.d.ts +14 -0
  170. package/dist/types-ts4.0/view/BlockCard/components/Link.d.ts +7 -0
  171. package/dist/types-ts4.0/view/BlockCard/components/Name.d.ts +10 -0
  172. package/dist/types-ts4.0/view/BlockCard/components/Provider.d.ts +6 -0
  173. package/dist/types-ts4.0/view/BlockCard/components/Thumbnail.d.ts +9 -0
  174. package/dist/types-ts4.0/view/BlockCard/components/UnresolvedText.d.ts +6 -0
  175. package/dist/types-ts4.0/view/BlockCard/index.d.ts +14 -0
  176. package/dist/types-ts4.0/view/BlockCard/types.d.ts +25 -0
  177. package/dist/types-ts4.0/view/BlockCard/utils/constants.d.ts +3 -0
  178. package/dist/types-ts4.0/view/BlockCard/utils/handlers.d.ts +2 -0
  179. package/dist/types-ts4.0/view/BlockCard/views/ErroredView.d.ts +12 -0
  180. package/dist/types-ts4.0/view/BlockCard/views/ForbiddenView.d.ts +21 -0
  181. package/dist/types-ts4.0/view/BlockCard/views/NotFoundView.d.ts +15 -0
  182. package/dist/types-ts4.0/view/BlockCard/views/ResolvedView.d.ts +32 -0
  183. package/dist/types-ts4.0/view/BlockCard/views/ResolvingView.d.ts +8 -0
  184. package/dist/types-ts4.0/view/BlockCard/views/UnauthorizedView.d.ts +17 -0
  185. package/dist/types-ts4.0/view/Card/index.d.ts +5 -0
  186. package/dist/types-ts4.0/view/Card/types.d.ts +37 -0
  187. package/dist/types-ts4.0/view/CardWithData/component.d.ts +5 -0
  188. package/dist/types-ts4.0/view/CardWithData/loader.d.ts +9 -0
  189. package/dist/types-ts4.0/view/CardWithData/types.d.ts +15 -0
  190. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyFallback.d.ts +4 -0
  191. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +3 -0
  192. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.d.ts +3 -0
  193. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/index.d.ts +3 -0
  194. package/dist/types-ts4.0/view/CardWithUrl/component.d.ts +3 -0
  195. package/dist/types-ts4.0/view/CardWithUrl/loader.d.ts +3 -0
  196. package/dist/types-ts4.0/view/CardWithUrl/types.d.ts +29 -0
  197. package/dist/types-ts4.0/view/EmbedCard/EmbedResizeMessageListener.d.ts +15 -0
  198. package/dist/types-ts4.0/view/EmbedCard/components/ExpandedFrame.d.ts +23 -0
  199. package/dist/types-ts4.0/view/EmbedCard/components/Frame.d.ts +7 -0
  200. package/dist/types-ts4.0/view/EmbedCard/components/ImageIcon.d.ts +9 -0
  201. package/dist/types-ts4.0/view/EmbedCard/components/styled.d.ts +45 -0
  202. package/dist/types-ts4.0/view/EmbedCard/index.d.ts +3 -0
  203. package/dist/types-ts4.0/view/EmbedCard/types.d.ts +46 -0
  204. package/dist/types-ts4.0/view/EmbedCard/views/ErroredView.d.ts +8 -0
  205. package/dist/types-ts4.0/view/EmbedCard/views/ForbiddenView.d.ts +13 -0
  206. package/dist/types-ts4.0/view/EmbedCard/views/NotFoundView.d.ts +11 -0
  207. package/dist/types-ts4.0/view/EmbedCard/views/ResolvedView.d.ts +27 -0
  208. package/dist/types-ts4.0/view/EmbedCard/views/UnauthorisedView.d.ts +12 -0
  209. package/dist/types-ts4.0/view/EmbedCard/views/UnresolvedView.d.ts +18 -0
  210. package/dist/types-ts4.0/view/EmbedModal/components/analytics/index.d.ts +5 -0
  211. package/dist/types-ts4.0/view/EmbedModal/components/analytics/types.d.ts +6 -0
  212. package/dist/types-ts4.0/view/EmbedModal/components/embed-content/index.d.ts +5 -0
  213. package/dist/types-ts4.0/view/EmbedModal/components/embed-content/types.d.ts +6 -0
  214. package/dist/types-ts4.0/view/EmbedModal/components/error-boundary/index.d.ts +4 -0
  215. package/dist/types-ts4.0/view/EmbedModal/components/link-info/index.d.ts +4 -0
  216. package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/index.d.ts +4 -0
  217. package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/types.d.ts +9 -0
  218. package/dist/types-ts4.0/view/EmbedModal/components/link-info/styled.d.ts +4 -0
  219. package/dist/types-ts4.0/view/EmbedModal/components/link-info/types.d.ts +13 -0
  220. package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/index.d.ts +7 -0
  221. package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/types.d.ts +4 -0
  222. package/dist/types-ts4.0/view/EmbedModal/constants.d.ts +2 -0
  223. package/dist/types-ts4.0/view/EmbedModal/index.d.ts +6 -0
  224. package/dist/types-ts4.0/view/EmbedModal/types.d.ts +34 -0
  225. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/index.d.ts +5 -0
  226. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/types.d.ts +8 -0
  227. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +4 -0
  228. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +8 -0
  229. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +5 -0
  230. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +7 -0
  231. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/index.d.ts +13 -0
  232. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/types.d.ts +48 -0
  233. package/dist/types-ts4.0/view/FlexibleCard/components/actions/index.d.ts +20 -0
  234. package/dist/types-ts4.0/view/FlexibleCard/components/actions/utils.d.ts +4 -0
  235. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/index.d.ts +11 -0
  236. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/types.d.ts +37 -0
  237. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/block/index.d.ts +12 -0
  238. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/index.d.ts +15 -0
  239. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/types.d.ts +10 -0
  240. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/index.d.ts +11 -0
  241. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/types.d.ts +10 -0
  242. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/index.d.ts +5 -0
  243. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +11 -0
  244. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +26 -0
  245. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/index.d.ts +10 -0
  246. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/types.d.ts +8 -0
  247. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +10 -0
  248. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -0
  249. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +12 -0
  250. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/index.d.ts +16 -0
  251. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +9 -0
  252. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +11 -0
  253. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/types.d.ts +86 -0
  254. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/types.d.ts +293 -0
  255. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/utils.d.ts +13 -0
  256. package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +4 -0
  257. package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +6 -0
  258. package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/index.d.ts +5 -0
  259. package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/types.d.ts +7 -0
  260. package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +5 -0
  261. package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +16 -0
  262. package/dist/types-ts4.0/view/FlexibleCard/components/container/index.d.ts +16 -0
  263. package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/index.d.ts +10 -0
  264. package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/types.d.ts +12 -0
  265. package/dist/types-ts4.0/view/FlexibleCard/components/container/types.d.ts +25 -0
  266. package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/index.d.ts +12 -0
  267. package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/types.d.ts +21 -0
  268. package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/index.d.ts +18 -0
  269. package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/types.d.ts +17 -0
  270. package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/index.d.ts +12 -0
  271. package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/types.d.ts +16 -0
  272. package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/index.d.ts +11 -0
  273. package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/types.d.ts +27 -0
  274. package/dist/types-ts4.0/view/FlexibleCard/components/elements/index.d.ts +124 -0
  275. package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/index.d.ts +11 -0
  276. package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/types.d.ts +35 -0
  277. package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/index.d.ts +11 -0
  278. package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/types.d.ts +13 -0
  279. package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/index.d.ts +11 -0
  280. package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/types.d.ts +17 -0
  281. package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/index.d.ts +11 -0
  282. package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/types.d.ts +17 -0
  283. package/dist/types-ts4.0/view/FlexibleCard/components/elements/types.d.ts +24 -0
  284. package/dist/types-ts4.0/view/FlexibleCard/components/elements/utils.d.ts +3 -0
  285. package/dist/types-ts4.0/view/FlexibleCard/components/types.d.ts +6 -0
  286. package/dist/types-ts4.0/view/FlexibleCard/components/utils.d.ts +15 -0
  287. package/dist/types-ts4.0/view/FlexibleCard/index.d.ts +10 -0
  288. package/dist/types-ts4.0/view/FlexibleCard/types.d.ts +113 -0
  289. package/dist/types-ts4.0/view/FlexibleCard/utils.d.ts +7 -0
  290. package/dist/types-ts4.0/view/HoverCard/components/HoverCardComponent.d.ts +4 -0
  291. package/dist/types-ts4.0/view/HoverCard/components/HoverCardContent.d.ts +9 -0
  292. package/dist/types-ts4.0/view/HoverCard/components/HoverCardLoadingView.d.ts +4 -0
  293. package/dist/types-ts4.0/view/HoverCard/components/SnippetOrPreview.d.ts +4 -0
  294. package/dist/types-ts4.0/view/HoverCard/index.d.ts +3 -0
  295. package/dist/types-ts4.0/view/HoverCard/styled.d.ts +12 -0
  296. package/dist/types-ts4.0/view/HoverCard/types.d.ts +45 -0
  297. package/dist/types-ts4.0/view/HoverCard/utils.d.ts +3 -0
  298. package/dist/types-ts4.0/view/InlineCard/ErroredView/index.d.ts +21 -0
  299. package/dist/types-ts4.0/view/InlineCard/ForbiddenView/index.d.ts +25 -0
  300. package/dist/types-ts4.0/view/InlineCard/Frame/index.d.ts +16 -0
  301. package/dist/types-ts4.0/view/InlineCard/Frame/styled.d.ts +8 -0
  302. package/dist/types-ts4.0/view/InlineCard/Icon.d.ts +4 -0
  303. package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/index.d.ts +19 -0
  304. package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/styled.d.ts +13 -0
  305. package/dist/types-ts4.0/view/InlineCard/ResolvedView/index.d.ts +30 -0
  306. package/dist/types-ts4.0/view/InlineCard/ResolvingView/index.d.ts +18 -0
  307. package/dist/types-ts4.0/view/InlineCard/ResolvingView/styled.d.ts +14 -0
  308. package/dist/types-ts4.0/view/InlineCard/UnauthorisedView/index.d.ts +20 -0
  309. package/dist/types-ts4.0/view/InlineCard/index.d.ts +9 -0
  310. package/dist/types-ts4.0/view/InlineCard/styled.d.ts +9 -0
  311. package/dist/types-ts4.0/view/InlineCard/types.d.ts +21 -0
  312. package/dist/types-ts4.0/view/LinkView/index.d.ts +8 -0
  313. package/dist/types-ts4.0/view/SmartLinkEvents/useSmartLinkEvents.d.ts +2 -0
  314. package/dist/types-ts4.0/view/__mocks__/intersection-observer.d.ts +26 -0
  315. package/dist/types-ts4.0/view/__mocks__/intersection-observer.mock.d.ts +12 -0
  316. package/dist/types-ts4.0/view/common/Byline.d.ts +8 -0
  317. package/dist/types-ts4.0/view/common/Icon.d.ts +9 -0
  318. package/dist/types-ts4.0/view/common/Metadata.d.ts +8 -0
  319. package/dist/types-ts4.0/view/common/MetadataList.d.ts +8 -0
  320. package/dist/types-ts4.0/view/common/Modal.d.ts +26 -0
  321. package/dist/types-ts4.0/view/common/ModalHeader.d.ts +17 -0
  322. package/dist/types-ts4.0/view/common/utils.d.ts +5 -0
  323. package/dist/types-ts4.0/view/types.d.ts +29 -0
  324. package/hooks/package.json +8 -1
  325. package/in-product/package.json +8 -1
  326. package/package.json +13 -6
  327. package/report.api.md +341 -738
  328. package/ssr/package.json +8 -1
  329. package/types/package.json +8 -1
@@ -0,0 +1,195 @@
1
+ import { AnalyticsHandler, AnalyticsName, AnalyticsPayload } from '../../utils/types';
2
+ import { ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps } from '../../utils/analytics/types';
3
+ /**
4
+ * This hook provides usage of Smart Link analytics outside of the Card component.
5
+ * Can be provided to Card via the analyticsEvents prop to change the analytics events.
6
+ * @param url URL of the link
7
+ * @param dispatchAnalytics dispatchAnalytics function
8
+ * @param id fallback id of the events sent if no id is available
9
+ * @param defaultLocation location attribute to be used
10
+ * @returns
11
+ */
12
+ export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHandler, id?: string | undefined, defaultLocation?: string | undefined) => {
13
+ ui: {
14
+ /**
15
+ * This fires an event that represents when a user clicks on the authentication
16
+ * call to action with no current authenticated account. (i.e. Connect to Preview).
17
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
18
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
19
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
20
+ * @returns
21
+ */
22
+ authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
23
+ /**
24
+ * This fires an event that represents when a user clicks on the authentication
25
+ * call to action with a forbidden authenticated account. (i.e. Try another account).
26
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
27
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
28
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
29
+ * @returns
30
+ */
31
+ authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
32
+ /**
33
+ * This fires an event that represents when a user
34
+ * click a button.
35
+ * @param data A partial analytics event payload
36
+ */
37
+ buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
38
+ actionSubjectId: Required<string>;
39
+ }) => void;
40
+ /**
41
+ * This fires an event that represents when a user clicks on a Smart Link.
42
+ * @param id The unique ID for this Smart Link.
43
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
44
+ * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
45
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
46
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
47
+ * @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
48
+ * @param location Where the Smart Link is currently rendered.
49
+ * @param destinationProduct The product the Smart Link is linked to.
50
+ * @returns
51
+ */
52
+ cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
53
+ /**
54
+ * This fires an event that represents when a user clicks on a Smart Link action.
55
+ * Note: This also starts the UFO smart-link-action-invocation experience.
56
+ * @param id The unique ID for this Smart Link.
57
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
58
+ * @param actionType The type of the action that was clicked, e.g. PreviewAction
59
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
60
+ * @param invokeType Whether the action invoked made a call to a server.
61
+ * @returns
62
+ */
63
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
64
+ /**
65
+ * This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
66
+ * https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
67
+ * @param previewDisplay What format the preview is in.
68
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
69
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
70
+ * @param previewInvokeMethod How the preview was triggered.
71
+ */
72
+ hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
73
+ /**
74
+ * This fires an event that represents when a user closed the authentication window without authenticating after opening it.
75
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
76
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
77
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
78
+ * @returns
79
+ */
80
+ closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
81
+ /**
82
+ * This fires an event that represents when a user close a modal.
83
+ * @param data A partial analytics event payload
84
+ */
85
+ modalClosedEvent: (data: Partial<AnalyticsPayload> & {
86
+ actionSubjectId: Required<string>;
87
+ }) => void;
88
+ /**
89
+ * This fires an event that represents when a Smart Link was rendered successfully.
90
+ * Note: this fires even if the Smart Link request errored out.
91
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
92
+ * @param id The unique ID for this Smart Link.
93
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
94
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
95
+ */
96
+ renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => void;
97
+ /**
98
+ * This fires an event that represents when a Smart Link renders unsuccessfuly.
99
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
100
+ * @param id The unique ID for this Smart Link.
101
+ * @param error: An error representing why the Smart Link render failed.
102
+ * @param errorInfo: Additional details about the error including the stack trace.
103
+ */
104
+ renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
105
+ /**
106
+ * This fires an event that represents a hover preview being opened.
107
+ * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
108
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
109
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
110
+ * @param previewInvokeMethod How the preview was triggered.
111
+ * @returns
112
+ */
113
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiHoverCardViewedEventProps) => void;
114
+ /**
115
+ * This fires an event that represents a hover preview being dismissed.
116
+ * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
117
+ * @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
118
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
119
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
120
+ * @param previewInvokeMethod How the preview was triggered.
121
+ * @returns
122
+ */
123
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiHoverCardDismissedEventProps) => void;
124
+ };
125
+ operational: {
126
+ /**
127
+ * This fires an event that represents an action being successfully invoked.
128
+ * @param id The unique ID for this Smart Link.
129
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
130
+ * @param actionType The type of action invoked, e.g. PreviewAction
131
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
132
+ */
133
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
134
+ /**
135
+ * This fires an event that represents an action being unsuccessfully invoked.
136
+ * @param id The unique ID for this Smart Link.
137
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
138
+ * @param actionType The type of action invoked, e.g. PreviewAction
139
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
140
+ * @param reason The reason the invocation failed.
141
+ */
142
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
143
+ /**
144
+ * This fires an event that represents an account successfully being connected via a Smart Link.
145
+ * @param id The unique ID for this Smart Link.
146
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
147
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
148
+ */
149
+ connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
150
+ /**
151
+ * This fires an event that represents an account unsuccessfully being connected.
152
+ * @param id The unique ID for this Smart Link.
153
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
154
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
155
+ * @param reason The reason why the Smart Link connect account failed.
156
+ */
157
+ connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
158
+ /**
159
+ * This fires an event which represents a Smart Link request succeeding or failing based on the status.
160
+ * @param id The unique ID for this Smart Link.
161
+ * @param status The status of the Smart Link.
162
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
163
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
164
+ * @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
165
+ * @param error An error representing why the Smart Link request failed.
166
+ */
167
+ instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
168
+ };
169
+ track: {
170
+ /**
171
+ * This fires an event which represents a user starting the Smart Link connect account process.
172
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
173
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
174
+ * @returns
175
+ */
176
+ appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
177
+ };
178
+ screen: {
179
+ /**
180
+ * This fires an event which represents the connect account page being opened.
181
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
182
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
183
+ * @returns
184
+ */
185
+ authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => void;
186
+ /**
187
+ * This fires an event that represents when a user view a modal.
188
+ * @param data A partial analytics event payload
189
+ */
190
+ modalViewedEvent: (data: Partial<AnalyticsPayload> & {
191
+ name: Extract<AnalyticsName, 'embedPreviewModal'>;
192
+ }) => void;
193
+ };
194
+ };
195
+ export declare type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
@@ -0,0 +1,2 @@
1
+ import { CardContext } from '@atlaskit/link-provider';
2
+ export declare const useSmartLinkConfig: () => CardContext['config'] | undefined;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FlexibleUiDataContext } from './types';
3
+ /**
4
+ * This provides the data that will be used by Smart Links Flexible UI to populate it's
5
+ * underlying elements.
6
+ */
7
+ export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
8
+ export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
@@ -0,0 +1,159 @@
1
+ import { LinkLozenge } from '../../extractors/common/lozenge/types';
2
+ import { LinkPerson } from '@atlaskit/linking-common/extractors';
3
+ import { IconType, MediaType } from '../../constants';
4
+ /**
5
+ * This provides the data that will be used by Smart Links Flexible UI to populate it's
6
+ * underlying elements.
7
+ */
8
+ export declare type FlexibleUiDataContext = {
9
+ /**
10
+ * An array containing data used to populate the AuthorGroup element.
11
+ * @see AvatarGroup
12
+ */
13
+ authorGroup?: LinkPerson[];
14
+ /**
15
+ * An array containing a @type {LinkPerson} used to populate the CollaboratorGroup element.
16
+ * @see CollaboratorGroup
17
+ */
18
+ collaboratorGroup?: LinkPerson[];
19
+ /**
20
+ * Contains the number of comments of the linked resource.
21
+ * @type number
22
+ * @see CommentCount
23
+ */
24
+ commentCount?: number;
25
+ /**
26
+ * Contains the ISO timestamp of when the resource was due.
27
+ * This value is mapped to JsonLD endTime.
28
+ * @type string - ISO Timestamp
29
+ * @see DueOn
30
+ */
31
+ dueOn?: string;
32
+ /**
33
+ * Contains the number of views of the linked resource.
34
+ * @type number
35
+ * @see ViewCount
36
+ */
37
+ viewCount?: number;
38
+ /**
39
+ * Contains the number of react of the linked resource.
40
+ * @type number
41
+ * @see ReactCount
42
+ */
43
+ reactCount?: number;
44
+ /**
45
+ * Contains the number of votes of the linked resource.
46
+ * @type number
47
+ * @see VoteCount
48
+ */
49
+ voteCount?: number;
50
+ /**
51
+ * Contains the name of the entity that created the resource.
52
+ * @type string
53
+ * @see CreatedBy
54
+ */
55
+ createdBy?: string;
56
+ /**
57
+ * Contains the ISO timestamp of when the resource was created.
58
+ * @type string - ISO Timestamp
59
+ * @see CreatedOn
60
+ */
61
+ createdOn?: string;
62
+ /**
63
+ * Contains the information about the latest commit in the repository
64
+ */
65
+ latestCommit?: string;
66
+ /**
67
+ * Contains the favicon of the resource.
68
+ * @type Icon
69
+ * @see LinkIcon
70
+ */
71
+ linkIcon?: Icon;
72
+ /**
73
+ * Contains the name of the entity that last modified the resource.
74
+ * @type string
75
+ * @see ModifiedBy
76
+ */
77
+ modifiedBy?: string;
78
+ /**
79
+ * Contains the ISO timestamp of when the resource was last modified.
80
+ * @type string - ISO Timestamp
81
+ * @see ModifiedOn
82
+ */
83
+ modifiedOn?: string;
84
+ /**
85
+ * Contains the preview (typically the thumbnail) of the resource.
86
+ * @type Media
87
+ * @see Preview
88
+ */
89
+ preview?: Media;
90
+ /**
91
+ * Contains the priority icon of the resource.
92
+ * @type Icon
93
+ * @see Priority
94
+ */
95
+ priority?: Icon;
96
+ /**
97
+ * Contains the programming language of the resource.
98
+ * @type string
99
+ * @see ProgrammingLanguage
100
+ */
101
+ programmingLanguage?: string;
102
+ /**
103
+ * Contains the provider icon of the linked resource.
104
+ * @type Icon
105
+ * @see Provider
106
+ */
107
+ provider?: Icon;
108
+ /**
109
+ * Contains the snippet of the resource.
110
+ * @type string
111
+ * @see Snippet
112
+ */
113
+ snippet?: string;
114
+ /**
115
+ * Contains the source branch name of the link typed pull request.
116
+ * @type string
117
+ * @see SourceBranch
118
+ */
119
+ sourceBranch?: string;
120
+ /**
121
+ * Contains the number of subscribers of the linked resource.
122
+ * @type number
123
+ * @see SubscriberCount
124
+ */
125
+ subscriberCount?: number;
126
+ /**
127
+ * Contains the number of subscribers of the linked resource.
128
+ * @type number
129
+ * @see SubscriberCount
130
+ */
131
+ state?: LinkLozenge;
132
+ /**
133
+ * Contains the target branch name of the link typed pull request.
134
+ * @type string
135
+ * @see TargetBranch
136
+ */
137
+ targetBranch?: string;
138
+ /**
139
+ * Contains the Title of the linked resource.
140
+ * @type string
141
+ * @see Title
142
+ */
143
+ title?: string;
144
+ /**
145
+ * Contains the url of the linked resource.
146
+ * @type string
147
+ * @see Title
148
+ */
149
+ url?: string;
150
+ };
151
+ export declare type Icon = {
152
+ icon?: IconType;
153
+ label?: string;
154
+ url?: string;
155
+ };
156
+ export declare type Media = {
157
+ type: MediaType;
158
+ url: string;
159
+ };
@@ -0,0 +1,16 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import { CardType, CardStore } from '@atlaskit/linking-common';
3
+ import { DestinationProduct, DestinationSubproduct } from '../utils/analytics/types';
4
+ export declare const getByDefinitionId: (definitionId: string | undefined, store: CardStore) => string[];
5
+ export declare const getClickUrl: (url: string, jsonLd?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string;
6
+ export declare const getDefinitionId: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
7
+ export declare const getExtensionKey: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
8
+ export declare const getResourceType: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
9
+ export declare const getProduct: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => DestinationProduct | string | undefined;
10
+ export declare const getSubproduct: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => DestinationSubproduct | string | undefined;
11
+ export declare const getServices: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => JsonLd.Primitives.AuthService[];
12
+ export declare const hasResolved: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => boolean | undefined;
13
+ export declare const isAccessible: ({ meta: { access } }: JsonLd.Response) => boolean;
14
+ export declare const isVisible: ({ meta: { visibility } }: JsonLd.Response) => boolean;
15
+ export declare const getStatus: ({ meta }: JsonLd.Response) => CardType;
16
+ export declare const isFinalState: (status: CardType) => boolean;
@@ -0,0 +1,2 @@
1
+ export { usePrefetch } from './usePrefetch';
2
+ export { useSmartLink } from './useSmartLink';
@@ -0,0 +1 @@
1
+ export declare function usePrefetch(url: string): () => Promise<void>;
@@ -0,0 +1,50 @@
1
+ import { AnalyticsHandler } from '../../utils/types';
2
+ export declare function useSmartLink(id: string, url: string, dispatchAnalytics: AnalyticsHandler): {
3
+ state: import("@atlaskit/linking-common").CardState;
4
+ actions: {
5
+ register: () => Promise<void>;
6
+ reload: () => void;
7
+ authorize: (appearance: import("@atlaskit/linking-common").CardAppearance) => void;
8
+ invoke: (opts: import("../../model/invoke-opts").InvokeClientOpts | import("../../model/invoke-opts").InvokeServerOpts, appearance: import("../../view/Card/types").CardInnerAppearance) => Promise<void | import("json-ld-types").JsonLd.Response<import("json-ld-types").JsonLd.Data.BaseData>>;
9
+ loadMetadata: () => Promise<void> | undefined;
10
+ };
11
+ config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
12
+ analytics: {
13
+ ui: {
14
+ authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthEventProps) => void;
15
+ authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
16
+ buttonClickedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
17
+ actionSubjectId: string;
18
+ }) => void;
19
+ cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
20
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
21
+ hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
22
+ closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
23
+ modalClosedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
24
+ actionSubjectId: string;
25
+ }) => void;
26
+ renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
27
+ renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
28
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
29
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
30
+ };
31
+ operational: {
32
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
33
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
34
+ connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
35
+ connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
36
+ instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
37
+ };
38
+ track: {
39
+ appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
40
+ };
41
+ screen: {
42
+ authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
43
+ modalViewedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
44
+ name: "embedPreviewModal";
45
+ }) => void;
46
+ };
47
+ };
48
+ renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
49
+ error: Error | null;
50
+ };
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import { JsonLd } from 'json-ld-types';
3
+ import type { AnalyticsHandler, AnalyticsOrigin } from '../../utils/types';
4
+ import type { CardInnerAppearance } from '../../view/Card/types';
5
+ export interface LinkAction {
6
+ /**
7
+ * Unique ID for the action.
8
+ * @example `delete-action`
9
+ */
10
+ id: string;
11
+ /**
12
+ * Text to render for the action.
13
+ * @description Use this in tooltips and UI.
14
+ * @example `Delete`.
15
+ */
16
+ text: React.ReactNode;
17
+ /**
18
+ * Promise to invoke on triggering this action.
19
+ * @example Clicking on `Delete` leading to deletion of content.
20
+ */
21
+ invoke: () => Promise<any>;
22
+ }
23
+ export interface UseSmartLinkActionsOpts {
24
+ /**
25
+ * Smart Link URL for which actions will be invoked.
26
+ * @example https://start.atlassian.com
27
+ */
28
+ url: string;
29
+ /**
30
+ * Appearance under which these actions will be invoked.
31
+ * @example `block` for card views.
32
+ */
33
+ appearance: CardInnerAppearance;
34
+ /**
35
+ * Callback for sending analytics events.
36
+ * @description Accepts an analytics payload and fires it to a system.
37
+ */
38
+ analyticsHandler: AnalyticsHandler;
39
+ /**
40
+ * Platform on which actions are being invoked.
41
+ * @default 'web'
42
+ */
43
+ platform?: JsonLd.Primitives.Platforms;
44
+ /**
45
+ * Smart link origin that the action being invoked from.
46
+ */
47
+ origin?: AnalyticsOrigin;
48
+ }
49
+ export declare function useSmartLinkActions({ url, appearance, analyticsHandler, platform, origin, }: UseSmartLinkActionsOpts): LinkAction[];
@@ -0,0 +1,19 @@
1
+ import type { AnalyticsHandler } from '../../utils/types';
2
+ export interface UseSmartLinkReloadOpts {
3
+ /**
4
+ * Smart Link URL for which the reload will be invoked.
5
+ * @example https://start.atlassian.com
6
+ */
7
+ url: string;
8
+ /**
9
+ * Callback for sending analytics events.
10
+ * @description Accepts an analytics payload and fires it to a system.
11
+ */
12
+ analyticsHandler: AnalyticsHandler;
13
+ }
14
+ /**
15
+ * Exposes a programmatic way to reload the data being used to render a Smart Link.
16
+ * @param
17
+ * @returns
18
+ */
19
+ export declare function useSmartLinkReload({ url, analyticsHandler, }: UseSmartLinkReloadOpts): () => void;
@@ -0,0 +1,5 @@
1
+ export { SmartCardContext, SmartCardProvider, useSmartLinkContext, } from '@atlaskit/link-provider';
2
+ export type { CardContext, ProviderProps } from '@atlaskit/link-provider';
3
+ export type { CardType } from '@atlaskit/linking-common';
4
+ export { useSmartLink, usePrefetch } from './hooks';
5
+ export { useSmartLinkAnalytics } from './analytics';
@@ -0,0 +1,4 @@
1
+ import { Reducer } from 'react';
2
+ import { CardAction, CardActionType } from '@atlaskit/linking-common';
3
+ export declare type CardReducerMap<StateType, ActionType> = Record<CardActionType, CardReducer<StateType, ActionType>>;
4
+ export declare type CardReducer<StateType, ActionType> = Reducer<StateType, CardAction<ActionType>>;
@@ -0,0 +1,2 @@
1
+ import { CardContext } from '@atlaskit/link-provider';
2
+ export declare const useSmartLinkRenderers: () => CardContext['renderers'] | undefined;
@@ -0,0 +1,3 @@
1
+ import { CardState } from '@atlaskit/linking-common';
2
+ export type { CardType } from '@atlaskit/linking-common';
3
+ export declare function useSmartCardState(url: string): CardState;
@@ -0,0 +1 @@
1
+ export type { CardStore, CardState } from '@atlaskit/linking-common';
@@ -0,0 +1,20 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import { RequestAccessMessageKey } from './messages';
3
+ export type { CardContext } from '@atlaskit/link-provider';
4
+ import { AccessContext } from './view/types';
5
+ import { ActionProps } from './view/BlockCard/components/Action';
6
+ export declare type ResolveResponse = JsonLd.Response;
7
+ export type { ProviderProps, CardType } from './state';
8
+ export type { CardProps, CardAppearance, CardPlatform, } from './view/Card/types';
9
+ export interface RequestAccessContextProps extends AccessContext {
10
+ action?: ActionProps;
11
+ callToActionMessageKey?: RequestAccessMessageKey;
12
+ descriptiveMessageKey?: RequestAccessMessageKey;
13
+ }
14
+ export declare type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
15
+ export declare type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
16
+ export interface LozengeProps {
17
+ text: string;
18
+ appearance?: LozengeColor;
19
+ isBold?: boolean;
20
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { AnalyticsPayload } from '../types';
3
+ import { CardInnerAppearance } from '../../view/Card/types';
4
+ import { ConnectFailedEventProps, ConnectSucceededEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ResolvedEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UnresolvedEventProps } from './types';
5
+ export declare const ANALYTICS_CHANNEL = "media";
6
+ export declare const context: {
7
+ componentName: string;
8
+ packageName: any;
9
+ packageVersion: any;
10
+ };
11
+ export declare class SmartLinkEvents {
12
+ insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
13
+ }
14
+ export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined) => void;
15
+ export declare const resolvedEvent: (props: ResolvedEventProps) => AnalyticsPayload;
16
+ export declare const unresolvedEvent: ({ id, definitionId, extensionKey, resourceType, destinationSubproduct, destinationProduct, error, status, location, }: UnresolvedEventProps) => AnalyticsPayload;
17
+ export declare const invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => AnalyticsPayload;
18
+ export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
19
+ export declare const connectSucceededEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => AnalyticsPayload;
20
+ export declare const connectFailedEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, reason, }: ConnectFailedEventProps) => AnalyticsPayload;
21
+ export declare const trackAppAccountConnected: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
22
+ export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
23
+ export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
24
+ export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
25
+ export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
26
+ export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
27
+ export declare const screenAuthPopupEvent: ({ extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => AnalyticsPayload;
28
+ export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => AnalyticsPayload;
29
+ export declare const uiRenderFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
30
+ export declare const uiHoverCardViewedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardViewedEventProps) => AnalyticsPayload;
31
+ export declare const uiHoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardDismissedEventProps) => AnalyticsPayload;
32
+ export declare const uiHoverCardOpenLinkClickedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => AnalyticsPayload;
@@ -0,0 +1,4 @@
1
+ import { AnalyticsPayload } from '../types';
2
+ import { InstrumentEventProps } from './types';
3
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, } from './analytics';
4
+ export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;