@atlaskit/media-card 70.10.0 → 72.1.0

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 (150) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/cjs/errors.js +76 -5
  3. package/dist/cjs/files/cardImageView/index.js +58 -89
  4. package/dist/cjs/files/index.js +0 -6
  5. package/dist/cjs/index.js +16 -6
  6. package/dist/cjs/root/card/cardAnalytics.js +33 -19
  7. package/dist/cjs/root/card/cardConstants.js +8 -0
  8. package/dist/cjs/root/card/cardLoader.js +66 -124
  9. package/dist/cjs/root/card/cardState.js +50 -0
  10. package/dist/cjs/root/card/getCardPreview/cache.js +5 -0
  11. package/dist/cjs/root/card/getCardPreview/filePreviewStatus.js +50 -0
  12. package/dist/cjs/root/card/getCardPreview/helpers.js +13 -21
  13. package/dist/cjs/root/card/getCardPreview/index.js +171 -100
  14. package/dist/cjs/root/card/getCardStatus.js +7 -1
  15. package/dist/cjs/root/card/index.js +407 -322
  16. package/dist/cjs/root/cardView.js +115 -76
  17. package/dist/cjs/root/index.js +9 -1
  18. package/dist/cjs/root/inline/loader.js +22 -21
  19. package/dist/cjs/root/inline/{inlineMediaCard.js → mediaInlineCard.js} +72 -25
  20. package/dist/cjs/root/inlinePlayer.js +5 -15
  21. package/dist/cjs/root/ui/iconMessage/index.js +17 -9
  22. package/dist/cjs/root/ui/imageRenderer/imageRenderer.js +36 -115
  23. package/dist/cjs/root/ui/styled.js +1 -1
  24. package/dist/cjs/root/ui/titleBox/failedTitleBox.js +7 -3
  25. package/dist/cjs/utils/analytics.js +26 -43
  26. package/dist/cjs/utils/cardActions/cardActionsDropdownMenu.js +16 -9
  27. package/dist/cjs/utils/dimensionComparer.js +1 -1
  28. package/dist/cjs/utils/document.js +12 -0
  29. package/dist/cjs/utils/getDataURIDimension.js +13 -2
  30. package/dist/cjs/utils/metadata.js +11 -3
  31. package/dist/cjs/utils/objectURLCache.js +6 -0
  32. package/dist/cjs/utils/resizeModeToMediaImageProps.js +13 -0
  33. package/dist/cjs/utils/shouldDisplayImageThumbnail.js +1 -1
  34. package/dist/cjs/version.json +1 -1
  35. package/dist/es2019/errors.js +42 -2
  36. package/dist/es2019/files/cardImageView/index.js +12 -46
  37. package/dist/es2019/files/index.js +1 -1
  38. package/dist/es2019/index.js +3 -3
  39. package/dist/es2019/root/card/cardAnalytics.js +23 -17
  40. package/dist/es2019/root/card/cardConstants.js +1 -0
  41. package/dist/es2019/root/card/cardLoader.js +47 -53
  42. package/dist/es2019/root/card/cardState.js +26 -0
  43. package/dist/es2019/root/card/getCardPreview/cache.js +5 -0
  44. package/dist/es2019/root/card/getCardPreview/filePreviewStatus.js +35 -0
  45. package/dist/es2019/root/card/getCardPreview/helpers.js +2 -12
  46. package/dist/es2019/root/card/getCardPreview/index.js +112 -79
  47. package/dist/es2019/root/card/getCardStatus.js +1 -0
  48. package/dist/es2019/root/card/index.js +356 -254
  49. package/dist/es2019/root/cardView.js +98 -58
  50. package/dist/es2019/root/index.js +2 -1
  51. package/dist/es2019/root/inline/loader.js +16 -15
  52. package/dist/es2019/root/inline/mediaInlineCard.js +132 -0
  53. package/dist/es2019/root/inlinePlayer.js +5 -13
  54. package/dist/es2019/root/ui/iconMessage/index.js +10 -6
  55. package/dist/es2019/root/ui/imageRenderer/imageRenderer.js +26 -74
  56. package/dist/es2019/root/ui/styled.js +1 -0
  57. package/dist/es2019/root/ui/titleBox/failedTitleBox.js +5 -3
  58. package/dist/es2019/utils/analytics.js +29 -40
  59. package/dist/es2019/utils/cardActions/cardActionsDropdownMenu.js +8 -4
  60. package/dist/es2019/utils/dimensionComparer.js +1 -1
  61. package/dist/es2019/utils/document.js +1 -0
  62. package/dist/es2019/utils/getDataURIDimension.js +8 -0
  63. package/dist/es2019/utils/metadata.js +12 -4
  64. package/dist/es2019/utils/objectURLCache.js +5 -0
  65. package/dist/es2019/utils/resizeModeToMediaImageProps.js +6 -0
  66. package/dist/es2019/utils/shouldDisplayImageThumbnail.js +1 -1
  67. package/dist/es2019/version.json +1 -1
  68. package/dist/esm/errors.js +60 -1
  69. package/dist/esm/files/cardImageView/index.js +55 -87
  70. package/dist/esm/files/index.js +1 -1
  71. package/dist/esm/index.js +3 -3
  72. package/dist/esm/root/card/cardAnalytics.js +23 -18
  73. package/dist/esm/root/card/cardConstants.js +1 -0
  74. package/dist/esm/root/card/cardLoader.js +66 -126
  75. package/dist/esm/root/card/cardState.js +32 -0
  76. package/dist/esm/root/card/getCardPreview/cache.js +6 -0
  77. package/dist/esm/root/card/getCardPreview/filePreviewStatus.js +35 -0
  78. package/dist/esm/root/card/getCardPreview/helpers.js +13 -21
  79. package/dist/esm/root/card/getCardPreview/index.js +142 -95
  80. package/dist/esm/root/card/getCardStatus.js +3 -0
  81. package/dist/esm/root/card/index.js +416 -325
  82. package/dist/esm/root/cardView.js +114 -73
  83. package/dist/esm/root/index.js +2 -1
  84. package/dist/esm/root/inline/loader.js +23 -22
  85. package/dist/esm/root/inline/mediaInlineCard.js +145 -0
  86. package/dist/esm/root/inlinePlayer.js +5 -13
  87. package/dist/esm/root/ui/iconMessage/index.js +12 -7
  88. package/dist/esm/root/ui/imageRenderer/imageRenderer.js +28 -106
  89. package/dist/esm/root/ui/styled.js +1 -1
  90. package/dist/esm/root/ui/titleBox/failedTitleBox.js +6 -3
  91. package/dist/esm/utils/analytics.js +22 -35
  92. package/dist/esm/utils/cardActions/cardActionsDropdownMenu.js +16 -9
  93. package/dist/esm/utils/dimensionComparer.js +1 -1
  94. package/dist/esm/utils/document.js +3 -0
  95. package/dist/esm/utils/getDataURIDimension.js +8 -0
  96. package/dist/esm/utils/metadata.js +12 -4
  97. package/dist/esm/utils/objectURLCache.js +6 -0
  98. package/dist/esm/utils/resizeModeToMediaImageProps.js +6 -0
  99. package/dist/esm/utils/shouldDisplayImageThumbnail.js +1 -1
  100. package/dist/esm/version.json +1 -1
  101. package/dist/types/errors.d.ts +15 -1
  102. package/dist/types/files/cardImageView/index.d.ts +5 -12
  103. package/dist/types/files/cardImageView/styled.d.ts +1 -1
  104. package/dist/types/files/index.d.ts +1 -1
  105. package/dist/types/index.d.ts +11 -13
  106. package/dist/types/root/card/cardAnalytics.d.ts +5 -7
  107. package/dist/types/root/card/cardConstants.d.ts +1 -0
  108. package/dist/types/root/card/cardLoader.d.ts +4 -18
  109. package/dist/types/root/card/cardState.d.ts +5 -0
  110. package/dist/types/root/card/getCardPreview/cache.d.ts +4 -2
  111. package/dist/types/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
  112. package/dist/types/root/card/getCardPreview/helpers.d.ts +4 -5
  113. package/dist/types/root/card/getCardPreview/index.d.ts +25 -14
  114. package/dist/types/root/card/getCardStatus.d.ts +1 -0
  115. package/dist/types/root/card/index.d.ts +18 -15
  116. package/dist/types/root/cardView.d.ts +14 -8
  117. package/dist/types/root/index.d.ts +1 -0
  118. package/dist/types/root/inline/loader.d.ts +8 -8
  119. package/dist/types/root/inline/{inlineMediaCard.d.ts → mediaInlineCard.d.ts} +4 -4
  120. package/dist/types/root/inlinePlayer.d.ts +1 -1
  121. package/dist/types/root/ui/iconMessage/index.d.ts +7 -2
  122. package/dist/types/root/ui/imageRenderer/imageRenderer.d.ts +5 -18
  123. package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +2 -0
  124. package/dist/types/types.d.ts +9 -1
  125. package/dist/types/utils/analytics.d.ts +20 -21
  126. package/dist/types/utils/cardDimensions.d.ts +5 -1
  127. package/dist/types/utils/dimensionComparer.d.ts +1 -1
  128. package/dist/types/utils/document.d.ts +2 -0
  129. package/dist/types/utils/getDataURIDimension.d.ts +3 -1
  130. package/dist/types/utils/index.d.ts +1 -0
  131. package/dist/types/utils/lazyContent/styled.d.ts +1 -1
  132. package/dist/types/utils/lightCards/types.d.ts +1 -1
  133. package/dist/types/utils/metadata.d.ts +2 -2
  134. package/dist/types/utils/objectURLCache.d.ts +2 -1
  135. package/dist/types/utils/resizeModeToMediaImageProps.d.ts +5 -0
  136. package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +1 -1
  137. package/example-helpers/developmentUseMessage.tsx +14 -0
  138. package/example-helpers/index.tsx +55 -4
  139. package/example-helpers/selectableCard.tsx +2 -1
  140. package/package.json +18 -14
  141. package/dist/cjs/root/card/getCardPreview/types.js +0 -5
  142. package/dist/cjs/utils/fileAttributesContext.js +0 -40
  143. package/dist/es2019/root/card/getCardPreview/types.js +0 -1
  144. package/dist/es2019/root/inline/inlineMediaCard.js +0 -92
  145. package/dist/es2019/utils/fileAttributesContext.js +0 -19
  146. package/dist/esm/root/card/getCardPreview/types.js +0 -1
  147. package/dist/esm/root/inline/inlineMediaCard.js +0 -100
  148. package/dist/esm/utils/fileAttributesContext.js +0 -18
  149. package/dist/types/root/card/getCardPreview/types.d.ts +0 -5
  150. package/dist/types/utils/fileAttributesContext.d.ts +0 -10
