@atlaskit/smart-card 22.1.2 → 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 (335) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client/package.json +8 -1
  3. package/dist/cjs/state/helpers.js +2 -1
  4. package/dist/cjs/state/hooks/usePrefetch.js +26 -14
  5. package/dist/cjs/version.json +1 -1
  6. package/dist/cjs/view/CardWithUrl/loader.js +10 -10
  7. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -5
  8. package/dist/es2019/state/helpers.js +2 -1
  9. package/dist/es2019/state/hooks/usePrefetch.js +9 -4
  10. package/dist/es2019/version.json +1 -1
  11. package/dist/es2019/view/CardWithUrl/loader.js +10 -10
  12. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -5
  13. package/dist/esm/state/helpers.js +2 -1
  14. package/dist/esm/state/hooks/usePrefetch.js +26 -14
  15. package/dist/esm/version.json +1 -1
  16. package/dist/esm/view/CardWithUrl/loader.js +10 -10
  17. package/dist/esm/view/EmbedModal/components/embed-content/index.js +1 -4
  18. package/dist/types/extractors/common/__mocks__/jsonld.d.ts +2 -2
  19. package/dist/types-ts4.0/__fixtures__/flexible-ui-data-context.d.ts +3 -0
  20. package/dist/types-ts4.0/__tests_external__/index.d.ts +6 -0
  21. package/dist/types-ts4.0/__tests_external__/page-objects/BaseCard.d.ts +16 -0
  22. package/dist/types-ts4.0/__tests_external__/page-objects/BlockCard.d.ts +6 -0
  23. package/dist/types-ts4.0/__tests_external__/page-objects/EmbedCard.d.ts +6 -0
  24. package/dist/types-ts4.0/__tests_external__/page-objects/InlineCard.d.ts +6 -0
  25. package/dist/types-ts4.0/__tests_external__/test-cases/card.d.ts +3 -0
  26. package/dist/types-ts4.0/__tests_external__/test-cases/embed.d.ts +3 -0
  27. package/dist/types-ts4.0/__tests_external__/test-cases/inline.d.ts +3 -0
  28. package/dist/types-ts4.0/__tests_external__/test-cases/types.d.ts +5 -0
  29. package/dist/types-ts4.0/classNames.d.ts +11 -0
  30. package/dist/types-ts4.0/client/index.d.ts +1 -0
  31. package/dist/types-ts4.0/constants.d.ts +185 -0
  32. package/dist/types-ts4.0/extractors/block/index.d.ts +9 -0
  33. package/dist/types-ts4.0/extractors/block/types.d.ts +14 -0
  34. package/dist/types-ts4.0/extractors/common/__mocks__/jsonld.d.ts +232 -0
  35. package/dist/types-ts4.0/extractors/common/__mocks__/render.d.ts +2 -0
  36. package/dist/types-ts4.0/extractors/common/actions/extractActions.d.ts +4 -0
  37. package/dist/types-ts4.0/extractors/common/actions/extractPreviewAction.d.ts +9 -0
  38. package/dist/types-ts4.0/extractors/common/byline/extractByline.d.ts +3 -0
  39. package/dist/types-ts4.0/extractors/common/context/extractAccessContext.d.ts +7 -0
  40. package/dist/types-ts4.0/extractors/common/context/index.d.ts +1 -0
  41. package/dist/types-ts4.0/extractors/common/detail/extractCommentCount.d.ts +4 -0
  42. package/dist/types-ts4.0/extractors/common/detail/extractDownloadUrl.d.ts +2 -0
  43. package/dist/types-ts4.0/extractors/common/detail/extractProgrammingLanguage.d.ts +4 -0
  44. package/dist/types-ts4.0/extractors/common/detail/extractSubscriberCount.d.ts +4 -0
  45. package/dist/types-ts4.0/extractors/common/detail/index.d.ts +7 -0
  46. package/dist/types-ts4.0/extractors/common/detail/types.d.ts +5 -0
  47. package/dist/types-ts4.0/extractors/common/icon/extractFileFormat.d.ts +2 -0
  48. package/dist/types-ts4.0/extractors/common/icon/extractIcon.d.ts +14 -0
  49. package/dist/types-ts4.0/extractors/common/icon/extractIconFromDocument.d.ts +4 -0
  50. package/dist/types-ts4.0/extractors/common/icon/extractIconFromTask.d.ts +3 -0
  51. package/dist/types-ts4.0/extractors/common/icon/index.d.ts +4 -0
  52. package/dist/types-ts4.0/extractors/common/icon/priority.d.ts +4 -0
  53. package/dist/types-ts4.0/extractors/common/lozenge/extractLozenge.d.ts +3 -0
  54. package/dist/types-ts4.0/extractors/common/lozenge/extractState.d.ts +3 -0
  55. package/dist/types-ts4.0/extractors/common/lozenge/extractTag.d.ts +3 -0
  56. package/dist/types-ts4.0/extractors/common/lozenge/extractTaskStatus.d.ts +3 -0
  57. package/dist/types-ts4.0/extractors/common/lozenge/extractTaskType.d.ts +7 -0
  58. package/dist/types-ts4.0/extractors/common/lozenge/index.d.ts +5 -0
  59. package/dist/types-ts4.0/extractors/common/lozenge/types.d.ts +8 -0
  60. package/dist/types-ts4.0/extractors/common/lozenge/utils.d.ts +4 -0
  61. package/dist/types-ts4.0/extractors/common/meta/extractIsTrusted.d.ts +2 -0
  62. package/dist/types-ts4.0/extractors/common/primitives/extractSummary.d.ts +2 -0
  63. package/dist/types-ts4.0/extractors/common/primitives/extractTitleTextColor.d.ts +2 -0
  64. package/dist/types-ts4.0/extractors/common/primitives/extractVisitUrl.d.ts +2 -0
  65. package/dist/types-ts4.0/extractors/common/primitives/index.d.ts +2 -0
  66. package/dist/types-ts4.0/extractors/common/title-prefix/extractTitlePrefix.d.ts +5 -0
  67. package/dist/types-ts4.0/extractors/common/title-prefix/index.d.ts +1 -0
  68. package/dist/types-ts4.0/extractors/constants.d.ts +12 -0
  69. package/dist/types-ts4.0/extractors/embed/index.d.ts +3 -0
  70. package/dist/types-ts4.0/extractors/flexible/collaboratorGroup/index.d.ts +4 -0
  71. package/dist/types-ts4.0/extractors/flexible/extract-preview.d.ts +4 -0
  72. package/dist/types-ts4.0/extractors/flexible/extract-priority.d.ts +4 -0
  73. package/dist/types-ts4.0/extractors/flexible/icon/extract-document-type-icon.d.ts +3 -0
  74. package/dist/types-ts4.0/extractors/flexible/icon/extract-file-formatIcon.d.ts +3 -0
  75. package/dist/types-ts4.0/extractors/flexible/icon/extract-icon-renderer.d.ts +4 -0
  76. package/dist/types-ts4.0/extractors/flexible/icon/extract-jira-task-icon.d.ts +3 -0
  77. package/dist/types-ts4.0/extractors/flexible/icon/extract-jsonld-data-icon.d.ts +4 -0
  78. package/dist/types-ts4.0/extractors/flexible/icon/extract-provider-icon.d.ts +4 -0
  79. package/dist/types-ts4.0/extractors/flexible/icon/extract-url-icon.d.ts +4 -0
  80. package/dist/types-ts4.0/extractors/flexible/icon/index.d.ts +17 -0
  81. package/dist/types-ts4.0/extractors/flexible/icon/types.d.ts +6 -0
  82. package/dist/types-ts4.0/extractors/flexible/index.d.ts +5 -0
  83. package/dist/types-ts4.0/extractors/flexible/latest-commit/index.d.ts +2 -0
  84. package/dist/types-ts4.0/extractors/flexible/utils.d.ts +12 -0
  85. package/dist/types-ts4.0/extractors/hover/extractMetadata.d.ts +3 -0
  86. package/dist/types-ts4.0/extractors/index.d.ts +14 -0
  87. package/dist/types-ts4.0/extractors/inline/index.d.ts +6 -0
  88. package/dist/types-ts4.0/hooks.d.ts +2 -0
  89. package/dist/types-ts4.0/i18n/cs.d.ts +71 -0
  90. package/dist/types-ts4.0/i18n/da.d.ts +71 -0
  91. package/dist/types-ts4.0/i18n/de.d.ts +71 -0
  92. package/dist/types-ts4.0/i18n/en.d.ts +71 -0
  93. package/dist/types-ts4.0/i18n/en_GB.d.ts +71 -0
  94. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +38 -0
  95. package/dist/types-ts4.0/i18n/es.d.ts +71 -0
  96. package/dist/types-ts4.0/i18n/et.d.ts +94 -0
  97. package/dist/types-ts4.0/i18n/fi.d.ts +71 -0
  98. package/dist/types-ts4.0/i18n/fr.d.ts +71 -0
  99. package/dist/types-ts4.0/i18n/hu.d.ts +71 -0
  100. package/dist/types-ts4.0/i18n/index.d.ts +35 -0
  101. package/dist/types-ts4.0/i18n/is.d.ts +70 -0
  102. package/dist/types-ts4.0/i18n/it.d.ts +71 -0
  103. package/dist/types-ts4.0/i18n/ja.d.ts +71 -0
  104. package/dist/types-ts4.0/i18n/ko.d.ts +71 -0
  105. package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
  106. package/dist/types-ts4.0/i18n/nb.d.ts +71 -0
  107. package/dist/types-ts4.0/i18n/nl.d.ts +71 -0
  108. package/dist/types-ts4.0/i18n/pl.d.ts +71 -0
  109. package/dist/types-ts4.0/i18n/pt_BR.d.ts +71 -0
  110. package/dist/types-ts4.0/i18n/pt_PT.d.ts +94 -0
  111. package/dist/types-ts4.0/i18n/ro.d.ts +70 -0
  112. package/dist/types-ts4.0/i18n/ru.d.ts +71 -0
  113. package/dist/types-ts4.0/i18n/sk.d.ts +94 -0
  114. package/dist/types-ts4.0/i18n/sv.d.ts +71 -0
  115. package/dist/types-ts4.0/i18n/th.d.ts +71 -0
  116. package/dist/types-ts4.0/i18n/tr.d.ts +71 -0
  117. package/dist/types-ts4.0/i18n/uk.d.ts +71 -0
  118. package/dist/types-ts4.0/i18n/vi.d.ts +71 -0
  119. package/dist/types-ts4.0/i18n/zh.d.ts +71 -0
  120. package/dist/types-ts4.0/i18n/zh_TW.d.ts +71 -0
  121. package/dist/types-ts4.0/in-product.d.ts +1 -0
  122. package/dist/types-ts4.0/index.d.ts +22 -0
  123. package/dist/types-ts4.0/messages.d.ts +8 -0
  124. package/dist/types-ts4.0/model/invoke-handler.d.ts +3 -0
  125. package/dist/types-ts4.0/model/invoke-opts.d.ts +17 -0
  126. package/dist/types-ts4.0/ssr.d.ts +6 -0
  127. package/dist/types-ts4.0/state/actions/constants.d.ts +6 -0
  128. package/dist/types-ts4.0/state/actions/index.d.ts +12 -0
  129. package/dist/types-ts4.0/state/actions/types.d.ts +2 -0
  130. package/dist/types-ts4.0/state/analytics/index.d.ts +3 -0
  131. package/dist/types-ts4.0/state/analytics/types.d.ts +9 -0
  132. package/dist/types-ts4.0/state/analytics/ufoExperiences.d.ts +7 -0
  133. package/dist/types-ts4.0/state/analytics/useSmartLinkAnalytics.d.ts +195 -0
  134. package/dist/types-ts4.0/state/config/index.d.ts +2 -0
  135. package/dist/types-ts4.0/state/flexible-ui-context/index.d.ts +8 -0
  136. package/dist/types-ts4.0/state/flexible-ui-context/types.d.ts +159 -0
  137. package/dist/types-ts4.0/state/helpers.d.ts +16 -0
  138. package/dist/types-ts4.0/state/hooks/index.d.ts +2 -0
  139. package/dist/types-ts4.0/state/hooks/usePrefetch.d.ts +1 -0
  140. package/dist/types-ts4.0/state/hooks/useSmartLink.d.ts +50 -0
  141. package/dist/types-ts4.0/state/hooks-external/useSmartLinkActions.d.ts +49 -0
  142. package/dist/types-ts4.0/state/hooks-external/useSmartLinkReload.d.ts +19 -0
  143. package/dist/types-ts4.0/state/index.d.ts +5 -0
  144. package/dist/types-ts4.0/state/reducers/types.d.ts +4 -0
  145. package/dist/types-ts4.0/state/renderers/index.d.ts +2 -0
  146. package/dist/types-ts4.0/state/store/index.d.ts +3 -0
  147. package/dist/types-ts4.0/state/types.d.ts +1 -0
  148. package/dist/types-ts4.0/types.d.ts +20 -0
  149. package/dist/types-ts4.0/utils/analytics/__mocks__/analytics.d.ts +2 -0
  150. package/dist/types-ts4.0/utils/analytics/analytics.d.ts +32 -0
  151. package/dist/types-ts4.0/utils/analytics/index.d.ts +4 -0
  152. package/dist/types-ts4.0/utils/analytics/types.d.ts +93 -0
  153. package/dist/types-ts4.0/utils/flexible.d.ts +5 -0
  154. package/dist/types-ts4.0/utils/index.d.ts +12 -0
  155. package/dist/types-ts4.0/utils/jsonld.d.ts +3 -0
  156. package/dist/types-ts4.0/utils/mocks.d.ts +74 -0
  157. package/dist/types-ts4.0/utils/performance.d.ts +8 -0
  158. package/dist/types-ts4.0/utils/test-utils.d.ts +4 -0
  159. package/dist/types-ts4.0/utils/token.d.ts +16 -0
  160. package/dist/types-ts4.0/utils/types.d.ts +14 -0
  161. package/dist/types-ts4.0/view/BlockCard/actions/AuthorizeAction.d.ts +2 -0
  162. package/dist/types-ts4.0/view/BlockCard/actions/DownloadAction.d.ts +8 -0
  163. package/dist/types-ts4.0/view/BlockCard/actions/ForbiddenAction.d.ts +2 -0
  164. package/dist/types-ts4.0/view/BlockCard/actions/PreviewAction.d.ts +32 -0
  165. package/dist/types-ts4.0/view/BlockCard/actions/RetryAction.d.ts +2 -0
  166. package/dist/types-ts4.0/view/BlockCard/actions/ViewAction.d.ts +8 -0
  167. package/dist/types-ts4.0/view/BlockCard/components/Action.d.ts +11 -0
  168. package/dist/types-ts4.0/view/BlockCard/components/ActionIcon.d.ts +12 -0
  169. package/dist/types-ts4.0/view/BlockCard/components/ActionList.d.ts +6 -0
  170. package/dist/types-ts4.0/view/BlockCard/components/CollaboratorList.d.ts +13 -0
  171. package/dist/types-ts4.0/view/BlockCard/components/Content.d.ts +7 -0
  172. package/dist/types-ts4.0/view/BlockCard/components/ContentFooter.d.ts +7 -0
  173. package/dist/types-ts4.0/view/BlockCard/components/ContentHeader.d.ts +8 -0
  174. package/dist/types-ts4.0/view/BlockCard/components/Emoji.d.ts +5 -0
  175. package/dist/types-ts4.0/view/BlockCard/components/Frame.d.ts +14 -0
  176. package/dist/types-ts4.0/view/BlockCard/components/Link.d.ts +7 -0
  177. package/dist/types-ts4.0/view/BlockCard/components/Name.d.ts +10 -0
  178. package/dist/types-ts4.0/view/BlockCard/components/Provider.d.ts +6 -0
  179. package/dist/types-ts4.0/view/BlockCard/components/Thumbnail.d.ts +9 -0
  180. package/dist/types-ts4.0/view/BlockCard/components/UnresolvedText.d.ts +6 -0
  181. package/dist/types-ts4.0/view/BlockCard/index.d.ts +14 -0
  182. package/dist/types-ts4.0/view/BlockCard/types.d.ts +25 -0
  183. package/dist/types-ts4.0/view/BlockCard/utils/constants.d.ts +3 -0
  184. package/dist/types-ts4.0/view/BlockCard/utils/handlers.d.ts +2 -0
  185. package/dist/types-ts4.0/view/BlockCard/views/ErroredView.d.ts +12 -0
  186. package/dist/types-ts4.0/view/BlockCard/views/ForbiddenView.d.ts +21 -0
  187. package/dist/types-ts4.0/view/BlockCard/views/NotFoundView.d.ts +15 -0
  188. package/dist/types-ts4.0/view/BlockCard/views/ResolvedView.d.ts +32 -0
  189. package/dist/types-ts4.0/view/BlockCard/views/ResolvingView.d.ts +8 -0
  190. package/dist/types-ts4.0/view/BlockCard/views/UnauthorizedView.d.ts +17 -0
  191. package/dist/types-ts4.0/view/Card/index.d.ts +5 -0
  192. package/dist/types-ts4.0/view/Card/types.d.ts +37 -0
  193. package/dist/types-ts4.0/view/CardWithData/component.d.ts +5 -0
  194. package/dist/types-ts4.0/view/CardWithData/loader.d.ts +9 -0
  195. package/dist/types-ts4.0/view/CardWithData/types.d.ts +15 -0
  196. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyFallback.d.ts +4 -0
  197. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +3 -0
  198. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.d.ts +3 -0
  199. package/dist/types-ts4.0/view/CardWithUrl/component-lazy/index.d.ts +3 -0
  200. package/dist/types-ts4.0/view/CardWithUrl/component.d.ts +3 -0
  201. package/dist/types-ts4.0/view/CardWithUrl/loader.d.ts +3 -0
  202. package/dist/types-ts4.0/view/CardWithUrl/types.d.ts +29 -0
  203. package/dist/types-ts4.0/view/EmbedCard/EmbedResizeMessageListener.d.ts +15 -0
  204. package/dist/types-ts4.0/view/EmbedCard/components/ExpandedFrame.d.ts +23 -0
  205. package/dist/types-ts4.0/view/EmbedCard/components/Frame.d.ts +7 -0
  206. package/dist/types-ts4.0/view/EmbedCard/components/ImageIcon.d.ts +9 -0
  207. package/dist/types-ts4.0/view/EmbedCard/components/styled.d.ts +45 -0
  208. package/dist/types-ts4.0/view/EmbedCard/index.d.ts +3 -0
  209. package/dist/types-ts4.0/view/EmbedCard/types.d.ts +46 -0
  210. package/dist/types-ts4.0/view/EmbedCard/views/ErroredView.d.ts +8 -0
  211. package/dist/types-ts4.0/view/EmbedCard/views/ForbiddenView.d.ts +13 -0
  212. package/dist/types-ts4.0/view/EmbedCard/views/NotFoundView.d.ts +11 -0
  213. package/dist/types-ts4.0/view/EmbedCard/views/ResolvedView.d.ts +27 -0
  214. package/dist/types-ts4.0/view/EmbedCard/views/UnauthorisedView.d.ts +12 -0
  215. package/dist/types-ts4.0/view/EmbedCard/views/UnresolvedView.d.ts +18 -0
  216. package/dist/types-ts4.0/view/EmbedModal/components/analytics/index.d.ts +5 -0
  217. package/dist/types-ts4.0/view/EmbedModal/components/analytics/types.d.ts +6 -0
  218. package/dist/types-ts4.0/view/EmbedModal/components/embed-content/index.d.ts +5 -0
  219. package/dist/types-ts4.0/view/EmbedModal/components/embed-content/types.d.ts +6 -0
  220. package/dist/types-ts4.0/view/EmbedModal/components/error-boundary/index.d.ts +4 -0
  221. package/dist/types-ts4.0/view/EmbedModal/components/link-info/index.d.ts +4 -0
  222. package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/index.d.ts +4 -0
  223. package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/types.d.ts +9 -0
  224. package/dist/types-ts4.0/view/EmbedModal/components/link-info/styled.d.ts +4 -0
  225. package/dist/types-ts4.0/view/EmbedModal/components/link-info/types.d.ts +13 -0
  226. package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/index.d.ts +7 -0
  227. package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/types.d.ts +4 -0
  228. package/dist/types-ts4.0/view/EmbedModal/constants.d.ts +2 -0
  229. package/dist/types-ts4.0/view/EmbedModal/index.d.ts +6 -0
  230. package/dist/types-ts4.0/view/EmbedModal/types.d.ts +34 -0
  231. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/index.d.ts +5 -0
  232. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/types.d.ts +8 -0
  233. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +4 -0
  234. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +8 -0
  235. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +5 -0
  236. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +7 -0
  237. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/index.d.ts +13 -0
  238. package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/types.d.ts +48 -0
  239. package/dist/types-ts4.0/view/FlexibleCard/components/actions/index.d.ts +20 -0
  240. package/dist/types-ts4.0/view/FlexibleCard/components/actions/utils.d.ts +4 -0
  241. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/index.d.ts +11 -0
  242. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/types.d.ts +37 -0
  243. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/block/index.d.ts +12 -0
  244. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/index.d.ts +15 -0
  245. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/types.d.ts +10 -0
  246. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/index.d.ts +11 -0
  247. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/types.d.ts +10 -0
  248. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/index.d.ts +5 -0
  249. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +11 -0
  250. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +26 -0
  251. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/index.d.ts +10 -0
  252. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/types.d.ts +8 -0
  253. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +10 -0
  254. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -0
  255. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +12 -0
  256. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/index.d.ts +16 -0
  257. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +9 -0
  258. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +11 -0
  259. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/types.d.ts +86 -0
  260. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/types.d.ts +293 -0
  261. package/dist/types-ts4.0/view/FlexibleCard/components/blocks/utils.d.ts +13 -0
  262. package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +4 -0
  263. package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +6 -0
  264. package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/index.d.ts +5 -0
  265. package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/types.d.ts +7 -0
  266. package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +5 -0
  267. package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +16 -0
  268. package/dist/types-ts4.0/view/FlexibleCard/components/container/index.d.ts +16 -0
  269. package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/index.d.ts +10 -0
  270. package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/types.d.ts +12 -0
  271. package/dist/types-ts4.0/view/FlexibleCard/components/container/types.d.ts +25 -0
  272. package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/index.d.ts +12 -0
  273. package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/types.d.ts +21 -0
  274. package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/index.d.ts +18 -0
  275. package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/types.d.ts +17 -0
  276. package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/index.d.ts +12 -0
  277. package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/types.d.ts +16 -0
  278. package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/index.d.ts +11 -0
  279. package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/types.d.ts +27 -0
  280. package/dist/types-ts4.0/view/FlexibleCard/components/elements/index.d.ts +124 -0
  281. package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/index.d.ts +11 -0
  282. package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/types.d.ts +35 -0
  283. package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/index.d.ts +11 -0
  284. package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/types.d.ts +13 -0
  285. package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/index.d.ts +11 -0
  286. package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/types.d.ts +17 -0
  287. package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/index.d.ts +11 -0
  288. package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/types.d.ts +17 -0
  289. package/dist/types-ts4.0/view/FlexibleCard/components/elements/types.d.ts +24 -0
  290. package/dist/types-ts4.0/view/FlexibleCard/components/elements/utils.d.ts +3 -0
  291. package/dist/types-ts4.0/view/FlexibleCard/components/types.d.ts +6 -0
  292. package/dist/types-ts4.0/view/FlexibleCard/components/utils.d.ts +15 -0
  293. package/dist/types-ts4.0/view/FlexibleCard/index.d.ts +10 -0
  294. package/dist/types-ts4.0/view/FlexibleCard/types.d.ts +113 -0
  295. package/dist/types-ts4.0/view/FlexibleCard/utils.d.ts +7 -0
  296. package/dist/types-ts4.0/view/HoverCard/components/HoverCardComponent.d.ts +4 -0
  297. package/dist/types-ts4.0/view/HoverCard/components/HoverCardContent.d.ts +9 -0
  298. package/dist/types-ts4.0/view/HoverCard/components/HoverCardLoadingView.d.ts +4 -0
  299. package/dist/types-ts4.0/view/HoverCard/components/SnippetOrPreview.d.ts +4 -0
  300. package/dist/types-ts4.0/view/HoverCard/index.d.ts +3 -0
  301. package/dist/types-ts4.0/view/HoverCard/styled.d.ts +12 -0
  302. package/dist/types-ts4.0/view/HoverCard/types.d.ts +45 -0
  303. package/dist/types-ts4.0/view/HoverCard/utils.d.ts +3 -0
  304. package/dist/types-ts4.0/view/InlineCard/ErroredView/index.d.ts +21 -0
  305. package/dist/types-ts4.0/view/InlineCard/ForbiddenView/index.d.ts +25 -0
  306. package/dist/types-ts4.0/view/InlineCard/Frame/index.d.ts +16 -0
  307. package/dist/types-ts4.0/view/InlineCard/Frame/styled.d.ts +8 -0
  308. package/dist/types-ts4.0/view/InlineCard/Icon.d.ts +4 -0
  309. package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/index.d.ts +19 -0
  310. package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/styled.d.ts +13 -0
  311. package/dist/types-ts4.0/view/InlineCard/ResolvedView/index.d.ts +30 -0
  312. package/dist/types-ts4.0/view/InlineCard/ResolvingView/index.d.ts +18 -0
  313. package/dist/types-ts4.0/view/InlineCard/ResolvingView/styled.d.ts +14 -0
  314. package/dist/types-ts4.0/view/InlineCard/UnauthorisedView/index.d.ts +20 -0
  315. package/dist/types-ts4.0/view/InlineCard/index.d.ts +9 -0
  316. package/dist/types-ts4.0/view/InlineCard/styled.d.ts +9 -0
  317. package/dist/types-ts4.0/view/InlineCard/types.d.ts +21 -0
  318. package/dist/types-ts4.0/view/LinkView/index.d.ts +8 -0
  319. package/dist/types-ts4.0/view/SmartLinkEvents/useSmartLinkEvents.d.ts +2 -0
  320. package/dist/types-ts4.0/view/__mocks__/intersection-observer.d.ts +26 -0
  321. package/dist/types-ts4.0/view/__mocks__/intersection-observer.mock.d.ts +12 -0
  322. package/dist/types-ts4.0/view/common/Byline.d.ts +8 -0
  323. package/dist/types-ts4.0/view/common/Icon.d.ts +9 -0
  324. package/dist/types-ts4.0/view/common/Metadata.d.ts +8 -0
  325. package/dist/types-ts4.0/view/common/MetadataList.d.ts +8 -0
  326. package/dist/types-ts4.0/view/common/Modal.d.ts +26 -0
  327. package/dist/types-ts4.0/view/common/ModalHeader.d.ts +17 -0
  328. package/dist/types-ts4.0/view/common/utils.d.ts +5 -0
  329. package/dist/types-ts4.0/view/types.d.ts +29 -0
  330. package/hooks/package.json +8 -1
  331. package/in-product/package.json +8 -1
  332. package/package.json +13 -6
  333. package/report.api.md +341 -738
  334. package/ssr/package.json +8 -1
  335. package/types/package.json +8 -1
