@atlaskit/smart-card 23.14.0 → 23.14.2

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 (672) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/__tests_external__/index.js +0 -6
  3. package/dist/cjs/__tests_external__/page-objects/BaseCard.js +6 -26
  4. package/dist/cjs/__tests_external__/page-objects/BlockCard.js +0 -15
  5. package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +0 -15
  6. package/dist/cjs/__tests_external__/page-objects/InlineCard.js +0 -15
  7. package/dist/cjs/__tests_external__/test-cases/card.js +2 -6
  8. package/dist/cjs/__tests_external__/test-cases/embed.js +1 -5
  9. package/dist/cjs/__tests_external__/test-cases/inline.js +2 -6
  10. package/dist/cjs/classNames.js +0 -11
  11. package/dist/cjs/client/index.js +0 -1
  12. package/dist/cjs/constants.js +1 -36
  13. package/dist/cjs/extractors/block/index.js +2 -29
  14. package/dist/cjs/extractors/common/actions/extractActions.js +2 -20
  15. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +18 -34
  16. package/dist/cjs/extractors/common/byline/extractByline.js +4 -15
  17. package/dist/cjs/extractors/common/context/extractAccessContext.js +2 -17
  18. package/dist/cjs/extractors/common/context/index.js +0 -1
  19. package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -7
  20. package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -7
  21. package/dist/cjs/extractors/common/detail/extractDownloadUrl.js +0 -2
  22. package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -7
  23. package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -7
  24. package/dist/cjs/extractors/common/detail/index.js +0 -5
  25. package/dist/cjs/extractors/common/icon/extractFileFormat.js +0 -2
  26. package/dist/cjs/extractors/common/icon/extractIcon.js +0 -26
  27. package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +2 -22
  28. package/dist/cjs/extractors/common/icon/extractIconFromTask.js +1 -28
  29. package/dist/cjs/extractors/common/icon/index.js +0 -4
  30. package/dist/cjs/extractors/common/lozenge/extractLozenge.js +0 -15
  31. package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +1 -6
  32. package/dist/cjs/extractors/common/lozenge/extractState.js +0 -5
  33. package/dist/cjs/extractors/common/lozenge/extractTag.js +0 -6
  34. package/dist/cjs/extractors/common/lozenge/extractTaskStatus.js +0 -3
  35. package/dist/cjs/extractors/common/lozenge/extractTaskType.js +0 -4
  36. package/dist/cjs/extractors/common/lozenge/index.js +0 -5
  37. package/dist/cjs/extractors/common/lozenge/utils.js +0 -2
  38. package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -2
  39. package/dist/cjs/extractors/common/primitives/extractSummary.js +0 -2
  40. package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +0 -7
  41. package/dist/cjs/extractors/common/primitives/extractVisitUrl.js +0 -2
  42. package/dist/cjs/extractors/common/primitives/index.js +0 -2
  43. package/dist/cjs/extractors/common/title-prefix/extractTitlePrefix.js +0 -6
  44. package/dist/cjs/extractors/common/title-prefix/index.js +0 -1
  45. package/dist/cjs/extractors/constants.js +2 -2
  46. package/dist/cjs/extractors/embed/index.js +0 -10
  47. package/dist/cjs/extractors/flexible/actions/extract-download-action.js +0 -6
  48. package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +0 -9
  49. package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -6
  50. package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +0 -4
  51. package/dist/cjs/extractors/flexible/extract-preview.js +0 -4
  52. package/dist/cjs/extractors/flexible/extract-priority.js +0 -7
  53. package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +0 -10
  54. package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +0 -25
  55. package/dist/cjs/extractors/flexible/icon/extract-icon-renderer.js +0 -5
  56. package/dist/cjs/extractors/flexible/icon/extract-jira-task-icon.js +0 -12
  57. package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -35
  58. package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +0 -11
  59. package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +0 -3
  60. package/dist/cjs/extractors/flexible/icon/index.js +4 -20
  61. package/dist/cjs/extractors/flexible/index.js +0 -17
  62. package/dist/cjs/extractors/flexible/latest-commit/index.js +0 -4
  63. package/dist/cjs/extractors/flexible/utils.js +0 -33
  64. package/dist/cjs/extractors/hover/extractMetadata.js +0 -5
  65. package/dist/cjs/extractors/index.js +4 -16
  66. package/dist/cjs/extractors/inline/index.js +0 -12
  67. package/dist/cjs/hooks.js +0 -2
  68. package/dist/cjs/hoverCard.js +0 -1
  69. package/dist/cjs/i18n/cs.js +0 -1
  70. package/dist/cjs/i18n/da.js +0 -1
  71. package/dist/cjs/i18n/de.js +0 -1
  72. package/dist/cjs/i18n/en.js +0 -1
  73. package/dist/cjs/i18n/en_GB.js +0 -1
  74. package/dist/cjs/i18n/en_ZZ.js +0 -1
  75. package/dist/cjs/i18n/es.js +0 -1
  76. package/dist/cjs/i18n/et.js +0 -1
  77. package/dist/cjs/i18n/fi.js +0 -1
  78. package/dist/cjs/i18n/fr.js +0 -1
  79. package/dist/cjs/i18n/hu.js +0 -1
  80. package/dist/cjs/i18n/index.js +0 -30
  81. package/dist/cjs/i18n/it.js +0 -1
  82. package/dist/cjs/i18n/ja.js +0 -1
  83. package/dist/cjs/i18n/ko.js +0 -1
  84. package/dist/cjs/i18n/nb.js +0 -1
  85. package/dist/cjs/i18n/nl.js +0 -1
  86. package/dist/cjs/i18n/pl.js +0 -1
  87. package/dist/cjs/i18n/pt_BR.js +0 -1
  88. package/dist/cjs/i18n/pt_PT.js +0 -1
  89. package/dist/cjs/i18n/ru.js +0 -1
  90. package/dist/cjs/i18n/sk.js +0 -1
  91. package/dist/cjs/i18n/sv.js +0 -1
  92. package/dist/cjs/i18n/th.js +0 -1
  93. package/dist/cjs/i18n/tr.js +0 -1
  94. package/dist/cjs/i18n/uk.js +0 -1
  95. package/dist/cjs/i18n/vi.js +0 -1
  96. package/dist/cjs/i18n/zh.js +0 -1
  97. package/dist/cjs/i18n/zh_TW.js +0 -1
  98. package/dist/cjs/in-product.js +0 -1
  99. package/dist/cjs/index.js +0 -12
  100. package/dist/cjs/linkUrl.js +0 -2
  101. package/dist/cjs/messages.js +0 -2
  102. package/dist/cjs/ssr.js +4 -23
  103. package/dist/cjs/state/actions/index.js +36 -76
  104. package/dist/cjs/state/analytics/index.js +0 -2
  105. package/dist/cjs/state/analytics/ufoExperiences.js +0 -11
  106. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +165 -205
  107. package/dist/cjs/state/config/index.js +0 -5
  108. package/dist/cjs/state/flexible-ui-context/index.js +1 -7
  109. package/dist/cjs/state/flexible-ui-context/utils.js +0 -2
  110. package/dist/cjs/state/helpers.js +3 -39
  111. package/dist/cjs/state/hooks/index.js +0 -2
  112. package/dist/cjs/state/hooks/usePrefetch.js +10 -31
  113. package/dist/cjs/state/hooks/useSmartLink.js +11 -23
  114. package/dist/cjs/state/hooks-external/useSmartLinkActions.js +12 -29
  115. package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -7
  116. package/dist/cjs/state/index.js +0 -3
  117. package/dist/cjs/state/renderers/index.js +0 -4
  118. package/dist/cjs/state/store/index.js +7 -15
  119. package/dist/cjs/utils/analytics/analytics.js +133 -197
  120. package/dist/cjs/utils/analytics/index.js +8 -18
  121. package/dist/cjs/utils/flexible.js +0 -20
  122. package/dist/cjs/utils/index.js +5 -54
  123. package/dist/cjs/utils/jsonld.js +0 -11
  124. package/dist/cjs/utils/mocks.js +0 -35
  125. package/dist/cjs/utils/performance.js +0 -23
  126. package/dist/cjs/utils/test-utils.js +0 -10
  127. package/dist/cjs/version.json +1 -1
  128. package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -6
  129. package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -15
  130. package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +0 -7
  131. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -30
  132. package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -11
  133. package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -14
  134. package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +0 -8
  135. package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -8
  136. package/dist/cjs/view/BlockCard/actions/flexible/RetryAction.js +0 -7
  137. package/dist/cjs/view/BlockCard/components/Action.js +8 -19
  138. package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -10
  139. package/dist/cjs/view/BlockCard/components/ActionList.js +1 -17
  140. package/dist/cjs/view/BlockCard/components/CollaboratorList.js +7 -14
  141. package/dist/cjs/view/BlockCard/components/Content.js +3 -7
  142. package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -7
  143. package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -6
  144. package/dist/cjs/view/BlockCard/components/Emoji.js +1 -6
  145. package/dist/cjs/view/BlockCard/components/Frame.js +10 -24
  146. package/dist/cjs/view/BlockCard/components/Link.js +4 -7
  147. package/dist/cjs/view/BlockCard/components/Name.js +5 -10
  148. package/dist/cjs/view/BlockCard/components/Provider.js +2 -8
  149. package/dist/cjs/view/BlockCard/components/Thumbnail.js +3 -15
  150. package/dist/cjs/view/BlockCard/components/UnresolvedText.js +2 -4
  151. package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +7 -19
  152. package/dist/cjs/view/BlockCard/index.js +17 -68
  153. package/dist/cjs/view/BlockCard/utils/handlers.js +0 -2
  154. package/dist/cjs/view/BlockCard/views/ErroredView.js +10 -36
  155. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +20 -42
  156. package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -36
  157. package/dist/cjs/view/BlockCard/views/ResolvedView.js +34 -57
  158. package/dist/cjs/view/BlockCard/views/ResolvingView.js +5 -16
  159. package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +15 -37
  160. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -23
  161. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +8 -31
  162. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -19
  163. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +16 -33
  164. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -30
  165. package/dist/cjs/view/Card/index.js +0 -20
  166. package/dist/cjs/view/CardWithData/component.js +7 -32
  167. package/dist/cjs/view/CardWithData/loader.js +9 -30
  168. package/dist/cjs/view/CardWithUrl/component-lazy/LazyFallback.js +2 -8
  169. package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -22
  170. package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -14
  171. package/dist/cjs/view/CardWithUrl/component-lazy/index.js +0 -6
  172. package/dist/cjs/view/CardWithUrl/component.js +35 -60
  173. package/dist/cjs/view/CardWithUrl/loader.js +31 -50
  174. package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +0 -22
  175. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +20 -29
  176. package/dist/cjs/view/EmbedCard/components/Frame.js +21 -48
  177. package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +14 -23
  178. package/dist/cjs/view/EmbedCard/components/ImageIcon.js +6 -14
  179. package/dist/cjs/view/EmbedCard/components/styled.js +1 -61
  180. package/dist/cjs/view/EmbedCard/index.js +18 -53
  181. package/dist/cjs/view/EmbedCard/views/ErroredView.js +6 -17
  182. package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +11 -26
  183. package/dist/cjs/view/EmbedCard/views/NotFoundView.js +6 -16
  184. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +13 -25
  185. package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +9 -24
  186. package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +8 -17
  187. package/dist/cjs/view/EmbedModal/components/analytics/index.js +5 -20
  188. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +3 -11
  189. package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +0 -8
  190. package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -32
  191. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +5 -11
  192. package/dist/cjs/view/EmbedModal/components/link-info/styled.js +0 -5
  193. package/dist/cjs/view/EmbedModal/index.js +24 -47
  194. package/dist/cjs/view/EmbedModal/types.js +0 -1
  195. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +8 -25
  196. package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -10
  197. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -15
  198. package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +5 -27
  199. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +13 -25
  200. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -42
  201. package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +5 -25
  202. package/dist/cjs/view/FlexibleCard/components/actions/index.js +4 -8
  203. package/dist/cjs/view/FlexibleCard/components/actions/utils.js +4 -43
  204. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -32
  205. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +13 -47
  206. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +11 -24
  207. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +12 -30
  208. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -26
  209. package/dist/cjs/view/FlexibleCard/components/blocks/index.js +0 -7
  210. package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -34
  211. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +4 -16
  212. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +10 -31
  213. package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -19
  214. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -31
  215. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +20 -52
  216. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +9 -21
  217. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -16
  218. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -44
  219. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -31
  220. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +5 -11
  221. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -9
  222. package/dist/cjs/view/FlexibleCard/components/container/index.js +29 -77
  223. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -13
  224. package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -25
  225. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +7 -28
  226. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +11 -30
  227. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +13 -35
  228. package/dist/cjs/view/FlexibleCard/components/elements/index.js +0 -28
  229. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +15 -37
  230. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -28
  231. package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +8 -18
  232. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +8 -20
  233. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -51
  234. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -39
  235. package/dist/cjs/view/FlexibleCard/index.js +13 -30
  236. package/dist/cjs/view/FlexibleCard/utils.js +0 -28
  237. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +20 -45
  238. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +13 -55
  239. package/dist/cjs/view/HoverCard/components/SnippetOrPreview.js +10 -26
  240. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +22 -46
  241. package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +0 -6
  242. package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -11
  243. package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +0 -5
  244. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +8 -30
  245. package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +0 -5
  246. package/dist/cjs/view/HoverCard/index.js +4 -15
  247. package/dist/cjs/view/HoverCard/styled.js +2 -11
  248. package/dist/cjs/view/HoverCard/utils.js +0 -21
  249. package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -37
  250. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +6 -46
  251. package/dist/cjs/view/InlineCard/Frame/index.js +11 -18
  252. package/dist/cjs/view/InlineCard/Frame/styled.js +1 -18
  253. package/dist/cjs/view/InlineCard/Icon.js +4 -13
  254. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +10 -48
  255. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +17 -34
  256. package/dist/cjs/view/InlineCard/ResolvedView/index.js +13 -37
  257. package/dist/cjs/view/InlineCard/ResolvingView/index.js +7 -27
  258. package/dist/cjs/view/InlineCard/ResolvingView/styled.js +0 -6
  259. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +10 -44
  260. package/dist/cjs/view/InlineCard/index.js +13 -43
  261. package/dist/cjs/view/InlineCard/styled.js +2 -15
  262. package/dist/cjs/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -30
  263. package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +5 -20
  264. package/dist/cjs/view/LinkUrl/index.js +10 -24
  265. package/dist/cjs/view/LinkView/index.js +0 -16
  266. package/dist/cjs/view/SmartLinkEvents/useSmartLinkEvents.js +0 -3
  267. package/dist/cjs/view/common/Byline.js +4 -8
  268. package/dist/cjs/view/common/Icon.js +6 -21
  269. package/dist/cjs/view/common/Metadata.js +4 -14
  270. package/dist/cjs/view/common/MetadataList.js +2 -9
  271. package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -14
  272. package/dist/cjs/view/common/utils.js +0 -7
  273. package/dist/es2019/__tests_external__/page-objects/BaseCard.js +6 -15
  274. package/dist/es2019/__tests_external__/page-objects/BlockCard.js +0 -1
  275. package/dist/es2019/__tests_external__/page-objects/EmbedCard.js +0 -1
  276. package/dist/es2019/__tests_external__/page-objects/InlineCard.js +0 -1
  277. package/dist/es2019/constants.js +11 -26
  278. package/dist/es2019/extractors/block/index.js +6 -12
  279. package/dist/es2019/extractors/common/actions/extractActions.js +4 -12
  280. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +14 -16
  281. package/dist/es2019/extractors/common/byline/extractByline.js +0 -2
  282. package/dist/es2019/extractors/common/context/extractAccessContext.js +10 -11
  283. package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -1
  284. package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -1
  285. package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -1
  286. package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -1
  287. package/dist/es2019/extractors/common/icon/extractIcon.js +0 -10
  288. package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +2 -11
  289. package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -12
  290. package/dist/es2019/extractors/common/lozenge/extractLozenge.js +0 -3
  291. package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -1
  292. package/dist/es2019/extractors/common/lozenge/extractState.js +0 -2
  293. package/dist/es2019/extractors/common/lozenge/extractTag.js +0 -3
  294. package/dist/es2019/extractors/common/lozenge/extractTaskStatus.js +0 -1
  295. package/dist/es2019/extractors/common/lozenge/extractTaskType.js +0 -1
  296. package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +0 -3
  297. package/dist/es2019/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
  298. package/dist/es2019/extractors/constants.js +2 -2
  299. package/dist/es2019/extractors/embed/index.js +2 -4
  300. package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -2
  301. package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -3
  302. package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -2
  303. package/dist/es2019/extractors/flexible/collaboratorGroup/index.js +0 -1
  304. package/dist/es2019/extractors/flexible/extract-preview.js +0 -2
  305. package/dist/es2019/extractors/flexible/extract-priority.js +0 -4
  306. package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +0 -9
  307. package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
  308. package/dist/es2019/extractors/flexible/icon/extract-icon-renderer.js +0 -4
  309. package/dist/es2019/extractors/flexible/icon/extract-jira-task-icon.js +0 -10
  310. package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +0 -18
  311. package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +0 -6
  312. package/dist/es2019/extractors/flexible/icon/extract-url-icon.js +0 -2
  313. package/dist/es2019/extractors/flexible/icon/index.js +4 -6
  314. package/dist/es2019/extractors/flexible/index.js +0 -3
  315. package/dist/es2019/extractors/flexible/latest-commit/index.js +0 -2
  316. package/dist/es2019/extractors/flexible/utils.js +0 -5
  317. package/dist/es2019/extractors/hover/extractMetadata.js +0 -3
  318. package/dist/es2019/extractors/index.js +0 -6
  319. package/dist/es2019/extractors/inline/index.js +0 -2
  320. package/dist/es2019/index.js +4 -4
  321. package/dist/es2019/ssr.js +2 -4
  322. package/dist/es2019/state/actions/index.js +25 -33
  323. package/dist/es2019/state/analytics/ufoExperiences.js +0 -1
  324. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +31 -46
  325. package/dist/es2019/state/config/index.js +0 -2
  326. package/dist/es2019/state/flexible-ui-context/index.js +1 -2
  327. package/dist/es2019/state/helpers.js +2 -11
  328. package/dist/es2019/state/hooks/usePrefetch.js +14 -15
  329. package/dist/es2019/state/hooks/useSmartLink.js +8 -7
  330. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -8
  331. package/dist/es2019/state/hooks-external/useSmartLinkReload.js +0 -1
  332. package/dist/es2019/state/store/index.js +6 -5
  333. package/dist/es2019/utils/analytics/analytics.js +46 -24
  334. package/dist/es2019/utils/analytics/index.js +8 -5
  335. package/dist/es2019/utils/flexible.js +0 -1
  336. package/dist/es2019/utils/index.js +0 -7
  337. package/dist/es2019/utils/jsonld.js +4 -2
  338. package/dist/es2019/utils/mocks.js +0 -3
  339. package/dist/es2019/utils/performance.js +0 -9
  340. package/dist/es2019/utils/test-utils.js +0 -2
  341. package/dist/es2019/version.json +1 -1
  342. package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -1
  343. package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -3
  344. package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -1
  345. package/dist/es2019/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
  346. package/dist/es2019/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
  347. package/dist/es2019/view/BlockCard/actions/flexible/RetryAction.js +1 -1
  348. package/dist/es2019/view/BlockCard/components/Action.js +0 -1
  349. package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -3
  350. package/dist/es2019/view/BlockCard/components/ActionList.js +0 -1
  351. package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -1
  352. package/dist/es2019/view/BlockCard/components/Frame.js +4 -2
  353. package/dist/es2019/view/BlockCard/components/Provider.js +0 -2
  354. package/dist/es2019/view/BlockCard/components/Thumbnail.js +4 -2
  355. package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +1 -4
  356. package/dist/es2019/view/BlockCard/index.js +1 -24
  357. package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -2
  358. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -2
  359. package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
  360. package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -2
  361. package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +2 -3
  362. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +0 -2
  363. package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -5
  364. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +0 -2
  365. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
  366. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -3
  367. package/dist/es2019/view/Card/index.js +0 -3
  368. package/dist/es2019/view/CardWithData/component.js +0 -6
  369. package/dist/es2019/view/CardWithData/loader.js +1 -10
  370. package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -4
  371. package/dist/es2019/view/CardWithUrl/component.js +10 -15
  372. package/dist/es2019/view/CardWithUrl/loader.js +8 -13
  373. package/dist/es2019/view/EmbedCard/EmbedResizeMessageListener.js +0 -8
  374. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -6
  375. package/dist/es2019/view/EmbedCard/components/Frame.js +1 -11
  376. package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +4 -6
  377. package/dist/es2019/view/EmbedCard/components/ImageIcon.js +0 -1
  378. package/dist/es2019/view/EmbedCard/components/styled.js +0 -9
  379. package/dist/es2019/view/EmbedCard/index.js +0 -17
  380. package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +0 -5
  381. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -1
  382. package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +0 -1
  383. package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +0 -1
  384. package/dist/es2019/view/EmbedModal/components/analytics/index.js +0 -7
  385. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -2
  386. package/dist/es2019/view/EmbedModal/components/error-boundary/index.js +0 -3
  387. package/dist/es2019/view/EmbedModal/components/link-info/index.js +0 -2
  388. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +0 -2
  389. package/dist/es2019/view/EmbedModal/index.js +0 -6
  390. package/dist/es2019/view/EmbedModal/types.js +0 -1
  391. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +0 -5
  392. package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +0 -2
  393. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -5
  394. package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +2 -9
  395. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -4
  396. package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +3 -9
  397. package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +2 -6
  398. package/dist/es2019/view/FlexibleCard/components/actions/index.js +4 -5
  399. package/dist/es2019/view/FlexibleCard/components/actions/utils.js +2 -11
  400. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -12
  401. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -12
  402. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +1 -4
  403. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -9
  404. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -6
  405. package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -8
  406. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -4
  407. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -6
  408. package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -3
  409. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -5
  410. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +1 -9
  411. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
  412. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -3
  413. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +3 -18
  414. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +62 -195
  415. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +0 -2
  416. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +0 -2
  417. package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -27
  418. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -3
  419. package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +1 -7
  420. package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +1 -9
  421. package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -7
  422. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -10
  423. package/dist/es2019/view/FlexibleCard/components/elements/index.js +0 -25
  424. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -10
  425. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -4
  426. package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -4
  427. package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -5
  428. package/dist/es2019/view/FlexibleCard/components/elements/utils.js +0 -23
  429. package/dist/es2019/view/FlexibleCard/components/utils.js +0 -11
  430. package/dist/es2019/view/FlexibleCard/index.js +1 -5
  431. package/dist/es2019/view/FlexibleCard/utils.js +0 -15
  432. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -14
  433. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +0 -9
  434. package/dist/es2019/view/HoverCard/components/SnippetOrPreview.js +4 -5
  435. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -7
  436. package/dist/es2019/view/HoverCard/components/views/resolving/index.js +0 -2
  437. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +0 -3
  438. package/dist/es2019/view/HoverCard/index.js +0 -3
  439. package/dist/es2019/view/HoverCard/styled.js +2 -2
  440. package/dist/es2019/view/HoverCard/utils.js +2 -11
  441. package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -5
  442. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -14
  443. package/dist/es2019/view/InlineCard/Frame/index.js +5 -4
  444. package/dist/es2019/view/InlineCard/Frame/styled.js +1 -5
  445. package/dist/es2019/view/InlineCard/Icon.js +6 -4
  446. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -21
  447. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +22 -15
  448. package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -6
  449. package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -2
  450. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -6
  451. package/dist/es2019/view/InlineCard/index.js +0 -14
  452. package/dist/es2019/view/InlineCard/styled.js +3 -2
  453. package/dist/es2019/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +1 -9
  454. package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +0 -2
  455. package/dist/es2019/view/LinkUrl/index.js +0 -2
  456. package/dist/es2019/view/LinkView/index.js +0 -1
  457. package/dist/es2019/view/common/Icon.js +0 -5
  458. package/dist/es2019/view/common/Metadata.js +0 -4
  459. package/dist/es2019/view/common/MetadataList.js +0 -1
  460. package/dist/es2019/view/common/UnauthorisedViewContent.js +0 -2
  461. package/dist/es2019/view/common/utils.js +0 -3
  462. package/dist/esm/__tests_external__/page-objects/BaseCard.js +6 -20
  463. package/dist/esm/__tests_external__/page-objects/BlockCard.js +0 -8
  464. package/dist/esm/__tests_external__/page-objects/EmbedCard.js +0 -8
  465. package/dist/esm/__tests_external__/page-objects/InlineCard.js +0 -8
  466. package/dist/esm/__tests_external__/test-cases/card.js +2 -2
  467. package/dist/esm/__tests_external__/test-cases/embed.js +1 -1
  468. package/dist/esm/__tests_external__/test-cases/inline.js +2 -2
  469. package/dist/esm/constants.js +11 -26
  470. package/dist/esm/extractors/block/index.js +2 -13
  471. package/dist/esm/extractors/common/actions/extractActions.js +2 -14
  472. package/dist/esm/extractors/common/actions/extractPreviewAction.js +18 -28
  473. package/dist/esm/extractors/common/byline/extractByline.js +4 -8
  474. package/dist/esm/extractors/common/context/extractAccessContext.js +2 -12
  475. package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -1
  476. package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -1
  477. package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -1
  478. package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -1
  479. package/dist/esm/extractors/common/icon/extractIcon.js +0 -10
  480. package/dist/esm/extractors/common/icon/extractIconFromDocument.js +2 -11
  481. package/dist/esm/extractors/common/icon/extractIconFromTask.js +1 -13
  482. package/dist/esm/extractors/common/lozenge/extractLozenge.js +0 -7
  483. package/dist/esm/extractors/common/lozenge/extractLozengeText.js +1 -3
  484. package/dist/esm/extractors/common/lozenge/extractState.js +0 -2
  485. package/dist/esm/extractors/common/lozenge/extractTag.js +0 -3
  486. package/dist/esm/extractors/common/lozenge/extractTaskStatus.js +0 -1
  487. package/dist/esm/extractors/common/lozenge/extractTaskType.js +0 -1
  488. package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +0 -3
  489. package/dist/esm/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
  490. package/dist/esm/extractors/constants.js +2 -2
  491. package/dist/esm/extractors/embed/index.js +0 -6
  492. package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -2
  493. package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -3
  494. package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -2
  495. package/dist/esm/extractors/flexible/collaboratorGroup/index.js +0 -1
  496. package/dist/esm/extractors/flexible/extract-preview.js +0 -2
  497. package/dist/esm/extractors/flexible/extract-priority.js +0 -4
  498. package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +0 -9
  499. package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
  500. package/dist/esm/extractors/flexible/icon/extract-icon-renderer.js +0 -4
  501. package/dist/esm/extractors/flexible/icon/extract-jira-task-icon.js +0 -11
  502. package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -24
  503. package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +0 -6
  504. package/dist/esm/extractors/flexible/icon/extract-url-icon.js +0 -2
  505. package/dist/esm/extractors/flexible/icon/index.js +4 -11
  506. package/dist/esm/extractors/flexible/index.js +0 -3
  507. package/dist/esm/extractors/flexible/latest-commit/index.js +0 -2
  508. package/dist/esm/extractors/flexible/utils.js +0 -5
  509. package/dist/esm/extractors/hover/extractMetadata.js +0 -3
  510. package/dist/esm/extractors/index.js +4 -15
  511. package/dist/esm/extractors/inline/index.js +0 -2
  512. package/dist/esm/index.js +4 -4
  513. package/dist/esm/ssr.js +4 -11
  514. package/dist/esm/state/actions/index.js +36 -57
  515. package/dist/esm/state/analytics/ufoExperiences.js +0 -1
  516. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +165 -195
  517. package/dist/esm/state/config/index.js +0 -2
  518. package/dist/esm/state/flexible-ui-context/index.js +1 -2
  519. package/dist/esm/state/helpers.js +3 -12
  520. package/dist/esm/state/hooks/usePrefetch.js +10 -24
  521. package/dist/esm/state/hooks/useSmartLink.js +11 -13
  522. package/dist/esm/state/hooks-external/useSmartLinkActions.js +12 -18
  523. package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -2
  524. package/dist/esm/state/store/index.js +7 -9
  525. package/dist/esm/utils/analytics/analytics.js +133 -139
  526. package/dist/esm/utils/analytics/index.js +8 -13
  527. package/dist/esm/utils/flexible.js +0 -1
  528. package/dist/esm/utils/index.js +5 -21
  529. package/dist/esm/utils/jsonld.js +0 -3
  530. package/dist/esm/utils/mocks.js +0 -20
  531. package/dist/esm/utils/performance.js +0 -9
  532. package/dist/esm/utils/test-utils.js +0 -2
  533. package/dist/esm/version.json +1 -1
  534. package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -6
  535. package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -15
  536. package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -3
  537. package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -6
  538. package/dist/esm/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
  539. package/dist/esm/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
  540. package/dist/esm/view/BlockCard/actions/flexible/RetryAction.js +1 -1
  541. package/dist/esm/view/BlockCard/components/Action.js +7 -11
  542. package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -4
  543. package/dist/esm/view/BlockCard/components/ActionList.js +1 -3
  544. package/dist/esm/view/BlockCard/components/CollaboratorList.js +6 -8
  545. package/dist/esm/view/BlockCard/components/Content.js +2 -2
  546. package/dist/esm/view/BlockCard/components/ContentFooter.js +2 -2
  547. package/dist/esm/view/BlockCard/components/ContentHeader.js +2 -2
  548. package/dist/esm/view/BlockCard/components/Frame.js +10 -13
  549. package/dist/esm/view/BlockCard/components/Link.js +3 -3
  550. package/dist/esm/view/BlockCard/components/Name.js +4 -4
  551. package/dist/esm/view/BlockCard/components/Provider.js +1 -3
  552. package/dist/esm/view/BlockCard/components/Thumbnail.js +3 -6
  553. package/dist/esm/view/BlockCard/components/UnresolvedText.js +1 -1
  554. package/dist/esm/view/BlockCard/components/flexible/footer/index.js +7 -12
  555. package/dist/esm/view/BlockCard/index.js +18 -42
  556. package/dist/esm/view/BlockCard/views/ErroredView.js +10 -17
  557. package/dist/esm/view/BlockCard/views/ForbiddenView.js +19 -22
  558. package/dist/esm/view/BlockCard/views/NotFoundView.js +11 -18
  559. package/dist/esm/view/BlockCard/views/ResolvedView.js +33 -35
  560. package/dist/esm/view/BlockCard/views/ResolvingView.js +4 -4
  561. package/dist/esm/view/BlockCard/views/UnauthorizedView.js +15 -22
  562. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -9
  563. package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +9 -13
  564. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -9
  565. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +17 -22
  566. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -15
  567. package/dist/esm/view/Card/index.js +0 -10
  568. package/dist/esm/view/CardWithData/component.js +7 -20
  569. package/dist/esm/view/CardWithData/loader.js +10 -24
  570. package/dist/esm/view/CardWithUrl/component-lazy/LazyFallback.js +2 -2
  571. package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +9 -11
  572. package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -3
  573. package/dist/esm/view/CardWithUrl/component.js +35 -42
  574. package/dist/esm/view/CardWithUrl/loader.js +31 -37
  575. package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +0 -15
  576. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +20 -23
  577. package/dist/esm/view/EmbedCard/components/Frame.js +20 -38
  578. package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +15 -20
  579. package/dist/esm/view/EmbedCard/components/ImageIcon.js +6 -8
  580. package/dist/esm/view/EmbedCard/components/styled.js +1 -17
  581. package/dist/esm/view/EmbedCard/index.js +18 -35
  582. package/dist/esm/view/EmbedCard/views/ErroredView.js +5 -5
  583. package/dist/esm/view/EmbedCard/views/ForbiddenView.js +11 -16
  584. package/dist/esm/view/EmbedCard/views/NotFoundView.js +6 -6
  585. package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -13
  586. package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +9 -10
  587. package/dist/esm/view/EmbedCard/views/UnresolvedView.js +7 -8
  588. package/dist/esm/view/EmbedModal/components/analytics/index.js +5 -12
  589. package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -7
  590. package/dist/esm/view/EmbedModal/components/error-boundary/index.js +0 -3
  591. package/dist/esm/view/EmbedModal/components/link-info/index.js +10 -14
  592. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +5 -7
  593. package/dist/esm/view/EmbedModal/components/link-info/styled.js +0 -2
  594. package/dist/esm/view/EmbedModal/index.js +24 -33
  595. package/dist/esm/view/EmbedModal/types.js +0 -1
  596. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +8 -15
  597. package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -6
  598. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -9
  599. package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +5 -21
  600. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +14 -18
  601. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -25
  602. package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +5 -19
  603. package/dist/esm/view/FlexibleCard/components/actions/index.js +4 -5
  604. package/dist/esm/view/FlexibleCard/components/actions/utils.js +4 -20
  605. package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -23
  606. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +13 -28
  607. package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +11 -16
  608. package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +12 -22
  609. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -14
  610. package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -22
  611. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -9
  612. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -18
  613. package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -10
  614. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -17
  615. package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +20 -32
  616. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +10 -12
  617. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -8
  618. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -22
  619. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +64 -200
  620. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +4 -6
  621. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -6
  622. package/dist/esm/view/FlexibleCard/components/container/index.js +29 -61
  623. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -9
  624. package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +10 -19
  625. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -17
  626. package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +11 -20
  627. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +13 -24
  628. package/dist/esm/view/FlexibleCard/components/elements/index.js +0 -25
  629. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +15 -26
  630. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -18
  631. package/dist/esm/view/FlexibleCard/components/elements/media/index.js +8 -14
  632. package/dist/esm/view/FlexibleCard/components/elements/text/index.js +8 -15
  633. package/dist/esm/view/FlexibleCard/components/elements/utils.js +2 -28
  634. package/dist/esm/view/FlexibleCard/components/utils.js +1 -14
  635. package/dist/esm/view/FlexibleCard/index.js +14 -20
  636. package/dist/esm/view/FlexibleCard/utils.js +0 -15
  637. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +19 -29
  638. package/dist/esm/view/HoverCard/components/HoverCardContent.js +12 -28
  639. package/dist/esm/view/HoverCard/components/SnippetOrPreview.js +10 -16
  640. package/dist/esm/view/HoverCard/components/views/resolved/index.js +22 -29
  641. package/dist/esm/view/HoverCard/components/views/resolved/styled.js +0 -2
  642. package/dist/esm/view/HoverCard/components/views/resolving/index.js +1 -3
  643. package/dist/esm/view/HoverCard/components/views/resolving/styled.js +0 -2
  644. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +8 -13
  645. package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +0 -2
  646. package/dist/esm/view/HoverCard/index.js +3 -6
  647. package/dist/esm/view/HoverCard/styled.js +2 -4
  648. package/dist/esm/view/HoverCard/utils.js +0 -15
  649. package/dist/esm/view/InlineCard/ErroredView/index.js +8 -22
  650. package/dist/esm/view/InlineCard/ForbiddenView/index.js +6 -29
  651. package/dist/esm/view/InlineCard/Frame/index.js +11 -10
  652. package/dist/esm/view/InlineCard/Frame/styled.js +1 -9
  653. package/dist/esm/view/InlineCard/Icon.js +5 -5
  654. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +10 -36
  655. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +20 -15
  656. package/dist/esm/view/InlineCard/ResolvedView/index.js +13 -25
  657. package/dist/esm/view/InlineCard/ResolvingView/index.js +7 -16
  658. package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -2
  659. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +10 -25
  660. package/dist/esm/view/InlineCard/index.js +13 -27
  661. package/dist/esm/view/InlineCard/styled.js +3 -4
  662. package/dist/esm/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -22
  663. package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +5 -7
  664. package/dist/esm/view/LinkUrl/index.js +10 -14
  665. package/dist/esm/view/LinkView/index.js +0 -8
  666. package/dist/esm/view/common/Byline.js +3 -3
  667. package/dist/esm/view/common/Icon.js +6 -13
  668. package/dist/esm/view/common/Metadata.js +3 -7
  669. package/dist/esm/view/common/MetadataList.js +1 -2
  670. package/dist/esm/view/common/UnauthorisedViewContent.js +3 -5
  671. package/dist/esm/view/common/utils.js +0 -3
  672. package/package.json +3 -3
