@atlaskit/media-card 75.0.1 → 76.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/card/card.js +1 -1
  3. package/dist/cjs/card/cardState.js +1 -1
  4. package/dist/cjs/card/cardView.js +102 -196
  5. package/dist/cjs/card/getCardStatus.js +2 -41
  6. package/dist/cjs/card/inlinePlayerWrapper.js +3 -3
  7. package/dist/cjs/card/inlinePlayerWrapperStyles.js +30 -0
  8. package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
  9. package/dist/cjs/card/ui/actionsBar/actionsBar.js +1 -1
  10. package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
  11. package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
  12. package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/styles.js +9 -6
  13. package/dist/cjs/card/ui/actionsBar/styles.js +1 -1
  14. package/dist/cjs/card/ui/blanket/styles.js +1 -1
  15. package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -1
  16. package/dist/cjs/card/ui/progressBar/styles.js +2 -2
  17. package/dist/cjs/card/ui/styles.js +16 -2
  18. package/dist/cjs/card/ui/tickBox/styles.js +1 -1
  19. package/dist/cjs/card/ui/titleBox/styles.js +3 -3
  20. package/dist/cjs/card/ui/wrapper/index.js +12 -0
  21. package/dist/cjs/card/ui/{newFileExperience → wrapper}/styles.js +7 -8
  22. package/dist/cjs/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +4 -4
  23. package/dist/cjs/classnames.js +1 -7
  24. package/dist/cjs/index.js +3 -9
  25. package/dist/cjs/inline/loader.js +15 -6
  26. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
  27. package/dist/cjs/inline/mediaInlineCard.js +62 -12
  28. package/dist/cjs/inline/mediaInlineCardAnalytics.js +60 -0
  29. package/dist/cjs/utils/cardDimensions.js +1 -86
  30. package/dist/cjs/utils/index.js +1 -128
  31. package/dist/cjs/utils/lightCards/cardError.js +1 -1
  32. package/dist/cjs/utils/lightCards/cardLoading.js +3 -16
  33. package/dist/cjs/utils/lightCards/lightCardWrappers.js +2 -12
  34. package/dist/cjs/utils/lightCards/styles.js +4 -10
  35. package/dist/cjs/utils/ufoExperiences.js +1 -1
  36. package/dist/cjs/version.json +1 -1
  37. package/dist/es2019/card/card.js +1 -1
  38. package/dist/es2019/card/cardState.js +1 -1
  39. package/dist/es2019/card/cardView.js +54 -154
  40. package/dist/es2019/card/getCardStatus.js +1 -41
  41. package/dist/es2019/card/inlinePlayerWrapper.js +1 -1
  42. package/dist/es2019/card/inlinePlayerWrapperStyles.js +47 -0
  43. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  44. package/dist/es2019/card/ui/actionsBar/actionsBar.js +1 -1
  45. package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
  46. package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
  47. package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/styles.js +10 -2
  48. package/dist/es2019/card/ui/actionsBar/styles.js +1 -1
  49. package/dist/es2019/card/ui/blanket/styles.js +1 -1
  50. package/dist/es2019/card/ui/imageRenderer/imageRenderer.js +1 -1
  51. package/dist/es2019/card/ui/progressBar/styles.js +1 -1
  52. package/dist/es2019/card/ui/styles.js +10 -1
  53. package/dist/es2019/card/ui/tickBox/styles.js +1 -1
  54. package/dist/es2019/card/ui/titleBox/styles.js +1 -1
  55. package/dist/es2019/card/ui/wrapper/index.js +1 -0
  56. package/dist/es2019/card/ui/{newFileExperience → wrapper}/styles.js +3 -3
  57. package/dist/es2019/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +3 -3
  58. package/dist/es2019/classnames.js +1 -1
  59. package/dist/es2019/index.js +2 -2
  60. package/dist/es2019/inline/loader.js +15 -6
  61. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
  62. package/dist/es2019/inline/mediaInlineCard.js +51 -8
  63. package/dist/es2019/inline/mediaInlineCardAnalytics.js +48 -0
  64. package/dist/es2019/utils/cardDimensions.js +0 -76
  65. package/dist/es2019/utils/index.js +1 -5
  66. package/dist/es2019/utils/lightCards/cardError.js +1 -1
  67. package/dist/es2019/utils/lightCards/cardLoading.js +4 -17
  68. package/dist/es2019/utils/lightCards/lightCardWrappers.js +1 -10
  69. package/dist/es2019/utils/lightCards/styles.js +1 -20
  70. package/dist/es2019/utils/ufoExperiences.js +1 -1
  71. package/dist/es2019/version.json +1 -1
  72. package/dist/esm/card/card.js +1 -1
  73. package/dist/esm/card/cardState.js +1 -1
  74. package/dist/esm/card/cardView.js +104 -198
  75. package/dist/esm/card/getCardStatus.js +2 -41
  76. package/dist/esm/card/inlinePlayerWrapper.js +1 -1
  77. package/dist/esm/card/inlinePlayerWrapperStyles.js +22 -0
  78. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  79. package/dist/esm/card/ui/actionsBar/actionsBar.js +1 -1
  80. package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
  81. package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
  82. package/dist/esm/{utils → card/ui/actionsBar}/cardActions/styles.js +8 -5
  83. package/dist/esm/card/ui/actionsBar/styles.js +1 -1
  84. package/dist/esm/card/ui/blanket/styles.js +1 -1
  85. package/dist/esm/card/ui/imageRenderer/imageRenderer.js +1 -1
  86. package/dist/esm/card/ui/progressBar/styles.js +1 -1
  87. package/dist/esm/card/ui/styles.js +13 -1
  88. package/dist/esm/card/ui/tickBox/styles.js +1 -1
  89. package/dist/esm/card/ui/titleBox/styles.js +1 -1
  90. package/dist/esm/card/ui/wrapper/index.js +1 -0
  91. package/dist/esm/card/ui/{newFileExperience → wrapper}/styles.js +3 -3
  92. package/dist/esm/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +3 -3
  93. package/dist/esm/classnames.js +1 -1
  94. package/dist/esm/index.js +2 -2
  95. package/dist/esm/inline/loader.js +15 -6
  96. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
  97. package/dist/esm/inline/mediaInlineCard.js +62 -12
  98. package/dist/esm/inline/mediaInlineCardAnalytics.js +50 -0
  99. package/dist/esm/utils/cardDimensions.js +0 -76
  100. package/dist/esm/utils/index.js +1 -5
  101. package/dist/esm/utils/lightCards/cardError.js +1 -1
  102. package/dist/esm/utils/lightCards/cardLoading.js +4 -17
  103. package/dist/esm/utils/lightCards/lightCardWrappers.js +1 -10
  104. package/dist/esm/utils/lightCards/styles.js +3 -7
  105. package/dist/esm/utils/ufoExperiences.js +1 -1
  106. package/dist/esm/version.json +1 -1
  107. package/dist/types/card/cardView.d.ts +3 -6
  108. package/dist/types/card/getCardStatus.d.ts +1 -2
  109. package/dist/{types-ts4.5/card/styles/styles.d.ts → types/card/inlinePlayerWrapperStyles.d.ts} +1 -5
  110. package/dist/types/card/types.d.ts +1 -12
  111. package/dist/{types-ts4.5/utils → types/card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.d.ts +1 -1
  112. package/dist/{types-ts4.5/utils → types/card/ui/actionsBar}/cardActions/cardActionsView.d.ts +1 -1
  113. package/dist/types/card/ui/styles.d.ts +2 -0
  114. package/dist/types/card/ui/wrapper/index.d.ts +1 -0
  115. package/dist/types/card/ui/wrapper/styles.d.ts +5 -0
  116. package/dist/{types-ts4.5/card/ui/newFileExperience → types/card/ui/wrapper}/types.d.ts +1 -1
  117. package/dist/{types-ts4.5/card/cardImageView/cardViewWrapper.d.ts → types/card/ui/wrapper/wrapper.d.ts} +1 -1
  118. package/dist/types/classnames.d.ts +1 -1
  119. package/dist/types/index.d.ts +2 -2
  120. package/dist/types/inline/loader.d.ts +1 -1
  121. package/dist/types/inline/mediaInlineCardAnalytics.d.ts +6 -0
  122. package/dist/types/utils/analytics.d.ts +7 -1
  123. package/dist/types/utils/cardDimensions.d.ts +0 -35
  124. package/dist/types/utils/index.d.ts +1 -9
  125. package/dist/types/utils/lightCards/lightCardWrappers.d.ts +0 -1
  126. package/dist/types/utils/lightCards/styles.d.ts +0 -2
  127. package/dist/types-ts4.5/card/cardView.d.ts +3 -6
  128. package/dist/types-ts4.5/card/getCardStatus.d.ts +1 -2
  129. package/dist/{types/card/styles/styles.d.ts → types-ts4.5/card/inlinePlayerWrapperStyles.d.ts} +1 -5
  130. package/dist/types-ts4.5/card/types.d.ts +1 -12
  131. package/dist/{types/utils → types-ts4.5/card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.d.ts +1 -1
  132. package/dist/{types/utils → types-ts4.5/card/ui/actionsBar}/cardActions/cardActionsView.d.ts +1 -1
  133. package/dist/types-ts4.5/card/ui/styles.d.ts +2 -0
  134. package/dist/types-ts4.5/card/ui/wrapper/index.d.ts +1 -0
  135. package/dist/types-ts4.5/card/ui/wrapper/styles.d.ts +5 -0
  136. package/dist/{types/card/ui/newFileExperience → types-ts4.5/card/ui/wrapper}/types.d.ts +1 -1
  137. package/dist/{types/card/cardImageView/cardViewWrapper.d.ts → types-ts4.5/card/ui/wrapper/wrapper.d.ts} +1 -1
  138. package/dist/types-ts4.5/classnames.d.ts +1 -1
  139. package/dist/types-ts4.5/index.d.ts +2 -2
  140. package/dist/types-ts4.5/inline/loader.d.ts +1 -1
  141. package/dist/types-ts4.5/inline/mediaInlineCardAnalytics.d.ts +6 -0
  142. package/dist/types-ts4.5/utils/analytics.d.ts +7 -1
  143. package/dist/types-ts4.5/utils/cardDimensions.d.ts +0 -35
  144. package/dist/types-ts4.5/utils/index.d.ts +1 -9
  145. package/dist/types-ts4.5/utils/lightCards/lightCardWrappers.d.ts +0 -1
  146. package/dist/types-ts4.5/utils/lightCards/styles.d.ts +0 -2
  147. package/package.json +5 -5
  148. package/report.api.md +2 -6
  149. package/dist/cjs/card/cardImageView/cardImageViewWrapper.js +0 -51
  150. package/dist/cjs/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -51
  151. package/dist/cjs/card/cardImageView/cardOverlay/index.js +0 -183
  152. package/dist/cjs/card/cardImageView/cardOverlay/styles.js +0 -63
  153. package/dist/cjs/card/cardImageView/cardViewWrapper.js +0 -32
  154. package/dist/cjs/card/cardImageView/fileCardImageView.js +0 -310
  155. package/dist/cjs/card/cardImageView/index.js +0 -12
  156. package/dist/cjs/card/cardImageView/styles.js +0 -48
  157. package/dist/cjs/card/styles/animations.js +0 -12
  158. package/dist/cjs/card/styles/config.js +0 -8
  159. package/dist/cjs/card/styles/easing.js +0 -10
  160. package/dist/cjs/card/styles/getSelectedBorderStyle.js +0 -17
  161. package/dist/cjs/card/styles/index.js +0 -121
  162. package/dist/cjs/card/styles/mixins.js +0 -45
  163. package/dist/cjs/card/styles/styles.js +0 -41
  164. package/dist/cjs/card/ui/loadingRateLimited/styles.js +0 -27
  165. package/dist/cjs/utils/breakpoint.js +0 -42
  166. package/dist/cjs/utils/fileIcon/index.js +0 -54
  167. package/dist/cjs/utils/fileIcon/styles.js +0 -13
  168. package/dist/cjs/utils/getErrorMessage.js +0 -14
  169. package/dist/cjs/utils/progressBar/index.js +0 -45
  170. package/dist/cjs/utils/progressBar/styles.js +0 -14
  171. package/dist/cjs/utils/shouldDisplayImageThumbnail.js +0 -17
  172. package/dist/es2019/card/cardImageView/cardImageViewWrapper.js +0 -43
  173. package/dist/es2019/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -41
  174. package/dist/es2019/card/cardImageView/cardOverlay/index.js +0 -158
  175. package/dist/es2019/card/cardImageView/cardOverlay/styles.js +0 -240
  176. package/dist/es2019/card/cardImageView/cardViewWrapper.js +0 -26
  177. package/dist/es2019/card/cardImageView/fileCardImageView.js +0 -291
  178. package/dist/es2019/card/cardImageView/index.js +0 -1
  179. package/dist/es2019/card/cardImageView/styles.js +0 -131
  180. package/dist/es2019/card/styles/animations.js +0 -4
  181. package/dist/es2019/card/styles/config.js +0 -1
  182. package/dist/es2019/card/styles/easing.js +0 -2
  183. package/dist/es2019/card/styles/getSelectedBorderStyle.js +0 -24
  184. package/dist/es2019/card/styles/index.js +0 -18
  185. package/dist/es2019/card/styles/mixins.js +0 -51
  186. package/dist/es2019/card/styles/styles.js +0 -42
  187. package/dist/es2019/card/ui/loadingRateLimited/styles.js +0 -41
  188. package/dist/es2019/utils/breakpoint.js +0 -83
  189. package/dist/es2019/utils/fileIcon/index.js +0 -31
  190. package/dist/es2019/utils/fileIcon/styles.js +0 -11
  191. package/dist/es2019/utils/getErrorMessage.js +0 -4
  192. package/dist/es2019/utils/progressBar/index.js +0 -21
  193. package/dist/es2019/utils/progressBar/styles.js +0 -15
  194. package/dist/es2019/utils/shouldDisplayImageThumbnail.js +0 -10
  195. package/dist/esm/card/cardImageView/cardImageViewWrapper.js +0 -41
  196. package/dist/esm/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -39
  197. package/dist/esm/card/cardImageView/cardOverlay/index.js +0 -176
  198. package/dist/esm/card/cardImageView/cardOverlay/styles.js +0 -42
  199. package/dist/esm/card/cardImageView/cardViewWrapper.js +0 -24
  200. package/dist/esm/card/cardImageView/fileCardImageView.js +0 -300
  201. package/dist/esm/card/cardImageView/index.js +0 -1
  202. package/dist/esm/card/cardImageView/styles.js +0 -33
  203. package/dist/esm/card/styles/animations.js +0 -4
  204. package/dist/esm/card/styles/config.js +0 -1
  205. package/dist/esm/card/styles/easing.js +0 -2
  206. package/dist/esm/card/styles/getSelectedBorderStyle.js +0 -11
  207. package/dist/esm/card/styles/index.js +0 -13
  208. package/dist/esm/card/styles/mixins.js +0 -27
  209. package/dist/esm/card/styles/styles.js +0 -31
  210. package/dist/esm/card/ui/loadingRateLimited/styles.js +0 -15
  211. package/dist/esm/utils/breakpoint.js +0 -33
  212. package/dist/esm/utils/fileIcon/index.js +0 -47
  213. package/dist/esm/utils/fileIcon/styles.js +0 -5
  214. package/dist/esm/utils/getErrorMessage.js +0 -6
  215. package/dist/esm/utils/progressBar/index.js +0 -38
  216. package/dist/esm/utils/progressBar/styles.js +0 -6
  217. package/dist/esm/utils/shouldDisplayImageThumbnail.js +0 -10
  218. package/dist/types/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
  219. package/dist/types/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
  220. package/dist/types/card/cardImageView/cardOverlay/index.d.ts +0 -39
  221. package/dist/types/card/cardImageView/cardOverlay/styles.d.ts +0 -26
  222. package/dist/types/card/cardImageView/fileCardImageView.d.ts +0 -49
  223. package/dist/types/card/cardImageView/index.d.ts +0 -2
  224. package/dist/types/card/cardImageView/styles.d.ts +0 -24
  225. package/dist/types/card/styles/animations.d.ts +0 -1
  226. package/dist/types/card/styles/config.d.ts +0 -1
  227. package/dist/types/card/styles/easing.d.ts +0 -2
  228. package/dist/types/card/styles/getSelectedBorderStyle.d.ts +0 -3
  229. package/dist/types/card/styles/index.d.ts +0 -8
  230. package/dist/types/card/styles/mixins.d.ts +0 -21
  231. package/dist/types/card/ui/loadingRateLimited/styles.d.ts +0 -13
  232. package/dist/types/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
  233. package/dist/types/card/ui/newFileExperience/styles.d.ts +0 -5
  234. package/dist/types/utils/breakpoint.d.ts +0 -11
  235. package/dist/types/utils/fileIcon/index.d.ts +0 -12
  236. package/dist/types/utils/fileIcon/styles.d.ts +0 -1
  237. package/dist/types/utils/getErrorMessage.d.ts +0 -2
  238. package/dist/types/utils/progressBar/index.d.ts +0 -9
  239. package/dist/types/utils/progressBar/styles.d.ts +0 -1
  240. package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +0 -3
  241. package/dist/types-ts4.5/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
  242. package/dist/types-ts4.5/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
  243. package/dist/types-ts4.5/card/cardImageView/cardOverlay/index.d.ts +0 -39
  244. package/dist/types-ts4.5/card/cardImageView/cardOverlay/styles.d.ts +0 -26
  245. package/dist/types-ts4.5/card/cardImageView/fileCardImageView.d.ts +0 -49
  246. package/dist/types-ts4.5/card/cardImageView/index.d.ts +0 -2
  247. package/dist/types-ts4.5/card/cardImageView/styles.d.ts +0 -24
  248. package/dist/types-ts4.5/card/styles/animations.d.ts +0 -1
  249. package/dist/types-ts4.5/card/styles/config.d.ts +0 -1
  250. package/dist/types-ts4.5/card/styles/easing.d.ts +0 -2
  251. package/dist/types-ts4.5/card/styles/getSelectedBorderStyle.d.ts +0 -3
  252. package/dist/types-ts4.5/card/styles/index.d.ts +0 -8
  253. package/dist/types-ts4.5/card/styles/mixins.d.ts +0 -21
  254. package/dist/types-ts4.5/card/ui/loadingRateLimited/styles.d.ts +0 -13
  255. package/dist/types-ts4.5/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
  256. package/dist/types-ts4.5/card/ui/newFileExperience/styles.d.ts +0 -5
  257. package/dist/types-ts4.5/utils/breakpoint.d.ts +0 -11
  258. package/dist/types-ts4.5/utils/fileIcon/index.d.ts +0 -12
  259. package/dist/types-ts4.5/utils/fileIcon/styles.d.ts +0 -1
  260. package/dist/types-ts4.5/utils/getErrorMessage.d.ts +0 -2
  261. package/dist/types-ts4.5/utils/progressBar/index.d.ts +0 -9
  262. package/dist/types-ts4.5/utils/progressBar/styles.d.ts +0 -1
  263. package/dist/types-ts4.5/utils/shouldDisplayImageThumbnail.d.ts +0 -3
  264. /package/dist/cjs/card/{cardImageView/classnames.js → classnames.js} +0 -0
  265. /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
  266. /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
  267. /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
  268. /package/dist/cjs/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
  269. /package/dist/cjs/card/ui/{newFileExperience → wrapper}/types.js +0 -0
  270. /package/dist/cjs/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
  271. /package/dist/cjs/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
  272. /package/dist/es2019/card/{cardImageView/classnames.js → classnames.js} +0 -0
  273. /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
  274. /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
  275. /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
  276. /package/dist/es2019/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
  277. /package/dist/es2019/card/ui/{newFileExperience → wrapper}/types.js +0 -0
  278. /package/dist/es2019/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
  279. /package/dist/es2019/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
  280. /package/dist/esm/card/{cardImageView/classnames.js → classnames.js} +0 -0
  281. /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
  282. /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
  283. /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
  284. /package/dist/esm/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
  285. /package/dist/esm/card/ui/{newFileExperience → wrapper}/types.js +0 -0
  286. /package/dist/esm/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
  287. /package/dist/esm/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
  288. /package/dist/types/card/{cardImageView/classnames.d.ts → classnames.d.ts} +0 -0
  289. /package/dist/types/{utils → card/ui/actionsBar}/cardActions/cardActionButton.d.ts +0 -0
  290. /package/dist/types/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.d.ts +0 -0
  291. /package/dist/types/{utils → card/ui/actionsBar}/cardActions/index.d.ts +0 -0
  292. /package/dist/types/{utils → card/ui/actionsBar}/cardActions/styles.d.ts +0 -0
  293. /package/dist/types/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.d.ts +0 -0
  294. /package/dist/types/utils/{errorIcon → lightCards/errorIcon}/index.d.ts +0 -0
  295. /package/dist/types/utils/{errorIcon → lightCards/errorIcon}/styles.d.ts +0 -0
  296. /package/dist/types-ts4.5/card/{cardImageView/classnames.d.ts → classnames.d.ts} +0 -0
  297. /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/cardActionButton.d.ts +0 -0
  298. /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.d.ts +0 -0
  299. /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/index.d.ts +0 -0
  300. /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/styles.d.ts +0 -0
  301. /package/dist/types-ts4.5/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.d.ts +0 -0
  302. /package/dist/types-ts4.5/utils/{errorIcon → lightCards/errorIcon}/index.d.ts +0 -0
  303. /package/dist/types-ts4.5/utils/{errorIcon → lightCards/errorIcon}/styles.d.ts +0 -0
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
3
3
  import { css } from '@emotion/react';
4
4
  import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
5
5
  import { N0, N800 } from '@atlaskit/theme/colors';
6
- import { rgba } from '../../styles/mixins';
6
+ import { rgba } from '../styles';
7
7
  import { themed } from '@atlaskit/theme/components';
8
8
  var generateResponsiveStyles = function generateResponsiveStyles() {
9
9
  var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
@@ -0,0 +1 @@
1
+ export { Wrapper } from './wrapper';
@@ -6,12 +6,12 @@ import { borderRadius } from '@atlaskit/media-ui';
6
6
  import { N20 } from '@atlaskit/theme/colors';
7
7
  import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
8
8
  import { themed } from '@atlaskit/theme/components';
9
- import { transition } from '../../styles';
9
+ import { transition } from '../styles';
10
10
  import { fixedBlanketStyles, blanketClassName } from '../blanket/styles';
11
11
  import { fixedActionBarStyles, actionsBarClassName } from '../actionsBar/styles';
12
12
  import { generateResponsiveStyles, getClickablePlayButtonStyles, getCursorStyle, getSelectableTickBoxStyles, getWrapperDimensions, getWrapperShadow } from '../styles';
13
13
  var BACKGROUND_COLOR_DARK = '#22272C';
14
- export var newFileExperienceWrapperStyles = function newFileExperienceWrapperStyles(_ref) {
14
+ export var wrapperStyles = function wrapperStyles(_ref) {
15
15
  var breakpoint = _ref.breakpoint,
16
16
  dimensions = _ref.dimensions,
17
17
  appearance = _ref.appearance,
@@ -30,4 +30,4 @@ export var newFileExperienceWrapperStyles = function newFileExperienceWrapperSty
30
30
  theme: theme
31
31
  }), ";"), borderRadius, getCursorStyle(mediaCardCursor), getWrapperShadow(disableOverlay, selected), generateResponsiveStyles(breakpoint), hideNativeBrowserTextSelectionStyles, getClickablePlayButtonStyles(isPlayButtonClickable), getSelectableTickBoxStyles(isTickBoxSelectable), blanketClassName, fixedBlanketStyles, actionsBarClassName, fixedActionBarStyles, shouldDisplayTooltip && "> div { width: 100%; height: 100%; }");
32
32
  };
