@atlaskit/media-card 70.9.0 → 72.0.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.
- package/CHANGELOG.md +69 -0
- package/dist/cjs/errors.js +109 -6
- package/dist/cjs/files/cardImageView/index.js +58 -89
- package/dist/cjs/files/index.js +0 -6
- package/dist/cjs/index.js +16 -6
- package/dist/cjs/root/card/cardAnalytics.js +33 -19
- package/dist/cjs/root/card/cardConstants.js +8 -0
- package/dist/cjs/root/card/cardSSRView.js +114 -0
- package/dist/cjs/root/card/cardState.js +50 -0
- package/dist/cjs/root/card/getCardPreview/cache.js +49 -0
- package/dist/cjs/root/card/getCardPreview/filePreviewStatus.js +50 -0
- package/dist/cjs/root/card/getCardPreview/helpers.js +215 -0
- package/dist/cjs/root/card/getCardPreview/index.js +225 -0
- package/dist/cjs/root/card/getCardStatus.js +16 -21
- package/dist/cjs/root/card/index.js +339 -398
- package/dist/cjs/root/cardView.js +108 -56
- package/dist/cjs/root/index.js +9 -1
- package/dist/cjs/root/inline/loader.js +22 -21
- package/dist/cjs/root/inline/{inlineMediaCard.js → mediaInlineCard.js} +66 -24
- package/dist/cjs/root/inlinePlayer.js +5 -15
- package/dist/cjs/root/ui/Breakpoint.js +13 -0
- package/dist/cjs/root/ui/common.js +5 -11
- package/dist/cjs/root/ui/iconMessage/index.js +17 -9
- package/dist/cjs/root/ui/imageRenderer/imageRenderer.js +32 -115
- package/dist/cjs/root/ui/loadingRateLimited/loadingRateLimited.js +2 -2
- package/dist/cjs/root/ui/progressBar/progressBar.js +2 -2
- package/dist/cjs/root/ui/progressBar/styled.js +3 -1
- package/dist/cjs/root/ui/styled.js +17 -80
- package/dist/cjs/root/ui/styledSSR.js +108 -0
- package/dist/cjs/root/ui/titleBox/failedTitleBox.js +7 -3
- package/dist/cjs/root/ui/titleBox/styled.js +3 -1
- package/dist/cjs/utils/analytics.js +26 -43
- package/dist/cjs/utils/dimensionComparer.js +1 -1
- package/dist/cjs/utils/document.js +12 -0
- package/dist/cjs/utils/getDataURIDimension.js +13 -2
- package/dist/cjs/utils/metadata.js +11 -3
- package/dist/cjs/utils/objectURLCache.js +6 -0
- package/dist/cjs/utils/resizeModeToMediaImageProps.js +13 -0
- package/dist/cjs/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/cjs/utils/videoSnapshot.js +45 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/errors.js +52 -2
- package/dist/es2019/files/cardImageView/index.js +12 -46
- package/dist/es2019/files/index.js +1 -1
- package/dist/es2019/index.js +3 -3
- package/dist/es2019/root/card/cardAnalytics.js +23 -17
- package/dist/es2019/root/card/cardConstants.js +1 -0
- package/dist/es2019/root/card/cardSSRView.js +93 -0
- package/dist/es2019/root/card/cardState.js +26 -0
- package/dist/es2019/root/card/getCardPreview/cache.js +29 -0
- package/dist/es2019/root/card/getCardPreview/filePreviewStatus.js +35 -0
- package/dist/es2019/root/card/getCardPreview/helpers.js +83 -0
- package/dist/es2019/root/card/getCardPreview/index.js +129 -0
- package/dist/es2019/root/card/getCardStatus.js +11 -15
- package/dist/es2019/root/card/index.js +292 -276
- package/dist/es2019/root/cardView.js +107 -53
- package/dist/es2019/root/index.js +2 -1
- package/dist/es2019/root/inline/loader.js +16 -15
- package/dist/es2019/root/inline/mediaInlineCard.js +127 -0
- package/dist/es2019/root/inlinePlayer.js +5 -13
- package/dist/es2019/root/ui/Breakpoint.js +6 -0
- package/dist/es2019/root/ui/common.js +1 -7
- package/dist/es2019/root/ui/iconMessage/index.js +10 -6
- package/dist/es2019/root/ui/imageRenderer/imageRenderer.js +22 -74
- package/dist/es2019/root/ui/loadingRateLimited/loadingRateLimited.js +1 -1
- package/dist/es2019/root/ui/progressBar/progressBar.js +1 -1
- package/dist/es2019/root/ui/progressBar/styled.js +2 -1
- package/dist/es2019/root/ui/styled.js +4 -64
- package/dist/es2019/root/ui/styledSSR.js +93 -0
- package/dist/es2019/root/ui/titleBox/failedTitleBox.js +5 -3
- package/dist/es2019/root/ui/titleBox/styled.js +2 -1
- package/dist/es2019/utils/analytics.js +29 -40
- package/dist/es2019/utils/dimensionComparer.js +1 -1
- package/dist/es2019/utils/document.js +1 -0
- package/dist/es2019/utils/getDataURIDimension.js +8 -0
- package/dist/es2019/utils/metadata.js +12 -4
- package/dist/es2019/utils/objectURLCache.js +5 -0
- package/dist/es2019/utils/resizeModeToMediaImageProps.js +6 -0
- package/dist/es2019/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/es2019/utils/videoSnapshot.js +7 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/errors.js +85 -2
- package/dist/esm/files/cardImageView/index.js +55 -87
- package/dist/esm/files/index.js +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/root/card/cardAnalytics.js +23 -18
- package/dist/esm/root/card/cardConstants.js +1 -0
- package/dist/esm/root/card/cardSSRView.js +92 -0
- package/dist/esm/root/card/cardState.js +32 -0
- package/dist/esm/root/card/getCardPreview/cache.js +33 -0
- package/dist/esm/root/card/getCardPreview/filePreviewStatus.js +35 -0
- package/dist/esm/root/card/getCardPreview/helpers.js +194 -0
- package/dist/esm/root/card/getCardPreview/index.js +174 -0
- package/dist/esm/root/card/getCardStatus.js +13 -17
- package/dist/esm/root/card/index.js +349 -401
- package/dist/esm/root/cardView.js +105 -52
- package/dist/esm/root/index.js +2 -1
- package/dist/esm/root/inline/loader.js +23 -22
- package/dist/esm/root/inline/{inlineMediaCard.js → mediaInlineCard.js} +62 -22
- package/dist/esm/root/inlinePlayer.js +5 -13
- package/dist/esm/root/ui/Breakpoint.js +6 -0
- package/dist/esm/root/ui/common.js +1 -7
- package/dist/esm/root/ui/iconMessage/index.js +12 -7
- package/dist/esm/root/ui/imageRenderer/imageRenderer.js +24 -106
- package/dist/esm/root/ui/loadingRateLimited/loadingRateLimited.js +1 -1
- package/dist/esm/root/ui/progressBar/progressBar.js +1 -1
- package/dist/esm/root/ui/progressBar/styled.js +2 -1
- package/dist/esm/root/ui/styled.js +13 -61
- package/dist/esm/root/ui/styledSSR.js +76 -0
- package/dist/esm/root/ui/titleBox/failedTitleBox.js +6 -3
- package/dist/esm/root/ui/titleBox/styled.js +2 -1
- package/dist/esm/utils/analytics.js +22 -35
- package/dist/esm/utils/dimensionComparer.js +1 -1
- package/dist/esm/utils/document.js +3 -0
- package/dist/esm/utils/getDataURIDimension.js +8 -0
- package/dist/esm/utils/metadata.js +12 -4
- package/dist/esm/utils/objectURLCache.js +6 -0
- package/dist/esm/utils/resizeModeToMediaImageProps.js +6 -0
- package/dist/esm/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/esm/utils/videoSnapshot.js +31 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/__tests_external__/page-objects/MediaCard.d.ts +4 -3
- package/dist/types/errors.d.ts +24 -2
- package/dist/types/files/cardImageView/index.d.ts +5 -12
- package/dist/types/files/cardImageView/styled.d.ts +1 -1
- package/dist/types/files/index.d.ts +1 -1
- package/dist/types/index.d.ts +9 -12
- package/dist/types/root/card/cardAnalytics.d.ts +5 -7
- package/dist/types/root/card/cardConstants.d.ts +1 -0
- package/dist/types/root/card/cardSSRView.d.ts +13 -0
- package/dist/types/root/card/cardState.d.ts +5 -0
- package/dist/types/root/card/getCardPreview/cache.d.ts +18 -0
- package/dist/types/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
- package/dist/types/root/card/getCardPreview/helpers.d.ts +9 -0
- package/dist/types/root/card/getCardPreview/index.d.ts +44 -0
- package/dist/types/root/card/getCardStatus.d.ts +4 -14
- package/dist/types/root/card/index.d.ts +17 -21
- package/dist/types/root/cardView.d.ts +12 -8
- package/dist/types/root/index.d.ts +1 -0
- package/dist/types/root/inline/loader.d.ts +8 -8
- package/dist/types/root/inline/{inlineMediaCard.d.ts → mediaInlineCard.d.ts} +4 -4
- package/dist/types/root/inlinePlayer.d.ts +1 -1
- package/dist/types/root/ui/Breakpoint.d.ts +4 -0
- package/dist/types/root/ui/common.d.ts +1 -4
- package/dist/types/root/ui/iconMessage/index.d.ts +7 -2
- package/dist/types/root/ui/iconWrapper/styled.d.ts +1 -1
- package/dist/types/root/ui/imageRenderer/imageRenderer.d.ts +2 -16
- package/dist/types/root/ui/loadingRateLimited/loadingRateLimited.d.ts +1 -1
- package/dist/types/root/ui/loadingRateLimited/styled.d.ts +1 -1
- package/dist/types/root/ui/progressBar/progressBar.d.ts +1 -1
- package/dist/types/root/ui/progressBar/styled.d.ts +1 -1
- package/dist/types/root/ui/styled.d.ts +3 -10
- package/dist/types/root/ui/styledSSR.d.ts +16 -0
- package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +3 -1
- package/dist/types/root/ui/titleBox/styled.d.ts +1 -1
- package/dist/types/root/ui/titleBox/titleBox.d.ts +1 -1
- package/dist/types/types.d.ts +15 -1
- package/dist/types/utils/analytics.d.ts +20 -21
- package/dist/types/utils/cardDimensions.d.ts +5 -1
- package/dist/types/utils/dimensionComparer.d.ts +1 -1
- package/dist/types/utils/document.d.ts +2 -0
- package/dist/types/utils/getDataURIDimension.d.ts +3 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/lazyContent/styled.d.ts +1 -1
- package/dist/types/utils/lightCards/types.d.ts +1 -1
- package/dist/types/utils/metadata.d.ts +2 -2
- package/dist/types/utils/objectURLCache.d.ts +2 -1
- package/dist/types/utils/resizeModeToMediaImageProps.d.ts +5 -0
- package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +1 -1
- package/dist/types/utils/videoSnapshot.d.ts +1 -0
- package/example-helpers/index.tsx +21 -0
- package/package.json +19 -17
- package/dist/cjs/root/card/getCardPreview.js +0 -173
- package/dist/cjs/utils/fileAttributesContext.js +0 -40
- package/dist/es2019/root/card/getCardPreview.js +0 -86
- package/dist/es2019/root/inline/inlineMediaCard.js +0 -92
- package/dist/es2019/utils/fileAttributesContext.js +0 -19
- package/dist/esm/root/card/getCardPreview.js +0 -153
- package/dist/esm/utils/fileAttributesContext.js +0 -18
- package/dist/types/root/card/getCardPreview.d.ts +0 -8
- package/dist/types/utils/fileAttributesContext.d.ts +0 -10
|
@@ -27,8 +27,9 @@ import { Wrapper } from './styled';
|
|
|
27
27
|
import { createAndFireMediaCardEvent } from '../utils/analytics';
|
|
28
28
|
import { attachDetailsToActions } from '../actions';
|
|
29
29
|
import { getErrorMessage } from '../utils/getErrorMessage';
|
|
30
|
-
import { toHumanReadableMediaSize } from '@atlaskit/media-ui';
|
|
31
|
-
import { NewFileExperienceWrapper
|
|
30
|
+
import { toHumanReadableMediaSize, messages } from '@atlaskit/media-ui';
|
|
31
|
+
import { NewFileExperienceWrapper } from './ui/styled';
|
|
32
|
+
import { CardImageContainer, calcBreakpointSize } from './ui/styledSSR';
|
|
32
33
|
import { ImageRenderer } from './ui/imageRenderer/imageRenderer';
|
|
33
34
|
import { TitleBox } from './ui/titleBox/titleBox';
|
|
34
35
|
import { FailedTitleBox } from './ui/titleBox/failedTitleBox';
|
|
@@ -41,10 +42,10 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
41
42
|
import { IconWrapper } from './ui/iconWrapper/styled';
|
|
42
43
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
43
44
|
import SpinnerIcon from '@atlaskit/spinner';
|
|
44
|
-
import { PreviewUnavailable, CreatingPreview,
|
|
45
|
-
import { LoadingRateLimited } from './ui/loadingRateLimited/loadingRateLimited';
|
|
45
|
+
import { PreviewUnavailable, CreatingPreview, FailedToUpload, PreviewCurrentlyUnavailable, FailedToLoad } from './ui/iconMessage';
|
|
46
46
|
import { isRateLimitedError, isPollingError } from '@atlaskit/media-client';
|
|
47
|
-
|
|
47
|
+
import { newFileExperienceClassName } from './card/cardConstants';
|
|
48
|
+
import { isUploadError } from '../errors';
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* This is classic vanilla CardView class. To create an instance of class one would need to supply
|
|
@@ -67,15 +68,36 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
67
68
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
68
69
|
|
|
69
70
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
70
|
-
|
|
71
|
+
didImageRender: false
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
_defineProperty(_assertThisInitialized(_this), "divRef", /*#__PURE__*/React.createRef());
|
|
74
75
|
|
|
75
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "onImageLoad", function () {
|
|
77
|
+
var onImageLoad = _this.props.onImageLoad; // We render the icon & icon message always, even if there is dataURI available.
|
|
78
|
+
// If the image fails to load/render, the icon will remain, i.e. the user won't see a change until
|
|
79
|
+
// the root card decides to chage status to error.
|
|
80
|
+
// If the image renders successfully, we switch this variable to hide the icon & icon message
|
|
81
|
+
// behind the thumbnail in case the image has transparency.
|
|
82
|
+
// It is less likely that root component replaces a suceeded dataURI for a failed one
|
|
83
|
+
// than the opposite case. Therefore we prefer to hide the icon instead show when the image fails,
|
|
84
|
+
// for a smoother transition
|
|
85
|
+
|
|
86
|
+
_this.setState({
|
|
87
|
+
didImageRender: true
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
onImageLoad && onImageLoad();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
_defineProperty(_assertThisInitialized(_this), "onImageError", function () {
|
|
94
|
+
var onImageError = _this.props.onImageError;
|
|
95
|
+
|
|
76
96
|
_this.setState({
|
|
77
|
-
|
|
97
|
+
didImageRender: false
|
|
78
98
|
});
|
|
99
|
+
|
|
100
|
+
onImageError && onImageError();
|
|
79
101
|
});
|
|
80
102
|
|
|
81
103
|
_defineProperty(_assertThisInitialized(_this), "saveElementWidth", function () {
|
|
@@ -111,11 +133,10 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
111
133
|
dataURI = _this$props.dataURI;
|
|
112
134
|
|
|
113
135
|
var _ref = metadata || {},
|
|
114
|
-
mediaType = _ref.mediaType,
|
|
115
136
|
name = _ref.name;
|
|
116
137
|
|
|
117
138
|
var shouldUsePointerCursor = status !== 'error' && status !== 'failed-processing';
|
|
118
|
-
var shouldDisplayBackground = !dataURI || !disableOverlay;
|
|
139
|
+
var shouldDisplayBackground = !dataURI || !disableOverlay || status === 'error' || status === 'failed-processing';
|
|
119
140
|
var isPlayButtonClickable = !!(_this.shouldRenderPlayButton() && disableOverlay);
|
|
120
141
|
var isTickBoxSelectable = !disableOverlay && !!selectable && !selected; // Make tooltip optional for media singles - images, videos.
|
|
121
142
|
// Intention is to show full file name when it's truncate in titlebox,
|
|
@@ -130,7 +151,6 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
130
151
|
onClick: onClick,
|
|
131
152
|
onMouseEnter: onMouseEnter,
|
|
132
153
|
innerRef: _this.divRef,
|
|
133
|
-
mediaType: mediaType,
|
|
134
154
|
breakpoint: _this.breakpoint,
|
|
135
155
|
shouldUsePointerCursor: shouldUsePointerCursor,
|
|
136
156
|
disableOverlay: !!disableOverlay,
|
|
@@ -190,7 +210,9 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
190
210
|
actions: actionsWithDetails,
|
|
191
211
|
disableOverlay: disableOverlay,
|
|
192
212
|
previewOrientation: previewOrientation,
|
|
193
|
-
alt: alt
|
|
213
|
+
alt: alt,
|
|
214
|
+
onImageLoad: _this.onImageLoad,
|
|
215
|
+
onImageError: _this.onImageError
|
|
194
216
|
});
|
|
195
217
|
});
|
|
196
218
|
|
|
@@ -201,21 +223,21 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
201
223
|
metadata = _this$props3.metadata,
|
|
202
224
|
disableOverlay = _this$props3.disableOverlay,
|
|
203
225
|
error = _this$props3.error,
|
|
204
|
-
selectable = _this$props3.selectable
|
|
226
|
+
selectable = _this$props3.selectable,
|
|
227
|
+
disableAnimation = _this$props3.disableAnimation;
|
|
205
228
|
|
|
206
229
|
var _ref3 = metadata || {},
|
|
207
230
|
name = _ref3.name,
|
|
208
231
|
mediaType = _ref3.mediaType;
|
|
209
232
|
|
|
210
|
-
var
|
|
233
|
+
var didImageRender = _this.state.didImageRender;
|
|
211
234
|
var isZeroSize = !!(metadata && metadata.size === 0);
|
|
212
235
|
var defaultConfig = {
|
|
213
|
-
renderTypeIcon:
|
|
214
|
-
renderImageRenderer: !!dataURI
|
|
236
|
+
renderTypeIcon: !didImageRender,
|
|
237
|
+
renderImageRenderer: !!dataURI,
|
|
215
238
|
renderPlayButton: !!dataURI && mediaType === 'video',
|
|
216
239
|
renderBlanket: !disableOverlay,
|
|
217
|
-
renderTitleBox:
|
|
218
|
-
renderFailedTitleBox: !!isImageFailedToLoad,
|
|
240
|
+
renderTitleBox: !disableOverlay && !!name,
|
|
219
241
|
renderTickBox: !disableOverlay && !!selectable
|
|
220
242
|
};
|
|
221
243
|
|
|
@@ -228,45 +250,73 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
228
250
|
});
|
|
229
251
|
|
|
230
252
|
case 'processing':
|
|
253
|
+
case 'loading-preview':
|
|
231
254
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
232
|
-
iconMessage:
|
|
255
|
+
iconMessage: !didImageRender && !isZeroSize ? /*#__PURE__*/React.createElement(CreatingPreview, {
|
|
256
|
+
disableAnimation: disableAnimation
|
|
257
|
+
}) : undefined
|
|
233
258
|
});
|
|
234
259
|
|
|
235
260
|
case 'complete':
|
|
236
|
-
return
|
|
261
|
+
return defaultConfig;
|
|
237
262
|
|
|
238
263
|
case 'error':
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
264
|
+
case 'failed-processing':
|
|
265
|
+
var baseErrorConfig = _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
266
|
+
renderTypeIcon: true,
|
|
267
|
+
renderImageRenderer: false,
|
|
268
|
+
renderTitleBox: false,
|
|
269
|
+
renderPlayButton: false
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
var iconMessage;
|
|
273
|
+
|
|
274
|
+
if (!!metadata) {
|
|
275
|
+
if (error) {
|
|
276
|
+
var secondaryError = error.secondaryError;
|
|
277
|
+
|
|
278
|
+
if (isRateLimitedError(secondaryError) || secondaryError && isPollingError(secondaryError)) {
|
|
279
|
+
iconMessage = /*#__PURE__*/React.createElement(PreviewCurrentlyUnavailable, null);
|
|
280
|
+
}
|
|
281
|
+
} else if (!isZeroSize) {
|
|
282
|
+
iconMessage = /*#__PURE__*/React.createElement(PreviewUnavailable, null);
|
|
283
|
+
}
|
|
284
|
+
} else if (!!disableOverlay) {
|
|
285
|
+
iconMessage = /*#__PURE__*/React.createElement(FailedToLoad, null);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (error && isUploadError(error)) {
|
|
289
|
+
if (!disableOverlay) {
|
|
290
|
+
return _objectSpread(_objectSpread({}, baseErrorConfig), {}, {
|
|
291
|
+
renderFailedTitleBox: true,
|
|
292
|
+
customTitleMessage: messages.failed_to_upload
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return _objectSpread(_objectSpread({}, baseErrorConfig), {}, {
|
|
297
|
+
renderTitleBox: !metadata && !!name,
|
|
298
|
+
iconMessage: /*#__PURE__*/React.createElement(FailedToUpload, null)
|
|
244
299
|
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
} else {
|
|
253
|
-
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
254
|
-
renderTitleBox: defaultConfig.renderTitleBox && !!dataURI,
|
|
255
|
-
renderFailedTitleBox: !!isImageFailedToLoad || !dataURI
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (!disableOverlay) {
|
|
303
|
+
return _objectSpread(_objectSpread({}, baseErrorConfig), {}, {
|
|
304
|
+
renderTitleBox: !!name,
|
|
305
|
+
renderFailedTitleBox: !metadata,
|
|
306
|
+
iconMessage: iconMessage
|
|
256
307
|
});
|
|
257
308
|
}
|
|
258
309
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
renderFailedTitleBox: !!isImageFailedToLoad || !dataURI && !metadata,
|
|
262
|
-
iconMessage: !!metadata && !isZeroSize ? /*#__PURE__*/React.createElement(PreviewUnavailable, null) : undefined
|
|
310
|
+
return _objectSpread(_objectSpread({}, baseErrorConfig), {}, {
|
|
311
|
+
iconMessage: iconMessage
|
|
263
312
|
});
|
|
264
313
|
|
|
265
314
|
case 'loading':
|
|
266
315
|
default:
|
|
267
316
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
317
|
+
renderPlayButton: false,
|
|
268
318
|
renderTypeIcon: false,
|
|
269
|
-
renderSpinner:
|
|
319
|
+
renderSpinner: !didImageRender
|
|
270
320
|
});
|
|
271
321
|
}
|
|
272
322
|
});
|
|
@@ -284,7 +334,7 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
284
334
|
renderFailedTitleBox = _this$getRenderConfig.renderFailedTitleBox,
|
|
285
335
|
renderTickBox = _this$getRenderConfig.renderTickBox,
|
|
286
336
|
isFixedBlanket = _this$getRenderConfig.isFixedBlanket,
|
|
287
|
-
|
|
337
|
+
customTitleMessage = _this$getRenderConfig.customTitleMessage;
|
|
288
338
|
|
|
289
339
|
var _this$props4 = _this.props,
|
|
290
340
|
progress = _this$props4.progress,
|
|
@@ -303,7 +353,7 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
303
353
|
"data-test-status": status,
|
|
304
354
|
"data-test-progress": progress,
|
|
305
355
|
"data-test-selected": selected ? true : undefined
|
|
306
|
-
}, renderTypeIcon && _this.renderMediaTypeIcon(hasTitleBox, iconMessage), renderSpinner && _this.renderSpinner(hasTitleBox), renderImageRenderer && _this.renderImageRenderer(), renderPlayButton && _this.renderPlayButton(hasTitleBox), renderBlanket && _this.renderBlanket(!!isFixedBlanket), renderTitleBox && _this.renderTitleBox(), renderFailedTitleBox && _this.renderFailedTitleBox(), renderProgressBar && _this.renderProgressBar(!
|
|
356
|
+
}, renderTypeIcon && _this.renderMediaTypeIcon(hasTitleBox, iconMessage), renderSpinner && _this.renderSpinner(hasTitleBox), renderImageRenderer && _this.renderImageRenderer(), renderPlayButton && _this.renderPlayButton(hasTitleBox), renderBlanket && _this.renderBlanket(!!isFixedBlanket), renderTitleBox && _this.renderTitleBox(), renderFailedTitleBox && _this.renderFailedTitleBox(customTitleMessage), renderProgressBar && _this.renderProgressBar(!hasTitleBox), renderTickBox && _this.renderTickBox()), _this.renderActionsBar());
|
|
307
357
|
});
|
|
308
358
|
|
|
309
359
|
return _this;
|
|
@@ -320,13 +370,14 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
320
370
|
key: "componentDidUpdate",
|
|
321
371
|
value: function componentDidUpdate(_ref5) {
|
|
322
372
|
var prevDataURI = _ref5.dataURI;
|
|
323
|
-
var dataURI = this.props.dataURI;
|
|
373
|
+
var dataURI = this.props.dataURI; // We should only switch didImageRender to false
|
|
374
|
+
// when dataURI goes undefined, not when it is updated.
|
|
375
|
+
// as this method could be triggered after onImageLoad callback,
|
|
376
|
+
// falling on a race condition
|
|
324
377
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
});
|
|
329
|
-
}
|
|
378
|
+
prevDataURI && !dataURI && this.setState({
|
|
379
|
+
didImageRender: false
|
|
380
|
+
});
|
|
330
381
|
}
|
|
331
382
|
}, {
|
|
332
383
|
key: "width",
|
|
@@ -447,9 +498,10 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
447
498
|
}
|
|
448
499
|
}, {
|
|
449
500
|
key: "renderFailedTitleBox",
|
|
450
|
-
value: function renderFailedTitleBox() {
|
|
501
|
+
value: function renderFailedTitleBox(customMessage) {
|
|
451
502
|
return /*#__PURE__*/React.createElement(FailedTitleBox, {
|
|
452
|
-
breakpoint: this.breakpoint
|
|
503
|
+
breakpoint: this.breakpoint,
|
|
504
|
+
customMessage: customMessage
|
|
453
505
|
});
|
|
454
506
|
}
|
|
455
507
|
}, {
|
|
@@ -484,7 +536,8 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
484
536
|
alt: alt,
|
|
485
537
|
resizeMode: resizeMode,
|
|
486
538
|
onDisplayImage: onDisplayImage,
|
|
487
|
-
|
|
539
|
+
onImageLoad: this.onImageLoad,
|
|
540
|
+
onImageError: this.onImageError
|
|
488
541
|
});
|
|
489
542
|
}
|
|
490
543
|
}, {
|
package/dist/esm/root/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Card } from './card/cardLoader';
|
|
1
|
+
export { default as Card } from './card/cardLoader';
|
|
2
|
+
export { default as MediaInlineCard } from './inline/loader';
|
|
@@ -14,17 +14,17 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
14
14
|
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; } }
|
|
15
15
|
|
|
16
16
|
import React from 'react';
|
|
17
|
-
import {
|
|
17
|
+
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
_inherits(
|
|
19
|
+
var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
20
|
+
_inherits(MediaInlineCardLoader, _React$PureComponent);
|
|
21
21
|
|
|
22
|
-
var _super = _createSuper(
|
|
22
|
+
var _super = _createSuper(MediaInlineCardLoader);
|
|
23
23
|
|
|
24
|
-
function
|
|
24
|
+
function MediaInlineCardLoader() {
|
|
25
25
|
var _this;
|
|
26
26
|
|
|
27
|
-
_classCallCheck(this,
|
|
27
|
+
_classCallCheck(this, MediaInlineCardLoader);
|
|
28
28
|
|
|
29
29
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
30
|
args[_key] = arguments[_key];
|
|
@@ -33,13 +33,14 @@ var InlineMediaCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
33
33
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
34
34
|
|
|
35
35
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
36
|
-
|
|
36
|
+
MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
|
|
37
|
+
ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
return _this;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
_createClass(
|
|
43
|
+
_createClass(MediaInlineCardLoader, [{
|
|
43
44
|
key: "componentDidMount",
|
|
44
45
|
value: function () {
|
|
45
46
|
var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -49,7 +50,7 @@ var InlineMediaCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
49
50
|
while (1) {
|
|
50
51
|
switch (_context.prev = _context.next) {
|
|
51
52
|
case 0:
|
|
52
|
-
if (this.state.
|
|
53
|
+
if (this.state.MediaInlineCard) {
|
|
53
54
|
_context.next = 16;
|
|
54
55
|
break;
|
|
55
56
|
}
|
|
@@ -60,7 +61,7 @@ var InlineMediaCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
60
61
|
/* webpackChunkName: "@atlaskit-internal_media-client" */
|
|
61
62
|
'@atlaskit/media-client'), import(
|
|
62
63
|
/* webpackChunkName: "@atlaskit-internal_inline-media-card" */
|
|
63
|
-
'./
|
|
64
|
+
'./mediaInlineCard'), import(
|
|
64
65
|
/* webpackChunkName: "@atlaskit-internal_media-card-error-boundary" */
|
|
65
66
|
'../media-card-analytics-error-boundary')]);
|
|
66
67
|
|
|
@@ -70,11 +71,11 @@ var InlineMediaCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
70
71
|
mediaClient = _yield$Promise$all2[0];
|
|
71
72
|
cardModule = _yield$Promise$all2[1];
|
|
72
73
|
mediaCardErrorBoundaryModule = _yield$Promise$all2[2];
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
MediaInlineCardLoader.MediaInlineCard = mediaClient.withMediaClient(cardModule.MediaInlineCard);
|
|
75
|
+
MediaInlineCardLoader.ErrorBoundary = mediaCardErrorBoundaryModule.default;
|
|
75
76
|
this.setState({
|
|
76
|
-
|
|
77
|
-
ErrorBoundary:
|
|
77
|
+
MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
|
|
78
|
+
ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
|
|
78
79
|
});
|
|
79
80
|
_context.next = 16;
|
|
80
81
|
break;
|
|
@@ -101,22 +102,22 @@ var InlineMediaCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
102
|
key: "render",
|
|
102
103
|
value: function render() {
|
|
103
104
|
var _this$state = this.state,
|
|
104
|
-
|
|
105
|
+
MediaInlineCard = _this$state.MediaInlineCard,
|
|
105
106
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
106
107
|
|
|
107
|
-
if (!
|
|
108
|
-
return /*#__PURE__*/React.createElement(
|
|
109
|
-
|
|
108
|
+
if (!MediaInlineCard || !ErrorBoundary) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
|
|
110
|
+
message: ""
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(
|
|
114
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(MediaInlineCard, this.props));
|
|
114
115
|
}
|
|
115
116
|
}]);
|
|
116
117
|
|
|
117
|
-
return
|
|
118
|
+
return MediaInlineCardLoader;
|
|
118
119
|
}(React.PureComponent);
|
|
119
120
|
|
|
120
|
-
_defineProperty(
|
|
121
|
+
_defineProperty(MediaInlineCardLoader, "displayName", 'MediaInlineCardLoader');
|
|
121
122
|
|
|
122
|
-
export {
|
|
123
|
+
export { MediaInlineCardLoader as default };
|
|
@@ -2,11 +2,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import { injectIntl } from 'react-intl';
|
|
5
|
-
import {
|
|
5
|
+
import { MediaInlineCardLoadedView, MediaInlineCardLoadingView, MediaInlineCardErroredView, messages } from '@atlaskit/media-ui';
|
|
6
6
|
import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
|
|
7
7
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import { formatDate } from '@atlaskit/media-ui/formatDate';
|
|
8
10
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
9
|
-
export var
|
|
11
|
+
export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
10
12
|
var mediaClient = _ref.mediaClient,
|
|
11
13
|
identifier = _ref.identifier,
|
|
12
14
|
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
@@ -22,10 +24,15 @@ export var InlineMediaCardInternal = function InlineMediaCardInternal(_ref) {
|
|
|
22
24
|
|
|
23
25
|
var _useState3 = useState(false),
|
|
24
26
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
isErrored = _useState4[0],
|
|
28
|
+
setIsErrored = _useState4[1];
|
|
27
29
|
|
|
28
|
-
var
|
|
30
|
+
var _useState5 = useState(false),
|
|
31
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
32
|
+
isMediaViewerVisible = _useState6[0],
|
|
33
|
+
setMediaViewerVisible = _useState6[1];
|
|
34
|
+
|
|
35
|
+
var onMediaInlineCardClick = function onMediaInlineCardClick(event) {
|
|
29
36
|
if (shouldOpenMediaViewer) {
|
|
30
37
|
setMediaViewerVisible(true);
|
|
31
38
|
}
|
|
@@ -57,44 +64,77 @@ export var InlineMediaCardInternal = function InlineMediaCardInternal(_ref) {
|
|
|
57
64
|
};
|
|
58
65
|
|
|
59
66
|
useEffect(function () {
|
|
60
|
-
|
|
61
|
-
// [EDM-1948] TODO: handle error here
|
|
62
|
-
mediaClient.file.getCurrentState(identifier.id, {
|
|
67
|
+
mediaClient.file.getFileState(identifier.id, {
|
|
63
68
|
collectionName: identifier.collectionName
|
|
64
|
-
}).
|
|
65
|
-
|
|
69
|
+
}).subscribe({
|
|
70
|
+
next: function next(fileState) {
|
|
71
|
+
setFileState(fileState);
|
|
72
|
+
},
|
|
73
|
+
error: function error() {
|
|
74
|
+
setIsErrored(true);
|
|
75
|
+
}
|
|
66
76
|
});
|
|
67
77
|
}, [identifier.collectionName, identifier.id, mediaClient.file]);
|
|
68
78
|
|
|
69
79
|
if (!fileState) {
|
|
70
|
-
return /*#__PURE__*/React.createElement(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
|
|
81
|
+
message: intl.formatMessage(messages.loading_file)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (isErrored) {
|
|
86
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
87
|
+
message: intl.formatMessage(messages.couldnt_load_file)
|
|
74
88
|
});
|
|
75
89
|
}
|
|
76
90
|
|
|
77
91
|
if (fileState.status === 'error') {
|
|
78
|
-
return /*#__PURE__*/React.createElement(
|
|
79
|
-
url: "",
|
|
92
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
80
93
|
message: fileState.message || ''
|
|
81
94
|
});
|
|
82
95
|
}
|
|
83
96
|
|
|
97
|
+
if (fileState.status === 'failed-processing') {
|
|
98
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
99
|
+
message: intl.formatMessage(messages.couldnt_load_file)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (fileState.status === 'uploading') {
|
|
104
|
+
return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
|
|
105
|
+
message: fileState.name
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
84
109
|
var mediaType = fileState.mediaType,
|
|
85
110
|
name = fileState.name;
|
|
86
111
|
var linkIcon = /*#__PURE__*/React.createElement(MediaTypeIcon, {
|
|
87
|
-
testId: 'inline-
|
|
112
|
+
testId: 'media-inline-card-file-type-icon',
|
|
88
113
|
size: "small",
|
|
89
114
|
type: mediaType
|
|
90
115
|
});
|
|
91
|
-
var mediaViewer = renderMediaViewer();
|
|
116
|
+
var mediaViewer = renderMediaViewer();
|
|
117
|
+
var formattedDate;
|
|
118
|
+
|
|
119
|
+
if (fileState.createdAt) {
|
|
120
|
+
var _ref2 = intl || {
|
|
121
|
+
locale: 'en'
|
|
122
|
+
},
|
|
123
|
+
_ref2$locale = _ref2.locale,
|
|
124
|
+
locale = _ref2$locale === void 0 ? 'en' : _ref2$locale;
|
|
125
|
+
|
|
126
|
+
formattedDate = formatDate(fileState.createdAt, locale);
|
|
127
|
+
}
|
|
92
128
|
|
|
93
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
129
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
130
|
+
position: "bottom",
|
|
131
|
+
content: formattedDate,
|
|
132
|
+
tag: "span"
|
|
133
|
+
}, /*#__PURE__*/React.createElement(MediaInlineCardLoadedView, {
|
|
94
134
|
icon: linkIcon,
|
|
95
135
|
title: name,
|
|
96
|
-
onClick:
|
|
136
|
+
onClick: onMediaInlineCardClick,
|
|
97
137
|
isSelected: isSelected
|
|
98
|
-
}), mediaViewer);
|
|
138
|
+
})), mediaViewer);
|
|
99
139
|
};
|
|
100
|
-
export var
|
|
140
|
+
export var MediaInlineCard = injectIntl(MediaInlineCardInternal);
|
|
@@ -20,8 +20,6 @@ import { CustomMediaPlayer, InactivityDetector } from '@atlaskit/media-ui';
|
|
|
20
20
|
import { InlinePlayerWrapper } from './styled';
|
|
21
21
|
import { defaultImageCardDimensions } from '..';
|
|
22
22
|
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
23
|
-
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
24
|
-
import { createAndFireMediaCardEvent } from '../utils/analytics';
|
|
25
23
|
export var inlinePlayerClassName = 'media-card-inline-player';
|
|
26
24
|
export var getPreferredVideoArtifact = function getPreferredVideoArtifact(fileState) {
|
|
27
25
|
if (fileState.status === 'processed' || fileState.status === 'processing') {
|
|
@@ -278,10 +276,11 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
278
276
|
onClick: onClick,
|
|
279
277
|
innerRef: forwardRef || undefined,
|
|
280
278
|
dimensions: dimensions
|
|
281
|
-
}, /*#__PURE__*/React.createElement(InactivityDetector, null, function () {
|
|
279
|
+
}, /*#__PURE__*/React.createElement(InactivityDetector, null, function (checkMouseMovement) {
|
|
282
280
|
return /*#__PURE__*/React.createElement(CustomMediaPlayer, {
|
|
283
281
|
type: "video",
|
|
284
282
|
src: fileSrc,
|
|
283
|
+
fileId: identifier.id,
|
|
285
284
|
isAutoPlay: true,
|
|
286
285
|
isHDAvailable: false,
|
|
287
286
|
onDownloadClick: _this3.onDownloadClick,
|
|
@@ -289,7 +288,8 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
289
288
|
lastWatchTimeConfig: {
|
|
290
289
|
contentId: identifier.id
|
|
291
290
|
},
|
|
292
|
-
originalDimensions: originalDimensions
|
|
291
|
+
originalDimensions: originalDimensions,
|
|
292
|
+
showControls: checkMouseMovement
|
|
293
293
|
});
|
|
294
294
|
}));
|
|
295
295
|
}
|
|
@@ -307,12 +307,4 @@ var InlinePlayerForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
307
307
|
forwardRef: ref
|
|
308
308
|
}));
|
|
309
309
|
});
|
|
310
|
-
export var InlinePlayer =
|
|
311
|
-
onClick: createAndFireMediaCardEvent({
|
|
312
|
-
eventType: 'ui',
|
|
313
|
-
action: 'clicked',
|
|
314
|
-
actionSubject: 'mediaCard',
|
|
315
|
-
actionSubjectId: 'mediaCardInlinePlayer',
|
|
316
|
-
attributes: {}
|
|
317
|
-
})
|
|
318
|
-
})(InlinePlayerForwardRef);
|
|
310
|
+
export var InlinePlayer = InlinePlayerForwardRef;
|
|
@@ -2,13 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
|
|
3
3
|
var _responsiveSettings;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(function (Breakpoint) {
|
|
8
|
-
Breakpoint["SMALL"] = "small";
|
|
9
|
-
Breakpoint["LARGE"] = "large";
|
|
10
|
-
})(Breakpoint || (Breakpoint = {}));
|
|
11
|
-
|
|
5
|
+
import { Breakpoint } from './Breakpoint';
|
|
12
6
|
export var responsiveSettings = (_responsiveSettings = {}, _defineProperty(_responsiveSettings, Breakpoint.SMALL, {
|
|
13
7
|
fontSize: 11,
|
|
14
8
|
lineHeight: 14,
|
|
@@ -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(
|
|
18
|
-
|
|
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:
|
|
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
|
|
29
|
+
export var FailedToLoad = function FailedToLoad(props) {
|
|
29
30
|
return /*#__PURE__*/React.createElement(IconMessage, _extends({}, props, {
|
|
30
|
-
messageDescriptor: messages.
|
|
31
|
-
|
|
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) {
|