@atlaskit/media-card 73.1.1 → 73.2.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 +19 -0
- package/dist/cjs/files/cardImageView/index.js +51 -41
- package/dist/cjs/root/card/getCardPreview/index.js +7 -1
- package/dist/cjs/root/card/index.js +247 -151
- package/dist/cjs/root/cardView.js +127 -115
- package/dist/cjs/root/inlinePlayer.js +4 -2
- package/dist/cjs/root/ui/imageRenderer/imageRenderer.js +14 -6
- package/dist/cjs/root/ui/styled.js +5 -5
- package/dist/cjs/types.js +10 -1
- package/dist/cjs/utils/analytics.js +23 -7
- package/dist/cjs/utils/dimensionComparer.js +7 -13
- package/dist/cjs/utils/getMediaCardCursor.js +29 -0
- package/dist/cjs/utils/globalScope/getSSRData.js +20 -0
- package/dist/cjs/utils/globalScope/globalScope.js +94 -0
- package/dist/cjs/utils/globalScope/index.js +39 -0
- package/dist/cjs/utils/globalScope/types.js +5 -0
- package/dist/cjs/utils/printScript.js +44 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/files/cardImageView/index.js +19 -5
- package/dist/es2019/root/card/getCardPreview/index.js +1 -0
- package/dist/es2019/root/card/index.js +107 -35
- package/dist/es2019/root/cardView.js +40 -30
- package/dist/es2019/root/inlinePlayer.js +4 -2
- package/dist/es2019/root/ui/imageRenderer/imageRenderer.js +14 -6
- package/dist/es2019/root/ui/styled.js +4 -4
- package/dist/es2019/types.js +7 -1
- package/dist/es2019/utils/analytics.js +8 -3
- package/dist/es2019/utils/dimensionComparer.js +6 -13
- package/dist/es2019/utils/getMediaCardCursor.js +19 -0
- package/dist/es2019/utils/globalScope/getSSRData.js +10 -0
- package/dist/es2019/utils/globalScope/globalScope.js +62 -0
- package/dist/es2019/utils/globalScope/index.js +2 -0
- package/dist/es2019/utils/globalScope/types.js +1 -0
- package/dist/es2019/utils/printScript.js +19 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/files/cardImageView/index.js +53 -41
- package/dist/esm/root/card/getCardPreview/index.js +3 -0
- package/dist/esm/root/card/index.js +228 -134
- package/dist/esm/root/cardView.js +126 -115
- package/dist/esm/root/inlinePlayer.js +4 -2
- package/dist/esm/root/ui/imageRenderer/imageRenderer.js +14 -6
- package/dist/esm/root/ui/styled.js +5 -5
- package/dist/esm/types.js +7 -1
- package/dist/esm/utils/analytics.js +17 -6
- package/dist/esm/utils/dimensionComparer.js +8 -13
- package/dist/esm/utils/getMediaCardCursor.js +19 -0
- package/dist/esm/utils/globalScope/getSSRData.js +10 -0
- package/dist/esm/utils/globalScope/globalScope.js +69 -0
- package/dist/esm/utils/globalScope/index.js +2 -0
- package/dist/esm/utils/globalScope/types.js +1 -0
- package/dist/esm/utils/printScript.js +30 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/files/cardImageView/index.d.ts +6 -2
- package/dist/types/root/card/getCardPreview/index.d.ts +1 -0
- package/dist/types/root/card/index.d.ts +3 -1
- package/dist/types/root/cardView.d.ts +8 -6
- package/dist/types/root/inlinePlayer.d.ts +3 -1
- package/dist/types/root/ui/imageRenderer/imageRenderer.d.ts +4 -4
- package/dist/types/root/ui/styled.d.ts +2 -1
- package/dist/types/types.d.ts +6 -1
- package/dist/types/utils/analytics.d.ts +6 -0
- package/dist/types/utils/getMediaCardCursor.d.ts +2 -0
- package/dist/types/utils/globalScope/getSSRData.d.ts +3 -0
- package/dist/types/utils/globalScope/globalScope.d.ts +21 -0
- package/dist/types/utils/globalScope/index.d.ts +4 -0
- package/dist/types/utils/globalScope/types.d.ts +8 -0
- package/dist/types/utils/printScript.d.ts +2 -0
- package/package.json +5 -5
|
@@ -41,7 +41,7 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
41
41
|
|
|
42
42
|
var _download = _interopRequireDefault(require("@atlaskit/icon/glyph/download"));
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _mediaClient2 = require("@atlaskit/media-client");
|
|
45
45
|
|
|
46
46
|
var _mediaViewer = require("@atlaskit/media-viewer");
|
|
47
47
|
|
|
@@ -67,8 +67,14 @@ var _cardAnalytics = require("./cardAnalytics");
|
|
|
67
67
|
|
|
68
68
|
var _document = _interopRequireDefault(require("../../utils/document"));
|
|
69
69
|
|
|
70
|
+
var _globalScope = require("../../utils/globalScope");
|
|
71
|
+
|
|
70
72
|
var _cardState = require("./cardState");
|
|
71
73
|
|
|
74
|
+
var _dimensionComparer = require("../../utils/dimensionComparer");
|
|
75
|
+
|
|
76
|
+
var _getMediaCardCursor = require("../../utils/getMediaCardCursor");
|
|
77
|
+
|
|
72
78
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
73
79
|
|
|
74
80
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -101,7 +107,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
101
107
|
var collection = _ref.collectionName;
|
|
102
108
|
return _objectSpread(_objectSpread({
|
|
103
109
|
collection: collection,
|
|
104
|
-
mode: (0,
|
|
110
|
+
mode: (0, _mediaClient2.imageResizeModeToFileImageMode)(_this.props.resizeMode)
|
|
105
111
|
}, _this.requestedDimensions), {}, {
|
|
106
112
|
allowAnimated: true
|
|
107
113
|
});
|
|
@@ -143,7 +149,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
143
149
|
dimensions: dimensions,
|
|
144
150
|
onLocalPreviewError: _this.fireLocalPreviewErrorEvent,
|
|
145
151
|
filePreview: isBannedLocalPreview ? undefined : (0, _getCardPreview.getFilePreviewFromFileState)(fileState),
|
|
146
|
-
isRemotePreviewReady: (0,
|
|
152
|
+
isRemotePreviewReady: (0, _mediaClient2.isImageRepresentationReady)(fileState),
|
|
147
153
|
imageUrlParams: _this.getImageURLParams(identifier),
|
|
148
154
|
mediaBlobUrlAttrs: _this.getMediaBlobUrlAttrs(identifier, fileState)
|
|
149
155
|
};
|
|
@@ -159,26 +165,18 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
159
165
|
// https://product-fabric.atlassian.net/browse/MEX-1071
|
|
160
166
|
});
|
|
161
167
|
});
|
|
162
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
163
|
-
var
|
|
168
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "refetchSSRPreview", /*#__PURE__*/function () {
|
|
169
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(identifier) {
|
|
170
|
+
var _this$props4, mediaClient, _this$props4$dimensio, dimensions, cardPreview;
|
|
164
171
|
|
|
165
|
-
try {
|
|
166
|
-
return (0, _getCardPreview.getSSRCardPreview)(ssr, mediaClient, identifier.id, _this.getImageURLParams(identifier), _this.getMediaBlobUrlAttrs(identifier));
|
|
167
|
-
} catch (e) {// TODO: log SSR reliability 'failed'
|
|
168
|
-
// https://product-fabric.atlassian.net/browse/MEX-770
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resolvePreview", /*#__PURE__*/function () {
|
|
172
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(identifier, fileState) {
|
|
173
|
-
var params, cardPreview, wrappedError;
|
|
174
172
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
175
173
|
while (1) {
|
|
176
174
|
switch (_context.prev = _context.next) {
|
|
177
175
|
case 0:
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
_this$props4 = _this.props, mediaClient = _this$props4.mediaClient, _this$props4$dimensio = _this$props4.dimensions, dimensions = _this$props4$dimensio === void 0 ? {} : _this$props4$dimensio;
|
|
177
|
+
_context.prev = 1;
|
|
180
178
|
_context.next = 4;
|
|
181
|
-
return (0, _getCardPreview.
|
|
179
|
+
return (0, _getCardPreview.fetchAndCacheRemotePreview)(mediaClient, identifier.id, dimensions, _this.getImageURLParams(identifier), _this.getMediaBlobUrlAttrs(identifier));
|
|
182
180
|
|
|
183
181
|
case 4:
|
|
184
182
|
cardPreview = _context.sent;
|
|
@@ -187,13 +185,51 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
187
185
|
cardPreview: cardPreview
|
|
188
186
|
});
|
|
189
187
|
|
|
190
|
-
_context.next =
|
|
188
|
+
_context.next = 10;
|
|
191
189
|
break;
|
|
192
190
|
|
|
193
191
|
case 8:
|
|
194
192
|
_context.prev = 8;
|
|
195
|
-
_context.t0 = _context["catch"](
|
|
196
|
-
|
|
193
|
+
_context.t0 = _context["catch"](1);
|
|
194
|
+
|
|
195
|
+
case 10:
|
|
196
|
+
case "end":
|
|
197
|
+
return _context.stop();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}, _callee, null, [[1, 8]]);
|
|
201
|
+
}));
|
|
202
|
+
|
|
203
|
+
return function (_x) {
|
|
204
|
+
return _ref2.apply(this, arguments);
|
|
205
|
+
};
|
|
206
|
+
}());
|
|
207
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resolvePreview", /*#__PURE__*/function () {
|
|
208
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(identifier, fileState) {
|
|
209
|
+
var params, cardPreview, wrappedError;
|
|
210
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
211
|
+
while (1) {
|
|
212
|
+
switch (_context2.prev = _context2.next) {
|
|
213
|
+
case 0:
|
|
214
|
+
_context2.prev = 0;
|
|
215
|
+
params = _this.getCardPreviewParams(identifier, fileState);
|
|
216
|
+
_context2.next = 4;
|
|
217
|
+
return (0, _getCardPreview.getCardPreview)(params);
|
|
218
|
+
|
|
219
|
+
case 4:
|
|
220
|
+
cardPreview = _context2.sent;
|
|
221
|
+
|
|
222
|
+
_this.safeSetState({
|
|
223
|
+
cardPreview: cardPreview
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
_context2.next = 12;
|
|
227
|
+
break;
|
|
228
|
+
|
|
229
|
+
case 8:
|
|
230
|
+
_context2.prev = 8;
|
|
231
|
+
_context2.t0 = _context2["catch"](0);
|
|
232
|
+
wrappedError = (0, _errors.ensureMediaCardError)('preview-fetch', _context2.t0); // If remote preview fails, we set status 'error'
|
|
197
233
|
// If local preview fails (i.e, no remote preview available),
|
|
198
234
|
// we can stay in the same status until there is a remote preview available
|
|
199
235
|
// If it's any other error we set status 'error'
|
|
@@ -211,14 +247,14 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
211
247
|
|
|
212
248
|
case 12:
|
|
213
249
|
case "end":
|
|
214
|
-
return
|
|
250
|
+
return _context2.stop();
|
|
215
251
|
}
|
|
216
252
|
}
|
|
217
|
-
},
|
|
253
|
+
}, _callee2, null, [[0, 8]]);
|
|
218
254
|
}));
|
|
219
255
|
|
|
220
|
-
return function (
|
|
221
|
-
return
|
|
256
|
+
return function (_x2, _x3) {
|
|
257
|
+
return _ref3.apply(this, arguments);
|
|
222
258
|
};
|
|
223
259
|
}());
|
|
224
260
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getPerformanceAttributes", function () {
|
|
@@ -234,11 +270,16 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
234
270
|
}
|
|
235
271
|
};
|
|
236
272
|
});
|
|
237
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageError", function () {
|
|
238
|
-
var
|
|
273
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageError", function (cardPreview) {
|
|
274
|
+
var currentPreview = _this.state.cardPreview; // If the dataURI has been replaced, we can dismiss this error
|
|
275
|
+
|
|
276
|
+
if ((cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dataURI) !== (currentPreview === null || currentPreview === void 0 ? void 0 : currentPreview.dataURI)) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
239
280
|
var error = new _errors.ImageLoadError(cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.source);
|
|
240
281
|
var isLocal = cardPreview && (0, _getCardPreview.isLocalPreview)(cardPreview);
|
|
241
|
-
var isSSR = cardPreview && (0, _getCardPreview.isSSRClientPreview)(cardPreview);
|
|
282
|
+
var isSSR = cardPreview && ((0, _getCardPreview.isSSRClientPreview)(cardPreview) || (0, _getCardPreview.isSSRDataPreview)(cardPreview));
|
|
242
283
|
|
|
243
284
|
if (isLocal || isSSR) {
|
|
244
285
|
var updateState = {
|
|
@@ -255,11 +296,11 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
255
296
|
// https://product-fabric.atlassian.net/browse/MEX-770
|
|
256
297
|
}
|
|
257
298
|
|
|
258
|
-
var _this$
|
|
259
|
-
identifier = _this$
|
|
260
|
-
_this$
|
|
261
|
-
dimensions = _this$
|
|
262
|
-
(0,
|
|
299
|
+
var _this$props5 = _this.props,
|
|
300
|
+
identifier = _this$props5.identifier,
|
|
301
|
+
_this$props5$dimensio = _this$props5.dimensions,
|
|
302
|
+
dimensions = _this$props5$dimensio === void 0 ? {} : _this$props5$dimensio;
|
|
303
|
+
(0, _mediaClient2.isFileIdentifier)(identifier) && (0, _getCardPreview.removeCardPreviewFromCache)(identifier.id, dimensions);
|
|
263
304
|
|
|
264
305
|
_this.safeSetState(updateState);
|
|
265
306
|
} else {
|
|
@@ -269,7 +310,13 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
269
310
|
});
|
|
270
311
|
}
|
|
271
312
|
});
|
|
272
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageLoad", function () {
|
|
313
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageLoad", function (cardPreview) {
|
|
314
|
+
var currentPreview = _this.state.cardPreview; // If the dataURI has been replaced, we can dismiss this callback
|
|
315
|
+
|
|
316
|
+
if ((cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dataURI) !== (currentPreview === null || currentPreview === void 0 ? void 0 : currentPreview.dataURI)) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
273
320
|
_this.safeSetState({
|
|
274
321
|
previewDidRender: true
|
|
275
322
|
});
|
|
@@ -309,10 +356,10 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
309
356
|
}
|
|
310
357
|
});
|
|
311
358
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onCardViewClick", function (event, analyticsEvent) {
|
|
312
|
-
var _this$
|
|
313
|
-
identifier = _this$
|
|
314
|
-
useInlinePlayer = _this$
|
|
315
|
-
shouldOpenMediaViewer = _this$
|
|
359
|
+
var _this$props6 = _this.props,
|
|
360
|
+
identifier = _this$props6.identifier,
|
|
361
|
+
useInlinePlayer = _this$props6.useInlinePlayer,
|
|
362
|
+
shouldOpenMediaViewer = _this$props6.shouldOpenMediaViewer;
|
|
316
363
|
var cardPreview = _this.state.cardPreview;
|
|
317
364
|
|
|
318
365
|
var _assertThisInitialize2 = (0, _assertThisInitialized2.default)(_this),
|
|
@@ -334,7 +381,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
334
381
|
} else if (shouldOpenMediaViewer) {
|
|
335
382
|
var mediaViewerSelectedItem;
|
|
336
383
|
|
|
337
|
-
if ((0,
|
|
384
|
+
if ((0, _mediaClient2.isFileIdentifier)(identifier)) {
|
|
338
385
|
mediaViewerSelectedItem = {
|
|
339
386
|
id: identifier.id,
|
|
340
387
|
mediaItemType: 'file',
|
|
@@ -365,14 +412,16 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
365
412
|
});
|
|
366
413
|
});
|
|
367
414
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderInlinePlayer", function () {
|
|
368
|
-
var _this$
|
|
369
|
-
identifier = _this$
|
|
370
|
-
mediaClient = _this$
|
|
371
|
-
dimensions = _this$
|
|
372
|
-
selected = _this$
|
|
373
|
-
testId = _this$
|
|
374
|
-
originalDimensions = _this$
|
|
375
|
-
var
|
|
415
|
+
var _this$props7 = _this.props,
|
|
416
|
+
identifier = _this$props7.identifier,
|
|
417
|
+
mediaClient = _this$props7.mediaClient,
|
|
418
|
+
dimensions = _this$props7.dimensions,
|
|
419
|
+
selected = _this$props7.selected,
|
|
420
|
+
testId = _this$props7.testId,
|
|
421
|
+
originalDimensions = _this$props7.originalDimensions;
|
|
422
|
+
var _this$state = _this.state,
|
|
423
|
+
shouldAutoplay = _this$state.shouldAutoplay,
|
|
424
|
+
cardPreview = _this$state.cardPreview;
|
|
376
425
|
return /*#__PURE__*/_react.default.createElement(_inlinePlayer.InlinePlayer, {
|
|
377
426
|
mediaClient: mediaClient,
|
|
378
427
|
dimensions: dimensions,
|
|
@@ -383,7 +432,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
383
432
|
onClick: _this.onClick,
|
|
384
433
|
selected: selected,
|
|
385
434
|
ref: _this.setRef,
|
|
386
|
-
testId: testId
|
|
435
|
+
testId: testId,
|
|
436
|
+
cardPreview: cardPreview
|
|
387
437
|
});
|
|
388
438
|
});
|
|
389
439
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMediaViewerClose", function () {
|
|
@@ -395,10 +445,10 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
395
445
|
var identifier = _this.props.identifier;
|
|
396
446
|
var payloadPart;
|
|
397
447
|
|
|
398
|
-
if ((0,
|
|
448
|
+
if ((0, _mediaClient2.isFileIdentifier)(identifier)) {
|
|
399
449
|
payloadPart = {
|
|
400
450
|
fileId: identifier.id,
|
|
401
|
-
isUserCollection: identifier.collectionName ===
|
|
451
|
+
isUserCollection: identifier.collectionName === _mediaClient2.RECENTS_COLLECTION
|
|
402
452
|
};
|
|
403
453
|
} else {
|
|
404
454
|
payloadPart = {
|
|
@@ -407,24 +457,24 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
407
457
|
};
|
|
408
458
|
}
|
|
409
459
|
|
|
410
|
-
|
|
460
|
+
_mediaClient2.globalMediaEventEmitter.emit('media-viewed', _objectSpread({
|
|
411
461
|
viewingLevel: 'minimal'
|
|
412
462
|
}, payloadPart));
|
|
413
463
|
});
|
|
414
464
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderMediaViewer", function () {
|
|
415
465
|
var mediaViewerSelectedItem = _this.state.mediaViewerSelectedItem;
|
|
416
|
-
var _this$
|
|
417
|
-
mediaClient = _this$
|
|
418
|
-
identifier = _this$
|
|
419
|
-
mediaViewerDataSource = _this$
|
|
420
|
-
contextId = _this$
|
|
421
|
-
featureFlags = _this$
|
|
466
|
+
var _this$props8 = _this.props,
|
|
467
|
+
mediaClient = _this$props8.mediaClient,
|
|
468
|
+
identifier = _this$props8.identifier,
|
|
469
|
+
mediaViewerDataSource = _this$props8.mediaViewerDataSource,
|
|
470
|
+
contextId = _this$props8.contextId,
|
|
471
|
+
featureFlags = _this$props8.featureFlags;
|
|
422
472
|
|
|
423
473
|
if (!mediaViewerSelectedItem) {
|
|
424
474
|
return;
|
|
425
475
|
}
|
|
426
476
|
|
|
427
|
-
var collectionName = (0,
|
|
477
|
+
var collectionName = (0, _mediaClient2.isFileIdentifier)(identifier) ? identifier.collectionName || '' : '';
|
|
428
478
|
var dataSource = mediaViewerDataSource || {
|
|
429
479
|
list: []
|
|
430
480
|
};
|
|
@@ -439,35 +489,31 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
439
489
|
}), document.body);
|
|
440
490
|
});
|
|
441
491
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderCard", function () {
|
|
442
|
-
var _this$
|
|
443
|
-
identifier = _this$
|
|
444
|
-
isLazy = _this$
|
|
445
|
-
appearance = _this$
|
|
446
|
-
resizeMode = _this$
|
|
447
|
-
dimensions = _this$
|
|
448
|
-
selectable = _this$
|
|
449
|
-
selected = _this$
|
|
450
|
-
disableOverlay = _this$
|
|
451
|
-
alt = _this$
|
|
452
|
-
testId = _this$
|
|
453
|
-
featureFlags = _this$
|
|
454
|
-
titleBoxBgColor = _this$
|
|
455
|
-
titleBoxIcon = _this$
|
|
456
|
-
ssr = _this$
|
|
492
|
+
var _this$props9 = _this.props,
|
|
493
|
+
identifier = _this$props9.identifier,
|
|
494
|
+
isLazy = _this$props9.isLazy,
|
|
495
|
+
appearance = _this$props9.appearance,
|
|
496
|
+
resizeMode = _this$props9.resizeMode,
|
|
497
|
+
dimensions = _this$props9.dimensions,
|
|
498
|
+
selectable = _this$props9.selectable,
|
|
499
|
+
selected = _this$props9.selected,
|
|
500
|
+
disableOverlay = _this$props9.disableOverlay,
|
|
501
|
+
alt = _this$props9.alt,
|
|
502
|
+
testId = _this$props9.testId,
|
|
503
|
+
featureFlags = _this$props9.featureFlags,
|
|
504
|
+
titleBoxBgColor = _this$props9.titleBoxBgColor,
|
|
505
|
+
titleBoxIcon = _this$props9.titleBoxIcon,
|
|
506
|
+
ssr = _this$props9.ssr,
|
|
507
|
+
useInlinePlayer = _this$props9.useInlinePlayer,
|
|
508
|
+
shouldOpenMediaViewer = _this$props9.shouldOpenMediaViewer;
|
|
457
509
|
var mediaItemType = identifier.mediaItemType;
|
|
458
|
-
var _this$
|
|
459
|
-
status = _this$
|
|
460
|
-
progress = _this$
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
} : _this$state$cardPrevi;
|
|
466
|
-
var dataURI = _this$state$cardPrevi.dataURI,
|
|
467
|
-
orientation = _this$state$cardPrevi.orientation,
|
|
468
|
-
error = _this$state.error,
|
|
469
|
-
cardRef = _this$state.cardRef,
|
|
470
|
-
isCardVisible = _this$state.isCardVisible;
|
|
510
|
+
var _this$state2 = _this.state,
|
|
511
|
+
status = _this$state2.status,
|
|
512
|
+
progress = _this$state2.progress,
|
|
513
|
+
cardPreview = _this$state2.cardPreview,
|
|
514
|
+
error = _this$state2.error,
|
|
515
|
+
cardRef = _this$state2.cardRef,
|
|
516
|
+
isCardVisible = _this$state2.isCardVisible;
|
|
471
517
|
|
|
472
518
|
var _assertThisInitialize3 = (0, _assertThisInitialized2.default)(_this),
|
|
473
519
|
metadata = _assertThisInitialize3.metadata;
|
|
@@ -483,13 +529,14 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
483
529
|
var nativeLazyLoad = isLazy && !isCardVisible; // Force Media Image to always display img for SSR
|
|
484
530
|
|
|
485
531
|
var forceSyncDisplay = !!ssr;
|
|
532
|
+
var mediaCardCursor = (0, _getMediaCardCursor.getMediaCardCursor)(!!useInlinePlayer, !!shouldOpenMediaViewer, status === 'error' || status === 'failed-processing', !!_this.state.cardPreview, metadata.mediaType);
|
|
486
533
|
|
|
487
534
|
var card = /*#__PURE__*/_react.default.createElement(_cardView.CardView, {
|
|
488
535
|
status: status,
|
|
489
536
|
error: error,
|
|
490
537
|
mediaItemType: mediaItemType,
|
|
491
538
|
metadata: metadata,
|
|
492
|
-
|
|
539
|
+
cardPreview: cardPreview,
|
|
493
540
|
alt: alt,
|
|
494
541
|
appearance: appearance,
|
|
495
542
|
resizeMode: resizeMode,
|
|
@@ -502,7 +549,6 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
502
549
|
disableOverlay: disableOverlay,
|
|
503
550
|
progress: progress,
|
|
504
551
|
onDisplayImage: onDisplayImage,
|
|
505
|
-
previewOrientation: orientation,
|
|
506
552
|
innerRef: _this.setRef,
|
|
507
553
|
testId: testId,
|
|
508
554
|
featureFlags: featureFlags,
|
|
@@ -511,7 +557,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
511
557
|
onImageError: _this.onImageError,
|
|
512
558
|
onImageLoad: _this.onImageLoad,
|
|
513
559
|
nativeLazyLoad: nativeLazyLoad,
|
|
514
|
-
forceSyncDisplay: forceSyncDisplay
|
|
560
|
+
forceSyncDisplay: forceSyncDisplay,
|
|
561
|
+
mediaCardCursor: mediaCardCursor
|
|
515
562
|
});
|
|
516
563
|
|
|
517
564
|
return isLazy ? /*#__PURE__*/_react.default.createElement(_viewportDetector.ViewportDetector, {
|
|
@@ -527,6 +574,23 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
527
574
|
offsetTop: _viewportDetector.ABS_VIEWPORT_ANCHOR_OFFSET_TOP
|
|
528
575
|
})) : card;
|
|
529
576
|
});
|
|
577
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "storeSSRData", function () {
|
|
578
|
+
var _this$props10 = _this.props,
|
|
579
|
+
ssr = _this$props10.ssr,
|
|
580
|
+
identifier = _this$props10.identifier;
|
|
581
|
+
var _this$state3 = _this.state,
|
|
582
|
+
_this$state3$cardPrev = _this$state3.cardPreview;
|
|
583
|
+
_this$state3$cardPrev = _this$state3$cardPrev === void 0 ? {} : _this$state3$cardPrev;
|
|
584
|
+
var dataURI = _this$state3$cardPrev.dataURI,
|
|
585
|
+
error = _this$state3.error;
|
|
586
|
+
var ssrDataError = !!error ? (0, _analytics.extractErrorInfo)(error) : undefined;
|
|
587
|
+
return (0, _mediaClient2.isFileIdentifier)(identifier) && ssr === 'server' && /*#__PURE__*/_react.default.createElement(_globalScope.StoreSSRDataScript, {
|
|
588
|
+
identifier: identifier,
|
|
589
|
+
dataURI: dataURI,
|
|
590
|
+
dimensions: _this.requestedDimensions,
|
|
591
|
+
error: ssrDataError
|
|
592
|
+
});
|
|
593
|
+
});
|
|
530
594
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onCardInViewport", function () {
|
|
531
595
|
_this.setState({
|
|
532
596
|
isCardVisible: true
|
|
@@ -564,22 +628,42 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
564
628
|
|
|
565
629
|
var _cardPreview;
|
|
566
630
|
|
|
567
|
-
var
|
|
568
|
-
_identifier = _this$props9.identifier,
|
|
569
|
-
_this$props9$dimensio = _this$props9.dimensions,
|
|
570
|
-
_dimensions = _this$props9$dimensio === void 0 ? {} : _this$props9$dimensio,
|
|
571
|
-
_ssr = _this$props9.ssr;
|
|
631
|
+
var _error;
|
|
572
632
|
|
|
573
|
-
|
|
633
|
+
var _this$props11 = _this.props,
|
|
634
|
+
_identifier = _this$props11.identifier,
|
|
635
|
+
_this$props11$dimensi = _this$props11.dimensions,
|
|
636
|
+
_dimensions = _this$props11$dimensi === void 0 ? {} : _this$props11$dimensi,
|
|
637
|
+
_ssr = _this$props11.ssr,
|
|
638
|
+
_mediaClient = _this$props11.mediaClient;
|
|
639
|
+
|
|
640
|
+
if ((0, _mediaClient2.isFileIdentifier)(_identifier)) {
|
|
574
641
|
var id = _identifier.id;
|
|
575
642
|
_cardPreview = (0, _getCardPreview.getCardPreviewFromCache)(id, _dimensions);
|
|
576
643
|
|
|
577
644
|
if (!_cardPreview && _ssr) {
|
|
578
|
-
_this
|
|
579
|
-
|
|
580
|
-
|
|
645
|
+
var _this$ssrData;
|
|
646
|
+
|
|
647
|
+
_this.ssrData = (0, _globalScope.getSSRData)(_identifier);
|
|
648
|
+
|
|
649
|
+
if (_ssr === 'server' || !((_this$ssrData = _this.ssrData) !== null && _this$ssrData !== void 0 && _this$ssrData.dataURI)) {
|
|
650
|
+
try {
|
|
651
|
+
_cardPreview = (0, _getCardPreview.getSSRCardPreview)(_ssr, _mediaClient, _identifier.id, _this.getImageURLParams(_identifier), _this.getMediaBlobUrlAttrs(_identifier));
|
|
652
|
+
} catch (e) {
|
|
653
|
+
// TODO: handle error in client MEX-770
|
|
654
|
+
// If we fail building the dataURI in server, we store the error in the state
|
|
655
|
+
// to be later stored in global scope and logged in client.
|
|
656
|
+
// We don't set the status = error to fall back to the spinner icon
|
|
657
|
+
_error = _ssr === 'server' ? e : undefined;
|
|
658
|
+
}
|
|
659
|
+
} else {
|
|
660
|
+
_cardPreview = {
|
|
661
|
+
dataURI: _this.ssrData.dataURI,
|
|
662
|
+
source: 'ssr-data'
|
|
663
|
+
};
|
|
664
|
+
}
|
|
581
665
|
}
|
|
582
|
-
} else if ((0,
|
|
666
|
+
} else if ((0, _mediaClient2.isExternalImageIdentifier)(_identifier)) {
|
|
583
667
|
_this.fireCommencedEvent();
|
|
584
668
|
|
|
585
669
|
_status = 'loading-preview';
|
|
@@ -605,7 +689,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
605
689
|
cardPreview: _cardPreview,
|
|
606
690
|
cardRef: null,
|
|
607
691
|
isBannedLocalPreview: false,
|
|
608
|
-
previewDidRender: false
|
|
692
|
+
previewDidRender: false,
|
|
693
|
+
error: _error
|
|
609
694
|
};
|
|
610
695
|
return _this;
|
|
611
696
|
}
|
|
@@ -614,21 +699,32 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
614
699
|
key: "componentDidMount",
|
|
615
700
|
value: function componentDidMount() {
|
|
616
701
|
this.hasBeenMounted = true;
|
|
617
|
-
var _this$
|
|
618
|
-
isCardVisible = _this$
|
|
619
|
-
cardPreview = _this$
|
|
620
|
-
var _this$
|
|
621
|
-
identifier = _this$
|
|
622
|
-
ssr = _this$
|
|
623
|
-
|
|
624
|
-
|
|
702
|
+
var _this$state4 = this.state,
|
|
703
|
+
isCardVisible = _this$state4.isCardVisible,
|
|
704
|
+
cardPreview = _this$state4.cardPreview;
|
|
705
|
+
var _this$props12 = this.props,
|
|
706
|
+
identifier = _this$props12.identifier,
|
|
707
|
+
ssr = _this$props12.ssr,
|
|
708
|
+
dimensions = _this$props12.dimensions;
|
|
709
|
+
|
|
710
|
+
if (isCardVisible && (0, _mediaClient2.isFileIdentifier)(identifier)) {
|
|
625
711
|
this.updateStateForIdentifier(identifier);
|
|
626
712
|
}
|
|
627
713
|
|
|
628
|
-
if (isCardVisible && !!ssr && !!cardPreview && (0,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
714
|
+
if (isCardVisible && !!ssr && !!cardPreview && (0, _mediaClient2.isFileIdentifier)(identifier)) {
|
|
715
|
+
var _this$ssrData2;
|
|
716
|
+
|
|
717
|
+
if ((0, _getCardPreview.isSSRClientPreview)(cardPreview)) {
|
|
718
|
+
// Since the SSR preview brings the token in the query params,
|
|
719
|
+
// We need to fetch the remote preview to be able to cache it,
|
|
720
|
+
this.setCacheSSRPreview(identifier);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if ((0, _getCardPreview.isSSRDataPreview)(cardPreview) && (0, _dimensionComparer.isBigger)((_this$ssrData2 = this.ssrData) === null || _this$ssrData2 === void 0 ? void 0 : _this$ssrData2.dimensions, dimensions)) {
|
|
724
|
+
// If dimensions from Server have changed and are bigger,
|
|
725
|
+
// we need to refetch
|
|
726
|
+
this.refetchSSRPreview(identifier);
|
|
727
|
+
}
|
|
632
728
|
} // we add a listener for each of the cards on the page
|
|
633
729
|
// and then check if the triggered listener is from the card
|
|
634
730
|
// that contains a div in current window.getSelection()
|
|
@@ -644,26 +740,26 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
644
740
|
prevIdentifier = prevProps.identifier,
|
|
645
741
|
prevDimensions = prevProps.dimensions;
|
|
646
742
|
var prevIsCardVisible = prevState.isCardVisible;
|
|
647
|
-
var _this$
|
|
648
|
-
mediaClient = _this$
|
|
649
|
-
identifier = _this$
|
|
650
|
-
dimensions = _this$
|
|
651
|
-
featureFlags = _this$
|
|
652
|
-
useInlinePlayer = _this$
|
|
653
|
-
disableOverlay = _this$
|
|
654
|
-
var _this$
|
|
655
|
-
isCardVisible = _this$
|
|
656
|
-
cardPreview = _this$
|
|
657
|
-
status = _this$
|
|
658
|
-
fileState = _this$
|
|
659
|
-
isBannedLocalPreview = _this$
|
|
660
|
-
previewDidRender = _this$
|
|
661
|
-
isPlayingFile = _this$
|
|
662
|
-
var isDifferent = (0,
|
|
743
|
+
var _this$props13 = this.props,
|
|
744
|
+
mediaClient = _this$props13.mediaClient,
|
|
745
|
+
identifier = _this$props13.identifier,
|
|
746
|
+
dimensions = _this$props13.dimensions,
|
|
747
|
+
featureFlags = _this$props13.featureFlags,
|
|
748
|
+
useInlinePlayer = _this$props13.useInlinePlayer,
|
|
749
|
+
disableOverlay = _this$props13.disableOverlay;
|
|
750
|
+
var _this$state5 = this.state,
|
|
751
|
+
isCardVisible = _this$state5.isCardVisible,
|
|
752
|
+
cardPreview = _this$state5.cardPreview,
|
|
753
|
+
status = _this$state5.status,
|
|
754
|
+
fileState = _this$state5.fileState,
|
|
755
|
+
isBannedLocalPreview = _this$state5.isBannedLocalPreview,
|
|
756
|
+
previewDidRender = _this$state5.previewDidRender,
|
|
757
|
+
isPlayingFile = _this$state5.isPlayingFile;
|
|
758
|
+
var isDifferent = (0, _mediaClient2.isDifferentIdentifier)(prevIdentifier, identifier);
|
|
663
759
|
var turnedVisible = !prevIsCardVisible && isCardVisible;
|
|
664
760
|
var isNewMediaClient = prevMediaClient !== mediaClient;
|
|
665
761
|
|
|
666
|
-
if ((0,
|
|
762
|
+
if ((0, _mediaClient2.isExternalImageIdentifier)(identifier) && isDifferent) {
|
|
667
763
|
this.fireCommencedEvent();
|
|
668
764
|
var dataURI = identifier.dataURI;
|
|
669
765
|
this.setState({
|
|
@@ -677,7 +773,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
677
773
|
});
|
|
678
774
|
}
|
|
679
775
|
|
|
680
|
-
if ((0,
|
|
776
|
+
if ((0, _mediaClient2.isFileIdentifier)(identifier) && (turnedVisible || !!this.subscription && (isNewMediaClient || isDifferent))) {
|
|
681
777
|
this.updateStateForIdentifier(identifier);
|
|
682
778
|
}
|
|
683
779
|
|
|
@@ -689,7 +785,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
689
785
|
}
|
|
690
786
|
}
|
|
691
787
|
|
|
692
|
-
if ((0,
|
|
788
|
+
if ((0, _mediaClient2.isFileIdentifier)(identifier) && fileState && (0, _getCardPreview.shouldResolvePreview)({
|
|
693
789
|
status: status,
|
|
694
790
|
fileState: fileState,
|
|
695
791
|
dimensions: dimensions,
|
|
@@ -701,7 +797,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
701
797
|
this.resolvePreview(identifier, fileState);
|
|
702
798
|
}
|
|
703
799
|
|
|
704
|
-
if (turnedVisible && this.props.ssr && !!cardPreview && (0, _getCardPreview.isSSRClientPreview)(cardPreview) && (0,
|
|
800
|
+
if (turnedVisible && this.props.ssr && !!cardPreview && (0, _getCardPreview.isSSRClientPreview)(cardPreview) && (0, _mediaClient2.isFileIdentifier)(identifier)) {
|
|
705
801
|
// Since the SSR preview brings the token in the query params,
|
|
706
802
|
// We need to fetch the remote preview to be able to cache it,
|
|
707
803
|
this.setCacheSSRPreview(identifier);
|
|
@@ -716,7 +812,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
716
812
|
}
|
|
717
813
|
|
|
718
814
|
var isVideo = this.fileAttributes.fileMediatype === 'video';
|
|
719
|
-
var videoAvailableToPlay = fileState && (0,
|
|
815
|
+
var videoAvailableToPlay = fileState && (0, _mediaClient2.isProcessedFileState)(fileState);
|
|
720
816
|
|
|
721
817
|
if (isVideo && !isPlayingFile && disableOverlay && useInlinePlayer && videoAvailableToPlay && (0, _mediaCommon.getMediaFeatureFlag)('timestampOnVideo', this.props.featureFlags)) {
|
|
722
818
|
this.setState({
|
|
@@ -774,8 +870,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
774
870
|
get: function get() {
|
|
775
871
|
var dimensions = this.props.dimensions;
|
|
776
872
|
|
|
777
|
-
var
|
|
778
|
-
element =
|
|
873
|
+
var _ref4 = this.state || {},
|
|
874
|
+
element = _ref4.cardRef;
|
|
779
875
|
|
|
780
876
|
return (0, _getDataURIDimension.getRequestedDimensions)({
|
|
781
877
|
dimensions: dimensions,
|
|
@@ -785,23 +881,23 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
785
881
|
}, {
|
|
786
882
|
key: "metadata",
|
|
787
883
|
get: function get() {
|
|
788
|
-
var _this$
|
|
884
|
+
var _this$state6;
|
|
789
885
|
|
|
790
|
-
return (0, _metadata.getFileDetails)(this.props.identifier, (_this$
|
|
886
|
+
return (0, _metadata.getFileDetails)(this.props.identifier, (_this$state6 = this.state) === null || _this$state6 === void 0 ? void 0 : _this$state6.fileState);
|
|
791
887
|
}
|
|
792
888
|
}, {
|
|
793
889
|
key: "fileAttributes",
|
|
794
890
|
get: function get() {
|
|
795
|
-
var _this$
|
|
891
|
+
var _this$state7, _this$state7$fileStat;
|
|
796
892
|
|
|
797
|
-
return (0, _analytics.getFileAttributes)(this.metadata, (_this$
|
|
893
|
+
return (0, _analytics.getFileAttributes)(this.metadata, (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : (_this$state7$fileStat = _this$state7.fileState) === null || _this$state7$fileStat === void 0 ? void 0 : _this$state7$fileStat.status);
|
|
798
894
|
}
|
|
799
895
|
}, {
|
|
800
896
|
key: "fireOperationalEvent",
|
|
801
897
|
value: function fireOperationalEvent() {
|
|
802
|
-
var _this$
|
|
803
|
-
status = _this$
|
|
804
|
-
error = _this$
|
|
898
|
+
var _this$state8 = this.state,
|
|
899
|
+
status = _this$state8.status,
|
|
900
|
+
error = _this$state8.error;
|
|
805
901
|
var createAnalyticsEvent = this.props.createAnalyticsEvent;
|
|
806
902
|
createAnalyticsEvent && (0, _cardAnalytics.fireOperationalEvent)(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), error);
|
|
807
903
|
}
|
|
@@ -821,15 +917,15 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
821
917
|
get: function get() {
|
|
822
918
|
var _this3 = this;
|
|
823
919
|
|
|
824
|
-
var _this$
|
|
825
|
-
_this$
|
|
826
|
-
actions = _this$
|
|
827
|
-
identifier = _this$
|
|
828
|
-
shouldEnableDownloadButton = _this$
|
|
920
|
+
var _this$props14 = this.props,
|
|
921
|
+
_this$props14$actions = _this$props14.actions,
|
|
922
|
+
actions = _this$props14$actions === void 0 ? [] : _this$props14$actions,
|
|
923
|
+
identifier = _this$props14.identifier,
|
|
924
|
+
shouldEnableDownloadButton = _this$props14.shouldEnableDownloadButton;
|
|
829
925
|
var status = this.state.status;
|
|
830
926
|
var metadata = this.metadata;
|
|
831
927
|
|
|
832
|
-
if ((0,
|
|
928
|
+
if ((0, _mediaClient2.isFileIdentifier)(identifier) && (status === 'failed-processing' || shouldEnableDownloadButton)) {
|
|
833
929
|
var downloadAction = {
|
|
834
930
|
label: 'Download',
|
|
835
931
|
icon: /*#__PURE__*/_react.default.createElement(_download.default, {
|
|
@@ -847,11 +943,11 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
847
943
|
}, {
|
|
848
944
|
key: "render",
|
|
849
945
|
value: function render() {
|
|
850
|
-
var _this$
|
|
851
|
-
isPlayingFile = _this$
|
|
852
|
-
mediaViewerSelectedItem = _this$
|
|
946
|
+
var _this$state9 = this.state,
|
|
947
|
+
isPlayingFile = _this$state9.isPlayingFile,
|
|
948
|
+
mediaViewerSelectedItem = _this$state9.mediaViewerSelectedItem;
|
|
853
949
|
|
|
854
|
-
var innerContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isPlayingFile ? this.renderInlinePlayer() : this.renderCard(), mediaViewerSelectedItem ? this.renderMediaViewer() : null);
|
|
950
|
+
var innerContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isPlayingFile ? this.renderInlinePlayer() : this.renderCard(), mediaViewerSelectedItem ? this.renderMediaViewer() : null, this.storeSSRData());
|
|
855
951
|
|
|
856
952
|
return this.props.intl ? innerContent : /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
|
|
857
953
|
locale: "en"
|