@atlaskit/media-viewer 49.6.0 → 49.6.2
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 +12 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/download.js +12 -7
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/download.js +7 -8
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/download.js +13 -8
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -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 = "49.6.
|
|
13
|
+
var packageVersion = exports.packageVersion = "49.6.2";
|
|
14
14
|
function getFileAttributes(fileState) {
|
|
15
15
|
if (!fileState) {
|
|
16
16
|
return {
|
|
@@ -12,7 +12,7 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
14
|
var packageName = "@atlaskit/media-viewer";
|
|
15
|
-
var packageVersion = "49.6.
|
|
15
|
+
var packageVersion = "49.6.2";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
package/dist/cjs/download.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.ToolbarDownloadButton = exports.ErrorViewDownloadButton = exports.DisabledToolbarDownloadButton = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -95,7 +96,10 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
95
96
|
traceContext = _ref3.traceContext,
|
|
96
97
|
iconBefore = _ref3.iconBefore,
|
|
97
98
|
children = _ref3.children;
|
|
98
|
-
var
|
|
99
|
+
var _useState = (0, _react.useState)(false),
|
|
100
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
101
|
+
isAbuseModalOpen = _useState2[0],
|
|
102
|
+
setIsAbuseModalOpen = _useState2[1];
|
|
99
103
|
var _useAnalyticsEvents2 = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
100
104
|
createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
|
|
101
105
|
var _useDownloadButtonDis = useDownloadButtonDisabledProps(mediaClient),
|
|
@@ -107,10 +111,12 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
107
111
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
108
112
|
traceContext: traceContext
|
|
109
113
|
});
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_abuseModal.AbuseModal, {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, shouldRenderAbuseModal && /*#__PURE__*/_react.default.createElement(_abuseModal.AbuseModal, {
|
|
115
|
+
isOpen: isAbuseModalOpen,
|
|
116
|
+
onConfirm: itemDownloader,
|
|
117
|
+
onClose: function onClose() {
|
|
118
|
+
return setIsAbuseModalOpen(false);
|
|
119
|
+
}
|
|
114
120
|
}), /*#__PURE__*/_react.default.createElement(DownloadButton, {
|
|
115
121
|
testId: testId,
|
|
116
122
|
appearance: appearance,
|
|
@@ -119,8 +125,7 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
119
125
|
tooltip: tooltip,
|
|
120
126
|
onClick: function onClick() {
|
|
121
127
|
if (shouldRenderAbuseModal) {
|
|
122
|
-
|
|
123
|
-
(_openModalRef$current = openModalRef.current) === null || _openModalRef$current === void 0 || _openModalRef$current.call(openModalRef);
|
|
128
|
+
setIsAbuseModalOpen(true);
|
|
124
129
|
} else {
|
|
125
130
|
itemDownloader();
|
|
126
131
|
}
|
|
@@ -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 = "49.6.
|
|
4
|
+
const packageVersion = "49.6.2";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
2
2
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
3
3
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
4
|
const packageName = "@atlaskit/media-viewer";
|
|
5
|
-
const packageVersion = "49.6.
|
|
5
|
+
const packageVersion = "49.6.2";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
package/dist/es2019/download.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
4
4
|
import { isErrorFileState, isExternalImageIdentifier } from '@atlaskit/media-client';
|
|
5
5
|
import { MediaButton, messages } from '@atlaskit/media-ui';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { useCallback, useState } from 'react';
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
8
8
|
import { createDownloadButtonClickedEvent } from './analytics/events/ui/downloadButtonClicked';
|
|
9
9
|
import { createDownloadFailedEventPayload, createDownloadSucceededEventPayload } from './analytics/events/operational/download';
|
|
@@ -77,7 +77,7 @@ const DownloadItem = ({
|
|
|
77
77
|
iconBefore,
|
|
78
78
|
children
|
|
79
79
|
}) => {
|
|
80
|
-
const
|
|
80
|
+
const [isAbuseModalOpen, setIsAbuseModalOpen] = useState(false);
|
|
81
81
|
const {
|
|
82
82
|
createAnalyticsEvent
|
|
83
83
|
} = useAnalyticsEvents();
|
|
@@ -91,10 +91,10 @@ const DownloadItem = ({
|
|
|
91
91
|
createAnalyticsEvent,
|
|
92
92
|
traceContext
|
|
93
93
|
});
|
|
94
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbuseModal, {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderAbuseModal && /*#__PURE__*/React.createElement(AbuseModal, {
|
|
95
|
+
isOpen: isAbuseModalOpen,
|
|
96
|
+
onConfirm: itemDownloader,
|
|
97
|
+
onClose: () => setIsAbuseModalOpen(false)
|
|
98
98
|
}), /*#__PURE__*/React.createElement(DownloadButton, {
|
|
99
99
|
testId: testId,
|
|
100
100
|
appearance: appearance,
|
|
@@ -103,8 +103,7 @@ const DownloadItem = ({
|
|
|
103
103
|
tooltip: tooltip,
|
|
104
104
|
onClick: () => {
|
|
105
105
|
if (shouldRenderAbuseModal) {
|
|
106
|
-
|
|
107
|
-
(_openModalRef$current = openModalRef.current) === null || _openModalRef$current === void 0 ? void 0 : _openModalRef$current.call(openModalRef);
|
|
106
|
+
setIsAbuseModalOpen(true);
|
|
108
107
|
} else {
|
|
109
108
|
itemDownloader();
|
|
110
109
|
}
|
|
@@ -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 = "49.6.
|
|
4
|
+
var packageVersion = "49.6.2";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -5,7 +5,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
var packageName = "@atlaskit/media-viewer";
|
|
8
|
-
var packageVersion = "49.6.
|
|
8
|
+
var packageVersion = "49.6.2";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
package/dist/esm/download.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
@@ -7,7 +8,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
8
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
8
9
|
import { isErrorFileState, isExternalImageIdentifier } from '@atlaskit/media-client';
|
|
9
10
|
import { MediaButton, messages } from '@atlaskit/media-ui';
|
|
10
|
-
import React, {
|
|
11
|
+
import React, { useCallback, useState } from 'react';
|
|
11
12
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
12
13
|
import { createDownloadButtonClickedEvent } from './analytics/events/ui/downloadButtonClicked';
|
|
13
14
|
import { createDownloadFailedEventPayload, createDownloadSucceededEventPayload } from './analytics/events/operational/download';
|
|
@@ -85,7 +86,10 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
85
86
|
traceContext = _ref3.traceContext,
|
|
86
87
|
iconBefore = _ref3.iconBefore,
|
|
87
88
|
children = _ref3.children;
|
|
88
|
-
var
|
|
89
|
+
var _useState = useState(false),
|
|
90
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
91
|
+
isAbuseModalOpen = _useState2[0],
|
|
92
|
+
setIsAbuseModalOpen = _useState2[1];
|
|
89
93
|
var _useAnalyticsEvents2 = useAnalyticsEvents(),
|
|
90
94
|
createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
|
|
91
95
|
var _useDownloadButtonDis = useDownloadButtonDisabledProps(mediaClient),
|
|
@@ -97,10 +101,12 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
97
101
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
98
102
|
traceContext: traceContext
|
|
99
103
|
});
|
|
100
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbuseModal, {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderAbuseModal && /*#__PURE__*/React.createElement(AbuseModal, {
|
|
105
|
+
isOpen: isAbuseModalOpen,
|
|
106
|
+
onConfirm: itemDownloader,
|
|
107
|
+
onClose: function onClose() {
|
|
108
|
+
return setIsAbuseModalOpen(false);
|
|
109
|
+
}
|
|
104
110
|
}), /*#__PURE__*/React.createElement(DownloadButton, {
|
|
105
111
|
testId: testId,
|
|
106
112
|
appearance: appearance,
|
|
@@ -109,8 +115,7 @@ var DownloadItem = function DownloadItem(_ref3) {
|
|
|
109
115
|
tooltip: tooltip,
|
|
110
116
|
onClick: function onClick() {
|
|
111
117
|
if (shouldRenderAbuseModal) {
|
|
112
|
-
|
|
113
|
-
(_openModalRef$current = openModalRef.current) === null || _openModalRef$current === void 0 || _openModalRef$current.call(openModalRef);
|
|
118
|
+
setIsAbuseModalOpen(true);
|
|
114
119
|
} else {
|
|
115
120
|
itemDownloader();
|
|
116
121
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "49.6.
|
|
3
|
+
"version": "49.6.2",
|
|
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/"
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@atlaskit/button": "^20.3.0",
|
|
39
39
|
"@atlaskit/code": "^15.6.0",
|
|
40
40
|
"@atlaskit/form": "^11.0.0",
|
|
41
|
-
"@atlaskit/icon": "^23.
|
|
41
|
+
"@atlaskit/icon": "^23.4.0",
|
|
42
42
|
"@atlaskit/icon-file-type": "^6.8.0",
|
|
43
|
-
"@atlaskit/media-client": "^
|
|
44
|
-
"@atlaskit/media-client-react": "^2.
|
|
43
|
+
"@atlaskit/media-client": "^30.0.0",
|
|
44
|
+
"@atlaskit/media-client-react": "^2.6.0",
|
|
45
45
|
"@atlaskit/media-common": "^11.7.0",
|
|
46
46
|
"@atlaskit/media-svg": "^1.0.0",
|
|
47
47
|
"@atlaskit/media-ui": "^27.3.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/spinner": "^16.3.0",
|
|
53
53
|
"@atlaskit/textfield": "^6.7.0",
|
|
54
54
|
"@atlaskit/theme": "^14.0.0",
|
|
55
|
-
"@atlaskit/tokens": "^
|
|
55
|
+
"@atlaskit/tokens": "^3.1.0",
|
|
56
56
|
"@atlaskit/tooltip": "^19.0.0",
|
|
57
57
|
"@atlaskit/ufo": "^0.3.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"@af/visual-regression": "*",
|
|
80
80
|
"@atlaskit/media-core": "^34.4.0",
|
|
81
81
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
82
|
-
"@atlaskit/media-state": "^1.
|
|
83
|
-
"@atlaskit/media-test-data": "^2.
|
|
82
|
+
"@atlaskit/media-state": "^1.5.0",
|
|
83
|
+
"@atlaskit/media-test-data": "^2.9.0",
|
|
84
84
|
"@atlaskit/media-test-helpers": "^34.7.0",
|
|
85
85
|
"@atlaskit/ssr": "*",
|
|
86
|
-
"@atlaskit/toggle": "14.0.
|
|
86
|
+
"@atlaskit/toggle": "14.0.3",
|
|
87
87
|
"@atlaskit/visual-regression": "*",
|
|
88
88
|
"@atlassian/feature-flags-test-utils": "*",
|
|
89
89
|
"@atlassian/ufo": "^0.4.0",
|