@@ -0,0 +1,124 @@
1
+ /// <reference types="react" />
2
+ import { BadgeProps } from './badge/types';
3
+ import { IconProps } from './icon/types';
4
+ import { LinkProps } from './link/types';
5
+ import { LozengeProps } from './lozenge/types';
6
+ import { AvatarGroupProps } from './avatar-group/types';
7
+ import { TextProps } from './text/types';
8
+ import { DateTimeProps } from './date-time/types';
9
+ import { MediaProps } from './media/types';
10
+ /**
11
+ * An AvatarGroup element using the data from AuthorGroup in the Flexible UI Context.
12
+ * @see AvatarGroup
13
+ */
14
+ export declare const AuthorGroup: import("react").FC<AvatarGroupProps>;
15
+ /**
16
+ * An AvatarGroup element using the data from CollaboratorGroup in the Flexible UI Context.
17
+ * @see AvatarGroup
18
+ */
19
+ export declare const CollaboratorGroup: import("react").FC<AvatarGroupProps>;
20
+ /**
21
+ * Creates a CommentCount Badge element using the data from CommentCount in the Flexible UI Context.
22
+ * @see Badge
23
+ */
24
+ export declare const CommentCount: import("react").FC<BadgeProps>;
25
+ /**
26
+ * Creates a CreatedOn DateTime element using the data from CreatedOn in the Flexible UI Context.
27
+ * @see DateTime
28
+ */
29
+ export declare const CreatedOn: import("react").FC<DateTimeProps>;
30
+ /**
31
+ * Creates a CreatedBy text element using the data from CreatedBy in the Flexible UI Context.
32
+ * @see Text
33
+ */
34
+ export declare const CreatedBy: import("react").FC<TextProps>;
35
+ /**
36
+ * Creates a DueOn Lozenge element using the data from dueOn in the Flexible UI Context.
37
+ * @see Lozenge
38
+ */
39
+ export declare const DueOn: import("react").FC<LozengeProps>;
40
+ /**
41
+ * Creates an element that contains Last Commit hash
42
+ */
43
+ export declare const LatestCommit: import("react").FC<BadgeProps>;
44
+ /**
45
+ * Creates a LinkIcon Icon element using the data from LinkIcon in the Flexible UI Context.
46
+ * @see Icon
47
+ */
48
+ export declare const LinkIcon: import("react").FC<IconProps>;
49
+ /**
50
+ * Creates a ModifiedBy Text element using the data from ModifiedBy in the Flexible UI Context.
51
+ * @see Text
52
+ */
53
+ export declare const ModifiedBy: import("react").FC<TextProps>;
54
+ /**
55
+ * Creates a ModifiedOn DateTime element using the data from ModifiedOn in the Flexible UI Context.
56
+ * @see DateTime
57
+ */
58
+ export declare const ModifiedOn: import("react").FC<DateTimeProps>;
59
+ /**
60
+ * Creates a Preview element using the data from Preview in the Flexible UI Context.
61
+ * @see Preview
62
+ */
63
+ export declare const Preview: import("react").FC<MediaProps>;
64
+ /**
65
+ * Creates a Priority Badge element using the data from Priority in the Flexible UI Context.
66
+ * @see Badge
67
+ */
68
+ export declare const Priority: import("react").FC<BadgeProps>;
69
+ /**
70
+ * Creates a ProgrammingLanguage Badge element using the data from ProgrammingLanguage in the Flexible UI Context.
71
+ * @see Badge
72
+ */
73
+ export declare const ProgrammingLanguage: import("react").FC<BadgeProps>;
74
+ /**
75
+ * Creates a Provider Badge element using the data from Provider in the Flexible UI Context.
76
+ * @see Badge
77
+ */
78
+ export declare const Provider: import("react").FC<BadgeProps>;
79
+ /**
80
+ * Creates a ReactCount Badge element using the data from ReactCount in the Flexible UI Context.
81
+ * @see Badge
82
+ */
83
+ export declare const ReactCount: import("react").FC<BadgeProps>;
84
+ /**
85
+ * Creates a Snippet element using the data from Snippet in the Flexible UI Context.
86
+ * @see Text
87
+ */
88
+ export declare const Snippet: import("react").FC<TextProps>;
89
+ /**
90
+ * Creates a SourceBranch Text element using the data from sourceBranch in the Flexible UI Context.
91
+ * @see Text
92
+ */
93
+ export declare const SourceBranch: import("react").FC<TextProps>;
94
+ /**
95
+ * Creates a State Lozenge element using the data from State in the Flexible UI Context.
96
+ * @see Lozenge
97
+ */
98
+ export declare const State: import("react").FC<LozengeProps>;
99
+ /**
100
+ * Creates a SubscriberCount Badge element using the data from SubscriberCount in the Flexible UI Context.
101
+ * @see Badge
102
+ */
103
+ export declare const SubscriberCount: import("react").FC<BadgeProps>;
104
+ /**
105
+ * Creates a TargetBranch Text element using the data from targetBranch in the Flexible UI Context.
106
+ * @see Text
107
+ */
108
+ export declare const TargetBranch: import("react").FC<TextProps>;
109
+ /**
110
+ * Creates a Title Link element using the data from Title in the Flexible UI Context.
111
+ * This represents the main link text within the Smart Link.
112
+ * @see Link
113
+ */
114
+ export declare const Title: import("react").FC<LinkProps>;
115
+ /**
116
+ * Creates a ViewCount Badge element using the data from ViewCount in the Flexible UI Context.
117
+ * @see Badge
118
+ */
119
+ export declare const ViewCount: import("react").FC<BadgeProps>;
120
+ /**
121
+ * Creates a VoteCount Badge element using the data from VoteCount in the Flexible UI Context.
122
+ * @see Badge
123
+ */
124
+ export declare const VoteCount: import("react").FC<BadgeProps>;
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { LinkProps } from './types';
4
+ /**
5
+ * A base element that represent an anchor.
6
+ * @internal
7
+ * @param {LinkProps} LinkProps - The props necessary for the Link element.
8
+ * @see LinkIcon
9
+ */
10
+ declare const Link: React.FC<LinkProps>;
11
+ export default Link;
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ import { ElementProps } from '../types';
3
+ import { SmartLinkTheme } from '../../../../../constants';
4
+ import { AnchorTarget } from '../../types';
5
+ export declare type LinkProps = ElementProps & {
6
+ /**
7
+ * Determines whether the link should display tooltip on hover.
8
+ */
9
+ hideTooltip?: boolean;
10
+ /**
11
+ * Determines the behaviour when the Link is clicked. By default is used to
12
+ * propagate analytics.
13
+ */
14
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
15
+ /**
16
+ * The number of lines that the link text should spread over. Maximum of 2 lines.
17
+ */
18
+ maxLines?: number;
19
+ /**
20
+ * The text to display. Overrides the default link text.
21
+ */
22
+ text?: string;
23
+ /**
24
+ * The theme of the link. Can be Black, or Link (default blue URL).
25
+ */
26
+ theme?: SmartLinkTheme;
27
+ /**
28
+ * The url that the Smart Link should be based upon.
29
+ */
30
+ url?: string;
31
+ /**
32
+ * The href target behaviour of the link.
33
+ */
34
+ target?: AnchorTarget;
35
+ };
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { LozengeProps } from './types';
4
+ /**
5
+ * A base element that displays a Lozenge.
6
+ * @internal
7
+ * @param {LozengeProps} LozengeProps - The props necessary for the Lozenge element.
8
+ * @see State
9
+ */
10
+ declare const Lozenge: React.FC<LozengeProps>;
11
+ export default Lozenge;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ElementProps } from '../types';
3
+ export declare type LozengeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
4
+ export declare type LozengeProps = ElementProps & {
5
+ /**
6
+ * Determines the appearance of the Atlaskit lozenge.
7
+ */
8
+ appearance?: LozengeAppearance;
9
+ /**
10
+ * The text to display within the lozenge.
11
+ */
12
+ text?: string | React.ReactNode;
13
+ };
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { MediaProps } from './types';
4
+ /**
5
+ * A base element that displays a Media.
6
+ * @internal
7
+ * @param {MediaProps} MediaProps - The props necessary for the Media element.
8
+ * @see Preview
9
+ */
10
+ declare const Media: React.FC<MediaProps>;
11
+ export default Media;
@@ -0,0 +1,17 @@
1
+ import { ElementProps } from '../types';
2
+ import { MediaType } from '../../../../../constants';
3
+ export declare type MediaProps = ElementProps & {
4
+ /**
5
+ * The type of media to display. Can be image.
6
+ */
7
+ type?: MediaType;
8
+ /**
9
+ * The URL of the associated media to display.
10
+ */
11
+ url?: string;
12
+ /**
13
+ * Function to be called on error loading media.
14
+ * @internal
15
+ */
16
+ onError?: () => void;
17
+ };
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { TextProps } from './types';
4
+ /**
5
+ * A base element that displays some Text.
6
+ * @internal
7
+ * @param {TextProps} TextProps - The props necessary for the Text element.
8
+ * @see Title
9
+ */
10
+ declare const Text: React.FC<TextProps>;
11
+ export default Text;
@@ -0,0 +1,17 @@
1
+ import { ElementProps } from '../types';
2
+ import { MessageProps } from '../../types';
3
+ export declare type TextProps = ElementProps & {
4
+ /**
5
+ * Determines the formatted message (i18n) to display.
6
+ * If this is provided, the content prop will not be displayed.
7
+ */
8
+ message?: MessageProps;
9
+ /**
10
+ * The raw text content to display.
11
+ */
12
+ content?: string;
13
+ /**
14
+ * The maximum number of lines the text should span over. Maximum is 2.
15
+ */
16
+ maxLines?: number;
17
+ };
@@ -0,0 +1,24 @@
1
+ import { SerializedStyles } from '@emotion/core';
2
+ import { ElementName, SmartLinkSize } from '../../../../constants';
3
+ export declare type ElementProps = {
4
+ /**
5
+ * Name of the element, can be used as a selector.
6
+ * E.g. [data-smart-element="Provider"]
7
+ * @internal
8
+ */
9
+ name?: ElementName;
10
+ /**
11
+ * Any additional CSS properties to apply to the element.
12
+ */
13
+ overrideCss?: SerializedStyles;
14
+ /**
15
+ * The size of the element to display.
16
+ */
17
+ size?: SmartLinkSize;
18
+ /**
19
+ * A `testId` prop is provided for specified elements, which is a unique
20
+ * string that appears as a data attribute `data-testid` in the rendered code,
21
+ * serving as a hook for automated tests
22
+ */
23
+ testId?: string;
24
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ElementName } from '../../../../constants';
3
+ export declare const createElement: <P extends {}>(name: ElementName) => React.FC<P>;
@@ -0,0 +1,6 @@
1
+ import { MessageDescriptor } from 'react-intl-next';
2
+ export declare type AnchorTarget = '_blank' | '_self' | '_top' | '_parent';
3
+ export declare type MessageProps = {
4
+ descriptor: MessageDescriptor;
5
+ values?: Record<string, string>;
6
+ };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { SerializedStyles } from '@emotion/core';
3
+ import { Spacing } from '@atlaskit/button';
4
+ import { SmartLinkSize } from '../../../constants';
5
+ import { MessageProps } from './types';
6
+ export declare const sizeToButtonSpacing: Record<SmartLinkSize, Spacing>;
7
+ export declare const getFormattedMessage: (message?: MessageProps | undefined) => JSX.Element | undefined;
8
+ export declare const getIconSizeStyles: (width: string) => SerializedStyles;
9
+ export declare const getIconWidth: (size?: SmartLinkSize | undefined) => string;
10
+ export declare const getLinkLineHeight: (size: SmartLinkSize) => string;
11
+ export declare const getLinkSizeStyles: (size: SmartLinkSize) => SerializedStyles;
12
+ export declare const getMaxLineHeight: (size: SmartLinkSize) => 1.5 | 1.75;
13
+ export declare const getMaxLines: (value: number, defaultValue: number, max: number, min: number) => number;
14
+ export declare const getTruncateStyles: (maxLines: number, lineHeight?: string, wordBreak?: 'break-word' | 'break-all') => SerializedStyles;
15
+ export declare const hasWhiteSpace: (str: string) => boolean;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { FlexibleCardProps } from './types';
3
+ /**
4
+ * This represents a Flexible Card: a link represented by a card with metadata.
5
+ * This is the container in which all Flexible UI Blocks and Elements exist.
6
+ * Note: TitleBlock is mandatory for a Flexible Card to render.
7
+ * @see Container
8
+ */
9
+ declare const FlexibleCard: React.FC<FlexibleCardProps>;
10
+ export default FlexibleCard;
@@ -0,0 +1,113 @@
1
+ /// <reference types="react" />
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ import { CardState } from '@atlaskit/linking-common';
4
+ import { CardProviderRenderers } from '@atlaskit/link-provider';
5
+ import { SmartLinkSize, SmartLinkTheme } from '../../constants';
6
+ import { CardAppearance } from '../../view/Card';
7
+ import { OnResolveCallback } from '../Card/types';
8
+ import { OnErrorCallback } from '../types';
9
+ export declare type FlexibleCardProps = {
10
+ /**
11
+ * @internal A unique ID for a Smart Link.
12
+ */
13
+ id?: string;
14
+ /**
15
+ * Determines the appearance of the Smart Link.
16
+ * @internal
17
+ */
18
+ appearance?: CardAppearance;
19
+ /**
20
+ * Determines the status and data of the Smart Link.
21
+ * @internal
22
+ */
23
+ cardState: CardState;
24
+ /**
25
+ * The Flexible UI block component(s) to be rendered.
26
+ * The minimum is a TitleBlock.
27
+ */
28
+ children: React.ReactNode;
29
+ /**
30
+ * Determines the onClick behaviour of Flexible UI. This will proxy to the
31
+ * TitleBlock if supplied.
32
+ */
33
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
34
+ /**
35
+ * An additional action that can be performed when link is not resolved, e.g.
36
+ * connect account to gain access to 403 link.
37
+ * @internal
38
+ */
39
+ onAuthorize?: () => void;
40
+ /**
41
+ * function to be called after a flexible card has rendered its error states
42
+ */
43
+ onError?: OnErrorCallback;
44
+ /**
45
+ * function to be called after a flexible card has rendered its resolved state
46
+ */
47
+ onResolve?: OnResolveCallback;
48
+ /**
49
+ * Any additional renderers required by Flexible UI. Currently used by icon
50
+ * to render Emoji.
51
+ */
52
+ renderers?: CardProviderRenderers;
53
+ /**
54
+ * A `testId` prop is provided for specified elements, which is a unique
55
+ * string that appears as a data attribute `data-testid` in the rendered code,
56
+ * serving as a hook for automated tests
57
+ */
58
+ testId?: string;
59
+ /**
60
+ * Determines the appearance of Flexible UI.
61
+ * @see FlexibleUiOptions
62
+ */
63
+ ui?: FlexibleUiOptions;
64
+ /**
65
+ * Determines the URL of the Smart Link.
66
+ */
67
+ url: string;
68
+ };
69
+ export declare type FlexibleUiOptions = {
70
+ /**
71
+ * Determines whether the entire Smart Link container should be clickable.
72
+ */
73
+ clickableContainer?: boolean;
74
+ /**
75
+ * Determines whether to hide elevation styling.
76
+ */
77
+ hideElevation?: boolean;
78
+ /**
79
+ * Determines whether to hide css padding styling.
80
+ */
81
+ hidePadding?: boolean;
82
+ /**
83
+ * Determines whether to hide css background color styling.
84
+ */
85
+ hideBackground?: boolean;
86
+ /**
87
+ * Determines the default padding and sizing of the underlying blocks and
88
+ * elements within Flexible UI.
89
+ */
90
+ size?: SmartLinkSize;
91
+ /**
92
+ * Determines the default theme of the Flexible UI.
93
+ * Can be Black or Link (default URL blue)
94
+ */
95
+ theme?: SmartLinkTheme;
96
+ };
97
+ /**
98
+ * Retry options used if Smart Link resolves to an errored state.
99
+ */
100
+ export declare type RetryOptions = {
101
+ /**
102
+ * Determines the error message to show.
103
+ */
104
+ descriptor?: MessageDescriptor;
105
+ /**
106
+ * Determines the onClick behaviour of the error message.
107
+ */
108
+ onClick?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
109
+ /**
110
+ * A list of optional value pairs for string interpolation in the message.
111
+ */
112
+ values?: Record<string, string>;
113
+ };
@@ -0,0 +1,7 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import { CardProviderRenderers } from '@atlaskit/link-provider';
3
+ import { RetryOptions } from './types';
4
+ import { SmartLinkStatus } from '../../constants';
5
+ import { FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
6
+ export declare const getContextByStatus: (url: string, status?: SmartLinkStatus | undefined, details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined, renderers?: CardProviderRenderers | undefined) => FlexibleUiDataContext | undefined;
7
+ export declare const getRetryOptions: (url: string, status?: SmartLinkStatus | undefined, details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined, onAuthorize?: (() => void) | undefined) => RetryOptions | undefined;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { HoverCardComponentProps } from '../types';
3
+ export declare const hoverCardClassName = "smart-links-hover-preview";
4
+ export declare const HoverCardComponent: FC<HoverCardComponentProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { AnalyticsFacade } from '../../../state/analytics';
3
+ import { LinkAction } from '../../../state/hooks-external/useSmartLinkActions';
4
+ import { ActionItem } from '../../FlexibleCard/components/blocks/types';
5
+ import { HoverCardContentProps } from '../types';
6
+ export declare const getOpenAction: (url: string, analytics: AnalyticsFacade, onActionClick?: ((actionId: string) => void) | undefined) => ActionItem;
7
+ export declare const toFooterActions: (cardActions: LinkAction[], onActionClick?: ((actionId: string) => void) | undefined) => ActionItem[];
8
+ declare const HoverCardContent: React.FC<HoverCardContentProps>;
9
+ export default HoverCardContent;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { HoverCardLoadingViewProps } from '../types';
3
+ declare const HoverCardLoadingView: React.FC<HoverCardLoadingViewProps>;
4
+ export default HoverCardLoadingView;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SnippetOrPreviewProps } from '../types';
3
+ declare const SnippetOrPreview: React.FC<SnippetOrPreviewProps>;
4
+ export default SnippetOrPreview;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { HoverCardProps } from './types';
3
+ export declare const HoverCard: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "id" | "analyticsContext" | "key"> & import("react").RefAttributes<any>>;
@@ -0,0 +1,12 @@
1
+ import { FlexibleUiOptions } from '../FlexibleCard/types';
2
+ export declare const flexibleUiOptions: FlexibleUiOptions;
3
+ export declare const CARD_WIDTH_REM = 24;
4
+ export declare const CARD_GAP_PX = 10;
5
+ export declare const HoverCardContainer: import("@emotion/utils").SerializedStyles;
6
+ export declare const titleBlockCss: import("@emotion/utils").SerializedStyles;
7
+ export declare const metadataBlockCss: import("@emotion/utils").SerializedStyles;
8
+ export declare const footerBlockCss: import("@emotion/utils").SerializedStyles;
9
+ export declare const loadingViewContainer: import("@emotion/utils").SerializedStyles;
10
+ export declare const skeletonContainer: import("@emotion/utils").SerializedStyles;
11
+ export declare const hiddenSnippetStyles: import("@emotion/utils").SerializedStyles;
12
+ export declare const getTransitionStyles: (snippetHeight: number) => import("@emotion/utils").SerializedStyles;
@@ -0,0 +1,45 @@
1
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
2
+ import { ElementItem } from '../FlexibleCard/components/blocks/types';
3
+ import { AnalyticsFacade } from '../../state/analytics';
4
+ import { LinkAction } from '../../state/hooks-external/useSmartLinkActions';
5
+ import { CardState } from '@atlaskit/linking-common';
6
+ import { CardProviderRenderers } from '@atlaskit/link-provider';
7
+ import { AnalyticsHandler } from '../../utils/types';
8
+ import { ReactElement } from 'react';
9
+ import { TitleBlockProps } from '../FlexibleCard/components/blocks/title-block/types';
10
+ import { FlexibleCardProps } from '../FlexibleCard/types';
11
+ import { JsonLd } from 'json-ld-types';
12
+ export interface HoverCardProps extends WithAnalyticsEventsProps {
13
+ id?: string;
14
+ url: string;
15
+ children: ReactElement;
16
+ }
17
+ export interface HoverCardComponentProps extends HoverCardProps {
18
+ analyticsHandler: AnalyticsHandler;
19
+ analytics: AnalyticsFacade;
20
+ }
21
+ export declare type PreviewDisplay = 'card' | 'embed';
22
+ export declare type PreviewInvokeMethod = 'keyboard' | 'mouse_hover' | 'mouse_click';
23
+ export interface MetadataOptions {
24
+ primary: Array<ElementItem>;
25
+ secondary: Array<ElementItem>;
26
+ subtitle: Array<ElementItem>;
27
+ }
28
+ export declare type HoverCardContentProps = {
29
+ id?: string;
30
+ analytics: AnalyticsFacade;
31
+ cardActions?: LinkAction[];
32
+ cardState: CardState;
33
+ renderers?: CardProviderRenderers;
34
+ onActionClick: (actionId: string) => void;
35
+ onResolve: () => void;
36
+ url: string;
37
+ };
38
+ export declare type HoverCardLoadingViewProps = {
39
+ flexibleCardProps: FlexibleCardProps;
40
+ titleBlockProps: TitleBlockProps;
41
+ };
42
+ export declare type SnippetOrPreviewProps = {
43
+ data: JsonLd.Data.BaseData;
44
+ snippetHeight: number;
45
+ };
@@ -0,0 +1,3 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ export declare const SMART_CARD_ANALYTICS_DISPLAY = "flexible";
3
+ export declare const getSimulatedMetadata: (extensionKey?: string, types?: JsonLd.Primitives.ObjectType[]) => JsonLd.Primitives.Property<any>;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface InlineCardErroredViewProps {
3
+ /** The url to display */
4
+ url: string;
5
+ /** The error message to display */
6
+ message: string;
7
+ /** The optional click handler */
8
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
9
+ /** What to do when a user clicks "Try again" button */
10
+ onRetry?: () => void;
11
+ /** A flag that determines whether the card is selected in edit mode. */
12
+ isSelected?: boolean;
13
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
14
+ testId?: string;
15
+ icon?: React.ReactNode;
16
+ }
17
+ export declare class InlineCardErroredView extends React.Component<InlineCardErroredViewProps> {
18
+ handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
19
+ renderMessage: () => JSX.Element;
20
+ render(): JSX.Element;
21
+ }
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { RequestAccessContextProps } from '../../types';
3
+ export interface InlineCardForbiddenViewProps {
4
+ /** The url to display */
5
+ url: string;
6
+ /** The icon of the service (e.g. Dropbox/Asana/Google/etc) to display */
7
+ icon?: React.ReactNode;
8
+ /** The name of the service (e.g. Jira/Confluence/Asana/etc) to display */
9
+ context?: string;
10
+ /** The optional click handler */
11
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
12
+ /** The optional handler for "Connect" button */
13
+ onAuthorise?: () => void;
14
+ /** A flag that determines whether the card is selected in edit mode. */
15
+ isSelected?: boolean;
16
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
17
+ testId?: string;
18
+ requestAccessContext?: RequestAccessContextProps;
19
+ }
20
+ export declare class InlineCardForbiddenView extends React.Component<InlineCardForbiddenViewProps> {
21
+ handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
22
+ renderForbiddenAccessMessage: () => JSX.Element;
23
+ renderMessage: () => JSX.Element;
24
+ render(): JSX.Element;
25
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface FrameViewProps {
3
+ /** A flag that determines whether the card is selected in edit mode. */
4
+ isSelected?: boolean;
5
+ /** A flag that determines whether the card needs a backgorund or not */
6
+ withoutBackground?: boolean;
7
+ withoutHover?: boolean;
8
+ children?: React.ReactNode;
9
+ link?: string;
10
+ /** The optional click handler */
11
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
12
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
13
+ testId?: string;
14
+ className?: string;
15
+ }
16
+ export declare const Frame: React.FC<FrameViewProps>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface WrapperProps {
3
+ isSelected?: boolean;
4
+ isInteractive?: boolean;
5
+ withoutHover?: boolean;
6
+ withoutBackground?: boolean;
7
+ }
8
+ export declare const Wrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, WrapperProps, object>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const Icon: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, Pick<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement>, keyof import("react").ImgHTMLAttributes<HTMLImageElement>>, object>;
3
+ export declare const AKIconWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
4
+ export declare const Shimmer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface IconAndTitleLayoutProps {
3
+ emoji?: React.ReactNode;
4
+ icon?: React.ReactNode;
5
+ title: React.ReactNode;
6
+ right?: React.ReactNode;
7
+ titleColor?: string;
8
+ titleTextColor?: string;
9
+ children?: React.ReactNode;
10
+ defaultIcon?: React.ReactNode;
11
+ testId?: string;
12
+ }
13
+ export declare class IconAndTitleLayout extends React.Component<IconAndTitleLayoutProps> {
14
+ private renderAtlaskitIcon;
15
+ private renderImageIcon;
16
+ private renderIconPlaceholder;
17
+ renderIcon(testId: string): JSX.Element;
18
+ render(): JSX.Element;
19
+ }