@@ -1,14 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
-
3
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
-
5
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
-
7
4
  import { ElementName } from '../../constants';
8
5
  export var getSimulatedMetadata = function getSimulatedMetadata() {
9
6
  var extensionKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
10
7
  var types = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
11
-
12
8
  switch (extensionKey) {
13
9
  case 'bitbucket-object-provider':
14
10
  case 'native-bitbucket-object-provider':
@@ -21,7 +17,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
21
17
  }
22
18
  };
23
19
  }
24
-
25
20
  return {
26
21
  metadata: {
27
22
  primary: [ElementName.ModifiedOn, ElementName.CreatedBy],
@@ -29,7 +24,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
29
24
  subtitle: []
30
25
  }
31
26
  };
32
-
33
27
  case 'confluence-object-provider':
34
28
  return {
35
29
  metadata: {
@@ -38,7 +32,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
38
32
  subtitle: []
39
33
  }
40
34
  };
41
-
42
35
  case 'jira-object-provider':
43
36
  return {
44
37
  metadata: {
@@ -47,7 +40,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
47
40
  subtitle: []
48
41
  }
49
42
  };
50
-
51
43
  case 'trello-object-provider':
52
44
  return {
53
45
  metadata: {
@@ -56,7 +48,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
56
48
  subtitle: []
57
49
  }
58
50
  };
