@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 22.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+ - Updated dependencies
9
+
10
+ ## 22.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`9a0c1c39d27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9a0c1c39d27) - Rethrow errors from child component of smart-card so all non API errors will be handed to parent of smart-card
15
+
3
16
  ## 22.1.2
4
17
 
5
18
  ### Patch Changes
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/client/index.js",
5
5
  "module:es2019": "../dist/es2019/client/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/client/index.d.ts"
7
+ "types": "../dist/types/client/index.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/client/index.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -93,7 +93,8 @@ exports.isAccessible = isAccessible;
93
93
  var isVisible = function isVisible(_ref2) {
94
94
  var visibility = _ref2.meta.visibility;
95
95
  return visibility === 'restricted' || visibility === 'public';
96
- };
96
+ }; // Be aware, this is a copy of a function in link-provider/src/helpers
97
+
97
98
 
98
99
  exports.isVisible = isVisible;
99
100
 
@@ -23,15 +23,27 @@ function usePrefetch(url) {
23
23
  prefetchStore = _useSmartLinkContext.prefetchStore,
24
24
  connections = _useSmartLinkContext.connections;
25
25
 
26
- var dispatch = store.dispatch,
27
- getState = store.getState;
28
- var client = connections.client;
26
+ var _ref = store || {},
27
+ dispatch = _ref.dispatch,
28
+ getState = _ref.getState;
29
+
30
+ var _ref2 = connections || {},
31
+ client = _ref2.client;
32
+
29
33
  return (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
30
34
  var isPrefetching, isFetching, needsPrefetch, response;
31
35
  return _regenerator.default.wrap(function _callee$(_context) {
32
36
  while (1) {
33
37
  switch (_context.prev = _context.next) {
34
38
  case 0:
39
+ if (!(!store || !prefetchStore || !connections)) {
40
+ _context.next = 2;
41
+ break;
42
+ }
43
+
44
+ return _context.abrupt("return");
45
+
46
+ case 2:
35
47
  // If the link is already being prefetched, the prefetch store
36
48
  // should have a flag set against the URL. The prefetch store is purposefully
37
49
  // separate from the UI in order to ensure no rendering takes place;
@@ -45,7 +57,7 @@ function usePrefetch(url) {
45
57
  needsPrefetch = !isPrefetching && !isFetching;
46
58
 
47
59
  if (!needsPrefetch) {
48
- _context.next = 14;
60
+ _context.next = 16;
49
61
  break;
50
62
  }
51
63
 
@@ -57,11 +69,11 @@ function usePrefetch(url) {
57
69
  // requests by domain (as usual) to ensure we minimize the amount of connections
58
70
  // we create between browser -> ORS when making network requests.
59
71
 
60
- _context.prev = 5;
61
- _context.next = 8;
72
+ _context.prev = 7;
73
+ _context.next = 10;
62
74
  return client.prefetchData(url);
63
75
 
64
- case 8:
76
+ case 10:
65
77
  response = _context.sent;
66
78
 
67
79
  // Once the data comes back, we put the link in the `resolved` status. This ensures
@@ -80,18 +92,18 @@ function usePrefetch(url) {
80
92
  }, undefined, undefined, 'resolved'));
81
93
  }
82
94
 
83
- _context.next = 14;
95
+ _context.next = 16;
84
96
  break;
85
97
 
86
- case 12:
87
- _context.prev = 12;
88
- _context.t0 = _context["catch"](5);
89
-
90
98
  case 14:
99
+ _context.prev = 14;
100
+ _context.t0 = _context["catch"](7);
101
+
102
+ case 16:
91
103
  case "end":
92
104
  return _context.stop();
93
105
  }
94
106
  }
95
- }, _callee, null, [[5, 12]]);
96
- })), [prefetchStore, url, getState, client, dispatch]);
107
+ }, _callee, null, [[7, 14]]);
108
+ })), [store, prefetchStore, connections, url, getState, client, dispatch]);
97
109
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "22.1.2",
3
+ "version": "22.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -83,16 +83,12 @@ function CardWithURLRenderer(props) {
83
83
  }, [appearance, createAnalyticsEvent]);
