@atlaskit/smart-card 32.7.1 → 32.7.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 (335) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/classNames.js +14 -82
  3. package/dist/cjs/extractors/common/actions/extractActions.js +1 -67
  4. package/dist/cjs/i18n/cs.js +2 -4
  5. package/dist/cjs/i18n/da.js +2 -4
  6. package/dist/cjs/i18n/de.js +2 -4
  7. package/dist/cjs/i18n/en.js +2 -4
  8. package/dist/cjs/i18n/en_GB.js +2 -4
  9. package/dist/cjs/i18n/en_ZZ.js +2 -4
  10. package/dist/cjs/i18n/es.js +8 -10
  11. package/dist/cjs/i18n/fi.js +5 -7
  12. package/dist/cjs/i18n/fr.js +2 -4
  13. package/dist/cjs/i18n/hu.js +2 -4
  14. package/dist/cjs/i18n/it.js +2 -4
  15. package/dist/cjs/i18n/ja.js +8 -10
  16. package/dist/cjs/i18n/ko.js +2 -4
  17. package/dist/cjs/i18n/nb.js +2 -4
  18. package/dist/cjs/i18n/nl.js +2 -4
  19. package/dist/cjs/i18n/pl.js +2 -4
  20. package/dist/cjs/i18n/pt_BR.js +2 -4
  21. package/dist/cjs/i18n/ru.js +2 -4
  22. package/dist/cjs/i18n/sv.js +2 -4
  23. package/dist/cjs/i18n/th.js +2 -4
  24. package/dist/cjs/i18n/tr.js +8 -10
  25. package/dist/cjs/i18n/uk.js +2 -4
  26. package/dist/cjs/i18n/vi.js +2 -4
  27. package/dist/cjs/i18n/zh.js +2 -4
  28. package/dist/cjs/i18n/zh_TW.js +2 -4
  29. package/dist/cjs/utils/analytics/analytics.js +1 -1
  30. package/dist/cjs/view/BlockCard/components/Action.js +1 -58
  31. package/dist/cjs/view/BlockCard/index.js +29 -218
  32. package/dist/cjs/view/CardWithUrl/component.js +1 -5
  33. package/dist/cjs/view/LinkUrl/index.js +1 -1
  34. package/dist/es2019/classNames.js +12 -10
  35. package/dist/es2019/extractors/common/actions/extractActions.js +1 -55
  36. package/dist/es2019/i18n/cs.js +2 -4
  37. package/dist/es2019/i18n/da.js +2 -4
  38. package/dist/es2019/i18n/de.js +2 -4
  39. package/dist/es2019/i18n/en.js +2 -4
  40. package/dist/es2019/i18n/en_GB.js +2 -4
  41. package/dist/es2019/i18n/en_ZZ.js +2 -4
  42. package/dist/es2019/i18n/es.js +8 -10
  43. package/dist/es2019/i18n/fi.js +5 -7
  44. package/dist/es2019/i18n/fr.js +2 -4
  45. package/dist/es2019/i18n/hu.js +2 -4
  46. package/dist/es2019/i18n/it.js +2 -4
  47. package/dist/es2019/i18n/ja.js +8 -10
  48. package/dist/es2019/i18n/ko.js +2 -4
  49. package/dist/es2019/i18n/nb.js +2 -4
  50. package/dist/es2019/i18n/nl.js +2 -4
  51. package/dist/es2019/i18n/pl.js +2 -4
  52. package/dist/es2019/i18n/pt_BR.js +2 -4
  53. package/dist/es2019/i18n/ru.js +2 -4
  54. package/dist/es2019/i18n/sv.js +2 -4
  55. package/dist/es2019/i18n/th.js +2 -4
  56. package/dist/es2019/i18n/tr.js +8 -10
  57. package/dist/es2019/i18n/uk.js +2 -4
  58. package/dist/es2019/i18n/vi.js +2 -4
  59. package/dist/es2019/i18n/zh.js +2 -4
  60. package/dist/es2019/i18n/zh_TW.js +2 -4
  61. package/dist/es2019/utils/analytics/analytics.js +1 -1
  62. package/dist/es2019/view/BlockCard/components/Action.js +1 -48
  63. package/dist/es2019/view/BlockCard/index.js +27 -163
  64. package/dist/es2019/view/CardWithUrl/component.js +1 -5
  65. package/dist/es2019/view/LinkUrl/index.js +1 -1
  66. package/dist/esm/classNames.js +12 -10
  67. package/dist/esm/extractors/common/actions/extractActions.js +1 -65
  68. package/dist/esm/i18n/cs.js +2 -4
  69. package/dist/esm/i18n/da.js +2 -4
  70. package/dist/esm/i18n/de.js +2 -4
  71. package/dist/esm/i18n/en.js +2 -4
  72. package/dist/esm/i18n/en_GB.js +2 -4
  73. package/dist/esm/i18n/en_ZZ.js +2 -4
  74. package/dist/esm/i18n/es.js +8 -10
  75. package/dist/esm/i18n/fi.js +5 -7
  76. package/dist/esm/i18n/fr.js +2 -4
  77. package/dist/esm/i18n/hu.js +2 -4
  78. package/dist/esm/i18n/it.js +2 -4
  79. package/dist/esm/i18n/ja.js +8 -10
  80. package/dist/esm/i18n/ko.js +2 -4
  81. package/dist/esm/i18n/nb.js +2 -4
  82. package/dist/esm/i18n/nl.js +2 -4
  83. package/dist/esm/i18n/pl.js +2 -4
  84. package/dist/esm/i18n/pt_BR.js +2 -4
  85. package/dist/esm/i18n/ru.js +2 -4
  86. package/dist/esm/i18n/sv.js +2 -4
  87. package/dist/esm/i18n/th.js +2 -4
  88. package/dist/esm/i18n/tr.js +8 -10
  89. package/dist/esm/i18n/uk.js +2 -4
  90. package/dist/esm/i18n/vi.js +2 -4
  91. package/dist/esm/i18n/zh.js +2 -4
  92. package/dist/esm/i18n/zh_TW.js +2 -4
  93. package/dist/esm/utils/analytics/analytics.js +1 -1
  94. package/dist/esm/view/BlockCard/components/Action.js +1 -54
  95. package/dist/esm/view/BlockCard/index.js +29 -164
  96. package/dist/esm/view/CardWithUrl/component.js +1 -5
  97. package/dist/esm/view/LinkUrl/index.js +1 -1
  98. package/dist/types/classNames.d.ts +12 -10
  99. package/dist/types/extractors/common/actions/extractActions.d.ts +0 -8
  100. package/dist/types/extractors/common/actions/types.d.ts +0 -9
  101. package/dist/types/i18n/cs.d.ts +1 -3
  102. package/dist/types/i18n/da.d.ts +1 -3
  103. package/dist/types/i18n/de.d.ts +1 -3
  104. package/dist/types/i18n/en.d.ts +1 -3
  105. package/dist/types/i18n/en_GB.d.ts +1 -3
  106. package/dist/types/i18n/en_ZZ.d.ts +1 -3
  107. package/dist/types/i18n/es.d.ts +1 -3
  108. package/dist/types/i18n/fi.d.ts +1 -3
  109. package/dist/types/i18n/fr.d.ts +1 -3
  110. package/dist/types/i18n/hu.d.ts +1 -3
  111. package/dist/types/i18n/it.d.ts +1 -3
  112. package/dist/types/i18n/ja.d.ts +1 -3
  113. package/dist/types/i18n/ko.d.ts +1 -3
  114. package/dist/types/i18n/nb.d.ts +1 -3
  115. package/dist/types/i18n/nl.d.ts +1 -3
  116. package/dist/types/i18n/pl.d.ts +1 -3
  117. package/dist/types/i18n/pt_BR.d.ts +1 -3
  118. package/dist/types/i18n/ru.d.ts +1 -3
  119. package/dist/types/i18n/sv.d.ts +1 -3
  120. package/dist/types/i18n/th.d.ts +1 -3
  121. package/dist/types/i18n/tr.d.ts +1 -3
  122. package/dist/types/i18n/uk.d.ts +1 -3
  123. package/dist/types/i18n/vi.d.ts +1 -3
  124. package/dist/types/i18n/zh.d.ts +1 -3
  125. package/dist/types/i18n/zh_TW.d.ts +1 -3
  126. package/dist/types/utils/analytics/click.d.ts +1 -1
  127. package/dist/types/view/BlockCard/components/Action.d.ts +0 -4
  128. package/dist/types/view/BlockCard/index.d.ts +2 -17
  129. package/dist/types/view/BlockCard/types.d.ts +1 -6
  130. package/dist/types/view/Card/index.d.ts +1 -1
  131. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
  132. package/dist/types/view/FlexibleCard/components/utils.d.ts +1 -1
  133. package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  134. package/dist/types-ts4.5/classNames.d.ts +12 -10
  135. package/dist/types-ts4.5/extractors/common/actions/extractActions.d.ts +0 -8
  136. package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -9
  137. package/dist/types-ts4.5/i18n/cs.d.ts +1 -3
  138. package/dist/types-ts4.5/i18n/da.d.ts +1 -3
  139. package/dist/types-ts4.5/i18n/de.d.ts +1 -3
  140. package/dist/types-ts4.5/i18n/en.d.ts +1 -3
  141. package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -3
  142. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -3
  143. package/dist/types-ts4.5/i18n/es.d.ts +1 -3
  144. package/dist/types-ts4.5/i18n/fi.d.ts +1 -3
  145. package/dist/types-ts4.5/i18n/fr.d.ts +1 -3
  146. package/dist/types-ts4.5/i18n/hu.d.ts +1 -3
  147. package/dist/types-ts4.5/i18n/it.d.ts +1 -3
  148. package/dist/types-ts4.5/i18n/ja.d.ts +1 -3
  149. package/dist/types-ts4.5/i18n/ko.d.ts +1 -3
  150. package/dist/types-ts4.5/i18n/nb.d.ts +1 -3
  151. package/dist/types-ts4.5/i18n/nl.d.ts +1 -3
  152. package/dist/types-ts4.5/i18n/pl.d.ts +1 -3
  153. package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -3
  154. package/dist/types-ts4.5/i18n/ru.d.ts +1 -3
  155. package/dist/types-ts4.5/i18n/sv.d.ts +1 -3
  156. package/dist/types-ts4.5/i18n/th.d.ts +1 -3
  157. package/dist/types-ts4.5/i18n/tr.d.ts +1 -3
  158. package/dist/types-ts4.5/i18n/uk.d.ts +1 -3
  159. package/dist/types-ts4.5/i18n/vi.d.ts +1 -3
  160. package/dist/types-ts4.5/i18n/zh.d.ts +1 -3
  161. package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -3
  162. package/dist/types-ts4.5/utils/analytics/click.d.ts +1 -1
  163. package/dist/types-ts4.5/view/BlockCard/components/Action.d.ts +0 -4
  164. package/dist/types-ts4.5/view/BlockCard/index.d.ts +2 -17
  165. package/dist/types-ts4.5/view/BlockCard/types.d.ts +1 -6
  166. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  167. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
  168. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +1 -1
  169. package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  170. package/package.json +1 -1
  171. package/dist/cjs/extractors/block/index.js +0 -96
  172. package/dist/cjs/extractors/block/types.js +0 -5
  173. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +0 -106
  174. package/dist/cjs/state/reducers/types.js +0 -5
  175. package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -22
  176. package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -21
  177. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +0 -35
  178. package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -35
  179. package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -21
  180. package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -57
  181. package/dist/cjs/view/BlockCard/components/ActionList.js +0 -78
  182. package/dist/cjs/view/BlockCard/components/CollaboratorList.js +0 -52
  183. package/dist/cjs/view/BlockCard/components/Content.js +0 -45
  184. package/dist/cjs/view/BlockCard/components/ContentFooter.js +0 -41
  185. package/dist/cjs/view/BlockCard/components/ContentHeader.js +0 -45
  186. package/dist/cjs/view/BlockCard/components/Emoji.js +0 -33
  187. package/dist/cjs/view/BlockCard/components/Link.js +0 -31
  188. package/dist/cjs/view/BlockCard/components/Name.js +0 -61
  189. package/dist/cjs/view/BlockCard/components/Provider.js +0 -57
  190. package/dist/cjs/view/BlockCard/components/Thumbnail.js +0 -62
  191. package/dist/cjs/view/BlockCard/components/UnresolvedText.js +0 -24
  192. package/dist/cjs/view/BlockCard/views/ErroredView.js +0 -91
  193. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +0 -121
  194. package/dist/cjs/view/BlockCard/views/NotFoundView.js +0 -82
  195. package/dist/cjs/view/BlockCard/views/ResolvedView.js +0 -143
  196. package/dist/cjs/view/BlockCard/views/ResolvingView.js +0 -57
  197. package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +0 -72
  198. package/dist/cjs/view/BlockCard/views/styled.js +0 -18
  199. package/dist/cjs/view/CardWithData/component.js +0 -66
  200. package/dist/cjs/view/CardWithData/types.js +0 -5
  201. package/dist/cjs/view/common/Byline.js +0 -52
  202. package/dist/cjs/view/common/Metadata.js +0 -56
  203. package/dist/cjs/view/common/MetadataList.js +0 -43
  204. package/dist/es2019/extractors/block/index.js +0 -86
  205. package/dist/es2019/extractors/block/types.js +0 -1
  206. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +0 -91
  207. package/dist/es2019/state/reducers/types.js +0 -1
  208. package/dist/es2019/view/BlockCard/actions/AuthorizeAction.js +0 -9
  209. package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -11
  210. package/dist/es2019/view/BlockCard/actions/PreviewAction.js +0 -23
  211. package/dist/es2019/view/BlockCard/actions/RetryAction.js +0 -8
  212. package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -11
  213. package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -51
  214. package/dist/es2019/view/BlockCard/components/ActionList.js +0 -63
  215. package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -42
  216. package/dist/es2019/view/BlockCard/components/Content.js +0 -36
  217. package/dist/es2019/view/BlockCard/components/ContentFooter.js +0 -32
  218. package/dist/es2019/view/BlockCard/components/ContentHeader.js +0 -39
  219. package/dist/es2019/view/BlockCard/components/Emoji.js +0 -26
  220. package/dist/es2019/view/BlockCard/components/Link.js +0 -24
  221. package/dist/es2019/view/BlockCard/components/Name.js +0 -54
  222. package/dist/es2019/view/BlockCard/components/Provider.js +0 -51
  223. package/dist/es2019/view/BlockCard/components/Thumbnail.js +0 -58
  224. package/dist/es2019/view/BlockCard/components/UnresolvedText.js +0 -18
  225. package/dist/es2019/view/BlockCard/views/ErroredView.js +0 -78
  226. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -104
  227. package/dist/es2019/view/BlockCard/views/NotFoundView.js +0 -71
  228. package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -121
  229. package/dist/es2019/view/BlockCard/views/ResolvingView.js +0 -46
  230. package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +0 -60
  231. package/dist/es2019/view/BlockCard/views/styled.js +0 -10
  232. package/dist/es2019/view/CardWithData/component.js +0 -43
  233. package/dist/es2019/view/CardWithData/types.js +0 -1
  234. package/dist/es2019/view/common/Byline.js +0 -44
  235. package/dist/es2019/view/common/Metadata.js +0 -49
  236. package/dist/es2019/view/common/MetadataList.js +0 -34
  237. package/dist/esm/extractors/block/index.js +0 -89
  238. package/dist/esm/extractors/block/types.js +0 -1
  239. package/dist/esm/extractors/common/actions/extractPreviewAction.js +0 -99
  240. package/dist/esm/state/reducers/types.js +0 -1
  241. package/dist/esm/view/BlockCard/actions/AuthorizeAction.js +0 -15
  242. package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -14
  243. package/dist/esm/view/BlockCard/actions/PreviewAction.js +0 -30
  244. package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -28
  245. package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -14
  246. package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -50
  247. package/dist/esm/view/BlockCard/components/ActionList.js +0 -69
  248. package/dist/esm/view/BlockCard/components/CollaboratorList.js +0 -44
  249. package/dist/esm/view/BlockCard/components/Content.js +0 -38
  250. package/dist/esm/view/BlockCard/components/ContentFooter.js +0 -34
  251. package/dist/esm/view/BlockCard/components/ContentHeader.js +0 -38
  252. package/dist/esm/view/BlockCard/components/Emoji.js +0 -25
  253. package/dist/esm/view/BlockCard/components/Link.js +0 -24
  254. package/dist/esm/view/BlockCard/components/Name.js +0 -54
  255. package/dist/esm/view/BlockCard/components/Provider.js +0 -50
  256. package/dist/esm/view/BlockCard/components/Thumbnail.js +0 -57
  257. package/dist/esm/view/BlockCard/components/UnresolvedText.js +0 -17
  258. package/dist/esm/view/BlockCard/views/ErroredView.js +0 -87
  259. package/dist/esm/view/BlockCard/views/ForbiddenView.js +0 -113
  260. package/dist/esm/view/BlockCard/views/NotFoundView.js +0 -78
  261. package/dist/esm/view/BlockCard/views/ResolvedView.js +0 -135
  262. package/dist/esm/view/BlockCard/views/ResolvingView.js +0 -49
  263. package/dist/esm/view/BlockCard/views/UnauthorizedView.js +0 -68
  264. package/dist/esm/view/BlockCard/views/styled.js +0 -10
  265. package/dist/esm/view/CardWithData/component.js +0 -59
  266. package/dist/esm/view/CardWithData/types.js +0 -1
  267. package/dist/esm/view/common/Byline.js +0 -45
  268. package/dist/esm/view/common/Metadata.js +0 -48
  269. package/dist/esm/view/common/MetadataList.js +0 -35
  270. package/dist/types/extractors/block/index.d.ts +0 -10
  271. package/dist/types/extractors/block/types.d.ts +0 -13
  272. package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +0 -14
  273. package/dist/types/state/reducers/types.d.ts +0 -4
  274. package/dist/types/view/BlockCard/actions/AuthorizeAction.d.ts +0 -2
  275. package/dist/types/view/BlockCard/actions/DownloadAction.d.ts +0 -4
  276. package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +0 -27
  277. package/dist/types/view/BlockCard/actions/RetryAction.d.ts +0 -2
  278. package/dist/types/view/BlockCard/actions/ViewAction.d.ts +0 -4
  279. package/dist/types/view/BlockCard/components/ActionIcon.d.ts +0 -12
  280. package/dist/types/view/BlockCard/components/ActionList.d.ts +0 -10
  281. package/dist/types/view/BlockCard/components/CollaboratorList.d.ts +0 -18
  282. package/dist/types/view/BlockCard/components/Content.d.ts +0 -18
  283. package/dist/types/view/BlockCard/components/ContentFooter.d.ts +0 -12
  284. package/dist/types/view/BlockCard/components/ContentHeader.d.ts +0 -19
  285. package/dist/types/view/BlockCard/components/Emoji.d.ts +0 -10
  286. package/dist/types/view/BlockCard/components/Link.d.ts +0 -11
  287. package/dist/types/view/BlockCard/components/Name.d.ts +0 -21
  288. package/dist/types/view/BlockCard/components/Provider.d.ts +0 -11
  289. package/dist/types/view/BlockCard/components/Thumbnail.d.ts +0 -13
  290. package/dist/types/view/BlockCard/components/UnresolvedText.d.ts +0 -11
  291. package/dist/types/view/BlockCard/views/ErroredView.d.ts +0 -19
  292. package/dist/types/view/BlockCard/views/ForbiddenView.d.ts +0 -35
  293. package/dist/types/view/BlockCard/views/NotFoundView.d.ts +0 -26
  294. package/dist/types/view/BlockCard/views/ResolvedView.d.ts +0 -46
  295. package/dist/types/view/BlockCard/views/ResolvingView.d.ts +0 -18
  296. package/dist/types/view/BlockCard/views/UnauthorizedView.d.ts +0 -19
  297. package/dist/types/view/BlockCard/views/styled.d.ts +0 -5
  298. package/dist/types/view/CardWithData/component.d.ts +0 -5
  299. package/dist/types/view/CardWithData/types.d.ts +0 -15
  300. package/dist/types/view/common/Byline.d.ts +0 -13
  301. package/dist/types/view/common/Metadata.d.ts +0 -13
  302. package/dist/types/view/common/MetadataList.d.ts +0 -12
  303. package/dist/types-ts4.5/extractors/block/index.d.ts +0 -10
  304. package/dist/types-ts4.5/extractors/block/types.d.ts +0 -13
  305. package/dist/types-ts4.5/extractors/common/actions/extractPreviewAction.d.ts +0 -14
  306. package/dist/types-ts4.5/state/reducers/types.d.ts +0 -4
  307. package/dist/types-ts4.5/view/BlockCard/actions/AuthorizeAction.d.ts +0 -2
  308. package/dist/types-ts4.5/view/BlockCard/actions/DownloadAction.d.ts +0 -4
  309. package/dist/types-ts4.5/view/BlockCard/actions/PreviewAction.d.ts +0 -27
  310. package/dist/types-ts4.5/view/BlockCard/actions/RetryAction.d.ts +0 -2
  311. package/dist/types-ts4.5/view/BlockCard/actions/ViewAction.d.ts +0 -4
  312. package/dist/types-ts4.5/view/BlockCard/components/ActionIcon.d.ts +0 -12
  313. package/dist/types-ts4.5/view/BlockCard/components/ActionList.d.ts +0 -10
  314. package/dist/types-ts4.5/view/BlockCard/components/CollaboratorList.d.ts +0 -18
  315. package/dist/types-ts4.5/view/BlockCard/components/Content.d.ts +0 -18
  316. package/dist/types-ts4.5/view/BlockCard/components/ContentFooter.d.ts +0 -12
  317. package/dist/types-ts4.5/view/BlockCard/components/ContentHeader.d.ts +0 -19
  318. package/dist/types-ts4.5/view/BlockCard/components/Emoji.d.ts +0 -10
  319. package/dist/types-ts4.5/view/BlockCard/components/Link.d.ts +0 -11
  320. package/dist/types-ts4.5/view/BlockCard/components/Name.d.ts +0 -21
  321. package/dist/types-ts4.5/view/BlockCard/components/Provider.d.ts +0 -11
  322. package/dist/types-ts4.5/view/BlockCard/components/Thumbnail.d.ts +0 -13
  323. package/dist/types-ts4.5/view/BlockCard/components/UnresolvedText.d.ts +0 -11
  324. package/dist/types-ts4.5/view/BlockCard/views/ErroredView.d.ts +0 -19
  325. package/dist/types-ts4.5/view/BlockCard/views/ForbiddenView.d.ts +0 -35
  326. package/dist/types-ts4.5/view/BlockCard/views/NotFoundView.d.ts +0 -26
  327. package/dist/types-ts4.5/view/BlockCard/views/ResolvedView.d.ts +0 -46
  328. package/dist/types-ts4.5/view/BlockCard/views/ResolvingView.d.ts +0 -18
  329. package/dist/types-ts4.5/view/BlockCard/views/UnauthorizedView.d.ts +0 -19
  330. package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +0 -5
  331. package/dist/types-ts4.5/view/CardWithData/component.d.ts +0 -5
  332. package/dist/types-ts4.5/view/CardWithData/types.d.ts +0 -15
  333. package/dist/types-ts4.5/view/common/Byline.d.ts +0 -13
  334. package/dist/types-ts4.5/view/common/Metadata.d.ts +0 -13
  335. package/dist/types-ts4.5/view/common/MetadataList.d.ts +0 -12