59
-
60
51
  case 'watermelon-object-provider':
61
52
  if (types.includes('atlassian:Project')) {
62
53
  return {
@@ -67,7 +58,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
67
58
  }
68
59
  };
69
60
  }
70
-
71
61
  return {
72
62
  metadata: {
73
63
  primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
@@ -75,7 +65,6 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
75
65
  subtitle: []
76
66
  }
77
67
  };
78
-
79
68
  default:
80
69
  return {
81
70
  metadata: {
@@ -90,13 +79,11 @@ export var toActionableMetadata = function toActionableMetadata(onActionClick, e
90
79
  var types = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
91
80
  var cardActions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
92
81
  var elementItems = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
93
-
94
82
  // Actionable State for Jira issue
95
83
  if (extensionKey === 'jira-object-provider' && types !== null && types !== void 0 && types.includes('atlassian:Task')) {
96
84
  var previewAction = cardActions.find(function (action) {
97
85
  return action.id === 'preview-content';
98
86
  });
99
-
100
87
  if (previewAction) {
101
88
  return elementItems.map(function (elementItem) {
102
89
  return elementItem.name === ElementName.State ? _objectSpread(_objectSpread({}, elementItem), {}, {
@@ -104,7 +91,6 @@ export var toActionableMetadata = function toActionableMetadata(onActionClick, e
104
91
  if (onActionClick) {
105
92
  onActionClick(previewAction.id);
106
93
  }
107
-
108
94
  return previewAction.invoke({
109
95
  isReloadRequired: true
110
96
  });
@@ -113,6 +99,5 @@ export var toActionableMetadata = function toActionableMetadata(onActionClick, e
113
99
  });
114
100
  }
115
101
  }
116
-
117
102
  return elementItems;
118
103
  };
@@ -5,11 +5,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
10
  import React from 'react';
14
11
  import { R300 } from '@atlaskit/theme/colors';
15
12
  import ErrorIcon from '@atlaskit/icon/glyph/error';
@@ -22,34 +19,26 @@ import { FormattedMessage } from 'react-intl-next';
22
19
  import { IconStyledButton, LowercaseAppearance } from '../styled';
23
20
  export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
24
21
  _inherits(InlineCardErroredView, _React$Component);
25
-
26
22
  var _super = _createSuper(InlineCardErroredView);
27
-
28
23
  function InlineCardErroredView() {
29
24
  var _this;
30
-
31
25
  _classCallCheck(this, InlineCardErroredView);
32
-
33
26
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
34
27
  args[_key] = arguments[_key];
35
28
  }
36
-
37
29
  _this = _super.call.apply(_super, [this].concat(args));
38
-
39
30
  _defineProperty(_assertThisInitialized(_this), "handleRetry", function (event) {
40
31
  var onRetry = _this.props.onRetry;
41
-
42
32
  if (onRetry) {
43
33
  event.preventDefault();
44
34
  event.stopPropagation();
45
35
  onRetry();
46
36
  }
47
37
  });
48
-
49
38
  _defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
50
39
  var _this$props = _this.props,
51
- onRetry = _this$props.onRetry,
52
- message = _this$props.message;
40
+ onRetry = _this$props.onRetry,
41
+ message = _this$props.message;
53
42
  return !onRetry ? message : /*#__PURE__*/React.createElement(React.Fragment, null, message, ', ', /*#__PURE__*/React.createElement(Button, {
54
43
  spacing: "none",
55
44
  appearance: "subtle-link",
@@ -60,20 +49,18 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
60
49
  return /*#__PURE__*/React.createElement(LowercaseAppearance, null, formattedMessage);
61
50
  })));
62
51
  });
63
-
64
52
  return _this;
65
53
  }
66
-
67
54
  _createClass(InlineCardErroredView, [{
68
55
  key: "render",
69
56
  value: function render() {
70
57
  var _this$props2 = this.props,
71
- url = _this$props2.url,
72
- onClick = _this$props2.onClick,
73
- isSelected = _this$props2.isSelected,
74
- _this$props2$testId = _this$props2.testId,
75
- testId = _this$props2$testId === void 0 ? 'inline-card-errored-view' : _this$props2$testId,
76
- icon = _this$props2.icon;
58
+ url = _this$props2.url,
59
+ onClick = _this$props2.onClick,
60
+ isSelected = _this$props2.isSelected,
61
+ _this$props2$testId = _this$props2.testId,
62
+ testId = _this$props2$testId === void 0 ? 'inline-card-errored-view' : _this$props2$testId,
63
+ icon = _this$props2.icon;
77
64
  return /*#__PURE__*/React.createElement(Frame, {
78
65
  testId: testId,
79
66
  isSelected: isSelected
@@ -91,6 +78,5 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
91
78
  }));
92
79
  }
93
80
  }]);
94
-
95
81
  return InlineCardErroredView;
96
82
  }(React.Component);