33
- newFileExperienceWrapperStyles.displayName = 'NewFileExperienceWrapper';
33
+ wrapperStyles.displayName = 'NewFileExperienceWrapper';
@@ -1,9 +1,9 @@
1
1
  /**@jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { newFileExperienceClassName } from '../../cardConstants';
4
- import { newFileExperienceWrapperStyles } from './styles';
4
+ import { wrapperStyles } from './styles';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
- export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
6
+ export var Wrapper = function Wrapper(props) {
7
7
  var testId = props.testId,
8
8
  dimensions = props.dimensions,
9
9
  appearance = props.appearance,
@@ -23,7 +23,7 @@ export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
23
23
  id: "newFileExperienceWrapper",
24
24
  className: newFileExperienceClassName,
25
25
  "data-testid": testId,
26
- css: newFileExperienceWrapperStyles({
26
+ css: wrapperStyles({
27
27
  breakpoint: breakpoint,
28
28
  dimensions: dimensions,
29
29
  appearance: appearance,
@@ -2,4 +2,4 @@
2
2
  * Entry Point: @atlaskit/media-card/classnames
3
3
  * tsconfig.entry-points.json
4
4
  */
5
- export { fileCardImageViewSelector, fileCardImageViewSelectedSelector } from './card/cardImageView/classnames';
5
+ export { fileCardImageViewSelector } from './card/classnames';
package/dist/esm/index.js CHANGED
@@ -8,6 +8,6 @@ export { MediaInlineCard } from './inline';
8
8
  export { CardLoading } from './utils/lightCards/cardLoading';