@@ -1,104 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
9
- import { FormattedMessage } from 'react-intl-next';
10
- import LockIcon from '@atlaskit/icon/utility/migration/lock-locked--lock-filled';
11
- import { Flex, xcss } from '@atlaskit/primitives';
12
- import { R300 } from '@atlaskit/theme/colors';
13
- import { messages } from '../../../messages';
14
- import { Byline } from '../../common/Byline';
15
- import { ActionList } from '../components/ActionList';
16
- import { Content } from '../components/Content';
17
- import { ContentFooter } from '../components/ContentFooter';
18
- import { ContentHeader } from '../components/ContentHeader';
19
- import { Frame } from '../components/Frame';
20
- import { Link } from '../components/Link';
21
- import { Provider } from '../components/Provider';
22
- import { UnresolvedText } from '../components/UnresolvedText';
23
- import { handleClickCommon } from '../utils/handlers';
24
- const iconWrapperStyles = xcss({
25
- marginRight: 'space.050'
26
- });
27
- /**
28
- * Class name for selecting non-flexible forbidden block card
29
- *
30
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
31
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
32
- */
33
- export const blockCardForbiddenViewClassName = 'block-card-forbidden-view';
34
-
35
- /**
36
- * Class name for selecting link inside non-flexible forbidden block card
37
- *
38
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
39
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
40
- */
41
- export const blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
42
- export const ForbiddenView = ({
43
- context = {
44
- text: ''
45
- },
46
- isSelected = false,
47
- actions = [],
48
- testId = 'block-card-forbidden-view',
49
- link = '',
50
- onClick = () => {},
51
- requestAccessContext = {},
52
- actionOptions
53
- }) => {
54
- const handleClick = event => handleClickCommon(event, onClick);
55
- const {
56
- action,
57
- descriptiveMessageKey = 'invalid_permissions_description',
58
- hostname = '',
59
- buttonDisabled
60
- } = requestAccessContext;
61
- const items = action !== undefined && !(buttonDisabled !== null && buttonDisabled !== void 0 ? buttonDisabled : false) ? [...actions, action] : actions;
62
- return jsx(Frame, {
63
- isSelected: isSelected,
64
- testId: testId
65
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
66
- ,
67
- className: blockCardForbiddenViewClassName,
68
- isFluidHeight: true
69
- }, jsx(Content, {
70
- isCompact: true
71
- }, jsx("div", null, jsx(ContentHeader, {
72
- onClick: handleClick,
73
- link: link
74
- }, jsx(Link, {
75
- url: link,
76
- testId: testId
77
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
78
- ,
79
- className: blockCardForbiddenViewLinkClassName
80
- })), jsx(Byline, null, jsx(UnresolvedText, {
81
- icon: jsx(Flex, {
82
- alignItems: "center",
83
- xcss: iconWrapperStyles
84
- }, jsx(LockIcon, {
85
- label: "forbidden-lock-icon",
86
- LEGACY_size: "small",
87
- color: `var(--ds-icon-danger, ${R300})`,
88
- testId: `${testId}-lock-icon`,
89
- LEGACY_margin: `0 ${"var(--ds-space-negative-050, -4px)"} 0 0`
90
- })),
91
- text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
92
- values: {
93
- product: context.text,
94
- context: context.text,
95
- hostname
96
- }
97
- }))
98
- }))), jsx(ContentFooter, null, jsx(Provider, {
99
- name: context.text,
100
- icon: context.icon
101
- }), !(actionOptions !== null && actionOptions !== void 0 && actionOptions.hide) && jsx(ActionList, {
102
- items: items
103
- }))));
104
- };
@@ -1,71 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
9
- import { FormattedMessage } from 'react-intl-next';
10
- import WarningIcon from '@atlaskit/icon/glyph/warning';
11
- import { R300 } from '@atlaskit/theme/colors';
12
- import { messages } from '../../../messages';
13
- import { Byline } from '../../common/Byline';
14
- import { Content } from '../components/Content';
15
- import { ContentFooter } from '../components/ContentFooter';
16
- import { ContentHeader } from '../components/ContentHeader';
17
- import { Frame } from '../components/Frame';
18
- import { Link } from '../components/Link';
19
- import { Provider } from '../components/Provider';
20
- import { UnresolvedText } from '../components/UnresolvedText';
21
- import { handleClickCommon } from '../utils/handlers';
22
- const textDescriptionProps = {
23
- ...messages.not_found_description
24
- };
25
- /**
26
- * Class name for selecting non-flexible not-found block card
27
- *
28
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
29
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
30
- */
31
- export const blockCardNotFoundViewClassName = 'block-card-not-found-view';
32
- export const NotFoundView = ({
33
- context = {
34
- text: ''
35
- },
36
- isSelected = false,
37
- testId = 'block-card-not-found-view',
38
- link = '',
39
- onClick = () => {}
40
- }) => {
41
- const handleClick = event => handleClickCommon(event, onClick);
42
- return jsx(Frame, {
43
- isSelected: isSelected,
44
- testId: testId
45
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
46
- ,
47
- className: blockCardNotFoundViewClassName,
48
- isFluidHeight: true
49
- }, jsx(Content, {
50
- isCompact: true
51
- }, jsx("div", null, jsx(ContentHeader, {
52
- onClick: handleClick,
53
- link: link
54
- }, jsx(Link, {
55
- url: link,
56
- testId: testId
57
- })), jsx(Byline, null, jsx(UnresolvedText, {
58
- icon:
59
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19513
60
- jsx(WarningIcon, {
61
- label: "not-found-warning-icon",
62
- size: "small",
63
- primaryColor: `var(--ds-icon-warning, ${R300})`,
64
- testId: `${testId}-warning-icon`
65
- }),
66
- text: jsx(FormattedMessage, textDescriptionProps)
67
- }))), jsx(ContentFooter, null, jsx(Provider, {
68
- name: context.text,
69
- icon: context.icon
70
- }))));
71
- };
@@ -1,121 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import Lozenge from '@atlaskit/lozenge';
10
- import { Byline } from '../../common/Byline';
11
- import { Icon } from '../../common/Icon';
12
- import { MetadataList } from '../../common/MetadataList';
13
- import { gs } from '../../common/utils';
14
- import { ActionList } from '../components/ActionList';
15
- import { CollaboratorList } from '../components/CollaboratorList';
16
- import { Content } from '../components/Content';
17
- import { ContentFooter } from '../components/ContentFooter';
18
- import { ContentHeader } from '../components/ContentHeader';
19
- import { Emoji } from '../components/Emoji';
20
- import { Frame } from '../components/Frame';
21
- import { Name } from '../components/Name';
22
- import { Provider } from '../components/Provider';
23
- import { Thumbnail } from '../components/Thumbnail';
24
- import { handleClickCommon } from '../utils/handlers';
25
- import { LozengeBlockWrapper } from './styled';
26
- const styles = css({
27
- display: 'flex',
28
- justifyContent: 'space-between',
29
- alignItems: 'flex-start'
30
- });
31
- const lozengeStyles = {
32
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
33
- height: gs(2.5),
34
- display: 'flex',
35
- alignItems: 'center',
36
- justifyContent: 'center'
37
- };
38
- /**
39
- * Class name for selecting non-flexible resolved block card
40
- *
41
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
42
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
43
- */
44
- export const blockCardResolvedViewClassName = 'block-card-resolved-view';
45
- /**
46
- * Class name for selecting non-flexible resolved byline
47
- *
48
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
49
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
50
- */
51
- export const blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
52
- export const ResolvedView = ({
53
- icon = {},
54
- actions = [],
55
- thumbnail,
56
- context = {
57
- text: ''
58
- },
59
- title = '',
60
- titleTextColor,
61
- titlePrefix,
62
- isSelected = false,
63
- users = [],
64
- handleAvatarClick = () => {},
65
- handleMoreAvatarsClick = () => {},
66
- onClick = () => {},
67
- link = '',
68
- byline = '',
69
- lozenge,
70
- details = [],
71
- testId = 'block-card-resolved-view'
72
- }) => {
73
- const resolvedMetadata = details.length > 0 ? jsx(MetadataList, {
74
- testId: testId ? `${testId}-meta` : undefined,
75
- items: details
76
- }) : undefined;
77
- const resolvedByline = jsx(Byline, {
78
- testId: testId ? `${testId}-by` : undefined
79
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
80
- ,
81
- className: blockCardResolvedViewByClassName
82
- }, byline);
83
- const handleClick = event => handleClickCommon(event, onClick);
84
- const hasActions = actions.length > 0;
85
- return jsx(Frame, {
86
- isSelected: isSelected,
87
- testId: testId
88
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
89
- ,
90
- className: blockCardResolvedViewClassName
91
- }, jsx(Content, null, jsx("div", null, jsx("div", {
92
- css: styles
93
- }, jsx(ContentHeader, {
94
- onClick: handleClick,
95
- link: link
96
- }, titlePrefix ? jsx(Emoji, {
97
- emoji: titlePrefix
98
- }) : jsx(Icon, icon), jsx(Name, {
99
- name: title,
100
- textColor: titleTextColor
101
- }), lozenge && jsx(LozengeBlockWrapper, {
102
- css: lozengeStyles
103
- }, jsx(Lozenge, _extends({
104
- style: lozenge.style
105
- }, lozenge), lozenge.text))), jsx(CollaboratorList, {
106
- items: users,
107
- handleAvatarClick: handleAvatarClick,
108
- handleMoreAvatarsClick: handleMoreAvatarsClick,
109
- testId: testId ? `${testId}-collaborator-list` : undefined
110
- })), resolvedByline, resolvedMetadata), jsx(ContentFooter, {
111
- hasSpaceBetween: hasActions
112
- }, jsx(Provider, {
113
- name: context.text,
114
- icon: context.icon
115
- }), hasActions && jsx(ActionList, {
116
- items: actions
117
- }))), thumbnail ? jsx(Thumbnail, {
118
- src: thumbnail,
119
- testId: testId ? `${testId}-thumb` : undefined
120
- }) : null);
121
- };
@@ -1,46 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { FormattedMessage } from 'react-intl-next';
8
- import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--editor-file';
9
- import { Inline } from '@atlaskit/primitives';
10
- import { N50, N90 } from '@atlaskit/theme/colors';
11
- import { messages } from '../../../messages';
12
- import { gs } from '../../common/utils';
13
- import { Frame } from '../components/Frame';
14
- /**
15
- * Class name for selecting non-flexible resolving block card
16
- *
17
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
18
- * Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
19
- */
20
- export const blockCardResolvingViewClassName = 'block-card-resolving-view';
21
- const messageStyles = css({
22
- font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
23
- color: `var(--ds-text-subtlest, ${N90})`,
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
- marginLeft: gs(0.5)
26
- });
27
- export const ResolvingView = ({
28
- isSelected = false,
29
- testId = 'block-card-resolving-view',
30
- inheritDimensions
31
- }) => jsx(Frame, {
32
- inheritDimensions: inheritDimensions,
33
- compact: true,
34
- isSelected: isSelected,
35
- testId: testId
36
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
37
- ,
38
- className: blockCardResolvingViewClassName
39
- }, jsx(DocumentFilledIcon, {
40
- LEGACY_size: "medium",
41
- color: `var(--ds-icon-subtle, ${N50})`,
42
- label: "document-icon",
43
- LEGACY_margin: "0 -4.3px 0 -4px"
44
- }), jsx(Inline, {
45
- xcss: messageStyles
46
- }, jsx(FormattedMessage, messages.loading)));
@@ -1,60 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
9
- import { FormattedMessage } from 'react-intl-next';
10
- import { messages } from '../../../messages';
11
- import { Byline } from '../../common/Byline';
12
- import { ActionList } from '../components/ActionList';
13
- import { Content } from '../components/Content';
14
- import { ContentFooter } from '../components/ContentFooter';
15
- import { ContentHeader } from '../components/ContentHeader';
16
- import { Frame } from '../components/Frame';
17
- import { Link } from '../components/Link';
18
- import { Provider } from '../components/Provider';
19
- import { handleClickCommon } from '../utils/handlers';
20
- const textBylineProps = {
21
- ...messages.connect_link_account_card_description
22
- };
23
- export const UnauthorizedView = ({
24
- context = {
25
- text: ''
26
- },
27
- isSelected = false,
28
- actions = [],
29
- testId = 'block-card-unauthorized-view',
30
- actionOptions,
31
- link = '',
32
- onClick = () => {}
33
- }) => {
34
- const handleClick = event => handleClickCommon(event, onClick);
35
- return jsx(Frame, {
36
- isSelected: isSelected,
37
- testId: testId,
38
- isFluidHeight: true
39
- }, jsx(Content, {
40
- isCompact: true
41
- }, jsx("div", null, jsx(ContentHeader, {
42
- onClick: handleClick,
43
- link: link
44
- }, jsx(Link, {
45
- url: link,
46
- testId: testId
47
- })), jsx(Byline, {
48
- testId: testId ? `${testId}-byline` : undefined,
49
- text: jsx(FormattedMessage, _extends({}, textBylineProps, {
50
- values: {
51
- context: context.text
52
- }
53
- }))
54
- })), jsx(ContentFooter, null, jsx(Provider, {
55
- name: context.text,
56
- icon: context.icon
57
- }), !(actionOptions !== null && actionOptions !== void 0 && actionOptions.hide) && jsx(ActionList, {
58
- items: actions
59
- }))));
60
- };
@@ -1,10 +0,0 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import styled from '@emotion/styled';
3
- // TODO: Replace overrides with proper AtlasKit solution.
4
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
- export const LozengeBlockWrapper = styled.span({
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
7
- '& > span': {
8
- marginLeft: "var(--ds-space-050, 4px)"
9
- }
10
- });
@@ -1,43 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import { extractBlockProps } from '../../extractors/block';
4
- import { extractInlineProps } from '../../extractors/inline';
5
- import { getEmptyJsonLd } from '../../utils/jsonld';
6
- import { BlockCardResolvedView } from '../BlockCard';
7
- import { InlineCardResolvedView } from '../InlineCard/ResolvedView';
8
- export class CardWithDataContent extends React.Component {
9
- render() {
10
- const {
11
- data: details,
12
- isSelected,
13
- appearance,
14
- onClick,
15
- onResolve,
16
- testId
17
- } = this.props;
18
- if (appearance === 'inline') {
19
- const props = extractInlineProps(details || getEmptyJsonLd());
20
- if (onResolve) {
21
- onResolve({
22
- title: props.title
23
- });
24
- }
25
- return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, props, {
26
- isSelected: isSelected,
27
- onClick: onClick,
28
- testId: testId
29
- }));
30
- } else {
31
- const props = extractBlockProps(details || getEmptyJsonLd());
32
- if (onResolve) {
33
- onResolve({
34
- title: props.title
35
- });
36
- }
37
- return /*#__PURE__*/React.createElement(BlockCardResolvedView, _extends({}, props, {
38
- isSelected: isSelected,
39
- onClick: onClick
40
- }));
41
- }
42
- }
43
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,44 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { N300 } from '@atlaskit/theme/colors';
8
- import { gs, mq } from './utils';
9
- const baseStyles = css({
10
- // Spec: only allow two lines MAX to be shown.
11
- display: '-webkit-box',
12
- overflow: 'hidden',
13
- textOverflow: 'ellipsis',
14
- WebkitLineClamp: 2,
15
- WebkitBoxOrient: 'vertical',
16
- wordBreak: 'break-word',
17
- whiteSpace: 'pre-line',
18
- // EDM-713: fixes copy-paste from renderer to editor for Firefox
19
- // due to HTML its unwrapping behaviour on paste.
20
- MozUserSelect: 'none'
21
- });
22
-
23
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
24
- const styles = mq({
25
- fontSize: gs(1.5),
26
- lineHeight: gs(2.5),
27
- color: `${`var(--ds-text-subtlest, ${N300})`}`,
28
- fontWeight: 'normal',
29
- marginTop: gs(0.5),
30
- // Fallback options.
31
- maxHeight: gs(5)
32
- });
33
- export const Byline = ({
34
- text,
35
- children,
36
- testId,
37
- className
38
- }) => jsx("span", {
39
- css: [baseStyles, styles],
40
- "data-testid": testId
41
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
42
- ,
43
- className: className
44
- }, text || children);
@@ -1,49 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { N300 } from '@atlaskit/theme/colors';
8
- import Tooltip from '@atlaskit/tooltip';
9
- const wrapperStyles = css({
10
- display: 'flex',
11
- alignItems: 'center',
12
- marginRight: "var(--ds-space-050, 4px)"
13
- });
14
- const imgStyles = css({
15
- width: "var(--ds-space-100, 8px)",
16
- height: "var(--ds-space-100, 8px)"
17
- });
18
- const textStyles = css({
19
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
20
- color: `${`var(--ds-text-subtlest, ${N300})`}`,
21
- marginRight: "var(--ds-space-050, 4px)",
22
- marginLeft: "var(--ds-space-025, 2px)"
23
- });
24
- export const Metadata = ({
25
- text,
26
- icon,
27
- iconUrl,
28
- tooltip
29
- }) => {
30
- let metadataIcon = icon || null;
31
- if (!metadataIcon && iconUrl) {
32
- // eslint-disable-next-line jsx-a11y/alt-text
33
- metadataIcon = jsx("img", {
34
- src: iconUrl,
35
- css: imgStyles
36
- });
37
- }
38
- const metadata = jsx("div", {
39
- css: wrapperStyles
40
- }, metadataIcon, jsx("span", {
41
- css: textStyles
42
- }, text));
43
- if (tooltip) {
44
- return jsx(Tooltip, {
45
- content: tooltip
46
- }, metadata);
47
- }
48
- return metadata;
49
- };
@@ -1,34 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
8
- import { Metadata } from './Metadata';
9
- import { gs } from './utils';
10
- export const metadataListClassName = 'smart-link-metadata-list';
11
- const wrapperStyles = css({
12
- display: 'flex',
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
14
- marginTop: gs(0.5),
15
- alignItems: 'center',
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
17
- '&:last-child': {
18
- marginRight: '0px'
19
- }
20
- });
21
- export const MetadataList = ({
22
- items,
23
- testId
24
- }) => {
25
- return jsx("div", {
26
- css: wrapperStyles,
27
- "data-testid": testId
28
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
29
- ,
30
- className: metadataListClassName
31
- }, items.map(item => jsx(Metadata, _extends({
32
- key: item.text
33
- }, item))));
34
- };
@@ -1,89 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { extractImage, extractLink, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractProvider, extractTitle } from '@atlaskit/link-extractors';
5
- import { extractClientActions } from '../common/actions/extractActions';
6
- import { extractPreviewAction } from '../common/actions/extractPreviewAction';
7
- import { extractByline } from '../common/byline/extractByline';
8
- import { extractAttachmentCount, extractCommentCount, extractProgrammingLanguage, extractSubscriberCount } from '../common/detail';
9
- import { extractIcon } from '../common/icon';
10
- import { extractLozenge } from '../common/lozenge';
11
- import { extractIsTrusted } from '../common/meta/extractIsTrusted';
12
- import { extractSummary, extractTitleTextColor } from '../common/primitives';
13
- import { extractTitlePrefix } from '../common/title-prefix/extractTitlePrefix';
14
- var extractBlockIcon = function extractBlockIcon(jsonLd) {
15
- var icon = extractIcon(jsonLd);
16
- if (typeof icon === 'string') {
17
- return {
18
- url: icon
19
- };
20
- } else {
21
- return {
22
- icon: icon
23
- };
24
- }
25
- };
26
- var extractBlockDetails = function extractBlockDetails(jsonLd) {
27
- return [extractCommentCount(jsonLd), extractProgrammingLanguage(jsonLd), extractSubscriberCount(jsonLd), extractAttachmentCount(jsonLd)].filter(function (detail) {
28
- return !!detail;
29
- });
30
- };
31
- export var extractBlockActions = function extractBlockActions(props, jsonLd, opts, platform, meta) {
32
- if (opts) {
33
- var handleInvoke = opts.handleInvoke,
34
- actionOptions = opts.actionOptions;
35
- var actions = extractClientActions(jsonLd, handleInvoke, actionOptions);
36
- var previewAction = extractPreviewAction(_objectSpread(_objectSpread({}, opts), {}, {
37
- viewProps: props,
38
- jsonLd: jsonLd,
39
- platform: platform,
40
- meta: meta
41
- }));
42
-
43
- // The previewAction should always be the last action
44
- if (previewAction) {
45
- actions.push(previewAction);
46
- }
47
- return actions;
48
- }
49
- return [];
50
- };
51
- export var extractBlockUsers = function extractBlockUsers(jsonLd) {
52
- if (jsonLd['@type'] === 'atlassian:Project') {
53
- return extractMembers(jsonLd);
54
- } else if (jsonLd['@type'] === 'atlassian:Task') {
55
- var assignedMembers = extractPersonAssignedTo(jsonLd);
56
- if (assignedMembers) {
57
- return [assignedMembers];
58
- }
59
- } else if (jsonLd['@type'] === 'atlassian:SourceCodePullRequest') {
60
- return extractPersonCreatedBy(jsonLd);
61
- } else {
62
- var updatedBy = extractPersonUpdatedBy(jsonLd);
63
- var updatedByMembers;
64
- if (updatedBy) {
65
- updatedByMembers = [updatedBy];
66
- }
67
- var createdByMembers = extractPersonCreatedBy(jsonLd);
68
- return updatedByMembers || createdByMembers;
69
- }
70
- };
71
- export var extractBlockProps = function extractBlockProps(jsonLd, meta, opts, renderers, platform) {
72
- var props = {
73
- link: extractLink(jsonLd),
74
- title: extractTitle(jsonLd),
75
- titleTextColor: extractTitleTextColor(jsonLd),
76
- lozenge: extractLozenge(jsonLd),
77
- icon: extractBlockIcon(jsonLd),
78
- context: extractProvider(jsonLd),
79
- details: extractBlockDetails(jsonLd),
80
- byline: extractSummary(jsonLd) || extractByline(jsonLd),
81
- thumbnail: extractImage(jsonLd),
82
- users: extractBlockUsers(jsonLd),
83
- titlePrefix: extractTitlePrefix(jsonLd, renderers, 'block'),
84
- isTrusted: extractIsTrusted(meta)
85
- };
86
- return _objectSpread(_objectSpread({}, props), {}, {
87
- actions: extractBlockActions(props, jsonLd, opts, platform, meta)
88
- });
89
- };