@atlaskit/media-viewer 54.12.6 → 54.12.8
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 +15 -0
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/media-viewer.js +8 -3
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/media-viewer.js +8 -3
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/media-viewer.js +8 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 54.12.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 54.12.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d9e0721578d45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9e0721578d45) -
|
|
14
|
+
An item the consumer passes no `extensions.sidebar` for now shows no sidebar, column or sidebar
|
|
15
|
+
gap while the sidebar is open for other items. The open state is kept, so the next item with a
|
|
16
|
+
sidebar shows it again. Applies when `cc_comments_media_viewer_sidebar` is on.
|
|
17
|
+
|
|
3
18
|
## 54.12.6
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -14,7 +14,7 @@ var _experienceTypes = require("@atlaskit/ufo/experience-types");
|
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
16
|
var packageName = "@atlaskit/media-viewer";
|
|
17
|
-
var packageVersion = "54.12.
|
|
17
|
+
var packageVersion = "54.12.7";
|
|
18
18
|
var ufoExperience;
|
|
19
19
|
var getExperience = function getExperience() {
|
|
20
20
|
if (!ufoExperience) {
|
package/dist/cjs/media-viewer.js
CHANGED
|
@@ -17,6 +17,7 @@ var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents"
|
|
|
17
17
|
var _mediaClient = require("@atlaskit/media-client");
|
|
18
18
|
var _shortcut = require("@atlaskit/media-ui/shortcut");
|
|
19
19
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
20
|
+
var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
|
|
20
21
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
21
22
|
var _modal = require("./analytics/events/screen/modal");
|
|
22
23
|
var _closed = require("./analytics/events/ui/closed");
|
|
@@ -105,6 +106,10 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
105
106
|
}, []);
|
|
106
107
|
var defaultSelectedItem = selectedItem || items[0];
|
|
107
108
|
var currentIdentifier = selectedIdentifier || defaultSelectedItem;
|
|
109
|
+
// The open state is kept across items, but an item without a sidebar shows none.
|
|
110
|
+
var isSidebarShown = isSidebarVisible && (!!(extensions !== null && extensions !== void 0 && extensions.sidebar) ||
|
|
111
|
+
// cc_comments_media_viewer_sidebar is exposed above correctly - avoid duplicates
|
|
112
|
+
!(0, _unsafeExpValNoExposure.UNSAFE_expValNoExposure)('cc_comments_media_viewer_sidebar', 'isEnabled', false));
|
|
108
113
|
|
|
109
114
|
// Toggling the sidebar: opening is unconditional; closing goes through the
|
|
110
115
|
// optional onSidebarClose interceptor.
|
|
@@ -206,7 +211,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
206
211
|
handlePreviewClose('escKey');
|
|
207
212
|
}
|
|
208
213
|
}), /*#__PURE__*/_react.default.createElement(ConditionalInsetViewerShell, null, /*#__PURE__*/_react.default.createElement(ConditionalInsetViewerLayout, null, /*#__PURE__*/_react.default.createElement(ConditionalInsetMediaColumn, null, /*#__PURE__*/_react.default.createElement(ConditionalInsetMediaStage, null, /*#__PURE__*/_react.default.createElement(_content.Content, {
|
|
209
|
-
isSidebarVisible:
|
|
214
|
+
isSidebarVisible: isSidebarShown,
|
|
210
215
|
onClose: function onClose(_e, analyticsEvent) {
|
|
211
216
|
var _analyticsEvent$paylo;
|
|
212
217
|
var reason = (analyticsEvent === null || analyticsEvent === void 0 || (_analyticsEvent$paylo = analyticsEvent.payload) === null || _analyticsEvent$paylo === void 0 ? void 0 : _analyticsEvent$paylo.actionSubject) === 'button' ? 'button' : 'other';
|
|
@@ -239,7 +244,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
239
244
|
requestNavigation(direction, commit);
|
|
240
245
|
},
|
|
241
246
|
onSidebarButtonClick: isInsetViewer ? onInsetSidebarButtonClick : toggleSidebar,
|
|
242
|
-
isSidebarVisible:
|
|
247
|
+
isSidebarVisible: isSidebarShown,
|
|
243
248
|
onHeaderClose: isInsetViewer ? function () {
|
|
244
249
|
return handlePreviewClose('button');
|
|
245
250
|
} : undefined,
|
|
@@ -249,7 +254,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
249
254
|
viewerOptions: viewerOptions,
|
|
250
255
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
251
256
|
}))), isInsetViewer ? /*#__PURE__*/_react.default.createElement(_styleWrappers.MediaFooterBar, null) : null), isInsetViewer ? /*#__PURE__*/_react.default.createElement(_styleWrappers.SidebarColumn, {
|
|
252
|
-
isOpen:
|
|
257
|
+
isOpen: isSidebarShown
|
|
253
258
|
}, currentIdentifier && extensions !== null && extensions !== void 0 && extensions.sidebar ? /*#__PURE__*/_react.default.createElement(_insetSidebarHeader.InsetSidebarHeader, {
|
|
254
259
|
identifier: currentIdentifier,
|
|
255
260
|
title: extensions.sidebar.title,
|
|
@@ -4,7 +4,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
4
4
|
import { UFOExperience } from '@atlaskit/ufo/experience';
|
|
5
5
|
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
6
6
|
const packageName = "@atlaskit/media-viewer";
|
|
7
|
-
const packageVersion = "54.12.
|
|
7
|
+
const packageVersion = "54.12.7";
|
|
8
8
|
let ufoExperience;
|
|
9
9
|
const getExperience = () => {
|
|
10
10
|
if (!ufoExperience) {
|
|
@@ -8,6 +8,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents'
|
|
|
8
8
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
9
9
|
import { Shortcut } from '@atlaskit/media-ui/shortcut';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
13
|
import { createModalEvent } from './analytics/events/screen/modal';
|
|
13
14
|
import { createClosedEvent } from './analytics/events/ui/closed';
|
|
@@ -90,6 +91,10 @@ const MediaViewerComponent = ({
|
|
|
90
91
|
}, []);
|
|
91
92
|
const defaultSelectedItem = selectedItem || items[0];
|
|
92
93
|
const currentIdentifier = selectedIdentifier || defaultSelectedItem;
|
|
94
|
+
// The open state is kept across items, but an item without a sidebar shows none.
|
|
95
|
+
const isSidebarShown = isSidebarVisible && (!!(extensions !== null && extensions !== void 0 && extensions.sidebar) ||
|
|
96
|
+
// cc_comments_media_viewer_sidebar is exposed above correctly - avoid duplicates
|
|
97
|
+
!UNSAFE_expValNoExposure('cc_comments_media_viewer_sidebar', 'isEnabled', false));
|
|
93
98
|
|
|
94
99
|
// Toggling the sidebar: opening is unconditional; closing goes through the
|
|
95
100
|
// optional onSidebarClose interceptor.
|
|
@@ -179,7 +184,7 @@ const MediaViewerComponent = ({
|
|
|
179
184
|
handlePreviewClose('escKey');
|
|
180
185
|
}
|
|
181
186
|
}), /*#__PURE__*/React.createElement(ConditionalInsetViewerShell, null, /*#__PURE__*/React.createElement(ConditionalInsetViewerLayout, null, /*#__PURE__*/React.createElement(ConditionalInsetMediaColumn, null, /*#__PURE__*/React.createElement(ConditionalInsetMediaStage, null, /*#__PURE__*/React.createElement(Content, {
|
|
182
|
-
isSidebarVisible:
|
|
187
|
+
isSidebarVisible: isSidebarShown,
|
|
183
188
|
onClose: (_e, analyticsEvent) => {
|
|
184
189
|
var _analyticsEvent$paylo;
|
|
185
190
|
const reason = (analyticsEvent === null || analyticsEvent === void 0 ? void 0 : (_analyticsEvent$paylo = analyticsEvent.payload) === null || _analyticsEvent$paylo === void 0 ? void 0 : _analyticsEvent$paylo.actionSubject) === 'button' ? 'button' : 'other';
|
|
@@ -210,7 +215,7 @@ const MediaViewerComponent = ({
|
|
|
210
215
|
requestNavigation(direction, commit);
|
|
211
216
|
},
|
|
212
217
|
onSidebarButtonClick: isInsetViewer ? onInsetSidebarButtonClick : toggleSidebar,
|
|
213
|
-
isSidebarVisible:
|
|
218
|
+
isSidebarVisible: isSidebarShown,
|
|
214
219
|
onHeaderClose: isInsetViewer ? () => handlePreviewClose('button') : undefined,
|
|
215
220
|
sidebarToggleRef: isInsetViewer ? showSidebarButtonRef : undefined,
|
|
216
221
|
contextId: contextId,
|
|
@@ -218,7 +223,7 @@ const MediaViewerComponent = ({
|
|
|
218
223
|
viewerOptions: viewerOptions,
|
|
219
224
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
220
225
|
}))), isInsetViewer ? /*#__PURE__*/React.createElement(MediaFooterBar, null) : null), isInsetViewer ? /*#__PURE__*/React.createElement(SidebarColumn, {
|
|
221
|
-
isOpen:
|
|
226
|
+
isOpen: isSidebarShown
|
|
222
227
|
}, currentIdentifier && extensions !== null && extensions !== void 0 && extensions.sidebar ? /*#__PURE__*/React.createElement(InsetSidebarHeader, {
|
|
223
228
|
identifier: currentIdentifier,
|
|
224
229
|
title: extensions.sidebar.title,
|
|
@@ -7,7 +7,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
7
7
|
import { UFOExperience } from '@atlaskit/ufo/experience';
|
|
8
8
|
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
9
9
|
var packageName = "@atlaskit/media-viewer";
|
|
10
|
-
var packageVersion = "54.12.
|
|
10
|
+
var packageVersion = "54.12.7";
|
|
11
11
|
var ufoExperience;
|
|
12
12
|
var getExperience = function getExperience() {
|
|
13
13
|
if (!ufoExperience) {
|
package/dist/esm/media-viewer.js
CHANGED
|
@@ -9,6 +9,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents'
|
|
|
9
9
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
10
10
|
import { Shortcut } from '@atlaskit/media-ui/shortcut';
|
|
11
11
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { createModalEvent } from './analytics/events/screen/modal';
|
|
14
15
|
import { createClosedEvent } from './analytics/events/ui/closed';
|
|
@@ -96,6 +97,10 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
96
97
|
}, []);
|
|
97
98
|
var defaultSelectedItem = selectedItem || items[0];
|
|
98
99
|
var currentIdentifier = selectedIdentifier || defaultSelectedItem;
|
|
100
|
+
// The open state is kept across items, but an item without a sidebar shows none.
|
|
101
|
+
var isSidebarShown = isSidebarVisible && (!!(extensions !== null && extensions !== void 0 && extensions.sidebar) ||
|
|
102
|
+
// cc_comments_media_viewer_sidebar is exposed above correctly - avoid duplicates
|
|
103
|
+
!UNSAFE_expValNoExposure('cc_comments_media_viewer_sidebar', 'isEnabled', false));
|
|
99
104
|
|
|
100
105
|
// Toggling the sidebar: opening is unconditional; closing goes through the
|
|
101
106
|
// optional onSidebarClose interceptor.
|
|
@@ -197,7 +202,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
197
202
|
handlePreviewClose('escKey');
|
|
198
203
|
}
|
|
199
204
|
}), /*#__PURE__*/React.createElement(ConditionalInsetViewerShell, null, /*#__PURE__*/React.createElement(ConditionalInsetViewerLayout, null, /*#__PURE__*/React.createElement(ConditionalInsetMediaColumn, null, /*#__PURE__*/React.createElement(ConditionalInsetMediaStage, null, /*#__PURE__*/React.createElement(Content, {
|
|
200
|
-
isSidebarVisible:
|
|
205
|
+
isSidebarVisible: isSidebarShown,
|
|
201
206
|
onClose: function onClose(_e, analyticsEvent) {
|
|
202
207
|
var _analyticsEvent$paylo;
|
|
203
208
|
var reason = (analyticsEvent === null || analyticsEvent === void 0 || (_analyticsEvent$paylo = analyticsEvent.payload) === null || _analyticsEvent$paylo === void 0 ? void 0 : _analyticsEvent$paylo.actionSubject) === 'button' ? 'button' : 'other';
|
|
@@ -230,7 +235,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
230
235
|
requestNavigation(direction, commit);
|
|
231
236
|
},
|
|
232
237
|
onSidebarButtonClick: isInsetViewer ? onInsetSidebarButtonClick : toggleSidebar,
|
|
233
|
-
isSidebarVisible:
|
|
238
|
+
isSidebarVisible: isSidebarShown,
|
|
234
239
|
onHeaderClose: isInsetViewer ? function () {
|
|
235
240
|
return handlePreviewClose('button');
|
|
236
241
|
} : undefined,
|
|
@@ -240,7 +245,7 @@ var MediaViewerComponent = function MediaViewerComponent(_ref) {
|
|
|
240
245
|
viewerOptions: viewerOptions,
|
|
241
246
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
242
247
|
}))), isInsetViewer ? /*#__PURE__*/React.createElement(MediaFooterBar, null) : null), isInsetViewer ? /*#__PURE__*/React.createElement(SidebarColumn, {
|
|
243
|
-
isOpen:
|
|
248
|
+
isOpen: isSidebarShown
|
|
244
249
|
}, currentIdentifier && extensions !== null && extensions !== void 0 && extensions.sidebar ? /*#__PURE__*/React.createElement(InsetSidebarHeader, {
|
|
245
250
|
identifier: currentIdentifier,
|
|
246
251
|
title: extensions.sidebar.title,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "54.12.
|
|
3
|
+
"version": "54.12.8",
|
|
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/"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/spinner": "^20.4.0",
|
|
61
61
|
"@atlaskit/textfield": "^10.3.0",
|
|
62
62
|
"@atlaskit/theme": "^28.2.0",
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^253.0.0",
|
|
64
64
|
"@atlaskit/tokens": "^20.9.0",
|
|
65
65
|
"@atlaskit/tooltip": "^24.4.0",
|
|
66
66
|
"@atlaskit/ufo": "^2.0.0",
|