9
9
  export { CardError } from './utils/lightCards/cardError';
10
10
  export { defaultImageCardDimensions } from './utils/cardDimensions';
11
- export { fileCardImageViewSelector, fileCardImageViewSelectedSelector } from './card/cardImageView/classnames';
12
- export { inlinePlayerClassName } from './card/styles/styles';
11
+ export { fileCardImageViewSelector } from './card/classnames';
12
+ export { inlinePlayerClassName } from './card/inlinePlayerWrapperStyles';
13
13
  export { newFileExperienceClassName } from './card/cardConstants';
@@ -12,6 +12,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
12
12
  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
13
  import React from 'react';
14
14
  import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
15
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
15
16
  var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
16
17
  _inherits(MediaInlineCardLoader, _React$PureComponent);
17
18
  var _super = _createSuper(MediaInlineCardLoader);
@@ -22,7 +23,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
22
23
  args[_key] = arguments[_key];
23
24
  }
24
25
  _this = _super.call.apply(_super, [this].concat(args));
25
- _defineProperty(_assertThisInitialized(_this), "isMounted", false);
26
+ _defineProperty(_assertThisInitialized(_this), "mounted", false);
26
27
  _defineProperty(_assertThisInitialized(_this), "state", {
27
28
  MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
28
29
  ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
@@ -37,7 +38,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
37
38
  return _regeneratorRuntime.wrap(function _callee$(_context) {
38
39
  while (1) switch (_context.prev = _context.next) {
39
40
  case 0:
40
- this.isMounted = true;
41
+ this.mounted = true;
41
42
  if (this.state.MediaInlineCard) {
42
43
  _context.next = 17;
43
44
  break;
@@ -53,7 +54,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
53
54
  mediaInlineErrorBoundaryModule = _yield$Promise$all2[2];
54
55
  MediaInlineCardLoader.MediaInlineCard = mediaClient.withMediaClient(cardModule.MediaInlineCard);
55
56
  MediaInlineCardLoader.ErrorBoundary = mediaInlineErrorBoundaryModule.default;
56
- if (this.isMounted) {
57
+ if (this.mounted) {
57
58
  this.setState({
58
59
  MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
59
60
  ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
@@ -82,7 +83,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
82
83
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
83
84
  while (1) switch (_context2.prev = _context2.next) {
84
85
  case 0:
85
- this.isMounted = false;
86
+ this.mounted = false;
86
87
  case 1:
87
88
  case "end":
88
89
  return _context2.stop();
@@ -100,14 +101,22 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
100
101
  var _this$state = this.state,
101
102
  MediaInlineCard = _this$state.MediaInlineCard,
102
103
  ErrorBoundary = _this$state.ErrorBoundary;
104
+ var analyticsContext = {
105
+ packageVersion: "@atlaskit/media-card",
106
+ packageName: "76.0.1",
107
+ componentName: 'mediaInlineCard',
108
+ component: 'mediaInlineCard'
109
+ };
103
110
  if (!MediaInlineCard || !ErrorBoundary) {
104
111
  return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
105
112
  message: ""
106
113
  });
107
114
  }
108
- return /*#__PURE__*/React.createElement(ErrorBoundary, {
115
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
116
+ data: analyticsContext
117
+ }, /*#__PURE__*/React.createElement(ErrorBoundary, {
109
118
  isSelected: this.props.isSelected
110
- }, /*#__PURE__*/React.createElement(MediaInlineCard, this.props));
119
+ }, /*#__PURE__*/React.createElement(MediaInlineCard, this.props)));
111
120
  }
112
121
  }]);
113
122
  return MediaInlineCardLoader;
@@ -10,7 +10,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
10
10
  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; }
11
11
  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; }
12
12
  import React from 'react';
13
- import { withMediaAnalyticsContext } from '@atlaskit/media-common';
14
13
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
15
14
  import { B300, R300, N30A, N900 } from '@atlaskit/theme/colors';
16
15
  import WarningIcon from '@atlaskit/icon/glyph/warning';
@@ -119,12 +118,5 @@ var WrappedMediaInlineAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Com
119
118
  return WrappedMediaInlineAnalyticsErrorBoundary;
120
119
  }(React.Component);
