@atlaskit/media-card 74.7.2 → 74.7.4

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 (66) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/card/card.js +92 -101
  3. package/dist/cjs/card/cardImageView/cardOverlay/index.js +1 -1
  4. package/dist/cjs/card/cardImageView/cardOverlay/styles.js +6 -0
  5. package/dist/cjs/card/cardImageView/fileCardImageView.js +1 -1
  6. package/dist/cjs/card/cardLoader.js +3 -3
  7. package/dist/cjs/card/cardView.js +7 -8
  8. package/dist/cjs/card/getCardPreview/cache.js +3 -0
  9. package/dist/cjs/card/getCardPreview/helpers.js +99 -107
  10. package/dist/cjs/card/getCardPreview/index.js +94 -98
  11. package/dist/cjs/card/inlinePlayer.js +87 -90
  12. package/dist/cjs/card/inlinePlayerLazy.js +16 -17
  13. package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
  14. package/dist/cjs/card/ui/common.js +4 -4
  15. package/dist/cjs/card/ui/unhandledErrorCard/index.js +1 -0
  16. package/dist/cjs/inline/loader.js +45 -47
  17. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +59 -9
  18. package/dist/cjs/types.js +4 -4
  19. package/dist/cjs/utils/cardActions/cardActionIconButton.js +2 -3
  20. package/dist/cjs/utils/cardActions/cardActionsView.js +1 -1
  21. package/dist/cjs/utils/cardActions/styles.js +4 -4
  22. package/dist/cjs/utils/errorIcon/index.js +1 -1
  23. package/dist/cjs/utils/fileIcon/index.js +1 -1
  24. package/dist/cjs/utils/progressBar/index.js +1 -1
  25. package/dist/cjs/utils/progressBar/styles.js +1 -0
  26. package/dist/cjs/utils/ufoExperiences.js +1 -1
  27. package/dist/cjs/utils/videoSnapshot.js +38 -40
  28. package/dist/cjs/utils/viewportDetector.js +1 -1
  29. package/dist/cjs/version.json +1 -1
  30. package/dist/es2019/card/card.js +6 -9
  31. package/dist/es2019/card/cardView.js +2 -4
  32. package/dist/es2019/card/getCardPreview/cache.js +3 -0
  33. package/dist/es2019/card/inlinePlayer.js +1 -0
  34. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  35. package/dist/es2019/card/ui/common.js +3 -3
  36. package/dist/es2019/inline/loader.js +3 -1
  37. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +60 -7
  38. package/dist/es2019/types.js +3 -3
  39. package/dist/es2019/utils/cardActions/cardActionIconButton.js +2 -3
  40. package/dist/es2019/utils/cardActions/styles.js +3 -3
  41. package/dist/es2019/utils/globalScope/globalScope.js +0 -1
  42. package/dist/es2019/utils/ufoExperiences.js +1 -1
  43. package/dist/es2019/version.json +1 -1
  44. package/dist/esm/card/card.js +92 -101
  45. package/dist/esm/card/cardView.js +6 -7
  46. package/dist/esm/card/getCardPreview/cache.js +3 -0
  47. package/dist/esm/card/getCardPreview/helpers.js +99 -107
  48. package/dist/esm/card/getCardPreview/index.js +94 -98
  49. package/dist/esm/card/inlinePlayer.js +87 -90
  50. package/dist/esm/card/inlinePlayerLazy.js +14 -16
  51. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  52. package/dist/esm/card/ui/common.js +3 -3
  53. package/dist/esm/inline/loader.js +39 -41
  54. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +59 -9
  55. package/dist/esm/types.js +3 -3
  56. package/dist/esm/utils/cardActions/cardActionIconButton.js +2 -3
  57. package/dist/esm/utils/cardActions/styles.js +3 -3
  58. package/dist/esm/utils/globalScope/globalScope.js +0 -1
  59. package/dist/esm/utils/ufoExperiences.js +1 -1
  60. package/dist/esm/utils/videoSnapshot.js +38 -40
  61. package/dist/esm/utils/viewportDetector.js +1 -1
  62. package/dist/esm/version.json +1 -1
  63. package/dist/types/inline/loader.d.ts +1 -0
  64. package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +1 -0
  65. package/package.json +6 -6
  66. package/report.api.md +1 -0