84
84
  var analytics = (0, _analytics2.useSmartLinkAnalytics)(url !== null && url !== void 0 ? url : '', dispatchAnalytics, id);
85
85
  var logError = (0, _react.useCallback)(function (error, info) {
86
- var componentStack = info.componentStack; // NB: APIErrors are thrown in response to Object Resolver Service.
87
- // In these cases, control is handed back to the Editor. We do not
86
+ var componentStack = info.componentStack; // NB: APIErrors are thrown in response to Object Resolver Service. We do not
88
87
  // fire an event for these, as they do not cover failed UI render events.
88
+ // The rest of the errors caught here are unexpected, and correlate
89
+ // to the reliability of the smart-card front-end components.
89
90
 
90
- if (error.name === 'APIError') {
91
- throw error;
92
- } // NB: the rest of the errors caught here are unexpected, and correlate
93
- // to the reliability of the smart-card front-end components. We instrument
94
- // these in order to measure our front-end reliability.
95
- else {
91
+ if (error.name !== 'APIError') {
96
92
  var errorInfo = {
97
93
  componentStack: componentStack
98
94
  };
@@ -102,7 +98,11 @@ function CardWithURLRenderer(props) {
102
98
  error: error,
103
99
  errorInfo: errorInfo
104
100
  });
105
- }
101
+ } // Rethrow to hand control to the consumer of Smart-card.
102
+ // In the case of editor this allows the Smart Link to fallback to a blue link.
103
+
104
+
105
+ throw error;
106
106
  }, [analytics.ui, appearance, id]);
107
107
 
108
108
  if (!url) {
@@ -140,5 +140,5 @@ function CardWithURLRenderer(props) {
140
140
  }
141
141
 
142
142
  var ErrorFallback = function ErrorFallback() {
143
- return /*#__PURE__*/_react.default.createElement("span", null);
143
+ return null;
144
144
  };
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
11
 
14
12
  var _core = require("@emotion/core");
@@ -33,9 +31,7 @@ var EmbedContent = function EmbedContent(_ref) {
33
31
  src: src,
34
32
  'data-testid': "".concat(testId, "-embed")
35
33
  };
36
- return src ? (0, _core.jsx)("iframe", (0, _extends2.default)({
37
- src: src
38
- }, props)) : (0, _core.jsx)("iframe", props);
34
+ return (0, _core.jsx)("iframe", props);
39
35
  };
40
36
 
41
37
  var _default = EmbedContent;
