@atlaskit/media-viewer 52.5.2 → 52.5.4
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 +16 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/navigation.js +4 -4
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +15 -6
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-renderer.js +2 -1
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar.js +13 -7
- package/dist/cjs/viewers/archiveSidebar/archive.js +2 -2
- package/dist/cjs/viewers/audio.js +2 -2
- package/dist/cjs/viewers/doc/passwordInput.js +4 -4
- package/dist/cjs/zoomControls.js +4 -4
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/navigation.js +2 -2
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +11 -0
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-renderer.js +2 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar.js +13 -6
- package/dist/es2019/viewers/archiveSidebar/archive.js +1 -1
- package/dist/es2019/viewers/audio.js +1 -1
- package/dist/es2019/viewers/doc/passwordInput.js +2 -2
- package/dist/es2019/zoomControls.js +2 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/navigation.js +2 -2
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +15 -6
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-renderer.js +2 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar.js +13 -7
- package/dist/esm/viewers/archiveSidebar/archive.js +1 -1
- package/dist/esm/viewers/audio.js +1 -1
- package/dist/esm/viewers/doc/passwordInput.js +2 -2
- package/dist/esm/zoomControls.js +2 -2
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +1 -0
- package/dist/types/viewers/archiveSidebar/archive-sidebar.d.ts +1 -0
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +1 -0
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar.d.ts +1 -0
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 52.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5f53f075991b4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f53f075991b4) -
|
|
8
|
+
Updated archive viewer to emit media-viewed event on child file download
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 52.5.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`6a82d7964a37b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a82d7964a37b) -
|
|
16
|
+
Icon entrypoint migration
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 52.5.2
|
|
4
20
|
|
|
5
21
|
### 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 = "0.0.0-development";
|
|
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 = "0.0.0-development";
|
|
17
17
|
var ufoExperience;
|
|
18
18
|
var getExperience = function getExperience() {
|
|
19
19
|
if (!ufoExperience) {
|
package/dist/cjs/navigation.js
CHANGED
|
@@ -12,8 +12,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _chevronLeft = _interopRequireDefault(require("@atlaskit/icon/core/chevron-left"));
|
|
16
|
+
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
18
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
19
|
var _styleWrappers = require("./styleWrappers");
|
|
@@ -73,8 +73,8 @@ var withIconWrapper = function withIconWrapper(Component) {
|
|
|
73
73
|
}));
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
var NextIcon = withIconWrapper(
|
|
77
|
-
var PreviousIcon = withIconWrapper(
|
|
76
|
+
var NextIcon = withIconWrapper(_chevronRight.default);
|
|
77
|
+
var PreviousIcon = withIconWrapper(_chevronLeft.default);
|
|
78
78
|
var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component) {
|
|
79
79
|
function NavigationBase() {
|
|
80
80
|
(0, _classCallCheck2.default)(this, NavigationBase);
|
|
@@ -17,6 +17,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _ = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/folder/24"));
|
|
18
18
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
19
19
|
var _mediaTypeIcon = require("@atlaskit/media-ui/media-type-icon");
|
|
20
|
+
var _mediaClient = require("@atlaskit/media-client");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
22
|
var _styleWrappers = require("./styleWrappers");
|
|
21
23
|
var _utils = require("../../utils");
|
|
22
24
|
var _customButtonItem = require("./custom-button-item");
|
|
@@ -91,21 +93,28 @@ var ArchiveSidebarFolderEntryBase = /*#__PURE__*/function (_React$Component) {
|
|
|
91
93
|
});
|
|
92
94
|
case 3:
|
|
93
95
|
blob = _context.sent;
|
|
94
|
-
name = _this.formatName(root, entry.name);
|
|
96
|
+
name = _this.formatName(root, entry.name); // Emit media-viewed event if feature flag is enabled
|
|
97
|
+
if (_this.props.fileId && (0, _platformFeatureFlags.fg)('download_event_for_jira_attachments')) {
|
|
98
|
+
_mediaClient.globalMediaEventEmitter.emit('media-viewed', {
|
|
99
|
+
fileId: _this.props.fileId,
|
|
100
|
+
viewingLevel: 'download',
|
|
101
|
+
childFileName: name
|
|
102
|
+
});
|
|
103
|
+
}
|
|
95
104
|
(0, _mediaCommon.downloadUrl)(URL.createObjectURL(blob), {
|
|
96
105
|
name: name
|
|
97
106
|
});
|
|
98
|
-
_context.next =
|
|
107
|
+
_context.next = 12;
|
|
99
108
|
break;
|
|
100
|
-
case
|
|
101
|
-
_context.prev =
|
|
109
|
+
case 9:
|
|
110
|
+
_context.prev = 9;
|
|
102
111
|
_context.t0 = _context["catch"](0);
|
|
103
112
|
_this.props.onError(_context.t0, entry);
|
|
104
|
-
case
|
|
113
|
+
case 12:
|
|
105
114
|
case "end":
|
|
106
115
|
return _context.stop();
|
|
107
116
|
}
|
|
108
|
-
}, _callee, null, [[0,
|
|
117
|
+
}, _callee, null, [[0, 9]]);
|
|
109
118
|
}));
|
|
110
119
|
return function (_x, _x2) {
|
|
111
120
|
return _ref.apply(this, arguments);
|
|
@@ -100,7 +100,8 @@ var ArchiveSidebarRenderer = exports.default = /*#__PURE__*/function (_Component
|
|
|
100
100
|
mediaClient: mediaClient,
|
|
101
101
|
isArchiveEntryLoading: isArchiveEntryLoading,
|
|
102
102
|
onError: onError,
|
|
103
|
-
shouldRenderAbuseModal: !(0, _mediaClient.isErrorFileState)(selectedFileState) && !!selectedFileState.abuseClassification
|
|
103
|
+
shouldRenderAbuseModal: !(0, _mediaClient.isErrorFileState)(selectedFileState) && !!selectedFileState.abuseClassification,
|
|
104
|
+
fileId: selectedFileState.id
|
|
104
105
|
}));
|
|
105
106
|
}
|
|
106
107
|
}]);
|
|
@@ -48,6 +48,7 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
48
48
|
case 5:
|
|
49
49
|
archive = _context.sent;
|
|
50
50
|
Object.values(archive.entries).forEach(function (zipEntry) {
|
|
51
|
+
// eslint-disable-next-line no-param-reassign
|
|
51
52
|
zipEntry.name = _this.state.currentArchiveSidebarFolder.name + zipEntry.name;
|
|
52
53
|
});
|
|
53
54
|
return _context.abrupt("return", archive);
|
|
@@ -103,7 +104,7 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
103
104
|
}());
|
|
104
105
|
(0, _defineProperty2.default)(_this, "onFolderEntrySelected", /*#__PURE__*/function () {
|
|
105
106
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(folder, isArchive) {
|
|
106
|
-
var _this$props, entries, mediaClient, folderName, archiveEntries, _this$props2, isArchiveEntryLoading, onError, shouldRenderAbuseModal, currentFolderName;
|
|
107
|
+
var _this$props, entries, mediaClient, folderName, archiveEntries, _this$props2, isArchiveEntryLoading, onError, shouldRenderAbuseModal, fileId, currentFolderName;
|
|
107
108
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
108
109
|
while (1) switch (_context3.prev = _context3.next) {
|
|
109
110
|
case 0:
|
|
@@ -119,7 +120,7 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
119
120
|
entries = _objectSpread(_objectSpread({}, entries), archiveEntries);
|
|
120
121
|
folderName = (0, _utils.extractArchiveFolderName)(folder.name);
|
|
121
122
|
case 7:
|
|
122
|
-
_this$props2 = _this.props, isArchiveEntryLoading = _this$props2.isArchiveEntryLoading, onError = _this$props2.onError, shouldRenderAbuseModal = _this$props2.shouldRenderAbuseModal;
|
|
123
|
+
_this$props2 = _this.props, isArchiveEntryLoading = _this$props2.isArchiveEntryLoading, onError = _this$props2.onError, shouldRenderAbuseModal = _this$props2.shouldRenderAbuseModal, fileId = _this$props2.fileId;
|
|
123
124
|
currentFolderName = folderName || folder.name;
|
|
124
125
|
_this.setState({
|
|
125
126
|
currentArchiveSidebarFolder: {
|
|
@@ -130,7 +131,8 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
130
131
|
onEntrySelected: _this.onEntrySelected,
|
|
131
132
|
mediaClient: mediaClient,
|
|
132
133
|
onError: onError,
|
|
133
|
-
shouldRenderAbuseModal: shouldRenderAbuseModal
|
|
134
|
+
shouldRenderAbuseModal: shouldRenderAbuseModal,
|
|
135
|
+
fileId: fileId
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
138
|
case 10:
|
|
@@ -150,7 +152,8 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
150
152
|
onHeaderClicked = _this$props3.onHeaderClicked,
|
|
151
153
|
isArchiveEntryLoading = _this$props3.isArchiveEntryLoading,
|
|
152
154
|
onError = _this$props3.onError,
|
|
153
|
-
shouldRenderAbuseModal = _this$props3.shouldRenderAbuseModal
|
|
155
|
+
shouldRenderAbuseModal = _this$props3.shouldRenderAbuseModal,
|
|
156
|
+
fileId = _this$props3.fileId;
|
|
154
157
|
var folderParent = (0, _utils.getFolderParent)(_this.state.currentArchiveSidebarFolder.root);
|
|
155
158
|
_this.setState({
|
|
156
159
|
currentArchiveSidebarFolder: {
|
|
@@ -161,7 +164,8 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
161
164
|
onEntrySelected: _this.onEntrySelected,
|
|
162
165
|
mediaClient: mediaClient,
|
|
163
166
|
onError: onError,
|
|
164
|
-
shouldRenderAbuseModal: shouldRenderAbuseModal
|
|
167
|
+
shouldRenderAbuseModal: shouldRenderAbuseModal,
|
|
168
|
+
fileId: fileId
|
|
165
169
|
}
|
|
166
170
|
});
|
|
167
171
|
|
|
@@ -172,7 +176,8 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
172
176
|
_entries = props.entries,
|
|
173
177
|
_mediaClient = props.mediaClient,
|
|
174
178
|
_onError = props.onError,
|
|
175
|
-
_shouldRenderAbuseModal = props.shouldRenderAbuseModal
|
|
179
|
+
_shouldRenderAbuseModal = props.shouldRenderAbuseModal,
|
|
180
|
+
_fileId = props.fileId;
|
|
176
181
|
_this.state = {
|
|
177
182
|
currentArchiveSidebarFolder: {
|
|
178
183
|
isArchiveEntryLoading: _isArchiveEntryLoading,
|
|
@@ -183,7 +188,8 @@ var ArchiveSidebar = exports.ArchiveSidebar = /*#__PURE__*/function (_React$Comp
|
|
|
183
188
|
hideHeader: true,
|
|
184
189
|
mediaClient: _mediaClient,
|
|
185
190
|
onError: _onError,
|
|
186
|
-
shouldRenderAbuseModal: _shouldRenderAbuseModal
|
|
191
|
+
shouldRenderAbuseModal: _shouldRenderAbuseModal,
|
|
192
|
+
fileId: _fileId
|
|
187
193
|
}
|
|
188
194
|
};
|
|
189
195
|
return _this;
|
|
@@ -21,7 +21,7 @@ var _codeViewer = require("@atlaskit/media-ui/codeViewer");
|
|
|
21
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
22
|
var _domain = require("../../domain");
|
|
23
23
|
var _styleWrappers = require("../../styleWrappers");
|
|
24
|
-
var
|
|
24
|
+
var _audio = _interopRequireDefault(require("@atlaskit/icon/core/audio"));
|
|
25
25
|
var _errorMessage = _interopRequireDefault(require("../../errorMessage"));
|
|
26
26
|
var _baseViewer = require("../base-viewer");
|
|
27
27
|
var _interactiveImg = require("../image/interactive-img");
|
|
@@ -342,7 +342,7 @@ var ArchiveViewerBase = exports.ArchiveViewerBase = /*#__PURE__*/function (_Base
|
|
|
342
342
|
case 'audio':
|
|
343
343
|
return /*#__PURE__*/_react.default.createElement(_styleWrappers2.ArchiveItemViewerWrapper, null, /*#__PURE__*/_react.default.createElement(_styleWrappers.AudioPlayer, {
|
|
344
344
|
"data-testid": "media-viewer-audio-content"
|
|
345
|
-
}, /*#__PURE__*/_react.default.createElement(_styleWrappers.DefaultCoverWrapper, null, /*#__PURE__*/_react.default.createElement(
|
|
345
|
+
}, /*#__PURE__*/_react.default.createElement(_styleWrappers.DefaultCoverWrapper, null, /*#__PURE__*/_react.default.createElement(_audio.default, {
|
|
346
346
|
label: "cover",
|
|
347
347
|
LEGACY_size: "xlarge",
|
|
348
348
|
color: "currentColor"
|
|
@@ -15,7 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _mediaClient = require("@atlaskit/media-client");
|
|
18
|
-
var
|
|
18
|
+
var _audio = _interopRequireDefault(require("@atlaskit/icon/core/audio"));
|
|
19
19
|
var _domain = require("../domain");
|
|
20
20
|
var _errors = require("../errors");
|
|
21
21
|
var _styleWrappers = require("../styleWrappers");
|
|
@@ -25,7 +25,7 @@ var _mediaUi = require("@atlaskit/media-ui");
|
|
|
25
25
|
var _getObjectUrlFromFileState = require("../utils/getObjectUrlFromFileState");
|
|
26
26
|
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)); }
|
|
27
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
-
var defaultCover = /*#__PURE__*/_react.default.createElement(_styleWrappers.DefaultCoverWrapper, null, /*#__PURE__*/_react.default.createElement(
|
|
28
|
+
var defaultCover = /*#__PURE__*/_react.default.createElement(_styleWrappers.DefaultCoverWrapper, null, /*#__PURE__*/_react.default.createElement(_audio.default, {
|
|
29
29
|
label: "cover",
|
|
30
30
|
LEGACY_size: "xlarge",
|
|
31
31
|
color: "currentColor"
|
|
@@ -15,12 +15,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
17
17
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
18
|
-
var
|
|
18
|
+
var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locked"));
|
|
19
19
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
20
20
|
var _reactIntlNext = require("react-intl-next");
|
|
21
21
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
22
22
|
var _primitives = require("@atlaskit/primitives");
|
|
23
|
-
var
|
|
23
|
+
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
24
24
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
25
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
26
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
@@ -72,7 +72,7 @@ var PasswordInput = exports.PasswordInput = function PasswordInput(_ref) {
|
|
|
72
72
|
submitting = _ref2.submitting;
|
|
73
73
|
return /*#__PURE__*/React.createElement("form", formProps, /*#__PURE__*/React.createElement(_primitives.Flex, {
|
|
74
74
|
justifyContent: "center"
|
|
75
|
-
}, /*#__PURE__*/React.createElement(
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_lockLocked.default, {
|
|
76
76
|
label: "",
|
|
77
77
|
LEGACY_size: "xlarge",
|
|
78
78
|
color: COLOR_SHADE
|
|
@@ -104,7 +104,7 @@ var PasswordInput = exports.PasswordInput = function PasswordInput(_ref) {
|
|
|
104
104
|
})), formError && /*#__PURE__*/React.createElement("div", {
|
|
105
105
|
id: "".concat(fieldProps.id, "-error"),
|
|
106
106
|
className: (0, _runtime.ax)(["_11c8dcr7 _19pk1b66 _1e0c1txw _4cvr1h6o _syaz1366 _125x1366"])
|
|
107
|
-
}, /*#__PURE__*/React.createElement(
|
|
107
|
+
}, /*#__PURE__*/React.createElement(_statusError.default, {
|
|
108
108
|
color: "currentColor",
|
|
109
109
|
LEGACY_size: "small",
|
|
110
110
|
label: "",
|
package/dist/cjs/zoomControls.js
CHANGED
|
@@ -14,8 +14,8 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var _zoomOut = _interopRequireDefault(require("@atlaskit/icon/core/zoom-out"));
|
|
18
|
+
var _zoomIn = _interopRequireDefault(require("@atlaskit/icon/core/zoom-in"));
|
|
19
19
|
var _styleWrappers = require("./styleWrappers");
|
|
20
20
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
21
|
var _analytics = require("./analytics/");
|
|
@@ -73,7 +73,7 @@ var ZoomControlsBase = exports.ZoomControlsBase = /*#__PURE__*/function (_Compon
|
|
|
73
73
|
}, /*#__PURE__*/_react.default.createElement(_styleWrappers.ZoomCenterControls, null, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaButton, {
|
|
74
74
|
isDisabled: !zoomLevel.canZoomOut,
|
|
75
75
|
onClick: this.zoomOut,
|
|
76
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
76
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_zoomOut.default, {
|
|
77
77
|
color: "currentColor",
|
|
78
78
|
spacing: "spacious",
|
|
79
79
|
label: formatMessage(_mediaUi.messages.zoom_out)
|
|
@@ -81,7 +81,7 @@ var ZoomControlsBase = exports.ZoomControlsBase = /*#__PURE__*/function (_Compon
|
|
|
81
81
|
}), /*#__PURE__*/_react.default.createElement(_mediaUi.MediaButton, {
|
|
82
82
|
isDisabled: !zoomLevel.canZoomIn,
|
|
83
83
|
onClick: this.zoomIn,
|
|
84
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
84
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_zoomIn.default, {
|
|
85
85
|
color: "currentColor",
|
|
86
86
|
spacing: "spacious",
|
|
87
87
|
label: formatMessage(_mediaUi.messages.zoom_in)
|
|
@@ -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 = "0.0.0-development";
|
|
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 = "0.0.0-development";
|
|
7
7
|
let ufoExperience;
|
|
8
8
|
const getExperience = () => {
|
|
9
9
|
if (!ufoExperience) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Component } from 'react';
|
|
4
|
-
import ArrowLeftCircleIcon from '@atlaskit/icon/core/
|
|
5
|
-
import ArrowRightCircleIcon from '@atlaskit/icon/core/
|
|
4
|
+
import ArrowLeftCircleIcon from '@atlaskit/icon/core/chevron-left';
|
|
5
|
+
import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
|
|
6
6
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
7
7
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
8
8
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import Folder24Icon from '@atlaskit/icon-file-type/glyph/folder/24';
|
|
4
4
|
import { downloadUrl } from '@atlaskit/media-common';
|
|
5
5
|
import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
|
|
6
|
+
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
8
|
import { ArchiveSidebarFolderWrapper, ArchiveSidebarFileEntryWrapper, SidebarItemWrapper } from './styleWrappers';
|
|
7
9
|
import { getMediaTypeFromFilename, isMacPrivateFile, rejectAfter } from '../../utils';
|
|
8
10
|
import { CustomButtonItem } from './custom-button-item';
|
|
@@ -59,6 +61,15 @@ class ArchiveSidebarFolderEntryBase extends React.Component {
|
|
|
59
61
|
try {
|
|
60
62
|
const blob = await rejectAfter(() => entry.blob());
|
|
61
63
|
const name = this.formatName(root, entry.name);
|
|
64
|
+
|
|
65
|
+
// Emit media-viewed event if feature flag is enabled
|
|
66
|
+
if (this.props.fileId && fg('download_event_for_jira_attachments')) {
|
|
67
|
+
globalMediaEventEmitter.emit('media-viewed', {
|
|
68
|
+
fileId: this.props.fileId,
|
|
69
|
+
viewingLevel: 'download',
|
|
70
|
+
childFileName: name
|
|
71
|
+
});
|
|
72
|
+
}
|
|
62
73
|
downloadUrl(URL.createObjectURL(blob), {
|
|
63
74
|
name
|
|
64
75
|
});
|
|
@@ -58,7 +58,8 @@ export default class ArchiveSidebarRenderer extends Component {
|
|
|
58
58
|
mediaClient: mediaClient,
|
|
59
59
|
isArchiveEntryLoading: isArchiveEntryLoading,
|
|
60
60
|
onError: onError,
|
|
61
|
-
shouldRenderAbuseModal: !isErrorFileState(selectedFileState) && !!selectedFileState.abuseClassification
|
|
61
|
+
shouldRenderAbuseModal: !isErrorFileState(selectedFileState) && !!selectedFileState.abuseClassification,
|
|
62
|
+
fileId: selectedFileState.id
|
|
62
63
|
}));
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -13,6 +13,7 @@ export class ArchiveSidebar extends React.Component {
|
|
|
13
13
|
const blob = await rejectAfter(() => entry.blob());
|
|
14
14
|
const archive = await rejectAfter(() => unzip(blob));
|
|
15
15
|
Object.values(archive.entries).forEach(zipEntry => {
|
|
16
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
17
|
zipEntry.name = this.state.currentArchiveSidebarFolder.name + zipEntry.name;
|
|
17
18
|
});
|
|
18
19
|
return archive;
|
|
@@ -48,7 +49,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
48
49
|
const {
|
|
49
50
|
isArchiveEntryLoading,
|
|
50
51
|
onError,
|
|
51
|
-
shouldRenderAbuseModal
|
|
52
|
+
shouldRenderAbuseModal,
|
|
53
|
+
fileId
|
|
52
54
|
} = this.props;
|
|
53
55
|
const currentFolderName = folderName || folder.name;
|
|
54
56
|
this.setState({
|
|
@@ -60,7 +62,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
60
62
|
onEntrySelected: this.onEntrySelected,
|
|
61
63
|
mediaClient,
|
|
62
64
|
onError,
|
|
63
|
-
shouldRenderAbuseModal
|
|
65
|
+
shouldRenderAbuseModal,
|
|
66
|
+
fileId
|
|
64
67
|
}
|
|
65
68
|
});
|
|
66
69
|
});
|
|
@@ -71,7 +74,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
71
74
|
onHeaderClicked,
|
|
72
75
|
isArchiveEntryLoading,
|
|
73
76
|
onError,
|
|
74
|
-
shouldRenderAbuseModal
|
|
77
|
+
shouldRenderAbuseModal,
|
|
78
|
+
fileId
|
|
75
79
|
} = this.props;
|
|
76
80
|
const folderParent = getFolderParent(this.state.currentArchiveSidebarFolder.root);
|
|
77
81
|
this.setState({
|
|
@@ -83,7 +87,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
83
87
|
onEntrySelected: this.onEntrySelected,
|
|
84
88
|
mediaClient,
|
|
85
89
|
onError,
|
|
86
|
-
shouldRenderAbuseModal
|
|
90
|
+
shouldRenderAbuseModal,
|
|
91
|
+
fileId
|
|
87
92
|
}
|
|
88
93
|
});
|
|
89
94
|
|
|
@@ -95,7 +100,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
95
100
|
entries: _entries,
|
|
96
101
|
mediaClient: _mediaClient,
|
|
97
102
|
onError: _onError,
|
|
98
|
-
shouldRenderAbuseModal: _shouldRenderAbuseModal
|
|
103
|
+
shouldRenderAbuseModal: _shouldRenderAbuseModal,
|
|
104
|
+
fileId: _fileId
|
|
99
105
|
} = props;
|
|
100
106
|
this.state = {
|
|
101
107
|
currentArchiveSidebarFolder: {
|
|
@@ -107,7 +113,8 @@ export class ArchiveSidebar extends React.Component {
|
|
|
107
113
|
hideHeader: true,
|
|
108
114
|
mediaClient: _mediaClient,
|
|
109
115
|
onError: _onError,
|
|
110
|
-
shouldRenderAbuseModal: _shouldRenderAbuseModal
|
|
116
|
+
shouldRenderAbuseModal: _shouldRenderAbuseModal,
|
|
117
|
+
fileId: _fileId
|
|
111
118
|
}
|
|
112
119
|
};
|
|
113
120
|
}
|
|
@@ -8,7 +8,7 @@ import { getLanguageType, isCodeViewerItem } from '@atlaskit/media-ui/codeViewer
|
|
|
8
8
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { Outcome } from '../../domain';
|
|
10
10
|
import { CustomVideoPlayerWrapper, AudioPlayer, CustomAudioPlayerWrapper, DefaultCoverWrapper, ListWrapper } from '../../styleWrappers';
|
|
11
|
-
import AudioIcon from '@atlaskit/icon/core/
|
|
11
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
12
12
|
import ErrorMessage from '../../errorMessage';
|
|
13
13
|
import { BaseViewer } from '../base-viewer';
|
|
14
14
|
import { InteractiveImg } from '../image/interactive-img';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
4
|
-
import AudioIcon from '@atlaskit/icon/core/
|
|
4
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
5
5
|
import { Outcome } from '../domain';
|
|
6
6
|
import { MediaViewerError } from '../errors';
|
|
7
7
|
import { AudioPlayer, AudioCover, Audio, DefaultCoverWrapper, CustomAudioPlayerWrapper } from '../styleWrappers';
|
|
@@ -6,14 +6,14 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import TextField from '@atlaskit/textfield';
|
|
9
|
-
import LockIcon from '@atlaskit/icon/core/
|
|
9
|
+
import LockIcon from '@atlaskit/icon/core/lock-locked';
|
|
10
10
|
import Form, { Field } from '@atlaskit/form';
|
|
11
11
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
12
12
|
import { messages } from '@atlaskit/media-ui';
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
14
14
|
import { xcss, Box, Flex, Text } from '@atlaskit/primitives';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
16
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
17
17
|
import Heading from '@atlaskit/heading';
|
|
18
18
|
const COLOR_SHADE = '#b6c2cf';
|
|
19
19
|
const ERROR_COLOR = '#FD9891';
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { hideControlsClassName, MediaButton } from '@atlaskit/media-ui';
|
|
5
|
-
import ZoomOutIcon from '@atlaskit/icon/core/
|
|
6
|
-
import ZoomInIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ZoomOutIcon from '@atlaskit/icon/core/zoom-out';
|
|
6
|
+
import ZoomInIcon from '@atlaskit/icon/core/zoom-in';
|
|
7
7
|
import { ZoomWrapper, ZoomCenterControls, ZoomRightControls, ZoomLevelIndicator } from './styleWrappers';
|
|
8
8
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
9
|
import { fireAnalytics } from './analytics/';
|
|
@@ -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 = "0.0.0-development";
|
|
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 = "0.0.0-development";
|
|
10
10
|
var ufoExperience;
|
|
11
11
|
var getExperience = function getExperience() {
|
|
12
12
|
if (!ufoExperience) {
|
package/dist/esm/navigation.js
CHANGED
|
@@ -8,8 +8,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
8
8
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { Component } from 'react';
|
|
11
|
-
import ArrowLeftCircleIcon from '@atlaskit/icon/core/
|
|
12
|
-
import ArrowRightCircleIcon from '@atlaskit/icon/core/
|
|
11
|
+
import ArrowLeftCircleIcon from '@atlaskit/icon/core/chevron-left';
|
|
12
|
+
import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
|
|
13
13
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
14
14
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
15
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -12,6 +12,8 @@ import React from 'react';
|
|
|
12
12
|
import Folder24Icon from '@atlaskit/icon-file-type/glyph/folder/24';
|
|
13
13
|
import { downloadUrl } from '@atlaskit/media-common';
|
|
14
14
|
import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
|
|
15
|
+
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
17
|
import { ArchiveSidebarFolderWrapper, ArchiveSidebarFileEntryWrapper, SidebarItemWrapper } from './styleWrappers';
|
|
16
18
|
import { getMediaTypeFromFilename, isMacPrivateFile, rejectAfter } from '../../utils';
|
|
17
19
|
import { CustomButtonItem } from './custom-button-item';
|
|
@@ -84,21 +86,28 @@ var ArchiveSidebarFolderEntryBase = /*#__PURE__*/function (_React$Component) {
|
|
|
84
86
|
});
|
|
85
87
|
case 3:
|
|
86
88
|
blob = _context.sent;
|
|
87
|
-
name = _this.formatName(root, entry.name);
|
|
89
|
+
name = _this.formatName(root, entry.name); // Emit media-viewed event if feature flag is enabled
|
|
90
|
+
if (_this.props.fileId && fg('download_event_for_jira_attachments')) {
|
|
91
|
+
globalMediaEventEmitter.emit('media-viewed', {
|
|
92
|
+
fileId: _this.props.fileId,
|
|
93
|
+
viewingLevel: 'download',
|
|
94
|
+
childFileName: name
|
|
95
|
+
});
|
|
96
|
+
}
|
|
88
97
|
downloadUrl(URL.createObjectURL(blob), {
|
|
89
98
|
name: name
|
|
90
99
|
});
|
|
91
|
-
_context.next =
|
|
100
|
+
_context.next = 12;
|
|
92
101
|
break;
|
|
93
|
-
case
|
|
94
|
-
_context.prev =
|
|
102
|
+
case 9:
|
|
103
|
+
_context.prev = 9;
|
|
95
104
|
_context.t0 = _context["catch"](0);
|
|
96
105
|
_this.props.onError(_context.t0, entry);
|
|
97
|
-
case
|
|
106
|
+
case 12:
|
|
98
107
|
case "end":
|
|
99
108
|
return _context.stop();
|
|
100
109
|
}
|
|
101
|
-
}, _callee, null, [[0,
|
|
110
|
+
}, _callee, null, [[0, 9]]);
|
|
102
111
|
}));
|
|
103
112
|
return function (_x, _x2) {
|
|
104
113
|
return _ref.apply(this, arguments);
|
|
@@ -91,7 +91,8 @@ var ArchiveSidebarRenderer = /*#__PURE__*/function (_Component) {
|
|
|
91
91
|
mediaClient: mediaClient,
|
|
92
92
|
isArchiveEntryLoading: isArchiveEntryLoading,
|
|
93
93
|
onError: onError,
|
|
94
|
-
shouldRenderAbuseModal: !isErrorFileState(selectedFileState) && !!selectedFileState.abuseClassification
|
|
94
|
+
shouldRenderAbuseModal: !isErrorFileState(selectedFileState) && !!selectedFileState.abuseClassification,
|
|
95
|
+
fileId: selectedFileState.id
|
|
95
96
|
}));
|
|
96
97
|
}
|
|
97
98
|
}]);
|
|
@@ -41,6 +41,7 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
41
41
|
case 5:
|
|
42
42
|
archive = _context.sent;
|
|
43
43
|
Object.values(archive.entries).forEach(function (zipEntry) {
|
|
44
|
+
// eslint-disable-next-line no-param-reassign
|
|
44
45
|
zipEntry.name = _this.state.currentArchiveSidebarFolder.name + zipEntry.name;
|
|
45
46
|
});
|
|
46
47
|
return _context.abrupt("return", archive);
|
|
@@ -96,7 +97,7 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
96
97
|
}());
|
|
97
98
|
_defineProperty(_this, "onFolderEntrySelected", /*#__PURE__*/function () {
|
|
98
99
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(folder, isArchive) {
|
|
99
|
-
var _this$props, entries, mediaClient, folderName, archiveEntries, _this$props2, isArchiveEntryLoading, onError, shouldRenderAbuseModal, currentFolderName;
|
|
100
|
+
var _this$props, entries, mediaClient, folderName, archiveEntries, _this$props2, isArchiveEntryLoading, onError, shouldRenderAbuseModal, fileId, currentFolderName;
|
|
100
101
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
101
102
|
while (1) switch (_context3.prev = _context3.next) {
|
|
102
103
|
case 0:
|
|
@@ -112,7 +113,7 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
112
113
|
entries = _objectSpread(_objectSpread({}, entries), archiveEntries);
|
|
113
114
|
folderName = extractArchiveFolderName(folder.name);
|
|
114
115
|
case 7:
|
|
115
|
-
_this$props2 = _this.props, isArchiveEntryLoading = _this$props2.isArchiveEntryLoading, onError = _this$props2.onError, shouldRenderAbuseModal = _this$props2.shouldRenderAbuseModal;
|
|
116
|
+
_this$props2 = _this.props, isArchiveEntryLoading = _this$props2.isArchiveEntryLoading, onError = _this$props2.onError, shouldRenderAbuseModal = _this$props2.shouldRenderAbuseModal, fileId = _this$props2.fileId;
|
|
116
117
|
currentFolderName = folderName || folder.name;
|
|
117
118
|
_this.setState({
|
|
118
119
|
currentArchiveSidebarFolder: {
|
|
@@ -123,7 +124,8 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
123
124
|
onEntrySelected: _this.onEntrySelected,
|
|
124
125
|
mediaClient: mediaClient,
|
|
125
126
|
onError: onError,
|
|
126
|
-
shouldRenderAbuseModal: shouldRenderAbuseModal
|
|
127
|
+
shouldRenderAbuseModal: shouldRenderAbuseModal,
|
|
128
|
+
fileId: fileId
|
|
127
129
|
}
|
|
128
130
|
});
|
|
129
131
|
case 10:
|
|
@@ -143,7 +145,8 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
143
145
|
onHeaderClicked = _this$props3.onHeaderClicked,
|
|
144
146
|
isArchiveEntryLoading = _this$props3.isArchiveEntryLoading,
|
|
145
147
|
onError = _this$props3.onError,
|
|
146
|
-
shouldRenderAbuseModal = _this$props3.shouldRenderAbuseModal
|
|
148
|
+
shouldRenderAbuseModal = _this$props3.shouldRenderAbuseModal,
|
|
149
|
+
fileId = _this$props3.fileId;
|
|
147
150
|
var folderParent = getFolderParent(_this.state.currentArchiveSidebarFolder.root);
|
|
148
151
|
_this.setState({
|
|
149
152
|
currentArchiveSidebarFolder: {
|
|
@@ -154,7 +157,8 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
154
157
|
onEntrySelected: _this.onEntrySelected,
|
|
155
158
|
mediaClient: mediaClient,
|
|
156
159
|
onError: onError,
|
|
157
|
-
shouldRenderAbuseModal: shouldRenderAbuseModal
|
|
160
|
+
shouldRenderAbuseModal: shouldRenderAbuseModal,
|
|
161
|
+
fileId: fileId
|
|
158
162
|
}
|
|
159
163
|
});
|
|
160
164
|
|
|
@@ -165,7 +169,8 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
165
169
|
_entries = props.entries,
|
|
166
170
|
_mediaClient = props.mediaClient,
|
|
167
171
|
_onError = props.onError,
|
|
168
|
-
_shouldRenderAbuseModal = props.shouldRenderAbuseModal
|
|
172
|
+
_shouldRenderAbuseModal = props.shouldRenderAbuseModal,
|
|
173
|
+
_fileId = props.fileId;
|
|
169
174
|
_this.state = {
|
|
170
175
|
currentArchiveSidebarFolder: {
|
|
171
176
|
isArchiveEntryLoading: _isArchiveEntryLoading,
|
|
@@ -176,7 +181,8 @@ export var ArchiveSidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
176
181
|
hideHeader: true,
|
|
177
182
|
mediaClient: _mediaClient,
|
|
178
183
|
onError: _onError,
|
|
179
|
-
shouldRenderAbuseModal: _shouldRenderAbuseModal
|
|
184
|
+
shouldRenderAbuseModal: _shouldRenderAbuseModal,
|
|
185
|
+
fileId: _fileId
|
|
180
186
|
}
|
|
181
187
|
};
|
|
182
188
|
return _this;
|
|
@@ -19,7 +19,7 @@ import { getLanguageType, isCodeViewerItem } from '@atlaskit/media-ui/codeViewer
|
|
|
19
19
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
20
20
|
import { Outcome } from '../../domain';
|
|
21
21
|
import { CustomVideoPlayerWrapper, AudioPlayer, CustomAudioPlayerWrapper, DefaultCoverWrapper, ListWrapper } from '../../styleWrappers';
|
|
22
|
-
import AudioIcon from '@atlaskit/icon/core/
|
|
22
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
23
23
|
import ErrorMessage from '../../errorMessage';
|
|
24
24
|
import { BaseViewer } from '../base-viewer';
|
|
25
25
|
import { InteractiveImg } from '../image/interactive-img';
|
|
@@ -10,7 +10,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
13
|
-
import AudioIcon from '@atlaskit/icon/core/
|
|
13
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
14
14
|
import { Outcome } from '../domain';
|
|
15
15
|
import { MediaViewerError } from '../errors';
|
|
16
16
|
import { AudioPlayer, AudioCover, Audio, DefaultCoverWrapper, CustomAudioPlayerWrapper } from '../styleWrappers';
|
|
@@ -7,14 +7,14 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
import { useEffect, useRef, useState } from 'react';
|
|
8
8
|
import Button from '@atlaskit/button/new';
|
|
9
9
|
import TextField from '@atlaskit/textfield';
|
|
10
|
-
import LockIcon from '@atlaskit/icon/core/
|
|
10
|
+
import LockIcon from '@atlaskit/icon/core/lock-locked';
|
|
11
11
|
import Form, { Field } from '@atlaskit/form';
|
|
12
12
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
13
13
|
import { messages } from '@atlaskit/media-ui';
|
|
14
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
15
|
import { xcss, Box, Flex, Text } from '@atlaskit/primitives';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
17
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
18
18
|
import Heading from '@atlaskit/heading';
|
|
19
19
|
var COLOR_SHADE = '#b6c2cf';
|
|
20
20
|
var ERROR_COLOR = '#FD9891';
|
package/dist/esm/zoomControls.js
CHANGED
|
@@ -9,8 +9,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { Component } from 'react';
|
|
11
11
|
import { hideControlsClassName, MediaButton } from '@atlaskit/media-ui';
|
|
12
|
-
import ZoomOutIcon from '@atlaskit/icon/core/
|
|
13
|
-
import ZoomInIcon from '@atlaskit/icon/core/
|
|
12
|
+
import ZoomOutIcon from '@atlaskit/icon/core/zoom-out';
|
|
13
|
+
import ZoomInIcon from '@atlaskit/icon/core/zoom-in';
|
|
14
14
|
import { ZoomWrapper, ZoomCenterControls, ZoomRightControls, ZoomLevelIndicator } from './styleWrappers';
|
|
15
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
16
16
|
import { fireAnalytics } from './analytics/';
|
|
@@ -16,6 +16,7 @@ export interface ArchiveSidebarFolderProps {
|
|
|
16
16
|
isArchiveEntryLoading: boolean;
|
|
17
17
|
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
18
18
|
shouldRenderAbuseModal: boolean;
|
|
19
|
+
fileId?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const ArchiveSidebarFolderEntry: React.FC<import("react-intl-next").WithIntlProps<ArchiveSidebarFolderProps & WrappedComponentProps>> & {
|
|
21
22
|
WrappedComponent: React.ComponentType<ArchiveSidebarFolderProps & WrappedComponentProps>;
|
|
@@ -13,6 +13,7 @@ export interface ArchiveSidebarProps {
|
|
|
13
13
|
isArchiveEntryLoading: boolean;
|
|
14
14
|
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
15
15
|
shouldRenderAbuseModal: boolean;
|
|
16
|
+
fileId?: string;
|
|
16
17
|
}
|
|
17
18
|
export type ArchiveSidebarState = {
|
|
18
19
|
currentArchiveSidebarFolder: ArchiveSidebarFolderProps;
|
|
@@ -16,6 +16,7 @@ export interface ArchiveSidebarFolderProps {
|
|
|
16
16
|
isArchiveEntryLoading: boolean;
|
|
17
17
|
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
18
18
|
shouldRenderAbuseModal: boolean;
|
|
19
|
+
fileId?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const ArchiveSidebarFolderEntry: React.FC<import("react-intl-next").WithIntlProps<ArchiveSidebarFolderProps & WrappedComponentProps>> & {
|
|
21
22
|
WrappedComponent: React.ComponentType<ArchiveSidebarFolderProps & WrappedComponentProps>;
|
|
@@ -13,6 +13,7 @@ export interface ArchiveSidebarProps {
|
|
|
13
13
|
isArchiveEntryLoading: boolean;
|
|
14
14
|
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
15
15
|
shouldRenderAbuseModal: boolean;
|
|
16
|
+
fileId?: string;
|
|
16
17
|
}
|
|
17
18
|
export type ArchiveSidebarState = {
|
|
18
19
|
currentArchiveSidebarFolder: ArchiveSidebarFolderProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "52.5.
|
|
3
|
+
"version": "52.5.4",
|
|
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,14 +32,14 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
35
|
-
"@atlaskit/button": "^23.
|
|
35
|
+
"@atlaskit/button": "^23.9.0",
|
|
36
36
|
"@atlaskit/code": "^17.4.0",
|
|
37
|
-
"@atlaskit/css": "^0.
|
|
38
|
-
"@atlaskit/form": "^15.
|
|
37
|
+
"@atlaskit/css": "^0.19.0",
|
|
38
|
+
"@atlaskit/form": "^15.1.0",
|
|
39
39
|
"@atlaskit/heading": "^5.2.0",
|
|
40
|
-
"@atlaskit/icon": "^29.
|
|
40
|
+
"@atlaskit/icon": "^29.3.0",
|
|
41
41
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
42
|
-
"@atlaskit/icon-lab": "^5.
|
|
42
|
+
"@atlaskit/icon-lab": "^5.13.0",
|
|
43
43
|
"@atlaskit/media-client": "^35.7.0",
|
|
44
44
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
45
45
|
"@atlaskit/media-common": "^12.3.0",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"@atlaskit/media-ui": "^28.7.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/portal": "^5.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^
|
|
51
|
+
"@atlaskit/primitives": "^17.0.0",
|
|
52
52
|
"@atlaskit/side-navigation": "^11.0.0",
|
|
53
53
|
"@atlaskit/spinner": "^19.0.0",
|
|
54
54
|
"@atlaskit/textfield": "^8.2.0",
|
|
55
55
|
"@atlaskit/theme": "^21.0.0",
|
|
56
|
-
"@atlaskit/tokens": "^
|
|
56
|
+
"@atlaskit/tokens": "^9.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^20.11.0",
|
|
58
58
|
"@atlaskit/ufo": "^0.4.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
@@ -125,6 +125,9 @@
|
|
|
125
125
|
},
|
|
126
126
|
"media_viewer_prevent_rerender_on_polling": {
|
|
127
127
|
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"download_event_for_jira_attachments": {
|
|
130
|
+
"type": "boolean"
|
|
128
131
|
}
|
|
129
132
|
},
|
|
130
133
|
"techstack": {
|