@@ -6,11 +6,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
-
10
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
-
12
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
11
  import React from 'react';
15
12
  import { R400, N500 } from '@atlaskit/theme/colors';
16
13
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
@@ -31,43 +28,31 @@ var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null
31
28
  }));
32
29
  export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
33
30
  _inherits(InlineCardForbiddenView, _React$Component);
34
-
35
31
  var _super = _createSuper(InlineCardForbiddenView);
36
-
37
32
  function InlineCardForbiddenView() {
38
33
  var _this$props, _this$props$requestAc;
39
-
40
34
  var _this;
41
-
42
35
  _classCallCheck(this, InlineCardForbiddenView);
43
-
44
36
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
45
37
  args[_key] = arguments[_key];
46
38
  }
47
-
48
39
  _this = _super.call.apply(_super, [this].concat(args));
49
-
50
40
  _defineProperty(_assertThisInitialized(_this), "state", {
51
41
  hasRequestAccessContextMessage: !!((_this$props = _this.props) !== null && _this$props !== void 0 && (_this$props$requestAc = _this$props.requestAccessContext) !== null && _this$props$requestAc !== void 0 && _this$props$requestAc.callToActionMessageKey)
52
42
  });
53
-
54
43
  _defineProperty(_assertThisInitialized(_this), "handleRetry", function (event) {
55
44
  var onAuthorise = _this.props.onAuthorise;
56
45
  event.preventDefault();
57
46
  event.stopPropagation();
58
-
59
47
  if (onAuthorise) {
60
48
  onAuthorise();
61
49
  } else {
62
50
  var _this$props2, _this$props2$requestA, _this$props2$requestA2;
63
-
64
51
  (_this$props2 = _this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$requestA = _this$props2.requestAccessContext) === null || _this$props2$requestA === void 0 ? void 0 : (_this$props2$requestA2 = _this$props2$requestA.action) === null || _this$props2$requestA2 === void 0 ? void 0 : _this$props2$requestA2.promise();
65
52
  }
66
53
  });
