@atlaskit/media-viewer 47.2.2 → 47.3.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 +11 -0
- package/dist/cjs/analytics/events/operational/commenced.js +3 -2
- package/dist/cjs/analytics/events/operational/loadFailed.js +3 -2
- package/dist/cjs/analytics/events/operational/loadSucceeded.js +3 -2
- package/dist/cjs/analytics/index.js +1 -2
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/errorMessage.js +5 -4
- package/dist/cjs/item-viewer.js +11 -4
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/viewers/image/index.js +3 -3
- package/dist/es2019/analytics/events/operational/commenced.js +3 -2
- package/dist/es2019/analytics/events/operational/loadFailed.js +3 -2
- package/dist/es2019/analytics/events/operational/loadSucceeded.js +3 -2
- package/dist/es2019/analytics/index.js +1 -2
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/errorMessage.js +5 -4
- package/dist/es2019/item-viewer.js +11 -4
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/viewers/image/index.js +3 -2
- package/dist/esm/analytics/events/operational/commenced.js +3 -2
- package/dist/esm/analytics/events/operational/loadFailed.js +3 -2
- package/dist/esm/analytics/events/operational/loadSucceeded.js +3 -2
- package/dist/esm/analytics/index.js +1 -2
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/errorMessage.js +5 -4
- package/dist/esm/item-viewer.js +11 -4
- package/dist/esm/version.json +1 -1
- package/dist/esm/viewers/image/index.js +3 -3
- package/dist/types/analytics/events/operational/commenced.d.ts +3 -3
- package/dist/types/analytics/events/operational/loadFailed.d.ts +2 -1
- package/dist/types/analytics/events/operational/loadSucceeded.d.ts +3 -3
- package/dist/types/analytics/index.d.ts +2 -3
- package/dist/types/errorMessage.d.ts +3 -1
- package/dist/types/item-viewer.d.ts +1 -0
- package/dist/types/viewers/image/index.d.ts +2 -0
- package/package.json +6 -6
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 47.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2168c4e0d81`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2168c4e0d81) - Implement traceContext in media-viewer
|
|
8
|
+
- [`0bccac57db6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0bccac57db6) - remove mediaUploadApiV2 Feature flag
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 47.2.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createCommencedEvent = void 0;
|
|
7
7
|
|
|
8
|
-
var createCommencedEvent = function createCommencedEvent(fileId) {
|
|
8
|
+
var createCommencedEvent = function createCommencedEvent(fileId, traceContext) {
|
|
9
9
|
return {
|
|
10
10
|
eventType: 'operational',
|
|
11
11
|
action: 'commenced',
|
|
@@ -13,7 +13,8 @@ var createCommencedEvent = function createCommencedEvent(fileId) {
|
|
|
13
13
|
attributes: {
|
|
14
14
|
fileAttributes: {
|
|
15
15
|
fileId: fileId
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
traceContext: traceContext
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
};
|
|
@@ -9,7 +9,7 @@ var _ = require("../..");
|
|
|
9
9
|
|
|
10
10
|
var _errors = require("../../../errors");
|
|
11
11
|
|
|
12
|
-
var createLoadFailedEvent = function createLoadFailedEvent(fileId, error, fileState) {
|
|
12
|
+
var createLoadFailedEvent = function createLoadFailedEvent(fileId, error, fileState, traceContext) {
|
|
13
13
|
var _getFileAttributes = (0, _.getFileAttributes)(fileState),
|
|
14
14
|
fileMediatype = _getFileAttributes.fileMediatype,
|
|
15
15
|
fileMimetype = _getFileAttributes.fileMimetype,
|
|
@@ -30,7 +30,8 @@ var createLoadFailedEvent = function createLoadFailedEvent(fileId, error, fileSt
|
|
|
30
30
|
fileMediatype: fileMediatype,
|
|
31
31
|
fileMimetype: fileMimetype,
|
|
32
32
|
fileSize: fileSize
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createLoadSucceededEvent = void 0;
|
|
7
7
|
|
|
8
|
-
var createLoadSucceededEvent = function createLoadSucceededEvent(_ref) {
|
|
8
|
+
var createLoadSucceededEvent = function createLoadSucceededEvent(_ref, traceContext) {
|
|
9
9
|
var fileId = _ref.fileId,
|
|
10
10
|
fileMediatype = _ref.fileMediatype,
|
|
11
11
|
fileMimetype = _ref.fileMimetype,
|
|
@@ -22,7 +22,8 @@ var createLoadSucceededEvent = function createLoadSucceededEvent(_ref) {
|
|
|
22
22
|
fileMediatype: fileMediatype,
|
|
23
23
|
fileMimetype: fileMimetype,
|
|
24
24
|
fileSize: fileSize
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
};
|
|
@@ -14,7 +14,7 @@ var componentName = 'mediaViewer';
|
|
|
14
14
|
exports.component = exports.componentName = componentName;
|
|
15
15
|
var packageName = "@atlaskit/media-viewer";
|
|
16
16
|
exports.packageName = packageName;
|
|
17
|
-
var packageVersion = "47.
|
|
17
|
+
var packageVersion = "47.3.0";
|
|
18
18
|
exports.packageVersion = packageVersion;
|
|
19
19
|
var relevantFlags = {
|
|
20
20
|
newCardExperience: false,
|
|
@@ -23,7 +23,6 @@ var relevantFlags = {
|
|
|
23
23
|
observedWidth: false,
|
|
24
24
|
mediaInline: false,
|
|
25
25
|
folderUploads: false,
|
|
26
|
-
mediaUploadApiV2: true,
|
|
27
26
|
memoryCacheLogging: false
|
|
28
27
|
};
|
|
29
28
|
exports.relevantFlags = relevantFlags;
|
|
@@ -20,7 +20,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
20
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
21
|
|
|
22
22
|
var packageName = "@atlaskit/media-viewer";
|
|
23
|
-
var packageVersion = "47.
|
|
23
|
+
var packageVersion = "47.3.0";
|
|
24
24
|
var ufoExperience;
|
|
25
25
|
|
|
26
26
|
var getExperience = function getExperience() {
|
package/dist/cjs/errorMessage.js
CHANGED
|
@@ -103,10 +103,11 @@ var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
103
103
|
var supressAnalytics = props.supressAnalytics,
|
|
104
104
|
error = props.error,
|
|
105
105
|
fileState = props.fileState,
|
|
106
|
-
fileId = props.fileId
|
|
106
|
+
fileId = props.fileId,
|
|
107
|
+
traceContext = props.traceContext;
|
|
107
108
|
|
|
108
109
|
if (supressAnalytics !== true) {
|
|
109
|
-
var payload = ErrorMessage.getEventPayload(error, fileId, fileState);
|
|
110
|
+
var payload = ErrorMessage.getEventPayload(error, fileId, fileState, traceContext);
|
|
110
111
|
(0, _analytics.fireAnalytics)(payload, props);
|
|
111
112
|
|
|
112
113
|
var rawPayload = _objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.attributes), {}, {
|
|
@@ -135,12 +136,12 @@ var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
135
136
|
}
|
|
136
137
|
}], [{
|
|
137
138
|
key: "getEventPayload",
|
|
138
|
-
value: function getEventPayload(error, fileId, fileState) {
|
|
139
|
+
value: function getEventPayload(error, fileId, fileState, traceContext) {
|
|
139
140
|
if (fileState && (0, _errors.getPrimaryErrorReason)(error) === 'unsupported') {
|
|
140
141
|
// this is not an SLI, its just a useful metric for unsupported
|
|
141
142
|
return (0, _previewUnsupported.createPreviewUnsupportedEvent)(fileState);
|
|
142
143
|
} else {
|
|
143
|
-
return (0, _loadFailed.createLoadFailedEvent)(fileId, error, fileState);
|
|
144
|
+
return (0, _loadFailed.createLoadFailedEvent)(fileId, error, fileState, traceContext);
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
}]);
|
package/dist/cjs/item-viewer.js
CHANGED
|
@@ -61,6 +61,8 @@ var _interactiveImg = require("./viewers/image/interactive-img");
|
|
|
61
61
|
|
|
62
62
|
var _archiveViewerLoader = _interopRequireDefault(require("./viewers/archiveSidebar/archiveViewerLoader"));
|
|
63
63
|
|
|
64
|
+
var _mediaCommon = require("@atlaskit/media-common");
|
|
65
|
+
|
|
64
66
|
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
65
67
|
|
|
66
68
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -169,12 +171,15 @@ var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
169
171
|
wasStatusUploading: false,
|
|
170
172
|
wasStatusProcessing: false
|
|
171
173
|
});
|
|
174
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "traceContext", {
|
|
175
|
+
traceId: (0, _mediaCommon.getRandomHex)(8)
|
|
176
|
+
});
|
|
172
177
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSuccess", function () {
|
|
173
178
|
var item = _this.state.item;
|
|
174
179
|
item.whenSuccessful(function (fileItem) {
|
|
175
180
|
if (isFileStateItem(fileItem)) {
|
|
176
181
|
var fileAttributes = (0, _analytics.getFileAttributes)(fileItem);
|
|
177
|
-
(0, _analytics.fireAnalytics)((0, _loadSucceeded.createLoadSucceededEvent)(fileAttributes), _this.props);
|
|
182
|
+
(0, _analytics.fireAnalytics)((0, _loadSucceeded.createLoadSucceededEvent)(fileAttributes, _this.traceContext), _this.props);
|
|
178
183
|
(0, _ufoExperiences.succeedMediaFileUfoExperience)({
|
|
179
184
|
fileAttributes: fileAttributes,
|
|
180
185
|
fileStateFlags: _this.fileStateFlags
|
|
@@ -268,7 +273,8 @@ var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
268
273
|
return /*#__PURE__*/_react.default.createElement(ImageViewer, (0, _extends2.default)({
|
|
269
274
|
onLoad: this.onSuccess,
|
|
270
275
|
onError: this.onLoadFail,
|
|
271
|
-
contextId: contextId
|
|
276
|
+
contextId: contextId,
|
|
277
|
+
traceContext: this.traceContext
|
|
272
278
|
}, viewerProps));
|
|
273
279
|
|
|
274
280
|
case 'audio':
|
|
@@ -323,7 +329,8 @@ var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
323
329
|
fileId: (0, _mediaClient.isFileIdentifier)(identifier) ? identifier.id : 'undefined',
|
|
324
330
|
error: error,
|
|
325
331
|
fileState: fileState,
|
|
326
|
-
fileStateFlags: this.fileStateFlags
|
|
332
|
+
fileStateFlags: this.fileStateFlags,
|
|
333
|
+
traceContext: this.traceContext
|
|
327
334
|
}, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _mediaUi.messages.try_downloading_file)), this.renderDownloadButton(fileState, error));
|
|
328
335
|
} else {
|
|
329
336
|
return /*#__PURE__*/_react.default.createElement(_errorMessage.default, {
|
|
@@ -425,7 +432,7 @@ var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
425
432
|
}
|
|
426
433
|
|
|
427
434
|
var id = identifier.id;
|
|
428
|
-
(0, _analytics.fireAnalytics)((0, _commenced.createCommencedEvent)(id), this.props);
|
|
435
|
+
(0, _analytics.fireAnalytics)((0, _commenced.createCommencedEvent)(id, this.traceContext), this.props);
|
|
429
436
|
(0, _ufoExperiences.startMediaFileUfoExperience)();
|
|
430
437
|
this.subscription = mediaClient.file.getFileState(id, {
|
|
431
438
|
collectionName: identifier.collectionName
|
package/dist/cjs/version.json
CHANGED
|
@@ -89,13 +89,13 @@ var ImageViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
89
89
|
key: "init",
|
|
90
90
|
value: function () {
|
|
91
91
|
var _init = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
92
|
-
var _this$props, fileState, mediaClient, collectionName, orientation, objectUrl, originalBinaryImageUrl, isLocalFileReference, preview, _yield$preview, value, origin, item, controller, response, imgError;
|
|
92
|
+
var _this$props, fileState, mediaClient, collectionName, traceContext, orientation, objectUrl, originalBinaryImageUrl, isLocalFileReference, preview, _yield$preview, value, origin, item, controller, response, imgError;
|
|
93
93
|
|
|
94
94
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
95
95
|
while (1) {
|
|
96
96
|
switch (_context.prev = _context.next) {
|
|
97
97
|
case 0:
|
|
98
|
-
_this$props = this.props, fileState = _this$props.item, mediaClient = _this$props.mediaClient, collectionName = _this$props.collectionName;
|
|
98
|
+
_this$props = this.props, fileState = _this$props.item, mediaClient = _this$props.mediaClient, collectionName = _this$props.collectionName, traceContext = _this$props.traceContext;
|
|
99
99
|
|
|
100
100
|
if (!(fileState.status === 'error')) {
|
|
101
101
|
_context.next = 3;
|
|
@@ -156,7 +156,7 @@ var ImageViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
156
156
|
response = mediaClient.getImage(item.details.id, {
|
|
157
157
|
collection: collectionName,
|
|
158
158
|
mode: 'fit'
|
|
159
|
-
}, controller, true);
|
|
159
|
+
}, controller, true, traceContext);
|
|
160
160
|
|
|
161
161
|
this.cancelImageFetch = function () {
|
|
162
162
|
return controller && controller.abort();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export const createCommencedEvent = fileId => ({
|
|
1
|
+
export const createCommencedEvent = (fileId, traceContext) => ({
|
|
2
2
|
eventType: 'operational',
|
|
3
3
|
action: 'commenced',
|
|
4
4
|
actionSubject: 'mediaFile',
|
|
5
5
|
attributes: {
|
|
6
6
|
fileAttributes: {
|
|
7
7
|
fileId: fileId
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
|
+
traceContext
|
|
9
10
|
}
|
|
10
11
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getFileAttributes } from '../..';
|
|
2
2
|
import { getPrimaryErrorReason, getSecondaryErrorReason, getErrorDetail, getRequestMetadata } from '../../../errors';
|
|
3
|
-
export const createLoadFailedEvent = (fileId, error, fileState) => {
|
|
3
|
+
export const createLoadFailedEvent = (fileId, error, fileState, traceContext) => {
|
|
4
4
|
const {
|
|
5
5
|
fileMediatype,
|
|
6
6
|
fileMimetype,
|
|
@@ -21,7 +21,8 @@ export const createLoadFailedEvent = (fileId, error, fileState) => {
|
|
|
21
21
|
fileMediatype,
|
|
22
22
|
fileMimetype,
|
|
23
23
|
fileSize
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
};
|
|
@@ -3,7 +3,7 @@ export const createLoadSucceededEvent = ({
|
|
|
3
3
|
fileMediatype,
|
|
4
4
|
fileMimetype,
|
|
5
5
|
fileSize
|
|
6
|
-
}) => {
|
|
6
|
+
}, traceContext) => {
|
|
7
7
|
return {
|
|
8
8
|
eventType: 'operational',
|
|
9
9
|
actionSubject: 'mediaFile',
|
|
@@ -16,7 +16,8 @@ export const createLoadSucceededEvent = ({
|
|
|
16
16
|
fileMediatype,
|
|
17
17
|
fileMimetype,
|
|
18
18
|
fileSize
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts, ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "47.
|
|
4
|
+
const packageVersion = "47.3.0";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export const relevantFlags = {
|
|
7
7
|
newCardExperience: false,
|
|
@@ -10,7 +10,6 @@ export const relevantFlags = {
|
|
|
10
10
|
observedWidth: false,
|
|
11
11
|
mediaInline: false,
|
|
12
12
|
folderUploads: false,
|
|
13
|
-
mediaUploadApiV2: true,
|
|
14
13
|
memoryCacheLogging: false
|
|
15
14
|
};
|
|
16
15
|
export const LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
|
|
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
2
2
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
3
3
|
import { LOGGED_FEATURE_FLAG_KEYS } from '.';
|
|
4
4
|
const packageName = "@atlaskit/media-viewer";
|
|
5
|
-
const packageVersion = "47.
|
|
5
|
+
const packageVersion = "47.3.0";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
|
|
8
8
|
const getExperience = () => {
|
|
@@ -49,11 +49,12 @@ export class ErrorMessage extends React.Component {
|
|
|
49
49
|
supressAnalytics,
|
|
50
50
|
error,
|
|
51
51
|
fileState,
|
|
52
|
-
fileId
|
|
52
|
+
fileId,
|
|
53
|
+
traceContext
|
|
53
54
|
} = props;
|
|
54
55
|
|
|
55
56
|
if (supressAnalytics !== true) {
|
|
56
|
-
const payload = ErrorMessage.getEventPayload(error, fileId, fileState);
|
|
57
|
+
const payload = ErrorMessage.getEventPayload(error, fileId, fileState, traceContext);
|
|
57
58
|
fireAnalytics(payload, props);
|
|
58
59
|
const rawPayload = { ...(payload === null || payload === void 0 ? void 0 : payload.attributes),
|
|
59
60
|
fileStateFlags: props.fileStateFlags
|
|
@@ -68,12 +69,12 @@ export class ErrorMessage extends React.Component {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
static getEventPayload(error, fileId, fileState) {
|
|
72
|
+
static getEventPayload(error, fileId, fileState, traceContext) {
|
|
72
73
|
if (fileState && getPrimaryErrorReason(error) === 'unsupported') {
|
|
73
74
|
// this is not an SLI, its just a useful metric for unsupported
|
|
74
75
|
return createPreviewUnsupportedEvent(fileState);
|
|
75
76
|
} else {
|
|
76
|
-
return createLoadFailedEvent(fileId, error, fileState);
|
|
77
|
+
return createLoadFailedEvent(fileId, error, fileState, traceContext);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -18,6 +18,7 @@ import { createLoadSucceededEvent } from './analytics/events/operational/loadSuc
|
|
|
18
18
|
import { fireAnalytics, getFileAttributes } from './analytics';
|
|
19
19
|
import { InteractiveImg } from './viewers/image/interactive-img';
|
|
20
20
|
import ArchiveViewerLoader from './viewers/archiveSidebar/archiveViewerLoader';
|
|
21
|
+
import { getRandomHex } from '@atlaskit/media-common';
|
|
21
22
|
import { startMediaFileUfoExperience, succeedMediaFileUfoExperience } from './analytics/ufoExperiences';
|
|
22
23
|
const ImageViewer = Loadable({
|
|
23
24
|
loader: () => import('./viewers/image').then(mod => mod.ImageViewer),
|
|
@@ -56,6 +57,10 @@ export class ItemViewerBase extends React.Component {
|
|
|
56
57
|
wasStatusProcessing: false
|
|
57
58
|
});
|
|
58
59
|
|
|
60
|
+
_defineProperty(this, "traceContext", {
|
|
61
|
+
traceId: getRandomHex(8)
|
|
62
|
+
});
|
|
63
|
+
|
|
59
64
|
_defineProperty(this, "onSuccess", () => {
|
|
60
65
|
const {
|
|
61
66
|
item
|
|
@@ -63,7 +68,7 @@ export class ItemViewerBase extends React.Component {
|
|
|
63
68
|
item.whenSuccessful(fileItem => {
|
|
64
69
|
if (isFileStateItem(fileItem)) {
|
|
65
70
|
const fileAttributes = getFileAttributes(fileItem);
|
|
66
|
-
fireAnalytics(createLoadSucceededEvent(fileAttributes), this.props);
|
|
71
|
+
fireAnalytics(createLoadSucceededEvent(fileAttributes, this.traceContext), this.props);
|
|
67
72
|
succeedMediaFileUfoExperience({
|
|
68
73
|
fileAttributes,
|
|
69
74
|
fileStateFlags: this.fileStateFlags
|
|
@@ -154,7 +159,8 @@ export class ItemViewerBase extends React.Component {
|
|
|
154
159
|
return /*#__PURE__*/React.createElement(ImageViewer, _extends({
|
|
155
160
|
onLoad: this.onSuccess,
|
|
156
161
|
onError: this.onLoadFail,
|
|
157
|
-
contextId: contextId
|
|
162
|
+
contextId: contextId,
|
|
163
|
+
traceContext: this.traceContext
|
|
158
164
|
}, viewerProps));
|
|
159
165
|
|
|
160
166
|
case 'audio':
|
|
@@ -210,7 +216,8 @@ export class ItemViewerBase extends React.Component {
|
|
|
210
216
|
fileId: isFileIdentifier(identifier) ? identifier.id : 'undefined',
|
|
211
217
|
error: error,
|
|
212
218
|
fileState: fileState,
|
|
213
|
-
fileStateFlags: this.fileStateFlags
|
|
219
|
+
fileStateFlags: this.fileStateFlags,
|
|
220
|
+
traceContext: this.traceContext
|
|
214
221
|
}, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_downloading_file)), this.renderDownloadButton(fileState, error));
|
|
215
222
|
} else {
|
|
216
223
|
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
@@ -312,7 +319,7 @@ export class ItemViewerBase extends React.Component {
|
|
|
312
319
|
const {
|
|
313
320
|
id
|
|
314
321
|
} = identifier;
|
|
315
|
-
fireAnalytics(createCommencedEvent(id), this.props);
|
|
322
|
+
fireAnalytics(createCommencedEvent(id, this.traceContext), this.props);
|
|
316
323
|
startMediaFileUfoExperience();
|
|
317
324
|
this.subscription = mediaClient.file.getFileState(id, {
|
|
318
325
|
collectionName: identifier.collectionName
|
package/dist/es2019/version.json
CHANGED
|
@@ -40,7 +40,8 @@ export class ImageViewer extends BaseViewer {
|
|
|
40
40
|
const {
|
|
41
41
|
item: fileState,
|
|
42
42
|
mediaClient,
|
|
43
|
-
collectionName
|
|
43
|
+
collectionName,
|
|
44
|
+
traceContext
|
|
44
45
|
} = this.props;
|
|
45
46
|
|
|
46
47
|
if (fileState.status === 'error') {
|
|
@@ -75,7 +76,7 @@ export class ImageViewer extends BaseViewer {
|
|
|
75
76
|
const response = mediaClient.getImage(item.details.id, {
|
|
76
77
|
collection: collectionName,
|
|
77
78
|
mode: 'fit'
|
|
78
|
-
}, controller, true);
|
|
79
|
+
}, controller, true, traceContext);
|
|
79
80
|
|
|
80
81
|
this.cancelImageFetch = () => controller && controller.abort();
|
|
81
82
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export var createCommencedEvent = function createCommencedEvent(fileId) {
|
|
1
|
+
export var createCommencedEvent = function createCommencedEvent(fileId, traceContext) {
|
|
2
2
|
return {
|
|
3
3
|
eventType: 'operational',
|
|
4
4
|
action: 'commenced',
|
|
@@ -6,7 +6,8 @@ export var createCommencedEvent = function createCommencedEvent(fileId) {
|
|
|
6
6
|
attributes: {
|
|
7
7
|
fileAttributes: {
|
|
8
8
|
fileId: fileId
|
|
9
|
-
}
|
|
9
|
+
},
|
|
10
|
+
traceContext: traceContext
|
|
10
11
|
}
|
|
11
12
|
};
|
|
12
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getFileAttributes } from '../..';
|
|
2
2
|
import { getPrimaryErrorReason, getSecondaryErrorReason, getErrorDetail, getRequestMetadata } from '../../../errors';
|
|
3
|
-
export var createLoadFailedEvent = function createLoadFailedEvent(fileId, error, fileState) {
|
|
3
|
+
export var createLoadFailedEvent = function createLoadFailedEvent(fileId, error, fileState, traceContext) {
|
|
4
4
|
var _getFileAttributes = getFileAttributes(fileState),
|
|
5
5
|
fileMediatype = _getFileAttributes.fileMediatype,
|
|
6
6
|
fileMimetype = _getFileAttributes.fileMimetype,
|
|
@@ -21,7 +21,8 @@ export var createLoadFailedEvent = function createLoadFailedEvent(fileId, error,
|
|
|
21
21
|
fileMediatype: fileMediatype,
|
|
22
22
|
fileMimetype: fileMimetype,
|
|
23
23
|
fileSize: fileSize
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export var createLoadSucceededEvent = function createLoadSucceededEvent(_ref) {
|
|
1
|
+
export var createLoadSucceededEvent = function createLoadSucceededEvent(_ref, traceContext) {
|
|
2
2
|
var fileId = _ref.fileId,
|
|
3
3
|
fileMediatype = _ref.fileMediatype,
|
|
4
4
|
fileMimetype = _ref.fileMimetype,
|
|
@@ -15,7 +15,8 @@ export var createLoadSucceededEvent = function createLoadSucceededEvent(_ref) {
|
|
|
15
15
|
fileMediatype: fileMediatype,
|
|
16
16
|
fileMimetype: fileMimetype,
|
|
17
17
|
fileSize: fileSize
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
traceContext: fileMediatype === 'image' ? traceContext : undefined
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts, ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "47.
|
|
4
|
+
var packageVersion = "47.3.0";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export var relevantFlags = {
|
|
7
7
|
newCardExperience: false,
|
|
@@ -10,7 +10,6 @@ export var relevantFlags = {
|
|
|
10
10
|
observedWidth: false,
|
|
11
11
|
mediaInline: false,
|
|
12
12
|
folderUploads: false,
|
|
13
|
-
mediaUploadApiV2: true,
|
|
14
13
|
memoryCacheLogging: false
|
|
15
14
|
};
|
|
16
15
|
export var LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
|
|
@@ -8,7 +8,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
8
8
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
9
|
import { LOGGED_FEATURE_FLAG_KEYS } from '.';
|
|
10
10
|
var packageName = "@atlaskit/media-viewer";
|
|
11
|
-
var packageVersion = "47.
|
|
11
|
+
var packageVersion = "47.3.0";
|
|
12
12
|
var ufoExperience;
|
|
13
13
|
|
|
14
14
|
var getExperience = function getExperience() {
|
package/dist/esm/errorMessage.js
CHANGED
|
@@ -75,10 +75,11 @@ export var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
75
75
|
var supressAnalytics = props.supressAnalytics,
|
|
76
76
|
error = props.error,
|
|
77
77
|
fileState = props.fileState,
|
|
78
|
-
fileId = props.fileId
|
|
78
|
+
fileId = props.fileId,
|
|
79
|
+
traceContext = props.traceContext;
|
|
79
80
|
|
|
80
81
|
if (supressAnalytics !== true) {
|
|
81
|
-
var payload = ErrorMessage.getEventPayload(error, fileId, fileState);
|
|
82
|
+
var payload = ErrorMessage.getEventPayload(error, fileId, fileState, traceContext);
|
|
82
83
|
fireAnalytics(payload, props);
|
|
83
84
|
|
|
84
85
|
var rawPayload = _objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.attributes), {}, {
|
|
@@ -107,12 +108,12 @@ export var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
107
108
|
}
|
|
108
109
|
}], [{
|
|
109
110
|
key: "getEventPayload",
|
|
110
|
-
value: function getEventPayload(error, fileId, fileState) {
|
|
111
|
+
value: function getEventPayload(error, fileId, fileState, traceContext) {
|
|
111
112
|
if (fileState && getPrimaryErrorReason(error) === 'unsupported') {
|
|
112
113
|
// this is not an SLI, its just a useful metric for unsupported
|
|
113
114
|
return createPreviewUnsupportedEvent(fileState);
|
|
114
115
|
} else {
|
|
115
|
-
return createLoadFailedEvent(fileId, error, fileState);
|
|
116
|
+
return createLoadFailedEvent(fileId, error, fileState, traceContext);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
}]);
|
package/dist/esm/item-viewer.js
CHANGED
|
@@ -29,6 +29,7 @@ import { createLoadSucceededEvent } from './analytics/events/operational/loadSuc
|
|
|
29
29
|
import { fireAnalytics, getFileAttributes } from './analytics';
|
|
30
30
|
import { InteractiveImg } from './viewers/image/interactive-img';
|
|
31
31
|
import ArchiveViewerLoader from './viewers/archiveSidebar/archiveViewerLoader';
|
|
32
|
+
import { getRandomHex } from '@atlaskit/media-common';
|
|
32
33
|
import { startMediaFileUfoExperience, succeedMediaFileUfoExperience } from './analytics/ufoExperiences';
|
|
33
34
|
var ImageViewer = Loadable({
|
|
34
35
|
loader: function loader() {
|
|
@@ -113,12 +114,16 @@ export var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
113
114
|
wasStatusProcessing: false
|
|
114
115
|
});
|
|
115
116
|
|
|
117
|
+
_defineProperty(_assertThisInitialized(_this), "traceContext", {
|
|
118
|
+
traceId: getRandomHex(8)
|
|
119
|
+
});
|
|
120
|
+
|
|
116
121
|
_defineProperty(_assertThisInitialized(_this), "onSuccess", function () {
|
|
117
122
|
var item = _this.state.item;
|
|
118
123
|
item.whenSuccessful(function (fileItem) {
|
|
119
124
|
if (isFileStateItem(fileItem)) {
|
|
120
125
|
var fileAttributes = getFileAttributes(fileItem);
|
|
121
|
-
fireAnalytics(createLoadSucceededEvent(fileAttributes), _this.props);
|
|
126
|
+
fireAnalytics(createLoadSucceededEvent(fileAttributes, _this.traceContext), _this.props);
|
|
122
127
|
succeedMediaFileUfoExperience({
|
|
123
128
|
fileAttributes: fileAttributes,
|
|
124
129
|
fileStateFlags: _this.fileStateFlags
|
|
@@ -216,7 +221,8 @@ export var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
216
221
|
return /*#__PURE__*/React.createElement(ImageViewer, _extends({
|
|
217
222
|
onLoad: this.onSuccess,
|
|
218
223
|
onError: this.onLoadFail,
|
|
219
|
-
contextId: contextId
|
|
224
|
+
contextId: contextId,
|
|
225
|
+
traceContext: this.traceContext
|
|
220
226
|
}, viewerProps));
|
|
221
227
|
|
|
222
228
|
case 'audio':
|
|
@@ -271,7 +277,8 @@ export var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
271
277
|
fileId: isFileIdentifier(identifier) ? identifier.id : 'undefined',
|
|
272
278
|
error: error,
|
|
273
279
|
fileState: fileState,
|
|
274
|
-
fileStateFlags: this.fileStateFlags
|
|
280
|
+
fileStateFlags: this.fileStateFlags,
|
|
281
|
+
traceContext: this.traceContext
|
|
275
282
|
}, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_downloading_file)), this.renderDownloadButton(fileState, error));
|
|
276
283
|
} else {
|
|
277
284
|
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
@@ -373,7 +380,7 @@ export var ItemViewerBase = /*#__PURE__*/function (_React$Component) {
|
|
|
373
380
|
}
|
|
374
381
|
|
|
375
382
|
var id = identifier.id;
|
|
376
|
-
fireAnalytics(createCommencedEvent(id), this.props);
|
|
383
|
+
fireAnalytics(createCommencedEvent(id, this.traceContext), this.props);
|
|
377
384
|
startMediaFileUfoExperience();
|
|
378
385
|
this.subscription = mediaClient.file.getFileState(id, {
|
|
379
386
|
collectionName: identifier.collectionName
|
package/dist/esm/version.json
CHANGED
|
@@ -69,13 +69,13 @@ export var ImageViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
69
69
|
key: "init",
|
|
70
70
|
value: function () {
|
|
71
71
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
72
|
-
var _this$props, fileState, mediaClient, collectionName, orientation, objectUrl, originalBinaryImageUrl, isLocalFileReference, preview, _yield$preview, value, origin, item, controller, response, imgError;
|
|
72
|
+
var _this$props, fileState, mediaClient, collectionName, traceContext, orientation, objectUrl, originalBinaryImageUrl, isLocalFileReference, preview, _yield$preview, value, origin, item, controller, response, imgError;
|
|
73
73
|
|
|
74
74
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
75
75
|
while (1) {
|
|
76
76
|
switch (_context.prev = _context.next) {
|
|
77
77
|
case 0:
|
|
78
|
-
_this$props = this.props, fileState = _this$props.item, mediaClient = _this$props.mediaClient, collectionName = _this$props.collectionName;
|
|
78
|
+
_this$props = this.props, fileState = _this$props.item, mediaClient = _this$props.mediaClient, collectionName = _this$props.collectionName, traceContext = _this$props.traceContext;
|
|
79
79
|
|
|
80
80
|
if (!(fileState.status === 'error')) {
|
|
81
81
|
_context.next = 3;
|
|
@@ -136,7 +136,7 @@ export var ImageViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
136
136
|
response = mediaClient.getImage(item.details.id, {
|
|
137
137
|
collection: collectionName,
|
|
138
138
|
mode: 'fit'
|
|
139
|
-
}, controller, true);
|
|
139
|
+
}, controller, true, traceContext);
|
|
140
140
|
|
|
141
141
|
this.cancelImageFetch = function () {
|
|
142
142
|
return controller && controller.abort();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WithFileAttributes } from '@atlaskit/media-common';
|
|
1
|
+
import { MediaTraceContext, WithFileAttributes, WithTraceContext } from '@atlaskit/media-common';
|
|
2
2
|
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
|
-
export declare type CommencedAttributes = WithFileAttributes;
|
|
3
|
+
export declare type CommencedAttributes = WithFileAttributes & WithTraceContext;
|
|
4
4
|
export declare type CommencedEventPayload = MediaFileEventPayload<CommencedAttributes, 'commenced'>;
|
|
5
|
-
export declare const createCommencedEvent: (fileId: string) => CommencedEventPayload;
|
|
5
|
+
export declare const createCommencedEvent: (fileId: string, traceContext: MediaTraceContext) => CommencedEventPayload;
|
|
@@ -2,5 +2,6 @@ import { FileState } from '@atlaskit/media-client';
|
|
|
2
2
|
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
3
|
import { MediaViewerFailureAttributes } from '../..';
|
|
4
4
|
import { MediaViewerError } from '../../../errors';
|
|
5
|
+
import { MediaTraceContext } from '@atlaskit/media-common';
|
|
5
6
|
export declare type LoadFailedEventPayload = MediaFileEventPayload<MediaViewerFailureAttributes, 'loadFailed'>;
|
|
6
|
-
export declare const createLoadFailedEvent: (fileId: string, error: MediaViewerError, fileState?: FileState | undefined) => LoadFailedEventPayload;
|
|
7
|
+
export declare const createLoadFailedEvent: (fileId: string, error: MediaViewerError, fileState?: FileState | undefined, traceContext?: MediaTraceContext | undefined) => LoadFailedEventPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SuccessAttributes, WithFileAttributes, FileAttributes } from '@atlaskit/media-common';
|
|
1
|
+
import { SuccessAttributes, WithFileAttributes, FileAttributes, MediaTraceContext, WithTraceContext } from '@atlaskit/media-common';
|
|
2
2
|
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
|
-
export declare type LoadSucceededAttributes = SuccessAttributes & WithFileAttributes;
|
|
3
|
+
export declare type LoadSucceededAttributes = SuccessAttributes & WithFileAttributes & WithTraceContext;
|
|
4
4
|
export declare type LoadSucceededEventPayload = MediaFileEventPayload<LoadSucceededAttributes, 'loadSucceeded'>;
|
|
5
|
-
export declare const createLoadSucceededEvent: ({ fileId, fileMediatype, fileMimetype, fileSize
|
|
5
|
+
export declare const createLoadSucceededEvent: ({ fileId, fileMediatype, fileMimetype, fileSize }: FileAttributes, traceContext?: MediaTraceContext | undefined) => LoadSucceededEventPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileState, RequestMetadata } from '@atlaskit/media-client';
|
|
2
|
-
import { FileAttributes, WithFileAttributes, FailureAttributes } from '@atlaskit/media-common';
|
|
2
|
+
import { FileAttributes, WithFileAttributes, FailureAttributes, WithTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
4
|
import { PrimaryErrorReason } from '../errors';
|
|
5
5
|
import { MediaViewerEventPayload } from './events';
|
|
@@ -14,7 +14,6 @@ export declare const relevantFlags: {
|
|
|
14
14
|
observedWidth: boolean;
|
|
15
15
|
mediaInline: boolean;
|
|
16
16
|
folderUploads: boolean;
|
|
17
|
-
mediaUploadApiV2: boolean;
|
|
18
17
|
memoryCacheLogging: boolean;
|
|
19
18
|
};
|
|
20
19
|
export declare const LOGGED_FEATURE_FLAGS: (keyof import("@atlaskit/media-common").MediaFeatureFlags)[];
|
|
@@ -24,5 +23,5 @@ export declare function getFileAttributes(fileState?: FileState): FileAttributes
|
|
|
24
23
|
export declare type MediaViewerFailureAttributes = Omit<FailureAttributes, 'failReason'> & {
|
|
25
24
|
failReason: PrimaryErrorReason;
|
|
26
25
|
request?: RequestMetadata;
|
|
27
|
-
} & WithFileAttributes;
|
|
26
|
+
} & WithFileAttributes & WithTraceContext;
|
|
28
27
|
export declare function fireAnalytics(payload: MediaViewerEventPayload, props: WithAnalyticsEventsProps): void;
|
|
@@ -5,6 +5,7 @@ import { FileState } from '@atlaskit/media-client';
|
|
|
5
5
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
6
6
|
import { PrimaryErrorReason, SecondaryErrorReason, MediaViewerError } from './errors';
|
|
7
7
|
import { FileStateFlags } from './components/types';
|
|
8
|
+
import { MediaTraceContext } from '@atlaskit/media-common';
|
|
8
9
|
export declare type Props = Readonly<{
|
|
9
10
|
error: MediaViewerError;
|
|
10
11
|
supressAnalytics?: boolean;
|
|
@@ -12,6 +13,7 @@ export declare type Props = Readonly<{
|
|
|
12
13
|
fileState?: FileState;
|
|
13
14
|
children?: ReactNode;
|
|
14
15
|
fileStateFlags?: FileStateFlags;
|
|
16
|
+
traceContext?: MediaTraceContext;
|
|
15
17
|
}>;
|
|
16
18
|
export declare type FormatMessageFn = (messageDescriptor: MessageDescriptor) => string;
|
|
17
19
|
export declare const errorReasonToMessages: Array<[
|
|
@@ -22,7 +24,7 @@ export declare const getErrorMessageFromError: (error: MediaViewerError) => Mess
|
|
|
22
24
|
export declare class ErrorMessage extends React.Component<Props & WrappedComponentProps & WithAnalyticsEventsProps, {}> {
|
|
23
25
|
private getErrorInfo;
|
|
24
26
|
componentDidMount(): void;
|
|
25
|
-
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState): import("./analytics/events/operational/loadFailed").LoadFailedEventPayload | import("./analytics/events/operational/previewUnsupported").PreviewUnsupportedEventPayload;
|
|
27
|
+
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext): import("./analytics/events/operational/loadFailed").LoadFailedEventPayload | import("./analytics/events/operational/previewUnsupported").PreviewUnsupportedEventPayload;
|
|
26
28
|
render(): JSX.Element;
|
|
27
29
|
}
|
|
28
30
|
declare const ErroMsg: React.ComponentType<Props & WithAnalyticsEventsProps>;
|
|
@@ -24,6 +24,7 @@ export declare class ItemViewerBase extends React.Component<Props, State> {
|
|
|
24
24
|
state: State;
|
|
25
25
|
private subscription?;
|
|
26
26
|
private fileStateFlags;
|
|
27
|
+
private traceContext;
|
|
27
28
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
28
29
|
componentDidUpdate(oldProps: Props): void;
|
|
29
30
|
componentWillUnmount(): void;
|
|
@@ -3,6 +3,7 @@ import { MediaClient, FileState } from '@atlaskit/media-client';
|
|
|
3
3
|
import { Outcome } from '../../domain';
|
|
4
4
|
import { MediaViewerError } from '../../errors';
|
|
5
5
|
import { BaseViewer } from '../base-viewer';
|
|
6
|
+
import { MediaTraceContext } from '@atlaskit/media-common';
|
|
6
7
|
export declare type ObjectUrl = string;
|
|
7
8
|
export declare type ImageViewerProps = {
|
|
8
9
|
mediaClient: MediaClient;
|
|
@@ -12,6 +13,7 @@ export declare type ImageViewerProps = {
|
|
|
12
13
|
onError: (error: MediaViewerError) => void;
|
|
13
14
|
onClose?: () => void;
|
|
14
15
|
contextId?: string;
|
|
16
|
+
traceContext?: MediaTraceContext;
|
|
15
17
|
};
|
|
16
18
|
export interface ImageViewerContent {
|
|
17
19
|
objectUrl: ObjectUrl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.3.0",
|
|
4
4
|
"description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@atlaskit/code": "^14.4.0",
|
|
33
33
|
"@atlaskit/icon": "^21.11.0",
|
|
34
34
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
35
|
-
"@atlaskit/media-client": "^19.
|
|
36
|
-
"@atlaskit/media-common": "^2.
|
|
35
|
+
"@atlaskit/media-client": "^19.1.0",
|
|
36
|
+
"@atlaskit/media-common": "^2.18.0",
|
|
37
37
|
"@atlaskit/media-ui": "^22.2.0",
|
|
38
|
-
"@atlaskit/side-navigation": "^1.
|
|
38
|
+
"@atlaskit/side-navigation": "^1.5.0",
|
|
39
39
|
"@atlaskit/spinner": "^15.3.0",
|
|
40
40
|
"@atlaskit/theme": "^12.2.0",
|
|
41
41
|
"@atlaskit/tokens": "^0.13.0",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@atlaskit/button": "^16.5.0",
|
|
59
59
|
"@atlaskit/docs": "*",
|
|
60
|
-
"@atlaskit/media-card": "^74.
|
|
60
|
+
"@atlaskit/media-card": "^74.4.0",
|
|
61
61
|
"@atlaskit/media-core": "^34.0.0",
|
|
62
62
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
63
|
-
"@atlaskit/media-test-helpers": "^30.
|
|
63
|
+
"@atlaskit/media-test-helpers": "^30.1.0",
|
|
64
64
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
65
65
|
"@atlaskit/ssr": "*",
|
|
66
66
|
"@atlaskit/visual-regression": "*",
|
package/report.api.md
CHANGED