@@ -55,7 +55,8 @@ export const isVisible = ({
55
55
  meta: {
56
56
  visibility
57
57
  }
58
- }) => visibility === 'restricted' || visibility === 'public';
58
+ }) => visibility === 'restricted' || visibility === 'public'; // Be aware, this is a copy of a function in link-provider/src/helpers
59
+
59
60
  export const getStatus = ({
60
61
  meta
61
62
  }) => {
@@ -10,15 +10,20 @@ export function usePrefetch(url) {
10
10
  const {
11
11
  dispatch,
12
12
  getState
13
- } = store;
13
+ } = store || {};
14
14
  const {
15
15
  client
16
- } = connections;
16
+ } = connections || {};
17
17
  return useCallback(async () => {
18
- // If the link is already being prefetched, the prefetch store
18
+ // If smartlink context props are undefined do nothing.
19
+ if (!store || !prefetchStore || !connections) {
20
+ return;
21
+ } // If the link is already being prefetched, the prefetch store
19
22
  // should have a flag set against the URL. The prefetch store is purposefully
20
23
  // separate from the UI in order to ensure no rendering takes place;
21
24
  // all mutations which occur are purely store-based mutations.
25
+
26
+
22
27
  const isPrefetching = prefetchStore[url]; // If the link has already been registered in the store, then it no
23
28
  // longer needs to be prefetched, as the normal flow of a link being in
24
29
  // the viewport and being fetched is now in motion.
@@ -59,5 +64,5 @@ export function usePrefetch(url) {
59
64
  // mutations yet, the link will behave like a 'brand new' link.
60
65
  }
61
66
  }
62
- }, [prefetchStore, url, getState, client, dispatch]);
67
+ }, [store, prefetchStore, connections, url, getState, client, dispatch]);
63
68
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "22.1.2",
3
+ "version": "22.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -55,16 +55,12 @@ export function CardWithURLRenderer(props) {
55
55
  const logError = useCallback((error, info) => {
56
56
  const {
57
57
  componentStack
58
- } = info; // NB: APIErrors are thrown in response to Object Resolver Service.
59
- // In these cases, control is handed back to the Editor. We do not
58
+ } = info; // NB: APIErrors are thrown in response to Object Resolver Service. We do not
60
59
  // fire an event for these, as they do not cover failed UI render events.
60
+ // The rest of the errors caught here are unexpected, and correlate
61
+ // to the reliability of the smart-card front-end components.
61
62
 
62
- if (error.name === 'APIError') {
63
- throw error;
64
- } // NB: the rest of the errors caught here are unexpected, and correlate
65
- // to the reliability of the smart-card front-end components. We instrument
66
- // these in order to measure our front-end reliability.
67
- else {
63
+ if (error.name !== 'APIError') {
68
64
  const errorInfo = {
69
65
  componentStack
70
66
  };
@@ -74,7 +70,11 @@ export function CardWithURLRenderer(props) {
74
70
  error,
75
71
  errorInfo
76
72
  });
77
- }
73
+ } // Rethrow to hand control to the consumer of Smart-card.
74
+ // In the case of editor this allows the Smart Link to fallback to a blue link.
75
+
76
+
77
+ throw error;
78
78
  }, [analytics.ui, appearance, id]);
79
79
 