@@ -14,21 +14,26 @@ export var IconMessage = function IconMessage(_ref) {
14
14
  reducedFont: reducedFont
15
15
  }, /*#__PURE__*/React.createElement(FormattedMessage, messageDescriptor));
16
16
  };
17
- export var CreatingPreview = function CreatingPreview(props) {
18
- return /*#__PURE__*/React.createElement(IconMessage, _extends({}, props, {
17
+ export var CreatingPreview = function CreatingPreview(_ref2) {
18
+ var disableAnimation = _ref2.disableAnimation;
19
+ return /*#__PURE__*/React.createElement(IconMessage, {
19
20
  messageDescriptor: messages.creating_preview,
20
- animated: true
21
- }));
21
+ animated: !disableAnimation
22
+ });
22
23
  };
23
24
  export var PreviewUnavailable = function PreviewUnavailable(props) {
24
25
  return /*#__PURE__*/React.createElement(IconMessage, _extends({}, props, {
25
26
  messageDescriptor: messages.preview_unavailable
26
27
  }));
27
28
  };
28
- export var RateLimited = function RateLimited(props) {
29
+ export var FailedToLoad = function FailedToLoad(props) {
29
30
  return /*#__PURE__*/React.createElement(IconMessage, _extends({}, props, {
30
- messageDescriptor: messages.preview_rateLimited,
31
- reducedFont: true
31
+ messageDescriptor: messages.failed_to_load
32
+ }));
33
+ };
34
+ export var FailedToUpload = function FailedToUpload(props) {
35
+ return /*#__PURE__*/React.createElement(IconMessage, _extends({}, props, {
36
+ messageDescriptor: messages.failed_to_upload
32
37
  }));
33
38
  };
34
39
  export var PreviewCurrentlyUnavailable = function PreviewCurrentlyUnavailable(props) {
@@ -1,109 +1,31 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
-
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
-
12
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
- import React from 'react';
2
+ import React, { useEffect } from 'react';
15
3
  import { MediaImage } from '@atlaskit/media-ui';
16
- import { withAnalyticsEvents } from '@atlaskit/analytics-next';
17
- import { fireMediaCardEvent, RenderEventAction, getRenderSucceededEventPayload, getRenderFailedFileUriPayload, getRenderFailedExternalUriPayload } from '../../../utils/analytics';
18
- import { withFileAttributes } from '../../../utils/fileAttributesContext';
19
- export var resizeModeToMediaImageProps = function resizeModeToMediaImageProps(resizeMode) {
20
- return {
21
- crop: resizeMode === 'crop',
22
- stretch: resizeMode === 'stretchy-fit'
23
- };
24
- };
25
- export var ImageRendererBase = /*#__PURE__*/function (_React$Component) {
26
- _inherits(ImageRendererBase, _React$Component);
27
-
28
- var _super = _createSuper(ImageRendererBase);
29
-
30
- function ImageRendererBase() {
31
- var _this;
32
-
33
- _classCallCheck(this, ImageRendererBase);
34
-
35
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
- args[_key] = arguments[_key];
4
+ import { resizeModeToMediaImageProps } from '../../../utils/resizeModeToMediaImageProps';
5
+ export var ImageRenderer = function ImageRenderer(_ref) {
6
+ var dataURI = _ref.dataURI,
7
+ previewOrientation = _ref.previewOrientation,
8
+ alt = _ref.alt,
9
+ resizeMode = _ref.resizeMode,
10
+ onImageLoad = _ref.onImageLoad,
11
+ onImageError = _ref.onImageError,
12
+ onDisplayImage = _ref.onDisplayImage,
13
+ mediaType = _ref.mediaType,
14
+ nativeLazyLoad = _ref.nativeLazyLoad,
15
+ forceSyncDisplay = _ref.forceSyncDisplay;
16
+ useEffect(function () {
17
+ // TODO: trigger accordingly with the succeeded event. This could be a breaking change
18
+ if (mediaType === 'image' && onDisplayImage) {
19
+ onDisplayImage();
37
20
  }
38
-
39
- _this = _super.call.apply(_super, [this].concat(args));
40
-
41
- _defineProperty(_assertThisInitialized(_this), "onImageLoad", function () {
42
- var _this$props = _this.props,
43
- createAnalyticsEvent = _this$props.createAnalyticsEvent,
44
- fileAttributes = _this$props.fileAttributes;
45
-
46
- if (fileAttributes && _this.shouldFireEvent(RenderEventAction.SUCCEEDED)) {
47
- fireMediaCardEvent(getRenderSucceededEventPayload(fileAttributes), createAnalyticsEvent);
48
- }
49
- });
50
-
51
- _defineProperty(_assertThisInitialized(_this), "onImageError", function () {
52
- var _this$props2 = _this.props,
53
- onImageError = _this$props2.onImageError,
54
- fileAttributes = _this$props2.fileAttributes;
55
- onImageError && onImageError();
56
-
57
- if (fileAttributes && _this.shouldFireEvent(RenderEventAction.FAILED)) {
58
- var _this$props3 = _this.props,
59
- createAnalyticsEvent = _this$props3.createAnalyticsEvent,
60
- mediaItemType = _this$props3.mediaItemType;
61
-
62
- if (mediaItemType === 'file') {
63
- fireMediaCardEvent(getRenderFailedFileUriPayload(fileAttributes), createAnalyticsEvent);
64
- } else if (mediaItemType === 'external-image') {
65
- fireMediaCardEvent(getRenderFailedExternalUriPayload(fileAttributes), createAnalyticsEvent);
66
- }
67
- }
68
- });
69
-
70
- _defineProperty(_assertThisInitialized(_this), "shouldFireEvent", function (action) {
71
- return !_this.lastAnalyticsAction || _this.lastAnalyticsAction !== action;
72
- });
73
-
74
- return _this;
75
- }
76
-
77
- _createClass(ImageRendererBase, [{
78
- key: "componentDidMount",
79
- value: function componentDidMount() {
80
- // TODO: trigger accordingly with the succeeded event. This could be a breaking change
81
- var _this$props4 = this.props,
82
- onDisplayImage = _this$props4.onDisplayImage,
83
- mediaType = _this$props4.mediaType;
84
-
85
- if (mediaType === 'image' && onDisplayImage) {
86
- onDisplayImage();
87
- }
88
- }
89
- }, {
90
- key: "render",
91
- value: function render() {
92
- var _this$props5 = this.props,
93
- dataURI = _this$props5.dataURI,
94
- previewOrientation = _this$props5.previewOrientation,
95
- alt = _this$props5.alt,
96
- resizeMode = _this$props5.resizeMode;
97
- return /*#__PURE__*/React.createElement(MediaImage, _extends({
98
- dataURI: dataURI,
99
- alt: alt,
100
- previewOrientation: previewOrientation,
101
- onImageLoad: this.onImageLoad,
102
- onImageError: this.onImageError
103
- }, resizeModeToMediaImageProps(resizeMode)));
104
- }
105
- }]);
106
-
107
- return ImageRendererBase;
108
- }(React.Component);
109
- export var ImageRenderer = withAnalyticsEvents()(withFileAttributes(ImageRendererBase));
21
+ }, [mediaType, onDisplayImage]);
22
+ return /*#__PURE__*/React.createElement(MediaImage, _extends({
23
+ dataURI: dataURI,
24
+ alt: alt,
25
+ previewOrientation: previewOrientation,
26
+ onImageLoad: onImageLoad,
27
+ onImageError: onImageError,
28
+ loading: nativeLazyLoad ? 'lazy' : undefined,
29
+ forceSyncDisplay: forceSyncDisplay
30
+ }, resizeModeToMediaImageProps(resizeMode)));
31
+ };
@@ -92,7 +92,7 @@ export var NewFileExperienceWrapper = styled.div(_templateObject || (_templateOb
92
92
  isPlayButtonClickable = _ref6.isPlayButtonClickable,
93
93
  isTickBoxSelectable = _ref6.isTickBoxSelectable,
94
94
  shouldDisplayTooltip = _ref6.shouldDisplayTooltip;
95
- return "\n ".concat(transition(), "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ").concat(fontFamily(), ";\n ").concat(getWrapperDimensions(dimensions, appearance), "\n ").concat(displayBackground ? "background-color: ".concat(N20, ";") : '', "\n ").concat(borderRadius, "\n ").concat(getCursorStyle(shouldUsePointerCursor), "\n ").concat(getWrapperShadow(disableOverlay, selected), "\n ").concat(generateResponsiveStyles(breakpoint), "\n ").concat(hideNativeBrowserTextSelectionStyles, "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ").concat(getClickablePlayButtonStyles(isPlayButtonClickable), "\n ").concat(getSelectableTickBoxStyles(isTickBoxSelectable), "\n &:hover .").concat(blanketClassName, " {\n ").concat(fixedBlanketStyles, "\n }\n &:hover .").concat(actionsBarClassName, " {\n ").concat(fixedActionBarStyles, "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ").concat(shouldDisplayTooltip ? "> div { ".concat(getWrapperDimensions(dimensions, appearance), " }") : '', "\n");
95
+ return "\n ".concat(transition(), "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ").concat(fontFamily(), ";\n ").concat(getWrapperDimensions(dimensions, appearance), "\n ").concat(displayBackground ? "background-color: ".concat(N20, ";") : '', "\n ").concat(borderRadius, "\n ").concat(getCursorStyle(shouldUsePointerCursor), "\n ").concat(getWrapperShadow(disableOverlay, selected), "\n ").concat(generateResponsiveStyles(breakpoint), "\n ").concat(hideNativeBrowserTextSelectionStyles, "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ").concat(getClickablePlayButtonStyles(isPlayButtonClickable), "\n ").concat(getSelectableTickBoxStyles(isTickBoxSelectable), "\n &:hover .").concat(blanketClassName, " {\n ").concat(fixedBlanketStyles, "\n }\n\n &:hover .").concat(actionsBarClassName, " {\n ").concat(fixedActionBarStyles, "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ").concat(shouldDisplayTooltip ? "> div { ".concat(getWrapperDimensions(dimensions, appearance), " }") : '', "\n");
96
96
  });
97
97
  NewFileExperienceWrapper.displayName = 'NewFileExperienceWrapper';
98
98
  export var CardImageContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n max-width: 100%;\n width: 100%;\n height: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), borderRadius);
@@ -1,15 +1,18 @@
1
1
  import React from 'react';
2
2
  import { TitleBoxWrapper, ErrorMessageWrapper } from './styled';
3
3
  import EditorWarningIcon from '@atlaskit/icon/glyph/editor/warning';
4
+ import { messages } from '@atlaskit/media-ui';
4
5
  import { R300 } from '@atlaskit/theme/colors';
5
- import { getErrorMessage } from '../../../utils/getErrorMessage';
6
+ import { FormattedMessage } from 'react-intl';
6
7
  export var FailedTitleBox = function FailedTitleBox(_ref) {
7
- var breakpoint = _ref.breakpoint;
8
+ var breakpoint = _ref.breakpoint,
9
+ _ref$customMessage = _ref.customMessage,
10
+ customMessage = _ref$customMessage === void 0 ? messages.failed_to_load : _ref$customMessage;
8
11
  return /*#__PURE__*/React.createElement(TitleBoxWrapper, {
9
12
  breakpoint: breakpoint
10
13
  }, /*#__PURE__*/React.createElement(ErrorMessageWrapper, null, /*#__PURE__*/React.createElement(EditorWarningIcon, {
11
14
  label: 'Warning',
12
15
  size: 'small',
13
16
  primaryColor: R300
14
- }), getErrorMessage('error')));
17
+ }), /*#__PURE__*/React.createElement(FormattedMessage, customMessage)));
15
18
  };