67
-
68
54
  _defineProperty(_assertThisInitialized(_this), "renderForbiddenAccessMessage", function () {
69
55
  var _this$props3, _this$props3$requestA;
70
-
71
56
  if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3$requestA = _this$props3.requestAccessContext) !== null && _this$props3$requestA !== void 0 && _this$props3$requestA.callToActionMessageKey) {
72
57
  var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
73
58
  return /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[callToActionMessageKey], {
@@ -76,15 +61,12 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
76
61
  }
77
62
  }));
78
63
  }
79
-
80
64
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.invalid_permissions, function (formattedMessage) {
81
65
  return /*#__PURE__*/React.createElement(React.Fragment, null, formattedMessage);
82
66
  }));
83
67
  });
84
-
85
68
  _defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
86
69
  var onAuthorise = _this.props.onAuthorise;
87
-
88
70
  if (_this.state.hasRequestAccessContextMessage) {
89
71
  return /*#__PURE__*/React.createElement(Button, {
90
72
  spacing: "none",
@@ -95,7 +77,6 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
95
77
  role: "button"
96
78
  }, _this.renderForbiddenAccessMessage());
97
79
  }
98
-
99
80
  if (onAuthorise) {
100
81
  return /*#__PURE__*/React.createElement(LozengeBlockWrapper, null, /*#__PURE__*/React.createElement(Button, {
101
82
  spacing: "none",
@@ -108,23 +89,20 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
108
89
  appearance: 'moved'
109
90
  }, _this.renderForbiddenAccessMessage()))));