121
120
  _defineProperty(WrappedMediaInlineAnalyticsErrorBoundary, "displayName", 'MediaInlineAnalyticsErrorBoundary');
122
- var packageName = "@atlaskit/media-card";
123
- var packageVersion = "75.0.1";
124
- var MediaInlineAnalyticsErrorBoundary = withMediaAnalyticsContext({
125
- packageVersion: packageVersion,
126
- packageName: packageName,
127
- componentName: 'mediaInlineCard',
128
- component: 'mediaInlineCard'
129
- })(withAnalyticsEvents()(WrappedMediaInlineAnalyticsErrorBoundary));
121
+ var MediaInlineAnalyticsErrorBoundary = withAnalyticsEvents()(WrappedMediaInlineAnalyticsErrorBoundary);
130
122
  export default MediaInlineAnalyticsErrorBoundary;
@@ -1,12 +1,17 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useState, useEffect } from 'react';
3
3
  import ReactDOM from 'react-dom';
4
+ import { FileFetcherError } from '@atlaskit/media-client';
4
5
  import { injectIntl, IntlProvider, createIntl } from 'react-intl-next';
5
6
  import { MediaInlineCardLoadedView, MediaInlineCardLoadingView, MediaInlineCardErroredView, messages } from '@atlaskit/media-ui';