@@ -68,92 +68,90 @@ export var getCardPreview = /*#__PURE__*/function () {
68
68
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
69
69
  var mediaClient, id, _ref$dimensions, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, createAnalyticsEvent, featureFlags, traceContext, mode, cachedPreview, dimensionsAreBigger, localPreview, remotePreview;
70
70
  return _regeneratorRuntime.wrap(function _callee$(_context) {
71
- while (1) {
72
- switch (_context.prev = _context.next) {
73
- case 0:
74
- mediaClient = _ref.mediaClient, id = _ref.id, _ref$dimensions = _ref.dimensions, dimensions = _ref$dimensions === void 0 ? {} : _ref$dimensions, filePreview = _ref.filePreview, onLocalPreviewError = _ref.onLocalPreviewError, isRemotePreviewReady = _ref.isRemotePreviewReady, imageUrlParams = _ref.imageUrlParams, mediaBlobUrlAttrs = _ref.mediaBlobUrlAttrs, createAnalyticsEvent = _ref.createAnalyticsEvent, featureFlags = _ref.featureFlags, traceContext = _ref.traceContext;
75
- mode = imageUrlParams.mode;
76
- cachedPreview = cardPreviewCache.get(id, mode);
77
- dimensionsAreBigger = isBigger(cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions, dimensions);
78
- if (!(cachedPreview && !dimensionsAreBigger)) {
79
- _context.next = 7;
80
- break;
81
- }
82
- if (getMediaFeatureFlag('memoryCacheLogging', featureFlags)) {
83
- createAnalyticsEvent && fireImageFetchingOperationalEvent(createAnalyticsEvent, 'cache-hit', {
84
- fileId: id,
85
- prevDimensions: cachedPreview.dimensions,
86
- currentDimensions: dimensions,
87
- source: cachedPreview.source
88
- });
89
- }
90
- return _context.abrupt("return", cachedPreview);
91
- case 7:
92
- _context.prev = 7;
93
- if (!filePreview) {
94
- _context.next = 13;
95
- break;
96
- }
97
- _context.next = 11;
98
- return getCardPreviewFromFilePreview(filePreview);
99
- case 11:
100
- localPreview = _context.sent;
101
- return _context.abrupt("return", extendAndCachePreview(id, mode, _objectSpread(_objectSpread({}, localPreview), {}, {
102
- dimensions: dimensions
103
- }), mediaBlobUrlAttrs));
104
- case 13:
71
+ while (1) switch (_context.prev = _context.next) {
72
+ case 0:
73
+ mediaClient = _ref.mediaClient, id = _ref.id, _ref$dimensions = _ref.dimensions, dimensions = _ref$dimensions === void 0 ? {} : _ref$dimensions, filePreview = _ref.filePreview, onLocalPreviewError = _ref.onLocalPreviewError, isRemotePreviewReady = _ref.isRemotePreviewReady, imageUrlParams = _ref.imageUrlParams, mediaBlobUrlAttrs = _ref.mediaBlobUrlAttrs, createAnalyticsEvent = _ref.createAnalyticsEvent, featureFlags = _ref.featureFlags, traceContext = _ref.traceContext;
74
+ mode = imageUrlParams.mode;
75
+ cachedPreview = cardPreviewCache.get(id, mode);
76
+ dimensionsAreBigger = isBigger(cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions, dimensions);
77
+ if (!(cachedPreview && !dimensionsAreBigger)) {
78
+ _context.next = 7;
79
+ break;
80
+ }
81
+ if (getMediaFeatureFlag('memoryCacheLogging', featureFlags)) {
82
+ createAnalyticsEvent && fireImageFetchingOperationalEvent(createAnalyticsEvent, 'cache-hit', {
83
+ fileId: id,
84
+ prevDimensions: cachedPreview.dimensions,
85
+ currentDimensions: dimensions,
86
+ source: cachedPreview.source
87
+ });
88
+ }
89
+ return _context.abrupt("return", cachedPreview);
90
+ case 7:
91
+ _context.prev = 7;
92
+ if (!filePreview) {
93
+ _context.next = 13;
94
+ break;
95
+ }
96
+ _context.next = 11;
97
+ return getCardPreviewFromFilePreview(filePreview);
98
+ case 11:
99
+ localPreview = _context.sent;
100
+ return _context.abrupt("return", extendAndCachePreview(id, mode, _objectSpread(_objectSpread({}, localPreview), {}, {
101
+ dimensions: dimensions
102
+ }), mediaBlobUrlAttrs));
103
+ case 13:
104
+ _context.next = 20;
105
+ break;
106
+ case 15:
107
+ _context.prev = 15;
108
+ _context.t0 = _context["catch"](7);
109
+ /**
110
+ * We report the error if:
111
+ * - local preview is supported and fails
112
+ * - local preview is unsupported and remote preview is NOT READY
113
+ * i.e. the function was called for "no reason".
114
+ * We DON'T report the error if:
115
+ * - local preview is unsupported and remote preview IS READY
116
+ * i.e. local preview is available and not supported,
117
+ * but we are after the remote preview instead.
118
+ */
119
+ if (!isUnsupportedLocalPreviewError(_context.t0) || isUnsupportedLocalPreviewError(_context.t0) && !isRemotePreviewReady) {
120
+ onLocalPreviewError && onLocalPreviewError(_context.t0);
121
+ }
122
+ /**
123
+ * No matter the reason why the local preview failed, we break the process
124
+ * if there is no remote preview available
125
+ */
126
+ if (isRemotePreviewReady) {
105
127
  _context.next = 20;
106
128
  break;
107
- case 15:
108
- _context.prev = 15;
109
- _context.t0 = _context["catch"](7);
110
- /**
111
- * We report the error if:
112
- * - local preview is supported and fails
113
- * - local preview is unsupported and remote preview is NOT READY
114
- * i.e. the function was called for "no reason".
115
- * We DON'T report the error if:
116
- * - local preview is unsupported and remote preview IS READY
117
- * i.e. local preview is available and not supported,
118
- * but we are after the remote preview instead.
119
- */
120
- if (!isUnsupportedLocalPreviewError(_context.t0) || isUnsupportedLocalPreviewError(_context.t0) && !isRemotePreviewReady) {
121
- onLocalPreviewError && onLocalPreviewError(_context.t0);
122
- }
123
- /**
124
- * No matter the reason why the local preview failed, we break the process
125
- * if there is no remote preview available
126
- */
127
- if (isRemotePreviewReady) {
128
- _context.next = 20;
129
- break;
130
- }
131
- throw _context.t0;
132
- case 20:
133
- if (isRemotePreviewReady) {
134
- _context.next = 22;
135
- break;
136
- }
137
- throw new MediaCardError('remote-preview-not-ready');
138
- case 22:
139
- _context.next = 24;
140
- return fetchAndCacheRemotePreview(mediaClient, id, dimensions, imageUrlParams, mediaBlobUrlAttrs, traceContext);
141
- case 24:
142
- remotePreview = _context.sent;
143
- if (getMediaFeatureFlag('memoryCacheLogging', featureFlags)) {
144
- createAnalyticsEvent && fireImageFetchingOperationalEvent(createAnalyticsEvent, 'remote-success', {
145
- fileId: id,
146
- prevDimensions: cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions,
147
- currentDimensions: dimensions,
148
- dimensionsPercentageDiff: calculatePercentageDifference(cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions, dimensions),
149
- source: remotePreview.source
150
- });
151
- }
152
- return _context.abrupt("return", remotePreview);
153
- case 27:
154
- case "end":
155
- return _context.stop();
156
- }
129
+ }
130
+ throw _context.t0;
131
+ case 20:
132
+ if (isRemotePreviewReady) {
133
+ _context.next = 22;
134
+ break;
135
+ }
136
+ throw new MediaCardError('remote-preview-not-ready');
137
+ case 22:
138
+ _context.next = 24;
139
+ return fetchAndCacheRemotePreview(mediaClient, id, dimensions, imageUrlParams, mediaBlobUrlAttrs, traceContext);
140
+ case 24:
141
+ remotePreview = _context.sent;
142
+ if (getMediaFeatureFlag('memoryCacheLogging', featureFlags)) {
143
+ createAnalyticsEvent && fireImageFetchingOperationalEvent(createAnalyticsEvent, 'remote-success', {
144
+ fileId: id,
145
+ prevDimensions: cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions,
146
+ currentDimensions: dimensions,
147
+ dimensionsPercentageDiff: calculatePercentageDifference(cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions, dimensions),
148
+ source: remotePreview.source
149
+ });
150
+ }
151
+ return _context.abrupt("return", remotePreview);
152
+ case 27:
153
+ case "end":
154
+ return _context.stop();
157
155
  }
158
156
  }, _callee, null, [[7, 15]]);
159
157
  }));