110
91
  }
111
-
112
92
  return null;
113
93
  });
114
-
115
94
  return _this;
116
95
  }
117
-
118
96
  _createClass(InlineCardForbiddenView, [{
119
97
  key: "render",
120
98
  value: function render() {
121
99
  var _this$props4 = this.props,
122
- url = _this$props4.url,
123
- icon = _this$props4.icon,
124
- onClick = _this$props4.onClick,
125
- isSelected = _this$props4.isSelected,
126
- _this$props4$testId = _this$props4.testId,
127
- testId = _this$props4$testId === void 0 ? 'inline-card-forbidden-view' : _this$props4$testId;
100
+ url = _this$props4.url,
101
+ icon = _this$props4.icon,
102
+ onClick = _this$props4.onClick,
103
+ isSelected = _this$props4.isSelected,
104
+ _this$props4$testId = _this$props4.testId,
105
+ testId = _this$props4$testId === void 0 ? 'inline-card-forbidden-view' : _this$props4$testId;
128
106
  return /*#__PURE__*/React.createElement(Frame, {
129
107
  testId: testId,
130
108
  isSelected: isSelected
@@ -139,6 +117,5 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
139
117
  }));
140
118
  }
141
119
  }]);
142
-
143
120
  return InlineCardForbiddenView;