6
7
  import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
7
8
  import { MediaViewer } from '@atlaskit/media-viewer';
8
9
  import Tooltip from '@atlaskit/tooltip';
9
10
  import { formatDate } from '@atlaskit/media-ui/formatDate';
11
+ import { fireMediaCardEvent } from '../utils/analytics';
12
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
13
+ import { MediaCardError } from '../errors';
14
+ import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
10
15
  // UI component which renders an inline link in the appropiate state based on a media file
11
16
  export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
12
17
  var mediaClient = _ref.mediaClient,
@@ -21,14 +26,36 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
21
26
  _useState2 = _slicedToArray(_useState, 2),
22
27
  fileState = _useState2[0],
23
28
  setFileState = _useState2[1];
24
- var _useState3 = useState(false),
29
+ var _useState3 = useState(),
25
30
  _useState4 = _slicedToArray(_useState3, 2),
26
- isErrored = _useState4[0],
27
- setIsErrored = _useState4[1];
31
+ subscribeError = _useState4[0],
32
+ setSubscribeError = _useState4[1];
28
33
  var _useState5 = useState(false),
29
34
  _useState6 = _slicedToArray(_useState5, 2),
30
- isMediaViewerVisible = _useState6[0],
31
- setMediaViewerVisible = _useState6[1];
35
+ isSucceededEventSent = _useState6[0],
36
+ setIsSucceededEventSent = _useState6[1];
37
+ var _useState7 = useState(false),
38
+ _useState8 = _slicedToArray(_useState7, 2),
39
+ isFailedEventSent = _useState8[0],
40
+ setIsFailedEventSent = _useState8[1];
41
+ var _useState9 = useState(false),
42
+ _useState10 = _slicedToArray(_useState9, 2),
43
+ isMediaViewerVisible = _useState10[0],
44
+ setMediaViewerVisible = _useState10[1];
45
+ var _useAnalyticsEvents = useAnalyticsEvents(),
46
+ createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
47
+ var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
48
+ var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new MediaCardError('missing-error-data');
49
+ var failReason = arguments.length > 1 ? arguments[1] : undefined;
50
+ var payload = failReason ? getFailedProcessingStatusPayload(fileState) : getErrorStatusPayload(error, fileState);
51
+ setIsFailedEventSent(true);
52
+ fireMediaCardEvent(payload, createAnalyticsEvent);
53
+ };
54
+ var fireSucceededOperationalEvent = function fireSucceededOperationalEvent() {
55
+ var payload = getSucceededStatusPayload(fileState);
56
+ setIsSucceededEventSent(true);
57
+ fireMediaCardEvent(payload, createAnalyticsEvent);
58
+ };
32
59
  var onMediaInlineCardClick = function onMediaInlineCardClick(event) {
33
60
  if (onClick) {
34
61
  var inlineCardEvent = {
@@ -70,25 +97,45 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
70
97
  }).subscribe({
71
98
  next: function next(fileState) {
72
99
  setFileState(fileState);
73
- setIsErrored(false);
100
+ setSubscribeError(undefined);
74
101
  },
75
- error: function error() {
76
- setIsErrored(true);
102
+ error: function error(e) {
103
+ setSubscribeError(e);
77
104
  }
78
105
  });
79
106
  return function () {
80
107
  subscription.unsubscribe();
81
108
  };
82
109
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
83
- if (isErrored && (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
110
+ if (subscribeError) {
111
+ var errorMessage = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? messages.failed_to_upload : messages.couldnt_load_file;
112
+ var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
113
+ !isFailedEventSent && fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
84
114
  return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
85
- message: (intl || defaultIntl).formatMessage(messages.failed_to_upload),
115
+ message: (intl || defaultIntl).formatMessage(errorMessage),
116
+ isSelected: isSelected
117
+ });
118
+ }
119
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
120
+ var error = new MediaCardError('error-file-state', new Error(fileState.message));
121
+ !isFailedEventSent && fireFailedOperationalEvent(error);
122
+ return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
123
+ message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
86
124
  isSelected: isSelected
87
125
  });