80
80
  if (!url) {
@@ -112,5 +112,5 @@ export function CardWithURLRenderer(props) {
112
112
  }
113
113
 
114
114
  const ErrorFallback = () => {
115
- return /*#__PURE__*/React.createElement("span", null);
115
+ return null;
116
116
  };
@@ -1,5 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
-
3
1
  /** @jsx jsx */
4
2
  import { css, jsx } from '@emotion/core';
5
3
  import { getIframeSandboxAttribute } from '../../../../utils';
@@ -23,9 +21,7 @@ const EmbedContent = ({
23
21
  src,
24
22
  'data-testid': `${testId}-embed`
25
23
  };
26
- return src ? jsx("iframe", _extends({
27
- src: src
28
- }, props)) : jsx("iframe", props);
24
+ return jsx("iframe", props);
29
25
  };
30
26
 
31
27
  export default EmbedContent;
@@ -55,7 +55,8 @@ export var isAccessible = function isAccessible(_ref) {
55
55
  export var isVisible = function isVisible(_ref2) {
56
56
  var visibility = _ref2.meta.visibility;
57
57
  return visibility === 'restricted' || visibility === 'public';
58
- };
58
+ }; // Be aware, this is a copy of a function in link-provider/src/helpers
59
+
59
60
  export var getStatus = function getStatus(_ref3) {
60
61
  var meta = _ref3.meta;
61
62
  var access = meta.access,
@@ -9,15 +9,27 @@ export function usePrefetch(url) {
9
9
  prefetchStore = _useSmartLinkContext.prefetchStore,
10
10
  connections = _useSmartLinkContext.connections;
11
11
 
12
- var dispatch = store.dispatch,
13
- getState = store.getState;
14
- var client = connections.client;
12
+ var _ref = store || {},
13
+ dispatch = _ref.dispatch,
14
+ getState = _ref.getState;
15
+
16
+ var _ref2 = connections || {},
17
+ client = _ref2.client;
18
+
15
19
  return useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
16
20
  var isPrefetching, isFetching, needsPrefetch, response;
17
21
  return _regeneratorRuntime.wrap(function _callee$(_context) {
18
22
  while (1) {
19
23
  switch (_context.prev = _context.next) {
20
24
  case 0:
25
+ if (!(!store || !prefetchStore || !connections)) {
26
+ _context.next = 2;
27
+ break;
28
+ }
29
+
30
+ return _context.abrupt("return");
31
+
32
+ case 2:
21
33
  // If the link is already being prefetched, the prefetch store
22
34
  // should have a flag set against the URL. The prefetch store is purposefully
23
35
  // separate from the UI in order to ensure no rendering takes place;
@@ -31,7 +43,7 @@ export function usePrefetch(url) {
31
43
  needsPrefetch = !isPrefetching && !isFetching;
32
44
 
33
45
  if (!needsPrefetch) {
34
- _context.next = 14;
46
+ _context.next = 16;
35
47
  break;
36
48
  }
37
49
 
@@ -43,11 +55,11 @@ export function usePrefetch(url) {
43
55
  // requests by domain (as usual) to ensure we minimize the amount of connections
44
56
  // we create between browser -> ORS when making network requests.
45
57
 
46
- _context.prev = 5;
47
- _context.next = 8;
58
+ _context.prev = 7;
59
+ _context.next = 10;
48
60
  return client.prefetchData(url);
49
61
 
50
- case 8:
62
+ case 10:
51
63
  response = _context.sent;
52
64
 
53
65
  // Once the data comes back, we put the link in the `resolved` status. This ensures
@@ -66,18 +78,18 @@ export function usePrefetch(url) {
66
78
  }, undefined, undefined, 'resolved'));
67
79
  }
68
80
 
69
- _context.next = 14;
81
+ _context.next = 16;
70
82
  break;
71
83
 
72
- case 12:
73
- _context.prev = 12;
74
- _context.t0 = _context["catch"](5);
75
-
76
84
  case 14:
85
+ _context.prev = 14;
86
+ _context.t0 = _context["catch"](7);
87
+
88
+ case 16:
77
89
  case "end":
78
90
  return _context.stop();
79
91
  }
80
92
  }
81
- }, _callee, null, [[5, 12]]);
82
- })), [prefetchStore, url, getState, client, dispatch]);
93
+ }, _callee, null, [[7, 14]]);
94
+ })), [store, prefetchStore, connections, url, getState, client, dispatch]);
83
95
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "22.1.2",
3
+ "version": "22.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -59,16 +59,12 @@ export function CardWithURLRenderer(props) {
59
59
  }, [appearance, createAnalyticsEvent]);
60
60
  var analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', dispatchAnalytics, id);
61
61
  var logError = useCallback(function (error, info) {
62
- var componentStack = info.componentStack; // NB: APIErrors are thrown in response to Object Resolver Service.
63
- // In these cases, control is handed back to the Editor. We do not
62
+ var componentStack = info.componentStack; // NB: APIErrors are thrown in response to Object Resolver Service. We do not
64
63
  // fire an event for these, as they do not cover failed UI render events.
64
+ // The rest of the errors caught here are unexpected, and correlate
65
+ // to the reliability of the smart-card front-end components.
65
66
 
66
- if (error.name === 'APIError') {
67
- throw error;
68
- } // NB: the rest of the errors caught here are unexpected, and correlate
69
- // to the reliability of the smart-card front-end components. We instrument
70
- // these in order to measure our front-end reliability.
71
- else {
67
+ if (error.name !== 'APIError') {
72
68
  var errorInfo = {
73
69
  componentStack: componentStack
74
70
  };
@@ -78,7 +74,11 @@ export function CardWithURLRenderer(props) {
78
74
  error: error,
79
75
  errorInfo: errorInfo
80
76
  });
81
- }
77
+ } // Rethrow to hand control to the consumer of Smart-card.
78
+ // In the case of editor this allows the Smart Link to fallback to a blue link.
79
+
80
+
81
+ throw error;
82
82
  }, [analytics.ui, appearance, id]);
83
83
 