144
121
  }(React.Component);
@@ -3,12 +3,12 @@ import { useGlobalTheme } from '@atlaskit/theme/components';
3
3
  import { WrapperAnchor, WrapperSpan } from './styled';
4
4
  export var Frame = function Frame(props) {
5
5
  var isSelected = props.isSelected,
6
- children = props.children,
7
- onClick = props.onClick,
8
- link = props.link,
9
- withoutBackground = props.withoutBackground,
10
- testId = props.testId,
11
- className = props.className;
6
+ children = props.children,
7
+ onClick = props.onClick,
8
+ link = props.link,
9
+ withoutBackground = props.withoutBackground,
10
+ testId = props.testId,
11
+ className = props.className;
12
12
  var handleClick = useCallback(function (event) {
13
13
  if (onClick) {
14
14
  event.preventDefault();
@@ -20,18 +20,19 @@ export var Frame = function Frame(props) {
20
20
  if (event.key !== ' ' && event.key !== 'Enter') {
21
21
  return;
22
22
  }
23
-
24
23
  if (onClick) {
25
24
  event.preventDefault();
26
25
  event.stopPropagation();
27
26
  onClick(event);
28
27
  }
29
28
  }, [onClick]);
30
- var isInteractive = Boolean(onClick); // Depending on whenever Frame was given onClick or link itself we display span or anchor elements
29
+ var isInteractive = Boolean(onClick);
31
30
 
32
- var Wrapper = link || onClick ? WrapperAnchor : WrapperSpan; // TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
33
- // It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
31
+ // Depending on whenever Frame was given onClick or link itself we display span or anchor elements
32
+ var Wrapper = link || onClick ? WrapperAnchor : WrapperSpan;
34
33
 
34
+ // TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
35
+ // It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
35
36
  return /*#__PURE__*/React.createElement(Wrapper, {
36
37
  theme: useGlobalTheme(),
37
38
  href: link,
@@ -1,17 +1,13 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2;
4
-
5
3
  import styled from '@emotion/styled';
6
4
  import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
7
5
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
8
6
  import { themed } from '@atlaskit/theme/components';
9
7
  var BACKGROUND_COLOR_DARK = '#262B31';
10
8
  var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
11
-
12
9
  var isInteractive = function isInteractive(_ref) {
13
10
  var isInteractive = _ref.isInteractive;
14
-
15
11
  if (isInteractive) {
16
12
  return "\n :hover {\n background-color: ".concat(themed({
17
13
  light: "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"),
@@ -24,16 +20,15 @@ var isInteractive = function isInteractive(_ref) {
24
20
  return '';
25
21
  }
26
22
  };
27
-
28
23
  var isSelected = function isSelected(_ref2) {
29
24
  var isSelected = _ref2.isSelected;
30
-
31
25
  if (isSelected) {
32
26
  return selected;
33
27
  } else {
34
28
  return 'user-select: text';
35
29
  }
36
30
  };
31
+
37
32
  /*
38
33
  Inline smart cards should have the following layout:
39
34
  ------------------------------------
@@ -46,8 +41,6 @@ var isSelected = function isSelected(_ref2) {
46
41
  // NB: `padding` consistent with @mentions.
47
42
  // NB: `display: inline` required for `box-decoration-break` to work.
48
43
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
49
-
50
-
51
44
  var baseWrapperStyle = function baseWrapperStyle(props) {
52
45
  return "\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ").concat(akBorderRadius(), "px;\n color: ").concat(themed({
53
46
  light: "var(--ds-link, ".concat(B400, ")"),
@@ -60,7 +53,6 @@ var baseWrapperStyle = function baseWrapperStyle(props) {
60
53
  dark: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(DN50A, ", 0 0 1px 1px ").concat(DN40A), ")"), ";")
61
54
  })(props), "\n ").concat(isSelected(props), ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n");
62
55
  };
63
-
64
56
  export var WrapperAnchor = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), baseWrapperStyle, isInteractive);
65
57
  WrapperAnchor.displayName = 'WrapperAnchor';
66
58
  export var WrapperSpan = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), baseWrapperStyle);
@@ -1,18 +1,18 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
-
5
3
  import styled from '@emotion/styled';
6
4
  import { keyframes } from '@emotion/react';
7
- var placeholderShimmer = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: -20px 0;\n }\n\n 100% {\n background-position: 20px 0;\n }\n"]))); // TODO: Figure out a more scalable/responsive solution
5
+ var placeholderShimmer = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: -20px 0;\n }\n\n 100% {\n background-position: 20px 0;\n }\n"])));
6
+
7
+ // TODO: Figure out a more scalable/responsive solution
8
8
  // for vertical alignment.
9
9
  // Current rationale: vertically positioned at the top of
10
10
  // the smart card container (when set to 0). Offset this
11
11
  // to position it with appropriate whitespace from the top.
12
+ export var Icon = styled.img(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
12
13
 
13
- export var Icon = styled.img(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"]))); // Used for 'untrue' icons which claim to be 16x16 but
14
+ // Used for 'untrue' icons which claim to be 16x16 but
14
15
  // are less than that in height/width.
15
16
  // TODO: Replace this override with proper AtlasKit solution.
16
-
17
17
  export var AKIconWrapper = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: -2px;\n"])));
18
18
  export var Shimmer = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: ", ";\n background-image: linear-gradient(\n to right,\n transparent 0%,\n ", " 20%,\n transparent 40%,\n transparent 100%\n );\n background-repeat: no-repeat;\n background-size: 40px 14px;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"])), "var(--ds-skeleton-subtle, #f6f7f8)", "var(--ds-skeleton, #edeef1)", placeholderShimmer);
@@ -5,11 +5,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
10
  import React from 'react';
14
11
  import ImageLoader from 'react-render-image';
15
12
  import { Icon, Shimmer } from '../Icon';
@@ -18,73 +15,56 @@ import LinkIcon from '@atlaskit/icon/glyph/link';
18
15
  import { LinkAppearance, NoLinkAppearance } from '../styled';
19
16
  export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
20
17
  _inherits(IconAndTitleLayout, _React$Component);
21
-
22
18
  var _super = _createSuper(IconAndTitleLayout);
23
-
24
19
  function IconAndTitleLayout() {
25
20
  var _this;
26
-
27
21
  _classCallCheck(this, IconAndTitleLayout);
28
-
29
22
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
23
  args[_key] = arguments[_key];
31
24
  }
32
-
33
25
  _this = _super.call.apply(_super, [this].concat(args));
34
-
35
26
  _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
36
27
  var onClick = _this.props.onClick;
37
-
38
28
  if (onClick) {
39
29
  event.preventDefault();
40
30
  event.stopPropagation();
41
31
  onClick(event);
42
32
  }
43
33
  });
44
-
45
34
  _defineProperty(_assertThisInitialized(_this), "handleKeyPress", function (event) {
46
35
  var onClick = _this.props.onClick;
47
-
48
36
  if (event.key !== ' ' && event.key !== 'Enter') {
49
37
  return;
50
38
  }
51
-
52
39
  if (onClick) {
53
40
  event.preventDefault();
54
41
  event.stopPropagation();
55
42
  onClick(event);
56
43
  }
57
44
  });
58
-
59
45
  return _this;
60
46
  }
61
-
62
47
  _createClass(IconAndTitleLayout, [{
63
48
  key: "renderAtlaskitIcon",
64
49
  value: function renderAtlaskitIcon() {
65
50
  var _this$props = this.props,
66
- icon = _this$props.icon,
67
- emoji = _this$props.emoji;
68
-
51
+ icon = _this$props.icon,
52
+ emoji = _this$props.emoji;
69
53
  if (emoji) {
70
54
  return /*#__PURE__*/React.createElement(EmojiWrapper, null, emoji);
71
55
  }
72
-
73
56
  if (!icon || typeof icon === 'string') {
74
57
  return null;
75
58
  }
76
-
77
59
  return /*#__PURE__*/React.createElement(IconWrapper, null, icon);
78
60
  }
79
61
  }, {
80
62
  key: "renderImageIcon",
81
63
  value: function renderImageIcon(errored, testId) {
82
64
  var url = this.props.icon;
83
-
84
65
  if (!url || typeof url !== 'string') {
85
66
  return null;
86
67
  }
87
-
88
68
  return /*#__PURE__*/React.createElement(ImageLoader, {
89
69
  src: url,
90
70
  loaded: /*#__PURE__*/React.createElement(Icon, {
@@ -102,11 +82,9 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
102
82
  key: "renderIconPlaceholder",
103
83
  value: function renderIconPlaceholder(testId) {
104
84
  var defaultIcon = this.props.defaultIcon;
105
-
106
85
  if (defaultIcon) {
107
86
  return /*#__PURE__*/React.createElement(IconWrapper, null, defaultIcon);
108
87
  }
109
-
110
88
  return /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(LinkIcon, {
111
89
  label: "link",
112
90
  size: "small",
@@ -121,11 +99,9 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
121
99
  // - Atlaskit Icon: an Atlaskit SVG;
122
100
  // Each of these are scaled down to 12x12.
123
101
  var icon = this.renderAtlaskitIcon();
124
-
125
102
  if (icon) {
126
103
  return icon;
127
104
  }
128
-
129
105
  var placeholder = this.renderIconPlaceholder(testId);
130
106
  var image = this.renderImageIcon(placeholder, testId);
131
107
  return image || placeholder;
@@ -134,14 +110,14 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
134
110
  key: "render",
135
111
  value: function render() {
136
112
  var _this$props2 = this.props,
137
- children = _this$props2.children,
138
- title = _this$props2.title,
139
- titleColor = _this$props2.titleColor,
140
- titleTextColor = _this$props2.titleTextColor,
141
- link = _this$props2.link,
142
- rightSide = _this$props2.rightSide,
143
- _this$props2$testId = _this$props2.testId,
144
- testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
113
+ children = _this$props2.children,
114
+ title = _this$props2.title,
115
+ titleColor = _this$props2.titleColor,
116
+ titleTextColor = _this$props2.titleTextColor,
117
+ link = _this$props2.link,
118
+ rightSide = _this$props2.rightSide,
119
+ _this$props2$testId = _this$props2.testId,
120
+ testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
145
121
  var titlePart = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, {
146
122
  style: {
147
123
  color: titleTextColor
@@ -160,10 +136,8 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
160
136
  }, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearance, null, this.props.rightSideSpacer && ' - ', rightSide) : null));
161
137
  }
162
138
  }]);
163
-
164
139
  return IconAndTitleLayout;
165
140
  }(React.Component);
166
-
167
141
  _defineProperty(IconAndTitleLayout, "defaultProps", {
168
142
  rightSideSpacer: true
169
143
  });
@@ -1,36 +1,41 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
3
+ import styled from '@emotion/styled';
4
4
 
5
- import styled from '@emotion/styled'; // TODO: remove this override behaviour for @atlaskit/icon-object
6
-
7
- export var IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"; // TODO: remove this override behaviour for @atlaskit/icon
5
+ // TODO: remove this override behaviour for @atlaskit/icon-object
6
+ export var IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
7
+ // TODO: remove this override behaviour for @atlaskit/icon
8
+ export var IconOverrides = "\n & > * > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
8
9
 
9
- export var IconOverrides = "\n & > * > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"; // Wraps all icons represented in Inline Links. Icons have three sources/types:
10
+ // Wraps all icons represented in Inline Links. Icons have three sources/types:
10
11
  // - JSON-LD: from the generator.icon property coming back from ORS.
11
12
  // - @atlaskit/icon: for lock icons, unauthorized, etc.
12
13
  // - @atlaskit/icon-object: for object icons, e.g. repository, branch, etc.
13
14
  // NB: the first set of overrides style icons imported from @atlaskit/icon-object correctly.
14
15
  // NB: the second set of overrides style icons imported from @atlaskit/icon correctly.
16
+ export var IconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides);
15
17
 
16
- export var IconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides); // Wraps all emoji in Inline Links similar to icon
18
+ // Wraps all emoji in Inline Links similar to icon
19
+ export var EmojiWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n margin-right: 2px;\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides);
17
20
 
18
- export var EmojiWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n margin-right: 2px;\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides); // The main 'wrapping' element, title of the content.
21
+ // The main 'wrapping' element, title of the content.
19
22
  // NB: `white-space` adds little whitespace before wrapping.
20
23
  // NB: `word-break` line breaks as soon as an overflow takes place.
24
+ export var IconTitleWrapper = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: pre-wrap;\n word-break: break-all;\n"])));
21
25
 
22
- export var IconTitleWrapper = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: pre-wrap;\n word-break: break-all;\n"]))); // TODO: Replace overrides with proper AtlasKit solution.
23
-
24
- export var LozengeWrapper = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: 1px;\n"]))); // TODO: Replace overrides with proper AtlasKit solution.
25
-
26
+ // TODO: Replace overrides with proper AtlasKit solution.
27
+ export var LozengeWrapper = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: 1px;\n"])));
28
+ // TODO: Replace overrides with proper AtlasKit solution.
26
29
  export var LozengeBlockWrapper = styled.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > span {\n margin-left: 4px;\n }\n"])));
27
- export var RightIconPositionWrapper = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 2px;\n margin-right: 4px;\n position: relative;\n display: inline-block;\n"]))); // The following components are used to absolutely position icons in the vertical center.
30
+ export var RightIconPositionWrapper = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 2px;\n margin-right: 4px;\n position: relative;\n display: inline-block;\n"])));
31
+
32
+ // The following components are used to absolutely position icons in the vertical center.
28
33
  // - IconPositionWrapper: the `relative` parent which has no height in itself.
29
34
  // - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
30
-
31
35
  export var IconPositionWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 4px;\n position: relative;\n display: inline-block;\n"])));
32
- export var IconEmptyWrapper = styled.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"]))); // With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
33
- // To achieve same result we use classname instead.
36
+ export var IconEmptyWrapper = styled.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"])));
34
37
 
38
+ // With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
39
+ // To achieve same result we use classname instead.
35
40
  export var TitleWrapperClassName = 'smart-link-title-wrapper';
36
41
  export var TitleWrapper = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])));