88
126
  }
89
- if (isErrored || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error' || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing' ||
127
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
128
+ !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
129
+ return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
130
+ message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
131
+ isSelected: isSelected
132
+ });
133
+ }
134
+
90
135
  // Empty file handling
91
- fileState && !fileState.name) {
136
+ if (fileState && !fileState.name) {
137
+ var _error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
138
+ !isFailedEventSent && fireFailedOperationalEvent(_error);
92
139
  return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
93
140
  message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
94
141
  isSelected: isSelected
@@ -126,6 +173,9 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
126
173
  locale = _ref2$locale === void 0 ? 'en' : _ref2$locale;
127
174
  formattedDate = formatDate(fileState.createdAt, locale);
128
175
  }
176
+ if (fileState.status === 'processed' && !isSucceededEventSent) {
177
+ fireSucceededOperationalEvent();
178
+ }
129
179
  if (shouldDisplayToolTip === undefined || shouldDisplayToolTip === true) {
130
180
  return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
131
181
  position: "bottom",
@@ -0,0 +1,50 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
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; }
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; }
4
+ import { extractErrorInfo } from '../utils/analytics';
5
+ export var getSucceededStatusPayload = function getSucceededStatusPayload(fileState) {
6
+ return {
7
+ eventType: 'operational',
8
+ action: 'succeeded',
9
+ actionSubject: 'mediaInlineRender',
10
+ attributes: {
11
+ status: 'success',
12
+ fileAttributes: {
13
+ fileId: (fileState === null || fileState === void 0 ? void 0 : fileState.id) || '',
14
+ fileSize: fileState === null || fileState === void 0 ? void 0 : fileState.size,
15
+ fileMediatype: fileState === null || fileState === void 0 ? void 0 : fileState.mediaType,
16
+ fileMimetype: fileState === null || fileState === void 0 ? void 0 : fileState.mimeType,
17
+ fileStatus: fileState === null || fileState === void 0 ? void 0 : fileState.status
18
+ }
19
+ }
20
+ };
21
+ };
22
+ export var getErrorStatusPayload = function getErrorStatusPayload(error, fileState) {
23
+ return {
24
+ eventType: 'operational',
25
+ action: 'failed',
26
+ actionSubject: 'mediaInlineRender',
27
+ attributes: _objectSpread({
28
+ status: 'fail',
29
+ fileAttributes: {
30
+ fileId: (fileState === null || fileState === void 0 ? void 0 : fileState.id) || '',
31
+ fileStatus: fileState === null || fileState === void 0 ? void 0 : fileState.status
32
+ }
33
+ }, extractErrorInfo(error))
34
+ };
35
+ };
36
+ export var getFailedProcessingStatusPayload = function getFailedProcessingStatusPayload(fileState) {
37
+ return {
38
+ eventType: 'operational',
39
+ action: 'failed',
40
+ actionSubject: 'mediaInlineRender',
41
+ attributes: {
42
+ status: 'fail',
43
+ fileAttributes: {
44
+ fileId: (fileState === null || fileState === void 0 ? void 0 : fileState.id) || '',
45
+ fileStatus: fileState === null || fileState === void 0 ? void 0 : fileState.status
46
+ },
47
+ failReason: 'failed-processing'
48
+ }
49
+ };
50
+ };
@@ -1,9 +1,3 @@
1
- // Default dimensions
2
-
3
- export var defaultSmallCardDimensions = {
4
- width: '100%',
5
- height: 42
6
- };
7
1
  export var defaultImageCardDimensions = {
8
2
  width: 156,
9
3
  height: 125
@@ -16,76 +10,6 @@ export var defaultSquareCardDimensions = {
16
10
  width: 300,
17
11
  height: 300
18
12
  };
19
-
20
- // Small dimensions
21
-
22
- export var minSmallCardDimensions = {
23
- width: 200,
24
- height: 32
25
- };
26
- export var minImageCardDimensions = {
27
- width: 144,
28
- height: 96
29
- };
30
- export var minSquareCardDimensions = {
31
- width: 272,
32
- height: 275
33
- };
34
- export var minHorizontalCardDimensions = {
35
- width: 400,
36
- height: 125
37
- };
38
-
39
- // Max dimensions
40
-
41
- export var maxImageCardDimensions = {
42
- width: 480,
43
- height: 360
44
- };
45
- export var maxHorizontalCardDimensions = {
46
- width: 400,
47
- height: 116
48
- };
49
- export var maxSquareCardDimensions = {
50
- width: 400,
51
- height: 348
52
- };
53
- export var getCardMaxHeight = function getCardMaxHeight(appearance) {
54
- if (appearance === 'image') {
55
- return maxImageCardDimensions.height;
56
- }
57
- if (appearance === 'horizontal') {
58
- return maxHorizontalCardDimensions.height;
59
- }
60
- if (appearance === 'square') {
61
- return maxSquareCardDimensions.height;
62
- }
63
- return maxSquareCardDimensions.width;
64
- };
65
- export var getCardMinWidth = function getCardMinWidth(appearance) {
66
- if (appearance === 'image') {
67
- return minImageCardDimensions.width;
68
- }
69
- if (appearance === 'horizontal') {
70
- return minHorizontalCardDimensions.width;
71
- }
72
- if (appearance === 'square') {
73
- return minSquareCardDimensions.width;
74
- }
75
- return minSmallCardDimensions.width;
76
- };
77
- export var getCardMaxWidth = function getCardMaxWidth(appearance) {
78
- if (appearance === 'image') {
79
- return maxImageCardDimensions.width;
80
- }
81
- if (appearance === 'horizontal') {
82
- return maxHorizontalCardDimensions.width;
83
- }
84
- if (appearance === 'square') {
85
- return maxSquareCardDimensions.width;
86
- }
87
- return maxSquareCardDimensions.width;
88
- };
89
13
  export var getDefaultCardDimensions = function getDefaultCardDimensions(appearance) {
90
14
  if (appearance === 'image') {
91
15
  return defaultImageCardDimensions;
@@ -1,9 +1,5 @@
1
- export { ErrorIcon } from './errorIcon';
2
- export { FileIcon } from './fileIcon';
3
- export { CardActionIconButton, CardActionsDropdownMenu, CardActionsView, default } from './cardActions';
4
1
  export { isRetina } from './isRetina';
5
- export { defaultHorizontalCardDimensions, defaultImageCardDimensions, defaultSmallCardDimensions, defaultSquareCardDimensions, getCardMaxHeight, getCardMaxWidth, getCardMinWidth, getDefaultCardDimensions, maxHorizontalCardDimensions, maxImageCardDimensions, maxSquareCardDimensions, minHorizontalCardDimensions, minImageCardDimensions, minSmallCardDimensions, minSquareCardDimensions } from './cardDimensions';
6
- export { breakpointSize, breakpointStyles, cardBreakpointSizes } from './breakpoint';
2
+ export { defaultHorizontalCardDimensions, defaultImageCardDimensions, defaultSquareCardDimensions, getDefaultCardDimensions } from './cardDimensions';
7
3
  export { isValidPercentageUnit } from './isValidPercentageUnit';
8
4
  export { getElementDimension } from './getElementDimension';
9
5
  export { containsPixelUnit } from './containsPixelUnit';
@@ -8,7 +8,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
8
8
  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; } }
9
9
  import React from 'react';
10
10
  import { Component } from 'react';
11
- import { ErrorIcon } from '../errorIcon';
11
+ import { ErrorIcon } from './errorIcon';
12
12
  import { Wrapper } from './lightCardWrappers';
13
13
  import { getDimensionsWithDefault } from './getDimensionsWithDefault';
14
14
  export var CardError = /*#__PURE__*/function (_Component) {
@@ -8,10 +8,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
8
8
  import React from 'react';
9
9
  import { Component } from 'react';
10
10
  import { getDimensionsWithDefault } from './getDimensionsWithDefault';
11
- import { Wrapper, AnimatedWrapper } from './lightCardWrappers';
11
+ import { Wrapper } from './lightCardWrappers';
12
12
  import SpinnerIcon from '@atlaskit/spinner';
13
- import FileIcon from '@atlaskit/icon/glyph/file';
14
- import { getMediaFeatureFlag } from '@atlaskit/media-common';
15
13
  export var CardLoading = /*#__PURE__*/function (_Component) {
16
14
  _inherits(CardLoading, _Component);
17
15
  var _super = _createSuper(CardLoading);
@@ -24,24 +22,13 @@ export var CardLoading = /*#__PURE__*/function (_Component) {
24
22
  value: function render() {
25
23
  var _this$props = this.props,
26
24
  dimensionsProp = _this$props.dimensions,
27
- testId = _this$props.testId,
28
- featureFlags = _this$props.featureFlags;
25
+ testId = _this$props.testId;
29
26
  var dimensions = getDimensionsWithDefault(dimensionsProp);
30
- if (getMediaFeatureFlag('newCardExperience', featureFlags)) {
31
- return /*#__PURE__*/React.createElement(Wrapper, {
32
- "data-testid": testId || 'media-card-loading',
33
- "data-test-loading": true,
34
- dimensions: dimensions
35
- }, /*#__PURE__*/React.createElement(SpinnerIcon, null));
36
- }
37
- return /*#__PURE__*/React.createElement(AnimatedWrapper, {
27
+ return /*#__PURE__*/React.createElement(Wrapper, {
38
28
  "data-testid": testId || 'media-card-loading',
39
29
  "data-test-loading": true,
40
30
  dimensions: dimensions
41
- }, /*#__PURE__*/React.createElement(FileIcon, {
42
- label: "loading",
43
- size: "medium"
44
- }));
31
+ }, /*#__PURE__*/React.createElement(SpinnerIcon, null));
45
32
  }
46
33
  }]);
47
34
  return CardLoading;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**@jsx jsx */
3
3
  import { jsx } from '@emotion/react';
4
- import { wrapperStyles, animatedWrapperStyles } from './styles';
4
+ import { wrapperStyles } from './styles';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
6
  export var Wrapper = function Wrapper(props) {
7
7
  var theme = useGlobalTheme();
@@ -11,13 +11,4 @@ export var Wrapper = function Wrapper(props) {
11
11
  theme: theme
12
12
  })
13
13
  }, props), props.children);