84
84
  if (!url) {
@@ -116,5 +116,5 @@ export function CardWithURLRenderer(props) {
116
116
  }
117
117
 
118
118
  var ErrorFallback = function ErrorFallback() {
119
- return /*#__PURE__*/React.createElement("span", null);
119
+ return null;
120
120
  };
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
2
 
4
3
  var _templateObject;
@@ -22,9 +21,7 @@ var EmbedContent = function EmbedContent(_ref) {
22
21
  src: src,
23
22
  'data-testid': "".concat(testId, "-embed")
24
23
  };
25
- return src ? jsx("iframe", _extends({
26
- src: src
27
- }, props)) : jsx("iframe", props);
24
+ return jsx("iframe", props);
28
25
  };
29
26
 
30
27
  export default EmbedContent;
@@ -142,7 +142,7 @@ export declare const TEST_DATA_WITH_LATEST_COMMIT_OBJ: {
142
142
  };
143
143
  '@context': JsonLd.Primitives.Context;
144
144
  '@type': JsonLd.Primitives.Property<JsonLd.Primitives.ObjectType>;
145
- 'schema:potentialAction'?: import("schema-dts").DeleteAction | import("schema-dts").ViewAction | import("schema-dts").DownloadAction | import("schema-dts").WatchAction | import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | (import("schema-dts").DeleteAction | import("schema-dts").ViewAction | import("schema-dts").DownloadAction | import("schema-dts").WatchAction | import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction)[] | undefined;
145
+ 'schema:potentialAction'?: import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction | (import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction)[] | undefined;
146
146
  'atlassian:downloadUrl'?: string | undefined;
147
147
  'atlassian:visitUrl'?: string | undefined;
148
148
  'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
