@atlaskit/media-viewer 52.5.4 → 52.5.5
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 +7 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/archiveSidebar/archive.js +4 -0
- package/dist/cjs/viewers/doc/index.js +5 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive.js +4 -0
- package/dist/es2019/viewers/doc/index.js +4 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive.js +4 -0
- package/dist/esm/viewers/doc/index.js +5 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 52.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`324d924df5712`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/324d924df5712) -
|
|
8
|
+
Emit media-viewed event for archive and document.
|
|
9
|
+
|
|
3
10
|
## 52.5.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ exports.packageVersion = exports.packageName = void 0;
|
|
|
10
10
|
var _analytics = require("@atlaskit/media-common/analytics");
|
|
11
11
|
var componentName = exports.component = exports.componentName = 'mediaViewer';
|
|
12
12
|
var packageName = exports.packageName = "@atlaskit/media-viewer";
|
|
13
|
-
var packageVersion = exports.packageVersion = "
|
|
13
|
+
var packageVersion = exports.packageVersion = "52.5.4";
|
|
14
14
|
function getFileAttributes(fileState) {
|
|
15
15
|
if (!fileState) {
|
|
16
16
|
return {
|
|
@@ -13,7 +13,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
15
|
var packageName = "@atlaskit/media-viewer";
|
|
16
|
-
var packageVersion = "
|
|
16
|
+
var packageVersion = "52.5.4";
|
|
17
17
|
var ufoExperience;
|
|
18
18
|
var getExperience = function getExperience() {
|
|
19
19
|
if (!ufoExperience) {
|
|
@@ -39,6 +39,7 @@ var _codeViewerRenderer = require("../codeViewer/codeViewerRenderer");
|
|
|
39
39
|
var _util = require("../codeViewer/util");
|
|
40
40
|
var _itemViewer = require("../../item-viewer");
|
|
41
41
|
var _nativePdfViewer = require("./nativePdfViewer");
|
|
42
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
42
43
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43
44
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
44
45
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -182,6 +183,9 @@ var ArchiveViewerBase = exports.ArchiveViewerBase = /*#__PURE__*/function (_Base
|
|
|
182
183
|
}))
|
|
183
184
|
});
|
|
184
185
|
_this.props.onSuccess();
|
|
186
|
+
if ((0, _platformFeatureFlags.fg)('download_event_for_jira_attachments')) {
|
|
187
|
+
_this.onMediaDisplayed();
|
|
188
|
+
}
|
|
185
189
|
});
|
|
186
190
|
return _this;
|
|
187
191
|
}
|
|
@@ -18,6 +18,7 @@ var _domain = require("../../domain");
|
|
|
18
18
|
var _baseViewer = require("../base-viewer");
|
|
19
19
|
var _zoomLevel = require("../../domain/zoomLevel");
|
|
20
20
|
var _docViewer = require("./doc-viewer");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
24
|
var DocViewer = exports.DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
@@ -62,7 +63,10 @@ var DocViewer = exports.DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
62
63
|
this.setState({
|
|
63
64
|
content: _domain.Outcome.successful(item.id)
|
|
64
65
|
});
|
|
65
|
-
|
|
66
|
+
if ((0, _platformFeatureFlags.fg)('download_event_for_jira_attachments')) {
|
|
67
|
+
this.onMediaDisplayed();
|
|
68
|
+
}
|
|
69
|
+
case 3:
|
|
66
70
|
case "end":
|
|
67
71
|
return _context.stop();
|
|
68
72
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "
|
|
4
|
+
const packageVersion = "52.5.4";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -3,7 +3,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
3
3
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
const packageName = "@atlaskit/media-viewer";
|
|
6
|
-
const packageVersion = "
|
|
6
|
+
const packageVersion = "52.5.4";
|
|
7
7
|
let ufoExperience;
|
|
8
8
|
const getExperience = () => {
|
|
9
9
|
if (!ufoExperience) {
|
|
@@ -26,6 +26,7 @@ import { CodeViewRenderer } from '../codeViewer/codeViewerRenderer';
|
|
|
26
26
|
import { DEFAULT_LANGUAGE } from '../codeViewer/util';
|
|
27
27
|
import { MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER } from '../../item-viewer';
|
|
28
28
|
import { NativePdfViewer } from './nativePdfViewer';
|
|
29
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
30
|
export const getArchiveEntriesFromFileState = async (fileState, mediaClient, collectionName) => {
|
|
30
31
|
const url = await mediaClient.file.getFileBinaryURL(fileState.id, collectionName);
|
|
31
32
|
const reader = new HTTPRangeReader(url);
|
|
@@ -105,6 +106,9 @@ export class ArchiveViewerBase extends BaseViewer {
|
|
|
105
106
|
})
|
|
106
107
|
});
|
|
107
108
|
this.props.onSuccess();
|
|
109
|
+
if (fg('download_event_for_jira_attachments')) {
|
|
110
|
+
this.onMediaDisplayed();
|
|
111
|
+
}
|
|
108
112
|
});
|
|
109
113
|
}
|
|
110
114
|
async init() {
|
|
@@ -4,6 +4,7 @@ import { Outcome } from '../../domain';
|
|
|
4
4
|
import { BaseViewer } from '../base-viewer';
|
|
5
5
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
6
6
|
import { DocViewer as DocViewerComponent } from './doc-viewer';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
export class DocViewer extends BaseViewer {
|
|
8
9
|
constructor(...args) {
|
|
9
10
|
super(...args);
|
|
@@ -30,6 +31,9 @@ export class DocViewer extends BaseViewer {
|
|
|
30
31
|
this.setState({
|
|
31
32
|
content: Outcome.successful(item.id)
|
|
32
33
|
});
|
|
34
|
+
if (fg('download_event_for_jira_attachments')) {
|
|
35
|
+
this.onMediaDisplayed();
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
release() {
|
|
35
39
|
if (!this.isObjectUrl) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "
|
|
4
|
+
var packageVersion = "52.5.4";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -6,7 +6,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
var packageName = "@atlaskit/media-viewer";
|
|
9
|
-
var packageVersion = "
|
|
9
|
+
var packageVersion = "52.5.4";
|
|
10
10
|
var ufoExperience;
|
|
11
11
|
var getExperience = function getExperience() {
|
|
12
12
|
if (!ufoExperience) {
|
|
@@ -37,6 +37,7 @@ import { CodeViewRenderer } from '../codeViewer/codeViewerRenderer';
|
|
|
37
37
|
import { DEFAULT_LANGUAGE } from '../codeViewer/util';
|
|
38
38
|
import { MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER } from '../../item-viewer';
|
|
39
39
|
import { NativePdfViewer } from './nativePdfViewer';
|
|
40
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
40
41
|
export var getArchiveEntriesFromFileState = /*#__PURE__*/function () {
|
|
41
42
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileState, mediaClient, collectionName) {
|
|
42
43
|
var url, reader, archive;
|
|
@@ -176,6 +177,9 @@ export var ArchiveViewerBase = /*#__PURE__*/function (_BaseViewer) {
|
|
|
176
177
|
}))
|
|
177
178
|
});
|
|
178
179
|
_this.props.onSuccess();
|
|
180
|
+
if (fg('download_event_for_jira_attachments')) {
|
|
181
|
+
_this.onMediaDisplayed();
|
|
182
|
+
}
|
|
179
183
|
});
|
|
180
184
|
return _this;
|
|
181
185
|
}
|
|
@@ -13,6 +13,7 @@ import { Outcome } from '../../domain';
|
|
|
13
13
|
import { BaseViewer } from '../base-viewer';
|
|
14
14
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
15
15
|
import { DocViewer as DocViewerComponent } from './doc-viewer';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
export var DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
17
18
|
function DocViewer() {
|
|
18
19
|
var _this;
|
|
@@ -55,7 +56,10 @@ export var DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
55
56
|
this.setState({
|
|
56
57
|
content: Outcome.successful(item.id)
|
|
57
58
|
});
|
|
58
|
-
|
|
59
|
+
if (fg('download_event_for_jira_attachments')) {
|
|
60
|
+
this.onMediaDisplayed();
|
|
61
|
+
}
|
|
62
|
+
case 3:
|
|
59
63
|
case "end":
|
|
60
64
|
return _context.stop();
|
|
61
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "52.5.
|
|
3
|
+
"version": "52.5.5",
|
|
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/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/button": "^23.9.0",
|
|
36
36
|
"@atlaskit/code": "^17.4.0",
|
|
37
37
|
"@atlaskit/css": "^0.19.0",
|
|
38
|
-
"@atlaskit/form": "^15.
|
|
38
|
+
"@atlaskit/form": "^15.2.0",
|
|
39
39
|
"@atlaskit/heading": "^5.2.0",
|
|
40
40
|
"@atlaskit/icon": "^29.3.0",
|
|
41
41
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@af/integration-testing": "workspace:^",
|
|
85
|
+
"@af/suppress-react-warnings": "workspace:^",
|
|
85
86
|
"@af/visual-regression": "workspace:^",
|
|
86
87
|
"@atlaskit/media-core": "^37.0.0",
|
|
87
88
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|