@@ -216,20 +214,18 @@ export var fetchAndCacheRemotePreview = /*#__PURE__*/function () {
216
214
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(mediaClient, id, dimensions, params, mediaBlobUrlAttrs, traceContext) {
217
215
  var remotePreview;
218
216
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
219
- while (1) {
220
- switch (_context2.prev = _context2.next) {
221
- case 0:
222
- _context2.next = 2;
223
- return getCardPreviewFromBackend(mediaClient, id, params, traceContext);
224
- case 2:
225
- remotePreview = _context2.sent;
226
- return _context2.abrupt("return", extendAndCachePreview(id, params.mode, _objectSpread(_objectSpread({}, remotePreview), {}, {
227
- dimensions: dimensions
228
- }), mediaBlobUrlAttrs));
229
- case 4:
230
- case "end":
231
- return _context2.stop();
232
- }
217
+ while (1) switch (_context2.prev = _context2.next) {
218
+ case 0:
219
+ _context2.next = 2;
220
+ return getCardPreviewFromBackend(mediaClient, id, params, traceContext);
221
+ case 2:
222
+ remotePreview = _context2.sent;
223
+ return _context2.abrupt("return", extendAndCachePreview(id, params.mode, _objectSpread(_objectSpread({}, remotePreview), {}, {
224
+ dimensions: dimensions
225
+ }), mediaBlobUrlAttrs));
226
+ case 4:
227
+ case "end":
228
+ return _context2.stop();
233
229
  }
234
230
  }, _callee2);
235
231
  }));