14
- };
15
- export var AnimatedWrapper = function AnimatedWrapper(props) {
16
- var theme = useGlobalTheme();
17
- return jsx("div", _extends({
18
- css: animatedWrapperStyles({
19
- dimensions: props.dimensions,
20
- theme: theme
21
- })
22
- }, props), props.children);
23
14
  };
@@ -1,14 +1,13 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
3
- import { css, keyframes } from '@emotion/react';
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
4
  import { center, borderRadius } from '@atlaskit/media-ui';
5
5
  import { themed } from '@atlaskit/theme/components';
6
6
  import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
7
- export var blinkLoadingAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0%{\n opacity: 1;\n }\n\n 50%{\n opacity: 0.6;\n }\n\n 100%{\n opacity: 1;\n }\n"])));
8
7
  export var wrapperStyles = function wrapperStyles(_ref) {
9
8
  var dimensions = _ref.dimensions,
10
9
  theme = _ref.theme;
11
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n color: ", ";\n ", "\n max-height: 100%;\n max-width: 100%;\n width: ", ";\n height: ", ";\n"])), center, themed({
10
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n color: ", ";\n ", "\n max-height: 100%;\n max-width: 100%;\n width: ", ";\n height: ", ";\n"])), center, themed({
12
11
  light: "var(--ds-background-neutral, ".concat(N20, ")"),
13
12
  dark: "var(--ds-background-neutral, ".concat(DN50, ")")
14
13
  })({
@@ -19,7 +18,4 @@ export var wrapperStyles = function wrapperStyles(_ref) {
19
18
  })({
20
19
  theme: theme
21
20
  }), borderRadius, dimensions.width, dimensions.height);
