@atlaskit/media-card 79.3.1 → 79.3.3
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 +27 -0
- package/dist/cjs/card/card.js +2 -3
- package/dist/cjs/card/cardLoader.js +1 -2
- package/dist/cjs/card/cardView.js +1 -2
- package/dist/cjs/card/externalImageCard.js +1 -2
- package/dist/cjs/card/fileCard.js +18 -19
- package/dist/cjs/card/inlinePlayer.js +89 -59
- package/dist/cjs/card/inlinePlayerLazy.js +1 -2
- package/dist/cjs/card/inlinePlayerWrapper-compiled.js +8 -3
- package/dist/cjs/card/inlinePlayerWrapper-emotion.js +7 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/svgView/svgImage-compiled.js +1 -2
- package/dist/cjs/card/svgView/svgImage-emotion.js +1 -2
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper-compiled.js +1 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +1 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +1 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsView.js +1 -2
- package/dist/cjs/card/ui/blanket/blanket-compiled.js +1 -2
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -2
- package/dist/cjs/card/ui/iconWrapper/iconWrapper-compiled.js +1 -2
- package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -2
- package/dist/cjs/card/ui/imageRenderer/imageRendererV2.js +8 -3
- package/dist/cjs/card/ui/imageRenderer/wrapper.js +1 -2
- package/dist/cjs/card/ui/playButton/playButtonBackground-compiled.js +1 -2
- package/dist/cjs/card/ui/playButton/playButtonWrapper-compiled.js +1 -2
- package/dist/cjs/card/ui/progressBar/styledBar-compiled.js +1 -2
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper-compiled.js +1 -2
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-compiled.js +1 -2
- package/dist/cjs/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +1 -2
- package/dist/cjs/card/ui/wrapper/imageContainer-compiled.js +1 -2
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +8 -3
- package/dist/cjs/card/ui/wrapper/wrapper-emotion.js +7 -1
- package/dist/cjs/inline/loader.js +2 -3
- package/dist/cjs/inline/mediaInlineCard.js +4 -5
- package/dist/cjs/utils/lightCards/cardError.js +1 -2
- package/dist/cjs/utils/lightCards/cardLoading.js +1 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/utils/viewportDetector.js +1 -2
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/inlinePlayer.js +42 -26
- package/dist/es2019/card/inlinePlayerWrapper-compiled.js +7 -1
- package/dist/es2019/card/inlinePlayerWrapper-emotion.js +7 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/imageRenderer/imageRendererV2.js +7 -1
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +7 -1
- package/dist/es2019/card/ui/wrapper/wrapper-emotion.js +7 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/fileCard.js +17 -17
- package/dist/esm/card/inlinePlayer.js +89 -58
- package/dist/esm/card/inlinePlayerWrapper-compiled.js +7 -1
- package/dist/esm/card/inlinePlayerWrapper-emotion.js +7 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/imageRenderer/imageRendererV2.js +7 -1
- package/dist/esm/card/ui/wrapper/wrapper-compiled.js +7 -1
- package/dist/esm/card/ui/wrapper/wrapper-emotion.js +7 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineCard.js +3 -3
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +9 -3
|
@@ -157,17 +157,17 @@ export var FileCard = function FileCard(_ref) {
|
|
|
157
157
|
status = _useState8[0],
|
|
158
158
|
setStatus = _useState8[1];
|
|
159
159
|
var _useState9 = useState(false),
|
|
160
|
-
|
|
161
|
-
isPlayingFile =
|
|
162
|
-
setIsPlayingFile =
|
|
160
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
161
|
+
isPlayingFile = _useState0[0],
|
|
162
|
+
setIsPlayingFile = _useState0[1];
|
|
163
|
+
var _useState1 = useState(false),
|
|
164
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
165
|
+
shouldAutoplay = _useState10[0],
|
|
166
|
+
setShouldAutoplay = _useState10[1];
|
|
163
167
|
var _useState11 = useState(false),
|
|
164
168
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
var _useState13 = useState(false),
|
|
168
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
169
|
-
previewDidRender = _useState14[0],
|
|
170
|
-
setPreviewDidRender = _useState14[1];
|
|
169
|
+
previewDidRender = _useState12[0],
|
|
170
|
+
setPreviewDidRender = _useState12[1];
|
|
171
171
|
var mediaBlobUrlAttrs = useMemo(function () {
|
|
172
172
|
var id = identifier.id,
|
|
173
173
|
collection = identifier.collectionName;
|
|
@@ -206,18 +206,18 @@ export var FileCard = function FileCard(_ref) {
|
|
|
206
206
|
getSsrScriptProps = _useFilePreview.getSsrScriptProps,
|
|
207
207
|
copyNodeRef = _useFilePreview.copyNodeRef;
|
|
208
208
|
var shouldSendPerformanceEventRef = useRef(shouldPerformanceBeSampled());
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
error =
|
|
212
|
-
setError =
|
|
209
|
+
var _useState13 = useState(),
|
|
210
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
211
|
+
error = _useState14[0],
|
|
212
|
+
setError = _useState14[1];
|
|
213
213
|
|
|
214
214
|
// CXP-2723 TODO: TEMPORARY VARIABLES
|
|
215
215
|
var finalError = error || (previewError && previewError.primaryReason !== 'failed-processing' && (fileStateValue === null || fileStateValue === void 0 ? void 0 : fileStateValue.mimeType) !== 'image/svg+xml' ? previewError : undefined);
|
|
216
216
|
var finalStatus = finalError ? 'error' : status === 'failed-processing' && (fileStateValue === null || fileStateValue === void 0 ? void 0 : fileStateValue.mimeType) === 'image/svg+xml' ? 'loading-preview' : status;
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
mediaViewerSelectedItem =
|
|
220
|
-
setMediaViewerSelectedItem =
|
|
217
|
+
var _useState15 = useState(null),
|
|
218
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
219
|
+
mediaViewerSelectedItem = _useState16[0],
|
|
220
|
+
setMediaViewerSelectedItem = _useState16[1];
|
|
221
221
|
var uploadProgressRef = useRef();
|
|
222
222
|
var metadata = useMemo(function () {
|
|
223
223
|
var getProcessingStatusFromFileState = function getProcessingStatusFromFileState(status) {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
import React, { useRef, useState, useEffect } from 'react';
|
|
5
|
+
import React, { useRef, useState, useEffect, useCallback } from 'react';
|
|
6
6
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
7
|
import { CustomMediaPlayer, MediaPlayer, InactivityDetector } from '@atlaskit/media-ui';
|
|
8
8
|
import { defaultImageCardDimensions } from '../utils';
|
|
@@ -64,12 +64,77 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
64
64
|
occurrenceKey: occurrenceKey
|
|
65
65
|
}),
|
|
66
66
|
fileState = _useFileState.fileState;
|
|
67
|
+
var init = useCallback( /*#__PURE__*/function () {
|
|
68
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileState) {
|
|
69
|
+
var artifactName, artifacts, newFileSrc, _newFileSrc;
|
|
70
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
if (fileState.status === 'processed' || fileState.status === 'processing') {
|
|
74
|
+
_context.next = 2;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
return _context.abrupt("return");
|
|
78
|
+
case 2:
|
|
79
|
+
artifactName = getPreferredVideoArtifact(fileState);
|
|
80
|
+
artifacts = fileState.artifacts;
|
|
81
|
+
if (!(!artifactName || !artifacts)) {
|
|
82
|
+
_context.next = 16;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
_context.prev = 5;
|
|
86
|
+
_context.next = 8;
|
|
87
|
+
return mediaClient.file.getFileBinaryURL(id, collectionName);
|
|
88
|
+
case 8:
|
|
89
|
+
newFileSrc = _context.sent;
|
|
90
|
+
setFileSrc(newFileSrc);
|
|
91
|
+
_context.next = 15;
|
|
92
|
+
break;
|
|
93
|
+
case 12:
|
|
94
|
+
_context.prev = 12;
|
|
95
|
+
_context.t0 = _context["catch"](5);
|
|
96
|
+
if (onErrorRef.current && _context.t0 instanceof Error) {
|
|
97
|
+
onErrorRef.current(_context.t0);
|
|
98
|
+
}
|
|
99
|
+
case 15:
|
|
100
|
+
return _context.abrupt("return");
|
|
101
|
+
case 16:
|
|
102
|
+
_context.prev = 16;
|
|
103
|
+
_context.next = 19;
|
|
104
|
+
return mediaClient.file.getArtifactURL(artifacts, artifactName, collectionName);
|
|
105
|
+
case 19:
|
|
106
|
+
_newFileSrc = _context.sent;
|
|
107
|
+
setFileSrc(_newFileSrc);
|
|
108
|
+
_context.next = 26;
|
|
109
|
+
break;
|
|
110
|
+
case 23:
|
|
111
|
+
_context.prev = 23;
|
|
112
|
+
_context.t1 = _context["catch"](16);
|
|
113
|
+
if (onErrorRef.current && _context.t1 instanceof Error) {
|
|
114
|
+
onErrorRef.current(_context.t1);
|
|
115
|
+
}
|
|
116
|
+
case 26:
|
|
117
|
+
case "end":
|
|
118
|
+
return _context.stop();
|
|
119
|
+
}
|
|
120
|
+
}, _callee, null, [[5, 12], [16, 23]]);
|
|
121
|
+
}));
|
|
122
|
+
return function (_x) {
|
|
123
|
+
return _ref2.apply(this, arguments);
|
|
124
|
+
};
|
|
125
|
+
}(), [collectionName, id, mediaClient.file]);
|
|
126
|
+
var onPlay = function onPlay() {
|
|
127
|
+
if (fg('platform_media_resume_video_on_token_expiry')) {
|
|
128
|
+
fileState && init(fileState);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var onTimeChanged = onPlay;
|
|
67
132
|
useEffect(function () {
|
|
68
133
|
var subscribeFileState = /*#__PURE__*/function () {
|
|
69
|
-
var
|
|
70
|
-
var _yield$fileState$prev, value, newFileSrc
|
|
71
|
-
return _regeneratorRuntime.wrap(function
|
|
72
|
-
while (1) switch (
|
|
134
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fileState) {
|
|
135
|
+
var _yield$fileState$prev, value, newFileSrc;
|
|
136
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
137
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
73
138
|
case 0:
|
|
74
139
|
if (fileState.status === 'uploading') {
|
|
75
140
|
setIsUploading(true);
|
|
@@ -80,83 +145,45 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
80
145
|
|
|
81
146
|
// We reuse the existing fileSrc to prevent re renders, therefore we only perform fileSrc updates when there isn't any
|
|
82
147
|
if (!fileSrc) {
|
|
83
|
-
|
|
148
|
+
_context2.next = 3;
|
|
84
149
|
break;
|
|
85
150
|
}
|
|
86
|
-
return
|
|
151
|
+
return _context2.abrupt("return");
|
|
87
152
|
case 3:
|
|
88
153
|
if (!(fileState.status !== 'error' && fileState.preview)) {
|
|
89
|
-
|
|
154
|
+
_context2.next = 12;
|
|
90
155
|
break;
|
|
91
156
|
}
|
|
92
|
-
|
|
157
|
+
_context2.next = 6;
|
|
93
158
|
return fileState.preview;
|
|
94
159
|
case 6:
|
|
95
|
-
_yield$fileState$prev =
|
|
160
|
+
_yield$fileState$prev = _context2.sent;
|
|
96
161
|
value = _yield$fileState$prev.value;
|
|
97
162
|
if (!(value instanceof Blob && value.type.indexOf('video/') === 0)) {
|
|
98
|
-
|
|
163
|
+
_context2.next = 12;
|
|
99
164
|
break;
|
|
100
165
|
}
|
|
101
166
|
newFileSrc = URL.createObjectURL(value);
|
|
102
167
|
setFileSrc(newFileSrc);
|
|
103
|
-
return
|
|
168
|
+
return _context2.abrupt("return");
|
|
104
169
|
case 12:
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
artifactName = getPreferredVideoArtifact(fileState);
|
|
110
|
-
artifacts = fileState.artifacts;
|
|
111
|
-
if (!(!artifactName || !artifacts)) {
|
|
112
|
-
_context.next = 27;
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
_context.prev = 16;
|
|
116
|
-
_context.next = 19;
|
|
117
|
-
return mediaClient.file.getFileBinaryURL(id, collectionName);
|
|
118
|
-
case 19:
|
|
119
|
-
_newFileSrc = _context.sent;
|
|
120
|
-
setFileSrc(_newFileSrc);
|
|
121
|
-
_context.next = 26;
|
|
122
|
-
break;
|
|
123
|
-
case 23:
|
|
124
|
-
_context.prev = 23;
|
|
125
|
-
_context.t0 = _context["catch"](16);
|
|
126
|
-
if (onErrorRef.current && _context.t0 instanceof Error) {
|
|
127
|
-
onErrorRef.current(_context.t0);
|
|
128
|
-
}
|
|
129
|
-
case 26:
|
|
130
|
-
return _context.abrupt("return");
|
|
131
|
-
case 27:
|
|
132
|
-
_context.prev = 27;
|
|
133
|
-
_context.next = 30;
|
|
134
|
-
return mediaClient.file.getArtifactURL(artifacts, artifactName, collectionName);
|
|
135
|
-
case 30:
|
|
136
|
-
_newFileSrc2 = _context.sent;
|
|
137
|
-
setFileSrc(_newFileSrc2);
|
|
138
|
-
_context.next = 37;
|
|
139
|
-
break;
|
|
140
|
-
case 34:
|
|
141
|
-
_context.prev = 34;
|
|
142
|
-
_context.t1 = _context["catch"](27);
|
|
143
|
-
if (onErrorRef.current && _context.t1 instanceof Error) {
|
|
144
|
-
onErrorRef.current(_context.t1);
|
|
170
|
+
if (fileState.status === 'processed' || fileState.status === 'processing') {
|
|
171
|
+
init(fileState);
|
|
145
172
|
}
|
|
146
|
-
case
|
|
173
|
+
case 13:
|
|
147
174
|
case "end":
|
|
148
|
-
return
|
|
175
|
+
return _context2.stop();
|
|
149
176
|
}
|
|
150
|
-
},
|
|
177
|
+
}, _callee2);
|
|
151
178
|
}));
|
|
152
|
-
return function subscribeFileState(
|
|
153
|
-
return
|
|
179
|
+
return function subscribeFileState(_x2) {
|
|
180
|
+
return _ref3.apply(this, arguments);
|
|
154
181
|
};
|
|
155
182
|
}();
|
|
156
183
|
if (fileState) {
|
|
157
184
|
subscribeFileState(fileState);
|
|
158
185
|
}
|
|
159
|
-
}, [fileState, collectionName, fileSrc, id, mediaClient]);
|
|
186
|
+
}, [fileState, collectionName, fileSrc, id, mediaClient, init]);
|
|
160
187
|
useEffect(function () {
|
|
161
188
|
return function () {
|
|
162
189
|
fileSrc && URL.revokeObjectURL(fileSrc);
|
|
@@ -190,6 +217,8 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
190
217
|
viewingLevel: 'full'
|
|
191
218
|
});
|
|
192
219
|
},
|
|
220
|
+
onPlay: onPlay,
|
|
221
|
+
onTimeChanged: onTimeChanged,
|
|
193
222
|
lastWatchTimeConfig: {
|
|
194
223
|
contentId: id
|
|
195
224
|
},
|
|
@@ -214,6 +243,8 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
214
243
|
viewingLevel: 'full'
|
|
215
244
|
});
|
|
216
245
|
},
|
|
246
|
+
onPlay: onPlay,
|
|
247
|
+
onTimeChanged: onTimeChanged,
|
|
217
248
|
lastWatchTimeConfig: {
|
|
218
249
|
contentId: id
|
|
219
250
|
},
|
|
@@ -5,6 +5,8 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
7
7
|
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
8
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
var hideNativeBrowserTextSelectionStyles = null;
|
|
9
11
|
var selectedBorderStyle = null;
|
|
10
12
|
|
|
@@ -38,5 +40,9 @@ export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
|
38
40
|
height: getDimensionsWithDefault(dimensions).height || 'auto',
|
|
39
41
|
"--_f9up2s": ix("1px solid ".concat("var(--ds-border-selected, #0C66E4)"))
|
|
40
42
|
}
|
|
41
|
-
}),
|
|
43
|
+
}), fg('platform_media_add_ufo_custom_data') ? /*#__PURE__*/React.createElement(UFOCustomData, {
|
|
44
|
+
data: {
|
|
45
|
+
hasMediaComponent: true
|
|
46
|
+
}
|
|
47
|
+
}) : null, props.children);
|
|
42
48
|
};
|
|
@@ -7,6 +7,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import { inlinePlayerWrapperStyles, inlinePlayerClassName } from './inlinePlayerWrapperStyles';
|
|
9
9
|
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
10
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
12
|
export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
11
13
|
var testId = props.testId,
|
|
12
14
|
selected = props.selected,
|
|
@@ -29,6 +31,10 @@ export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
|
29
31
|
}),
|
|
30
32
|
onClick: onClick,
|
|
31
33
|
ref: innerRef
|
|
32
|
-
}, VcMediaWrapperProps),
|
|
34
|
+
}, VcMediaWrapperProps), fg('platform_media_add_ufo_custom_data') ? jsx(UFOCustomData, {
|
|
35
|
+
data: {
|
|
36
|
+
hasMediaComponent: true
|
|
37
|
+
}
|
|
38
|
+
}) : null, props.children)
|
|
33
39
|
);
|
|
34
40
|
};
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "79.3.
|
|
83
|
+
var packageVersion = "79.3.3";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -10,6 +10,8 @@ import { calculateDimensions, calculateInitialDimensions } from './helpers';
|
|
|
10
10
|
import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
|
|
11
11
|
import { ImageRendererWrapper } from './wrapper';
|
|
12
12
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
13
15
|
var baseStyles = null;
|
|
14
16
|
var backgroundStyles = null;
|
|
15
17
|
export var ImageRenderer = function ImageRenderer(_ref) {
|
|
@@ -57,7 +59,11 @@ export var ImageRenderer = function ImageRenderer(_ref) {
|
|
|
57
59
|
setResolvedDimensions(calculateDimensions(imgRef.current, wrapperRef.current, resizeMode));
|
|
58
60
|
}
|
|
59
61
|
}, [resizeMode, wrapperRef]);
|
|
60
|
-
return cardPreview ? /*#__PURE__*/React.createElement(ImageRendererWrapper, null, /*#__PURE__*/React.createElement(
|
|
62
|
+
return cardPreview ? /*#__PURE__*/React.createElement(ImageRendererWrapper, null, fg('platform_media_add_ufo_custom_data') ? /*#__PURE__*/React.createElement(UFOCustomData, {
|
|
63
|
+
data: {
|
|
64
|
+
hasMediaComponent: true
|
|
65
|
+
}
|
|
66
|
+
}) : null, /*#__PURE__*/React.createElement("img", {
|
|
61
67
|
ref: imgRef,
|
|
62
68
|
"data-testid": testId,
|
|
63
69
|
"data-fileid": isFileIdentifier(identifier) ? identifier.id : null,
|
|
@@ -11,6 +11,8 @@ import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
|
11
11
|
import { N0, N100, N20, N60A, N90A, B100 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { getDefaultCardDimensions } from '../../../utils/cardDimensions';
|
|
13
13
|
import { getCSSUnitValue } from '../../../utils/getCSSUnitValue';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
14
16
|
var LOCAL_WIDTH_VARIABLE = '--media-wrapper-width';
|
|
15
17
|
var LOCAL_HEIGHT_VARIABLE = '--media-wrapper-height';
|
|
16
18
|
var wrapperStyles = null;
|
|
@@ -82,6 +84,10 @@ export var Wrapper = function Wrapper(props) {
|
|
|
82
84
|
"--_mt8cm6": ix("var(--ds-background-input, ".concat(N0, ")")),
|
|
83
85
|
"--_13xf2t5": ix("var(--ds-icon-subtle, ".concat(N100, ")"))
|
|
84
86
|
})
|
|
85
|
-
}),
|
|
87
|
+
}), fg('platform_media_add_ufo_custom_data') ? /*#__PURE__*/React.createElement(UFOCustomData, {
|
|
88
|
+
data: {
|
|
89
|
+
hasMediaComponent: true
|
|
90
|
+
}
|
|
91
|
+
}) : null, props.children);
|
|
86
92
|
};
|
|
87
93
|
Wrapper.displayName = 'NewFileExperienceWrapper';
|
|
@@ -8,6 +8,8 @@ import { jsx } from '@emotion/react';
|
|
|
8
8
|
import { newFileExperienceClassName } from '../../cardConstants';
|
|
9
9
|
import { wrapperStyles } from './styles';
|
|
10
10
|
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
11
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
export var Wrapper = function Wrapper(props) {
|
|
12
14
|
var testId = props.testId,
|
|
13
15
|
dimensions = props.dimensions,
|
|
@@ -48,6 +50,10 @@ export var Wrapper = function Wrapper(props) {
|
|
|
48
50
|
ref: innerRef,
|
|
49
51
|
onClick: onClick,
|
|
50
52
|
onMouseEnter: onMouseEnter
|
|
51
|
-
}, VcMediaWrapperProps),
|
|
53
|
+
}, VcMediaWrapperProps), fg('platform_media_add_ufo_custom_data') ? jsx(UFOCustomData, {
|
|
54
|
+
data: {
|
|
55
|
+
hasMediaComponent: true
|
|
56
|
+
}
|
|
57
|
+
}) : null, props.children)
|
|
52
58
|
);
|
|
53
59
|
};
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "79.3.
|
|
104
|
+
packageName: "79.3.3",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -41,9 +41,9 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
41
41
|
isFailedEventSent = _useState8[0],
|
|
42
42
|
setIsFailedEventSent = _useState8[1];
|
|
43
43
|
var _useState9 = useState(false),
|
|
44
|
-
|
|
45
|
-
isMediaViewerVisible =
|
|
46
|
-
setMediaViewerVisible =
|
|
44
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
45
|
+
isMediaViewerVisible = _useState0[0],
|
|
46
|
+
setMediaViewerVisible = _useState0[1];
|
|
47
47
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
48
48
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
49
49
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "79.3.
|
|
11
|
+
var packageVersion = "79.3.3";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.3.
|
|
3
|
+
"version": "79.3.3",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
41
41
|
"@atlaskit/dropdown-menu": "^16.0.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
43
|
-
"@atlaskit/icon": "^26.
|
|
43
|
+
"@atlaskit/icon": "^26.4.0",
|
|
44
44
|
"@atlaskit/link": "^3.2.0",
|
|
45
45
|
"@atlaskit/media-client": "^33.3.0",
|
|
46
46
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/spinner": "^18.0.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
57
|
"@atlaskit/tokens": "^4.9.0",
|
|
58
|
-
"@atlaskit/tooltip": "^20.
|
|
58
|
+
"@atlaskit/tooltip": "^20.2.0",
|
|
59
59
|
"@atlaskit/ufo": "^0.4.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
"platform-filecard-ufo-trace": {
|
|
111
111
|
"type": "boolean"
|
|
112
112
|
},
|
|
113
|
+
"platform_media_add_ufo_custom_data": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
113
116
|
"platform.media-card-performance-observer_a803k": {
|
|
114
117
|
"type": "boolean"
|
|
115
118
|
},
|
|
@@ -139,6 +142,9 @@
|
|
|
139
142
|
},
|
|
140
143
|
"platform_media_video_captions": {
|
|
141
144
|
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"platform_media_resume_video_on_token_expiry": {
|
|
147
|
+
"type": "boolean"
|
|
142
148
|
}
|
|
143
149
|
},
|
|
144
150
|
"techstack": {
|