@@ -48,32 +48,31 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
48
48
  fileSrc: fileSrc
49
49
  });
50
50
  });
51
+ // Tries to use the binary artifact to provide something to play while the video is still processing
51
52
  _defineProperty(_assertThisInitialized(_this), "setBinaryURL", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
52
53
  var _this$props, mediaClient, identifier, onError, id, collectionName, fileSrc;
53
54
  return _regeneratorRuntime.wrap(function _callee$(_context) {
54
- while (1) {
55
- switch (_context.prev = _context.next) {
56
- case 0:
57
- _this$props = _this.props, mediaClient = _this$props.mediaClient, identifier = _this$props.identifier, onError = _this$props.onError;
58
- id = identifier.id, collectionName = identifier.collectionName;
59
- _context.prev = 2;
60
- _context.next = 5;
61
- return mediaClient.file.getFileBinaryURL(id, collectionName);
62
- case 5:
63
- fileSrc = _context.sent;
64
- _this.setFileSrc(fileSrc);
65
- _context.next = 12;
66
- break;
67
- case 9:
68
- _context.prev = 9;
69
- _context.t0 = _context["catch"](2);
70
- if (onError && _context.t0 instanceof Error) {
71
- onError(_context.t0);
72
- }
73
- case 12:
74
- case "end":
75
- return _context.stop();
76
- }
55
+ while (1) switch (_context.prev = _context.next) {
56
+ case 0:
57
+ _this$props = _this.props, mediaClient = _this$props.mediaClient, identifier = _this$props.identifier, onError = _this$props.onError;
58
+ id = identifier.id, collectionName = identifier.collectionName;
59
+ _context.prev = 2;
60
+ _context.next = 5;
61
+ return mediaClient.file.getFileBinaryURL(id, collectionName);
62
+ case 5:
63
+ fileSrc = _context.sent;
64
+ _this.setFileSrc(fileSrc);
65
+ _context.next = 12;
66
+ break;
67
+ case 9:
68
+ _context.prev = 9;
69
+ _context.t0 = _context["catch"](2);
70
+ if (onError && _context.t0 instanceof Error) {
71
+ onError(_context.t0);
72
+ }
73
+ case 12:
74
+ case "end":
75
+ return _context.stop();
77
76
  }
78
77
  }, _callee, null, [[2, 9]]);
79
78
  })));