22
- };
23
- export var animatedWrapperStyles = function animatedWrapperStyles(props) {
24
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n > span {\n animation: ", " 0.8s infinite;\n }\n"])), wrapperStyles(props), blinkLoadingAnimation);
25
21
  };
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
7
7
  import { MediaCardError } from '../errors';
8
8
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
9
9
  var packageName = "@atlaskit/media-card";
10
- var packageVersion = "75.0.1";
10
+ var packageVersion = "76.0.1";
11
11
  var concurrentExperience;
12
12
  var getExperience = function getExperience(id) {
13
13
  if (!concurrentExperience) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "75.0.1",
3
+ "version": "76.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -57,10 +57,8 @@ export declare class CardViewBase extends React.Component<CardViewProps, CardVie
57
57
  componentDidUpdate({ cardPreview: prevCardPreview }: CardViewProps): void;
58
58
  private onImageLoad;
59
59
  private onImageError;
60
- private get width();
61
60
  private get breakpoint();
62
- saveElementWidth: () => void;
63
- render(): jsx.JSX.Element;
61
+ private saveElementWidth;
64
62
  private renderSpinner;
65
63
  private shouldRenderPlayButton;
66
64
  private renderPlayButton;
@@ -72,9 +70,8 @@ export declare class CardViewBase extends React.Component<CardViewProps, CardVie
72
70
  private renderTickBox;
73
71
  private renderMediaTypeIcon;
74
72
  private renderActionsBar;
75
- private renderFileNewExperience;
76
- private renderFile;
73
+ render(): jsx.JSX.Element;
77
74
  private getRenderConfigByStatus;
78
- private renderNewExperienceCard;
75
+ private renderContents;
79
76
  }
80
77
  export declare const CardView: React.ForwardRefExoticComponent<Pick<Omit<CardViewProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<CardViewProps, keyof WithAnalyticsEventsProps>, keyof CardViewOwnProps>> & Partial<Pick<Partial<CardViewOwnProps>, never>> & React.RefAttributes<any>>;
@@ -1,5 +1,4 @@
1
1
  import { FileStatus } from '@atlaskit/media-client';
2
- import { MediaFeatureFlags } from '@atlaskit/media-common';
3
2
  import { CardStatus, FilePreviewStatus } from '../types';
4
3
  export declare const isFinalCardStatus: (status: CardStatus) => boolean;
5
- export declare const getCardStatus: (fileStatus: FileStatus, filePreviewStatus: FilePreviewStatus, featureFlags?: MediaFeatureFlags) => CardStatus;
4
+ export declare const getCardStatus: (fileStatus: FileStatus, { isPreviewable, hasPreview }: FilePreviewStatus) => CardStatus;
@@ -1,9 +1,5 @@
1
- import { InlinePlayerWrapperProps, WrapperProps } from '../types';
1
+ import { InlinePlayerWrapperProps } from './types';
2
2
  export declare const inlinePlayerClassName = "media-card-inline-player";
3
- export declare const wrapperStyles: {
4
- ({ dimensions, breakpointSize, shouldUsePointerCursor, }: WrapperProps): import("@emotion/react").SerializedStyles;
5
- displayName: string;
6
- };
7
3
  export declare const inlinePlayerWrapperStyles: {
8
4
  ({ dimensions, selected, }: InlinePlayerWrapperProps): import("@emotion/react").SerializedStyles;
9
5
  displayName: string;
@@ -1,17 +1,6 @@
1
- import React, { MouseEvent, ReactElement, RefObject } from 'react';
1
+ import React, { ReactElement, RefObject } from 'react';
2
2
  import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  import { CardDimensions } from '../types';
4
- import { BreakpointSizeValue } from '../utils/breakpoint';
5
- export interface WrapperProps {
6
- testId?: string;
7
- shouldUsePointerCursor?: boolean;
8
- dimensions?: CardDimensions;
9
- breakpointSize?: BreakpointSizeValue;
10
- onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
11
- onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
12
- innerRef?: RefObject<HTMLDivElement>;
13
- children?: JSX.Element;
14
- }
15
4
  export type InlinePlayerWrapperProps = {
16
5
  testId?: string;
17
6
  dimensions?: CardDimensions;
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { CardAction } from '../../card/actions';
2
+ import { CardAction } from '../../../actions';
3
3
  import { CardActionIconButtonVariant } from './styles';
4
4
  export type CardActionsDropdownMenuProps = {
5
5
  readonly actions: CardAction[];
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { CardAction } from '../../card/actions';
2
+ import { CardAction } from '../../../actions';
3
3
  import { CardActionIconButtonVariant } from './styles';
4
4
  export interface CardActionsViewProps {
5
5
  readonly actions: CardAction[];