@@ -2,14 +2,6 @@ import { getMediaClientErrorReason, isRequestError } from '@atlaskit/media-clien
2
2
  import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
3
3
  import { createAndFireEvent } from '@atlaskit/analytics-next';
4
4
  import { isMediaCardError } from '../errors';
5
- export var RenderEventAction;
6
-
7
- (function (RenderEventAction) {
8
- RenderEventAction["COMMENCED"] = "commenced";
9
- RenderEventAction["SUCCEEDED"] = "succeeded";
10
- RenderEventAction["FAILED"] = "failed";
11
- })(RenderEventAction || (RenderEventAction = {}));
12
-
13
5
  export var getFileAttributes = function getFileAttributes(metadata, fileStatus) {
14
6
  return {
15
7
  fileMediatype: metadata.mediaType,
@@ -19,56 +11,49 @@ export var getFileAttributes = function getFileAttributes(metadata, fileStatus)
19
11
  fileStatus: fileStatus
20
12
  };
21
13
  };
22
- export var getRenderCommencedEventPayload = function getRenderCommencedEventPayload(fileAttributes) {
14
+ export var getRenderPreviewableCardPayload = function getRenderPreviewableCardPayload(fileAttributes) {
23
15
  return {
24
- eventType: 'operational',
25
- action: RenderEventAction.COMMENCED,
26
- actionSubject: 'mediaCardRender',
16
+ eventType: 'screen',
17
+ action: 'viewed',
18
+ actionSubject: 'mediaCardRenderScreen',
19
+ name: 'mediaCardRenderScreen',
27
20
  attributes: {
21
+ type: fileAttributes.fileMediatype,
28
22
  fileAttributes: fileAttributes
29
23
  }
30
24
  };
31
25
  };
32
- export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes) {
26
+ export var getRenderCommencedEventPayload = function getRenderCommencedEventPayload(fileAttributes, performanceAttributes) {
33
27
  return {
34
28
  eventType: 'operational',
35
- action: RenderEventAction.SUCCEEDED,
29
+ action: 'commenced',
36
30
  actionSubject: 'mediaCardRender',
37
31
  attributes: {
38
32
  fileAttributes: fileAttributes,
39
- status: 'success'
33
+ performanceAttributes: performanceAttributes
40
34
  }
41
35
  };
42
36
  };
43
- export var getFailedFileUriFailReason = function getFailedFileUriFailReason(fileStatus) {
44
- if (!fileStatus) {
45
- // This fail reason will come from a bug, most likely.
46
- return "unknown-uri";
47
- } else if (fileStatus === 'uploading') {
48
- return 'local-uri';
49
- }
50
-
51
- return 'remote-uri';
52
- };
53
- export var getRenderFailedFileUriPayload = function getRenderFailedFileUriPayload(fileAttributes) {
37
+ export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes, performanceAttributes) {
54
38
  return {
55
39
  eventType: 'operational',
56
- action: RenderEventAction.FAILED,
40
+ action: 'succeeded',
57
41
  actionSubject: 'mediaCardRender',
58
42
  attributes: {
59
43
  fileAttributes: fileAttributes,
60
- status: 'fail',
61
- failReason: getFailedFileUriFailReason(fileAttributes.fileStatus)
44
+ performanceAttributes: performanceAttributes,
45
+ status: 'success'
62
46
  }
63
47
  };
64
48
  };
65
- export var getRenderFailedExternalUriPayload = function getRenderFailedExternalUriPayload(fileAttributes) {
49
+ export var getRenderFailedExternalUriPayload = function getRenderFailedExternalUriPayload(fileAttributes, performanceAttributes) {
66
50
  return {
67
51
  eventType: 'operational',
68
- action: RenderEventAction.FAILED,
52
+ action: 'failed',
69
53
  actionSubject: 'mediaCardRender',
70
54
  attributes: {
71
55
  fileAttributes: fileAttributes,
56
+ performanceAttributes: performanceAttributes,
72
57
  status: 'fail',
73
58
  failReason: 'external-uri'
74
59
  }
@@ -104,13 +89,14 @@ export var getRenderErrorRequestMetadata = function getRenderErrorRequestMetadat
104
89
  return error.secondaryError.metadata;
105
90
  }
106
91
  };
107
- export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, error) {
92
+ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error) {
108
93
  return {
109
94
  eventType: 'operational',
110
- action: RenderEventAction.FAILED,
95
+ action: 'failed',
111
96
  actionSubject: 'mediaCardRender',
112
97
  attributes: {
113
98
  fileAttributes: fileAttributes,
99
+ performanceAttributes: performanceAttributes,
114
100
  status: 'fail',
115
101
  failReason: getRenderErrorFailReason(error),
116
102
  error: getRenderErrorErrorReason(error),
@@ -119,13 +105,14 @@ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(file
119
105
  }
120
106
  };
121
107
  };
122
- export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatusPayload(fileAttributes) {
108
+ export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatusPayload(fileAttributes, performanceAttributes) {
123
109
  return {
124
110
  eventType: 'operational',
125
- action: RenderEventAction.FAILED,
111
+ action: 'failed',
126
112
  actionSubject: 'mediaCardRender',
127
113
  attributes: {
128
114
  fileAttributes: fileAttributes,
115
+ performanceAttributes: performanceAttributes,
129
116
  status: 'fail',
130
117
  failReason: 'failed-processing'
131
118
  }
@@ -1,3 +1,4 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
1
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/createClass";
3
4
  import _inherits from "@babel/runtime/helpers/inherits";
@@ -80,16 +81,22 @@ export var CardActionsDropdownMenu = /*#__PURE__*/function (_Component) {
80
81
 
81
82
  if (actions.length > 0) {
82
83
  return /*#__PURE__*/React.createElement(DropdownMenu, {
83
- "data-testid": "media-card-actions-menu",
84
+ testId: "media-card-actions-menu",
84
85
  onOpenChange: onOpenChange,
85
- trigger: /*#__PURE__*/React.createElement(CardActionButtonWithAnalytics, {
86
- variant: triggerVariant,
87
- style: {
88
- color: triggerColor
89
- }
90
- }, /*#__PURE__*/React.createElement(MoreIcon, {
91
- label: "more"
92
- }))
86
+ trigger: function trigger(_ref) {
87
+ var triggerRef = _ref.triggerRef,
88
+ providedProps = _objectWithoutProperties(_ref, ["triggerRef"]);
89
+
90
+ return /*#__PURE__*/React.createElement(CardActionButtonWithAnalytics, _extends({
91
+ variant: triggerVariant,
92
+ style: {
93
+ color: triggerColor
94
+ },
95
+ ref: triggerRef
96
+ }, providedProps), /*#__PURE__*/React.createElement(MoreIcon, {
97
+ label: "more"
98
+ }));
99
+ }
93
100
  }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, actions.map(createDropdownItemWithAnalytics)));
94
101
  } else {
95
102
  return null;
@@ -20,7 +20,7 @@ export var canCompareDimension = function canCompareDimension(current, next) {
20
20
  return false;
21
21
  };
22
22
  export var isBigger = function isBigger(current, next) {
23
- if (canCompareDimension(current.width, next.width) && canCompareDimension(current.height, next.height)) {
23
+ if (!!current && !!next && canCompareDimension(current.width, next.width) && canCompareDimension(current.height, next.height)) {
24
24
  var nextIsHigher = parseInt("".concat(current.width), 10) < parseInt("".concat(next.width), 10);
25
25
  var nextIsWider = parseInt("".concat(current.height), 10) < parseInt("".concat(next.height), 10);
26
26
  return nextIsHigher || nextIsWider;
@@ -0,0 +1,3 @@
1
+ export default (function () {
2
+ return document;
3
+ });
@@ -20,4 +20,12 @@ export var getDataURIDimension = function getDataURIDimension(dimension, options
20
20
  }
21
21
 
22
22
  return defaultImageCardDimensions[dimension] * retinaFactor;
23
+ };
24
+ export var getRequestedDimensions = function getRequestedDimensions(options) {
25
+ var width = getDataURIDimension('width', options);
26
+ var height = getDataURIDimension('height', options);
27
+ return {
28
+ width: width,
29
+ height: height
30
+ };
23
31
  };
@@ -1,4 +1,4 @@
1
- import { isErrorFileState } from '@atlaskit/media-client';
1
+ import { isErrorFileState, isFileIdentifier } from '@atlaskit/media-client';
2
2
 
3
3
  var getProcessingStatusFromFileState = function getProcessingStatusFromFileState(status) {
4
4
  switch (status) {
@@ -13,8 +13,8 @@ var getProcessingStatusFromFileState = function getProcessingStatusFromFileState
13
13
  }
14
14
  };
15
15
 
16
- export var getFileDetails = function getFileDetails(state) {
17
- return !isErrorFileState(state) ? {
16
+ var getFileDetailsFromFileState = function getFileDetailsFromFileState(state) {
17
+ return {
18
18
  id: state.id,
19
19
  name: state.name,
20
20
  size: state.size,
@@ -22,7 +22,15 @@ export var getFileDetails = function getFileDetails(state) {
22
22
  createdAt: state.createdAt,
23
23
  mediaType: state.mediaType,
24
24
  processingStatus: getProcessingStatusFromFileState(state.status)
25
+ };
26
+ };
27
+
28
+ export var getFileDetails = function getFileDetails(identifier, fileState) {
29
+ return isFileIdentifier(identifier) ? fileState && !isErrorFileState(fileState) ? getFileDetailsFromFileState(fileState) : {
30
+ id: identifier.id
25
31
  } : {
26
- id: state.id
32
+ id: identifier.mediaItemType,
33
+ name: identifier.name || identifier.dataURI,
34
+ mediaType: 'image'
27
35
  };
28
36
  };
@@ -73,6 +73,12 @@ export var ObjectURLCache = /*#__PURE__*/function () {
73
73
  value: function set(key, value) {
74
74
  this.cache.set(key, value);
75
75
  }
76
+ }, {
77
+ key: "remove",
78
+ value: function remove(key) {
79
+ var removed = this.cache.remove(key);
80
+ removed && URL.revokeObjectURL(removed.dataURI);
81
+ }
76
82
  }]);
77
83
 
78
84
  return ObjectURLCache;
@@ -0,0 +1,6 @@
1
+ export function resizeModeToMediaImageProps(resizeMode) {
2
+ return {
3
+ crop: resizeMode === 'crop',
4
+ stretch: resizeMode === 'stretchy-fit'
5
+ };
6
+ }
@@ -5,7 +5,7 @@ export var shouldDisplayImageThumbnail = function shouldDisplayImageThumbnail(ca
5
5
  }
6
6
 
7
7
  if (dataURI) {
8
- return mediaItemType === 'external-image' || mimeType && isMimeTypeSupportedByBrowser(mimeType) || cardStatus === 'complete';
8
+ return mediaItemType === 'external-image' || mimeType && isMimeTypeSupportedByBrowser(mimeType) || cardStatus === 'complete' || cardStatus === 'loading-preview';
9
9
  }
10
10
 
11
11
  return false;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "70.10.0",
3
+ "version": "72.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,9 @@
1
- export declare type MediaCardErrorPrimaryReason = 'upload' | 'metadata-fetch' | 'error-file-state' | RemotePreviewPrimaryReason | LocalPreviewPrimaryReason | 'preview-fetch';
1
+ import { CardPreview } from '.';
2
+ export declare type MediaCardErrorPrimaryReason = 'upload' | 'metadata-fetch' | 'error-file-state' | RemotePreviewPrimaryReason | LocalPreviewPrimaryReason | ImageLoadPrimaryReason | SsrPreviewPrimaryReason | 'preview-fetch';
3
+ export declare type ImageLoadPrimaryReason = 'cache-remote-uri' | 'cache-local-uri' | 'local-uri' | 'remote-uri' | 'external-uri' | 'unknown-uri';
2
4
  export declare type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-preview-not-ready';
3
5
  export declare type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
6
+ export declare type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
4
7
  export declare class MediaCardError extends Error {
5
8
  readonly primaryReason: MediaCardErrorPrimaryReason;
6
9
  readonly secondaryError?: Error | undefined;
@@ -16,8 +19,19 @@ export declare class RemotePreviewError extends MediaCardError {
16
19
  readonly secondaryError?: Error | undefined;
17
20
  constructor(primaryReason: RemotePreviewPrimaryReason, secondaryError?: Error | undefined);
18
21
  }
22
+ export declare class SsrPreviewError extends MediaCardError {
23
+ readonly primaryReason: SsrPreviewPrimaryReason;
24
+ readonly secondaryError?: Error | undefined;
25
+ constructor(primaryReason: SsrPreviewPrimaryReason, secondaryError?: Error | undefined);
26
+ }
27
+ export declare const getImageLoadPrimaryReason: (source?: "local" | "remote" | "ssr-server" | "ssr-client" | "cache-local" | "cache-remote" | "cache-ssr-client" | "cache-ssr-server" | "external" | undefined) => ImageLoadPrimaryReason;
28
+ export declare class ImageLoadError extends MediaCardError {
29
+ constructor(source?: CardPreview['source']);
30
+ }
19
31
  export declare function isMediaCardError(err: Error): err is MediaCardError;
20
32
  export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewError;
21
33
  export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
22
34
  export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
35
+ export declare function isImageLoadError(err: Error): err is ImageLoadError;
23
36
  export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error) => MediaCardError;
37
+ export declare const isUploadError: (error?: MediaCardError | undefined) => boolean | undefined;
@@ -1,11 +1,7 @@
1
- import React from 'react';
2
1
  import { Component, ReactNode } from 'react';
3
2
  import { MediaItemType, MediaType, ImageResizeMode } from '@atlaskit/media-client';
4
3
  import { CardDimensions, CardStatus } from '../../index';
5
4
  import { CardAction } from '../../actions';
6
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
7
- import { RenderEventAction } from '../../utils/analytics';
8
- import { WithFileAttributesProps } from '../../utils/fileAttributesContext';
9
5
  export interface FileCardImageViewProps {
10
6
  readonly mediaName?: string;
11
7
  readonly mediaType?: MediaType;
@@ -25,13 +21,14 @@ export interface FileCardImageViewProps {
25
21
  readonly actions?: CardAction[];
26
22
  readonly onDisplayImage?: () => void;
27
23
  readonly previewOrientation?: number;
24
+ readonly onImageError?: () => void;
25
+ readonly onImageLoad?: () => void;
28
26
  }
29
27
  export declare const fileCardImageViewSelector = "media-file-card-view";
30
- export declare type FileCardImageViewBaseProps = FileCardImageViewProps & WithAnalyticsEventsProps & WithFileAttributesProps;
31
- export declare class FileCardImageViewBase extends Component<FileCardImageViewBaseProps> {
28
+ export declare const fileCardImageViewSelectedSelector = "media-file-card-view-selected";
29
+ export declare class FileCardImageView extends Component<FileCardImageViewProps> {
32
30
  private wasThumbnailDisplayed;
33
- private lastAnalyticsAction;
34
- static defaultProps: Partial<FileCardImageViewBaseProps>;
31
+ static defaultProps: Partial<FileCardImageViewProps>;
35
32
  render(): JSX.Element;
36
33
  private renderCardContents;
37
34
  private renderLoadingContents;
@@ -39,10 +36,7 @@ export declare class FileCardImageViewBase extends Component<FileCardImageViewBa
39
36
  private renderFailedContents;
40
37
  private renderUploadingCardOverlay;
41
38
  private renderPlayButton;
42
- onImageLoad: () => void;
43
- onImageError: () => void;
44
39
  private renderMediaImage;
45
- shouldFireEvent: (action: RenderEventAction) => boolean;
46
40
  private renderProgressBar;
47
41
  private renderSuccessCardContents;
48
42
  private renderSuccessCardOverlay;
@@ -50,4 +44,3 @@ export declare class FileCardImageViewBase extends Component<FileCardImageViewBa
50
44
  private get isCropped();
51
45
  private get isStretched();
52
46
  }
53
- export declare const FileCardImageView: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<FileCardImageViewProps & WithAnalyticsEventsProps>, "progress" | "error" | "alt" | "dimensions" | "resizeMode" | "mediaType" | "mimeType" | "children" | "actions" | "mediaName" | "selectable" | "selected" | "disableOverlay" | "fileSize" | "dataURI" | "status" | "mediaItemType" | "onDisplayImage" | "previewOrientation"> & React.RefAttributes<any>>;
@@ -6,7 +6,7 @@ export interface WrapperProps {
6
6
  hasOnClick?: boolean;
7
7
  mediaType?: string;
8
8
  }
9
- export declare const Wrapper: import("styled-components").StyledComponentClass<import("react").HTMLAttributes<{}> & WrapperProps, any, Pick<import("react").HTMLAttributes<{}>, "dir" | "slot" | "style" | "title" | "id" | "children" | "onError" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & {
9
+ export declare const Wrapper: import("styled-components").StyledComponentClass<import("react").HTMLAttributes<{}> & WrapperProps, any, Pick<import("react").HTMLAttributes<{}>, "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & {
10
10
  theme?: any;
11
11
  } & WrapperProps>;
12
12
  export declare const PlayIconWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- export { FileCardImageView, FileCardImageViewBase } from './cardImageView';
1
+ export { FileCardImageView } from './cardImageView';
2
2
  export type { FileCardImageViewProps } from './cardImageView';