@@ -137,75 +136,73 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
137
136
  var _next = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fileState) {
138
137
  var existingFileSrc, _yield$fileState$prev, value, fileSrc, artifactName, artifacts, _fileSrc, onError;
139
138
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
140
- while (1) {
141
- switch (_context2.prev = _context2.next) {
142
- case 0:
143
- if (fileState.status === 'uploading') {
144
- _this2.setState({
145
- isUploading: true,
146
- progress: fileState.progress
147
- });
148
- } else {
149
- _this2.setState({
150
- isUploading: false
151
- });
152
- }
153
- existingFileSrc = _this2.state.fileSrc; // we want to reuse the existing fileSrc to prevent re renders
154
- if (!existingFileSrc) {
155
- _context2.next = 4;
156
- break;
157
- }
158
- return _context2.abrupt("return");
159
- case 4:
160
- if (!(fileState.status !== 'error' && fileState.preview)) {
161
- _context2.next = 13;
162
- break;
163
- }
164
- _context2.next = 7;
165
- return fileState.preview;
166
- case 7:
167
- _yield$fileState$prev = _context2.sent;
168
- value = _yield$fileState$prev.value;
169
- if (!(value instanceof Blob && value.type.indexOf('video/') === 0)) {
170
- _context2.next = 13;
171
- break;
172
- }
173
- fileSrc = URL.createObjectURL(value);
174
- _this2.setFileSrc(fileSrc);
175
- return _context2.abrupt("return");
176
- case 13:
177
- if (!(fileState.status === 'processed' || fileState.status === 'processing')) {
178
- _context2.next = 30;
179
- break;
180
- }
181
- artifactName = getPreferredVideoArtifact(fileState);
182
- artifacts = fileState.artifacts;
183
- if (!(!artifactName || !artifacts)) {
184
- _context2.next = 19;
185
- break;
186
- }
187
- _this2.setBinaryURL();
188
- return _context2.abrupt("return");
189
- case 19:
190
- _context2.prev = 19;
191
- _context2.next = 22;
192
- return mediaClient.file.getArtifactURL(artifacts, artifactName, collectionName);
193
- case 22:
194
- _fileSrc = _context2.sent;
195
- _this2.setFileSrc(_fileSrc);
139
+ while (1) switch (_context2.prev = _context2.next) {
140
+ case 0:
141
+ if (fileState.status === 'uploading') {
142
+ _this2.setState({
143
+ isUploading: true,
144
+ progress: fileState.progress
145
+ });
146
+ } else {
147
+ _this2.setState({
148
+ isUploading: false
149
+ });
150
+ }
151
+ existingFileSrc = _this2.state.fileSrc; // we want to reuse the existing fileSrc to prevent re renders
152
+ if (!existingFileSrc) {
153
+ _context2.next = 4;
154
+ break;
155
+ }
156
+ return _context2.abrupt("return");
157
+ case 4:
158
+ if (!(fileState.status !== 'error' && fileState.preview)) {
159
+ _context2.next = 13;
160
+ break;
161
+ }
162
+ _context2.next = 7;
163
+ return fileState.preview;
164
+ case 7:
165
+ _yield$fileState$prev = _context2.sent;
166
+ value = _yield$fileState$prev.value;
167
+ if (!(value instanceof Blob && value.type.indexOf('video/') === 0)) {
168
+ _context2.next = 13;
169
+ break;
170
+ }
171
+ fileSrc = URL.createObjectURL(value);
172
+ _this2.setFileSrc(fileSrc);
173
+ return _context2.abrupt("return");
174
+ case 13:
175
+ if (!(fileState.status === 'processed' || fileState.status === 'processing')) {
196
176
  _context2.next = 30;
197
177
  break;
198
- case 26:
199
- _context2.prev = 26;
200
- _context2.t0 = _context2["catch"](19);
201
- onError = _this2.props.onError;
202
- if (onError && _context2.t0 instanceof Error) {
203
- onError(_context2.t0);
204
- }
205
- case 30:
206
- case "end":
207
- return _context2.stop();
208
- }
178
+ }
179
+ artifactName = getPreferredVideoArtifact(fileState);
180
+ artifacts = fileState.artifacts;
181
+ if (!(!artifactName || !artifacts)) {
182
+ _context2.next = 19;
183
+ break;
184
+ }
185
+ _this2.setBinaryURL();
186
+ return _context2.abrupt("return");
187
+ case 19:
188
+ _context2.prev = 19;
189
+ _context2.next = 22;
190
+ return mediaClient.file.getArtifactURL(artifacts, artifactName, collectionName);
191
+ case 22:
192
+ _fileSrc = _context2.sent;
193
+ _this2.setFileSrc(_fileSrc);
194
+ _context2.next = 30;
195
+ break;
196
+ case 26:
197
+ _context2.prev = 26;
198
+ _context2.t0 = _context2["catch"](19);
199
+ onError = _this2.props.onError;
200
+ if (onError && _context2.t0 instanceof Error) {
201
+ onError(_context2.t0);
202
+ }
203
+ case 30:
204
+ case "end":
205
+ return _context2.stop();
209
206
  }
210
207
  }, _callee2, null, [[19, 26]]);