@@ -188,7 +188,7 @@ export declare const TEST_DATA_WITH_LATEST_COMMIT_TEXT: {
188
188
  'atlassian:latestCommit': string;
189
189
  '@context': JsonLd.Primitives.Context;
190
190
  '@type': JsonLd.Primitives.Property<JsonLd.Primitives.ObjectType>;
191
- 'schema:potentialAction'?: import("schema-dts").DeleteAction | import("schema-dts").ViewAction | import("schema-dts").DownloadAction | import("schema-dts").WatchAction | import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | (import("schema-dts").DeleteAction | import("schema-dts").ViewAction | import("schema-dts").DownloadAction | import("schema-dts").WatchAction | import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction)[] | undefined;
191
+ 'schema:potentialAction'?: import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction | (import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction)[] | undefined;
192
192
  'atlassian:downloadUrl'?: string | undefined;
193
193
  'atlassian:visitUrl'?: string | undefined;
194
194
  'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
@@ -0,0 +1,3 @@
1
+ import { FlexibleUiDataContext } from '../state/flexible-ui-context/types';
2
+ declare const context: FlexibleUiDataContext;
3
+ export default context;
@@ -0,0 +1,6 @@
1
+ export { InlineCardPageObject } from './page-objects/InlineCard';
2
+ export { BlockCardPageObject } from './page-objects/BlockCard';
3
+ export { EmbedCardPageObject } from './page-objects/EmbedCard';
4
+ export { inlineSmartLinkRendersTestCase } from './test-cases/inline';
5
+ export { blockSmartLinkRendersTestCase } from './test-cases/card';
6
+ export { embedSmartLinkRendersTestCase } from './test-cases/embed';
@@ -0,0 +1,16 @@
1
+ /// <reference types="cypress" />
2
+ import { InProductTestPageObject, CypressType } from '@atlaskit/in-product-testing';
3
+ import { CardType, CardAppearance } from '@atlaskit/linking-common';
4
+ export declare class BaseCardPageObject extends InProductTestPageObject {
5
+ protected cy: CypressType;
6
+ protected appearance: CardAppearance;
7
+ protected constructor(cy: CypressType, appearance: CardAppearance);
8
+ private static CARD_TIMEOUT;
9
+ private _toSelector;
10
+ expectCardReady(numOfCards?: number, status?: CardType): Cypress.Chainable<JQuery<HTMLElement>>;
11
+ expectCardNotExists(status?: CardType): Cypress.Chainable<JQuery<HTMLElement>>;
12
+ findCardNth(nth?: number, status?: CardType): Cypress.Chainable<JQuery<HTMLElement>>;
13
+ assertHrefRendered(url: string): Cypress.Chainable<JQuery<HTMLElement>>;
14
+ assertHrefNotRendered(url: string): Cypress.Chainable<JQuery<HTMLElement>>;
15
+ click(status?: CardType): Cypress.Chainable<JQuery<HTMLElement>>;
16
+ }
@@ -0,0 +1,6 @@
1
+ import { CypressType } from '@atlaskit/in-product-testing';
2
+ import { BaseCardPageObject } from './BaseCard';
3
+ export declare class BlockCardPageObject extends BaseCardPageObject {
4
+ protected cy: CypressType;
5
+ constructor(cy: CypressType);
6
+ }
@@ -0,0 +1,6 @@
1
+ import { CypressType } from '@atlaskit/in-product-testing';
2
+ import { BaseCardPageObject } from './BaseCard';
3
+ export declare class EmbedCardPageObject extends BaseCardPageObject {
4
+ protected cy: CypressType;
5
+ constructor(cy: CypressType);
6
+ }
@@ -0,0 +1,6 @@
1
+ import { CypressType } from '@atlaskit/in-product-testing';
2
+ import { BaseCardPageObject } from './BaseCard';
3
+ export declare class InlineCardPageObject extends BaseCardPageObject {
4
+ protected cy: CypressType;
5
+ constructor(cy: CypressType);
6
+ }
@@ -0,0 +1,3 @@
1
+ import { InProductTestCase } from '@atlaskit/in-product-testing';
2
+ import { SmartLinkTestCaseOpts } from './types';
3
+ export declare const blockSmartLinkRendersTestCase: ({ url, status, }: SmartLinkTestCaseOpts) => InProductTestCase;
@@ -0,0 +1,3 @@
1
+ import { InProductTestCase } from '@atlaskit/in-product-testing';
2
+ import { SmartLinkTestCaseOpts } from './types';
3
+ export declare const embedSmartLinkRendersTestCase: ({ url, status, }: SmartLinkTestCaseOpts) => InProductTestCase;
@@ -0,0 +1,3 @@
1
+ import { InProductTestCase } from '@atlaskit/in-product-testing';
2
+ import { SmartLinkTestCaseOpts } from './types';
3
+ export declare const inlineSmartLinkRendersTestCase: ({ url, status, }: SmartLinkTestCaseOpts) => InProductTestCase;
@@ -0,0 +1,5 @@
1
+ import { CardType } from '../../state';
2
+ export interface SmartLinkTestCaseOpts {
3
+ url: string;
4
+ status?: CardType;
5
+ }
@@ -0,0 +1,11 @@
1
+ export { contentFooterClassName } from './view/BlockCard/components/ContentFooter';
2
+ export { metadataListClassName } from './view/common/MetadataList';
3
+ export { blockCardResolvingViewClassName } from './view/BlockCard/views/ResolvingView';
4
+ export { blockCardResolvedViewClassName, blockCardResolvedViewByClassName, } from './view/BlockCard/views/ResolvedView';
5
+ export { blockCardForbiddenViewClassName, blockCardForbiddenViewLinkClassName, } from './view/BlockCard/views/ForbiddenView';
6
+ export { blockCardIconImageClassName } from './view/common/Icon';
7
+ export { blockCardContentClassName } from './view/BlockCard/components/Content';
8
+ export { blockCardContentHeaderClassName } from './view/BlockCard/components/ContentHeader';
9
+ export { blockCardContentHeaderNameClassName } from './view/BlockCard/components/Name';
10
+ export { blockCardNotFoundViewClassName } from './view/BlockCard/views/NotFoundView';
11
+ export { blockCardErroredViewClassName } from './view/BlockCard/views/ErroredView';
@@ -0,0 +1 @@
1
+ export { CardClient as default } from '@atlaskit/link-provider';