211
208
  }));
@@ -4,22 +4,20 @@ import { lazy } from 'react';
4
4
  export var InlinePlayerLazy = /*#__PURE__*/lazy( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
5
5
  var _yield$import, InlinePlayer;
6
6
  return _regeneratorRuntime.wrap(function _callee$(_context) {
7
- while (1) {
8
- switch (_context.prev = _context.next) {
9
- case 0:
10
- _context.next = 2;
11
- return import( /* webpackChunkName: "@atlaskit-internal_media-card-inlineplayer" */
12
- './inlinePlayer');
13
- case 2:
14
- _yield$import = _context.sent;
15
- InlinePlayer = _yield$import.InlinePlayer;
16
- return _context.abrupt("return", {
17
- default: InlinePlayer
18
- });
19
- case 5:
20
- case "end":
21
- return _context.stop();
22
- }
7
+ while (1) switch (_context.prev = _context.next) {
8
+ case 0:
9
+ _context.next = 2;
10
+ return import( /* webpackChunkName: "@atlaskit-internal_media-card-inlineplayer" */
11
+ './inlinePlayer');
12
+ case 2:
13
+ _yield$import = _context.sent;
14
+ InlinePlayer = _yield$import.InlinePlayer;
15
+ return _context.abrupt("return", {
16
+ default: InlinePlayer
17
+ });
18
+ case 5:
19
+ case "end":
20
+ return _context.stop();
23
21
  }
24
22
  }, _callee);
25
23
  })));
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
83
83
  }(React.Component);
84
84
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
85
85
  var packageName = "@atlaskit/media-card";
86
- var packageVersion = "74.7.2";
86
+ var packageVersion = "74.7.4";
87
87
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
88
88
  packageVersion: packageVersion,
89
89
  packageName: packageName,
@@ -1,10 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _responsiveSettings;
3
- export var Breakpoint;
4
- (function (Breakpoint) {
3
+ export var Breakpoint = /*#__PURE__*/function (Breakpoint) {
5
4
  Breakpoint["SMALL"] = "small";
6
5
  Breakpoint["LARGE"] = "large";
7
- })(Breakpoint || (Breakpoint = {}));
6
+ return Breakpoint;
7
+ }({});
8
8
  export var responsiveSettings = (_responsiveSettings = {}, _defineProperty(_responsiveSettings, Breakpoint.SMALL, {
9
9
  fontSize: 11,
10
10
  lineHeight: 14,
@@ -35,40 +35,38 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
35
35
  var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
36
36
  var _yield$Promise$all, _yield$Promise$all2, mediaClient, cardModule, mediaInlineErrorBoundaryModule;
37
37
  return _regeneratorRuntime.wrap(function _callee$(_context) {
38
- while (1) {
39
- switch (_context.prev = _context.next) {
40
- case 0:
41
- this.isMounted = true;
42
- if (this.state.MediaInlineCard) {
43
- _context.next = 17;
44
- break;
45
- }
46
- _context.prev = 2;
47
- _context.next = 5;
48
- return Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
49
- case 5:
50
- _yield$Promise$all = _context.sent;
51
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
52
- mediaClient = _yield$Promise$all2[0];
53
- cardModule = _yield$Promise$all2[1];
54
- mediaInlineErrorBoundaryModule = _yield$Promise$all2[2];
55
- MediaInlineCardLoader.MediaInlineCard = mediaClient.withMediaClient(cardModule.MediaInlineCard);
56
- MediaInlineCardLoader.ErrorBoundary = mediaInlineErrorBoundaryModule.default;
57
- if (this.isMounted) {
58
- this.setState({
59
- MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
60
- ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
61
- });
62
- }
38
+ while (1) switch (_context.prev = _context.next) {
39
+ case 0:
40
+ this.isMounted = true;
41
+ if (this.state.MediaInlineCard) {
63
42
  _context.next = 17;
64
43
  break;
65
- case 15:
66
- _context.prev = 15;
67
- _context.t0 = _context["catch"](2);
68
- case 17:
69
- case "end":
70
- return _context.stop();
71
- }
44
+ }
45
+ _context.prev = 2;
46
+ _context.next = 5;
47
+ return Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
48
+ case 5:
49
+ _yield$Promise$all = _context.sent;
50
+ _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
51
+ mediaClient = _yield$Promise$all2[0];
52
+ cardModule = _yield$Promise$all2[1];
53
+ mediaInlineErrorBoundaryModule = _yield$Promise$all2[2];
54
+ MediaInlineCardLoader.MediaInlineCard = mediaClient.withMediaClient(cardModule.MediaInlineCard);
55
+ MediaInlineCardLoader.ErrorBoundary = mediaInlineErrorBoundaryModule.default;
56
+ if (this.isMounted) {
57
+ this.setState({
58
+ MediaInlineCard: MediaInlineCardLoader.MediaInlineCard,
59
+ ErrorBoundary: MediaInlineCardLoader.ErrorBoundary
60
+ });
61
+ }
62
+ _context.next = 17;
63
+ break;
64
+ case 15:
65
+ _context.prev = 15;
66
+ _context.t0 = _context["catch"](2);
67
+ case 17:
68
+ case "end":
69
+ return _context.stop();
72
70
  }
73
71
  }, _callee, this, [[2, 15]]);
74
72
  }));
@@ -82,14 +80,12 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
82
80
  value: function () {
83
81
  var _componentWillUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
84
82
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
85
- while (1) {
86
- switch (_context2.prev = _context2.next) {
87
- case 0:
88
- this.isMounted = false;
89
- case 1:
90
- case "end":
91
- return _context2.stop();
92
- }
83
+ while (1) switch (_context2.prev = _context2.next) {
84
+ case 0:
85
+ this.isMounted = false;
86
+ case 1:
87
+ case "end":
88
+ return _context2.stop();
93
89
  }
94
90
  }, _callee2, this);
95
91
  }));
@@ -109,7 +105,9 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
109
105
  message: ""
110
106
  });
111
107
  }
112
- return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(MediaInlineCard, this.props));
108
+ return /*#__PURE__*/React.createElement(ErrorBoundary, {
109
+ isSelected: this.props.isSelected
110
+ }, /*#__PURE__*/React.createElement(MediaInlineCard, this.props));
113
111
  }
114
112
  }]);
115
113
  return MediaInlineCardLoader;