@atlaskit/media-viewer 49.0.1 → 49.1.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 +8 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/navigation.js +59 -37
- package/dist/cjs/styleWrappers.js +0 -2
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/navigation.js +58 -37
- package/dist/es2019/styleWrappers.js +0 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/navigation.js +59 -37
- package/dist/esm/styleWrappers.js +0 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 49.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#148875](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148875)
|
|
8
|
+
[`e5fef6fc65331`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e5fef6fc65331) -
|
|
9
|
+
[ux] Enable new icons behind a feature flag.
|
|
10
|
+
|
|
3
11
|
## 49.0.1
|
|
4
12
|
|
|
5
13
|
### 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 = "49.0
|
|
13
|
+
var packageVersion = exports.packageVersion = "49.1.0";
|
|
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.0
|
|
15
|
+
var packageVersion = "49.1.0";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
package/dist/cjs/navigation.js
CHANGED
|
@@ -12,21 +12,69 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _chevronLeftChevronLeftCircle = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-left--chevron-left-circle"));
|
|
16
|
+
var _chevronRightChevronRightCircle = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-right--chevron-right-circle"));
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
|
-
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
19
18
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
20
19
|
var _styleWrappers = require("./styleWrappers");
|
|
21
20
|
var _utils = require("./utils");
|
|
22
21
|
var _navigated = require("./analytics/events/ui/navigated");
|
|
23
22
|
var _analytics = require("./analytics");
|
|
23
|
+
var _primitives = require("@atlaskit/primitives");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
27
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
28
28
|
var nextNavButtonId = exports.nextNavButtonId = 'media-viewer-navigation-next';
|
|
29
29
|
var prevNavButtonId = exports.prevNavButtonId = 'media-viewer-navigation-prev';
|
|
30
|
+
var wrapperStyles = (0, _primitives.xcss)({
|
|
31
|
+
width: '40px',
|
|
32
|
+
height: '40px',
|
|
33
|
+
borderRadius: '100%',
|
|
34
|
+
padding: 'space.0',
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
backgroundColor: '#9FADBC',
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
color: '#161A1D',
|
|
39
|
+
boxSizing: 'border-box',
|
|
40
|
+
display: 'flex',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
':hover': {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
backgroundColor: '#B6C2CF'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var iconRightStyles = (0, _primitives.xcss)({
|
|
49
|
+
marginRight: 'space.100'
|
|
50
|
+
});
|
|
51
|
+
var iconLeftStyles = (0, _primitives.xcss)({
|
|
52
|
+
marginLeft: 'space.100'
|
|
53
|
+
});
|
|
54
|
+
var withIconWrapper = function withIconWrapper(Component) {
|
|
55
|
+
return function (_ref) {
|
|
56
|
+
var label = _ref.label,
|
|
57
|
+
clickHandler = _ref.clickHandler,
|
|
58
|
+
testId = _ref.testId;
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
60
|
+
xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
|
|
61
|
+
onClick: clickHandler('mouse'),
|
|
62
|
+
testId: testId
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(Component, {
|
|
64
|
+
label: label,
|
|
65
|
+
LEGACY_size: "xlarge"
|
|
66
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
67
|
+
,
|
|
68
|
+
LEGACY_primaryColor: "#9FADBC"
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
70
|
+
,
|
|
71
|
+
LEGACY_secondaryColor: "#161A1D",
|
|
72
|
+
color: "currentColor"
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
var NextIcon = withIconWrapper(_chevronRightChevronRightCircle.default);
|
|
77
|
+
var PreviousIcon = withIconWrapper(_chevronLeftChevronLeftCircle.default);
|
|
30
78
|
var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component) {
|
|
31
79
|
(0, _inherits2.default)(NavigationBase, _Component);
|
|
32
80
|
var _super = _createSuper(NavigationBase);
|
|
@@ -89,23 +137,10 @@ var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component)
|
|
|
89
137
|
code: 'ArrowLeft',
|
|
90
138
|
handler: prev('keyboard'),
|
|
91
139
|
eventType: 'keyup'
|
|
92
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/*#__PURE__*/
|
|
97
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
98
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
99
|
-
_react.default.createElement(_chevronLeftCircle.default
|
|
100
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
101
|
-
, {
|
|
102
|
-
primaryColor: "#9FADBC"
|
|
103
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
104
|
-
,
|
|
105
|
-
secondaryColor: "#161A1D",
|
|
106
|
-
size: "xlarge",
|
|
107
|
-
label: "Previous"
|
|
108
|
-
})
|
|
140
|
+
}), /*#__PURE__*/_react.default.createElement(PreviousIcon, {
|
|
141
|
+
label: "Previous",
|
|
142
|
+
clickHandler: prev,
|
|
143
|
+
testId: prevNavButtonId
|
|
109
144
|
})) : null), /*#__PURE__*/_react.default.createElement(_styleWrappers.RightWrapper, null, isRightVisible ?
|
|
110
145
|
/*#__PURE__*/
|
|
111
146
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -115,23 +150,10 @@ var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component)
|
|
|
115
150
|
code: 'ArrowRight',
|
|
116
151
|
handler: next('keyboard'),
|
|
117
152
|
eventType: 'keyup'
|
|
118
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
/*#__PURE__*/
|
|
123
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
124
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
125
|
-
_react.default.createElement(_chevronRightCircle.default
|
|
126
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
127
|
-
, {
|
|
128
|
-
primaryColor: "#9FADBC"
|
|
129
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
130
|
-
,
|
|
131
|
-
secondaryColor: "#161A1D",
|
|
132
|
-
size: "xlarge",
|
|
133
|
-
label: "Next"
|
|
134
|
-
})
|
|
153
|
+
}), /*#__PURE__*/_react.default.createElement(NextIcon, {
|
|
154
|
+
label: "Next",
|
|
155
|
+
clickHandler: next,
|
|
156
|
+
testId: nextNavButtonId
|
|
135
157
|
})) : null));
|
|
136
158
|
}
|
|
137
159
|
}]);
|
|
@@ -166,8 +166,6 @@ var arrowStyles = (0, _react.css)({
|
|
|
166
166
|
},
|
|
167
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
168
168
|
'&& button': {
|
|
169
|
-
height: 'inherit',
|
|
170
|
-
background: 'none',
|
|
171
169
|
'&:hover': {
|
|
172
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
173
171
|
svg: {
|
|
@@ -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.0
|
|
4
|
+
const packageVersion = "49.1.0";
|
|
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.0
|
|
5
|
+
const packageVersion = "49.1.0";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -1,18 +1,65 @@
|
|
|
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/
|
|
5
|
-
import ArrowRightCircleIcon from '@atlaskit/icon/
|
|
4
|
+
import ArrowLeftCircleIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-circle';
|
|
5
|
+
import ArrowRightCircleIcon from '@atlaskit/icon/utility/migration/chevron-right--chevron-right-circle';
|
|
6
6
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
7
|
-
import Button from '@atlaskit/button/standard-button';
|
|
8
7
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
9
8
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
9
|
import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
|
|
11
10
|
import { getSelectedIndex } from './utils';
|
|
12
11
|
import { createNavigatedEvent } from './analytics/events/ui/navigated';
|
|
13
12
|
import { fireAnalytics } from './analytics';
|
|
13
|
+
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
14
14
|
export const nextNavButtonId = 'media-viewer-navigation-next';
|
|
15
15
|
export const prevNavButtonId = 'media-viewer-navigation-prev';
|
|
16
|
+
const wrapperStyles = xcss({
|
|
17
|
+
width: '40px',
|
|
18
|
+
height: '40px',
|
|
19
|
+
borderRadius: '100%',
|
|
20
|
+
padding: 'space.0',
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
backgroundColor: '#9FADBC',
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
color: '#161A1D',
|
|
25
|
+
boxSizing: 'border-box',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
':hover': {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
backgroundColor: '#B6C2CF'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const iconRightStyles = xcss({
|
|
35
|
+
marginRight: 'space.100'
|
|
36
|
+
});
|
|
37
|
+
const iconLeftStyles = xcss({
|
|
38
|
+
marginLeft: 'space.100'
|
|
39
|
+
});
|
|
40
|
+
const withIconWrapper = Component => {
|
|
41
|
+
return ({
|
|
42
|
+
label,
|
|
43
|
+
clickHandler,
|
|
44
|
+
testId
|
|
45
|
+
}) => /*#__PURE__*/React.createElement(Pressable, {
|
|
46
|
+
xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
|
|
47
|
+
onClick: clickHandler('mouse'),
|
|
48
|
+
testId: testId
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Component, {
|
|
50
|
+
label: label,
|
|
51
|
+
LEGACY_size: "xlarge"
|
|
52
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
53
|
+
,
|
|
54
|
+
LEGACY_primaryColor: "#9FADBC"
|
|
55
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
56
|
+
,
|
|
57
|
+
LEGACY_secondaryColor: "#161A1D",
|
|
58
|
+
color: "currentColor"
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
const NextIcon = withIconWrapper(ArrowRightCircleIcon);
|
|
62
|
+
const PreviousIcon = withIconWrapper(ArrowLeftCircleIcon);
|
|
16
63
|
export class NavigationBase extends Component {
|
|
17
64
|
navigate(direction, source) {
|
|
18
65
|
return () => {
|
|
@@ -64,23 +111,10 @@ export class NavigationBase extends Component {
|
|
|
64
111
|
code: 'ArrowLeft',
|
|
65
112
|
handler: prev('keyboard'),
|
|
66
113
|
eventType: 'keyup'
|
|
67
|
-
}), /*#__PURE__*/React.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/*#__PURE__*/
|
|
72
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
73
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
74
|
-
React.createElement(ArrowLeftCircleIcon
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
76
|
-
, {
|
|
77
|
-
primaryColor: "#9FADBC"
|
|
78
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
79
|
-
,
|
|
80
|
-
secondaryColor: "#161A1D",
|
|
81
|
-
size: "xlarge",
|
|
82
|
-
label: "Previous"
|
|
83
|
-
})
|
|
114
|
+
}), /*#__PURE__*/React.createElement(PreviousIcon, {
|
|
115
|
+
label: "Previous",
|
|
116
|
+
clickHandler: prev,
|
|
117
|
+
testId: prevNavButtonId
|
|
84
118
|
})) : null), /*#__PURE__*/React.createElement(RightWrapper, null, isRightVisible ?
|
|
85
119
|
/*#__PURE__*/
|
|
86
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -90,23 +124,10 @@ export class NavigationBase extends Component {
|
|
|
90
124
|
code: 'ArrowRight',
|
|
91
125
|
handler: next('keyboard'),
|
|
92
126
|
eventType: 'keyup'
|
|
93
|
-
}), /*#__PURE__*/React.createElement(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/*#__PURE__*/
|
|
98
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
99
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
100
|
-
React.createElement(ArrowRightCircleIcon
|
|
101
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
102
|
-
, {
|
|
103
|
-
primaryColor: "#9FADBC"
|
|
104
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
105
|
-
,
|
|
106
|
-
secondaryColor: "#161A1D",
|
|
107
|
-
size: "xlarge",
|
|
108
|
-
label: "Next"
|
|
109
|
-
})
|
|
127
|
+
}), /*#__PURE__*/React.createElement(NextIcon, {
|
|
128
|
+
label: "Next",
|
|
129
|
+
clickHandler: next,
|
|
130
|
+
testId: nextNavButtonId
|
|
110
131
|
})) : null));
|
|
111
132
|
}
|
|
112
133
|
}
|
|
@@ -157,8 +157,6 @@ const arrowStyles = css({
|
|
|
157
157
|
},
|
|
158
158
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
159
159
|
'&& button': {
|
|
160
|
-
height: 'inherit',
|
|
161
|
-
background: 'none',
|
|
162
160
|
'&:hover': {
|
|
163
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
164
162
|
svg: {
|
|
@@ -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.0
|
|
4
|
+
var packageVersion = "49.1.0";
|
|
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.0
|
|
8
|
+
var packageVersion = "49.1.0";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
package/dist/esm/navigation.js
CHANGED
|
@@ -8,18 +8,66 @@ 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/
|
|
12
|
-
import ArrowRightCircleIcon from '@atlaskit/icon/
|
|
11
|
+
import ArrowLeftCircleIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-circle';
|
|
12
|
+
import ArrowRightCircleIcon from '@atlaskit/icon/utility/migration/chevron-right--chevron-right-circle';
|
|
13
13
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
14
|
-
import Button from '@atlaskit/button/standard-button';
|
|
15
14
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
16
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
16
|
import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
|
|
18
17
|
import { getSelectedIndex } from './utils';
|
|
19
18
|
import { createNavigatedEvent } from './analytics/events/ui/navigated';
|
|
20
19
|
import { fireAnalytics } from './analytics';
|
|
20
|
+
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
21
21
|
export var nextNavButtonId = 'media-viewer-navigation-next';
|
|
22
22
|
export var prevNavButtonId = 'media-viewer-navigation-prev';
|
|
23
|
+
var wrapperStyles = xcss({
|
|
24
|
+
width: '40px',
|
|
25
|
+
height: '40px',
|
|
26
|
+
borderRadius: '100%',
|
|
27
|
+
padding: 'space.0',
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
backgroundColor: '#9FADBC',
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
color: '#161A1D',
|
|
32
|
+
boxSizing: 'border-box',
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
':hover': {
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
backgroundColor: '#B6C2CF'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
var iconRightStyles = xcss({
|
|
42
|
+
marginRight: 'space.100'
|
|
43
|
+
});
|
|
44
|
+
var iconLeftStyles = xcss({
|
|
45
|
+
marginLeft: 'space.100'
|
|
46
|
+
});
|
|
47
|
+
var withIconWrapper = function withIconWrapper(Component) {
|
|
48
|
+
return function (_ref) {
|
|
49
|
+
var label = _ref.label,
|
|
50
|
+
clickHandler = _ref.clickHandler,
|
|
51
|
+
testId = _ref.testId;
|
|
52
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
53
|
+
xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
|
|
54
|
+
onClick: clickHandler('mouse'),
|
|
55
|
+
testId: testId
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Component, {
|
|
57
|
+
label: label,
|
|
58
|
+
LEGACY_size: "xlarge"
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
60
|
+
,
|
|
61
|
+
LEGACY_primaryColor: "#9FADBC"
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
63
|
+
,
|
|
64
|
+
LEGACY_secondaryColor: "#161A1D",
|
|
65
|
+
color: "currentColor"
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
var NextIcon = withIconWrapper(ArrowRightCircleIcon);
|
|
70
|
+
var PreviousIcon = withIconWrapper(ArrowLeftCircleIcon);
|
|
23
71
|
export var NavigationBase = /*#__PURE__*/function (_Component) {
|
|
24
72
|
_inherits(NavigationBase, _Component);
|
|
25
73
|
var _super = _createSuper(NavigationBase);
|
|
@@ -82,23 +130,10 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
|
|
|
82
130
|
code: 'ArrowLeft',
|
|
83
131
|
handler: prev('keyboard'),
|
|
84
132
|
eventType: 'keyup'
|
|
85
|
-
}), /*#__PURE__*/React.createElement(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/*#__PURE__*/
|
|
90
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
91
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
92
|
-
React.createElement(ArrowLeftCircleIcon
|
|
93
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
94
|
-
, {
|
|
95
|
-
primaryColor: "#9FADBC"
|
|
96
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
97
|
-
,
|
|
98
|
-
secondaryColor: "#161A1D",
|
|
99
|
-
size: "xlarge",
|
|
100
|
-
label: "Previous"
|
|
101
|
-
})
|
|
133
|
+
}), /*#__PURE__*/React.createElement(PreviousIcon, {
|
|
134
|
+
label: "Previous",
|
|
135
|
+
clickHandler: prev,
|
|
136
|
+
testId: prevNavButtonId
|
|
102
137
|
})) : null), /*#__PURE__*/React.createElement(RightWrapper, null, isRightVisible ?
|
|
103
138
|
/*#__PURE__*/
|
|
104
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -108,23 +143,10 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
|
|
|
108
143
|
code: 'ArrowRight',
|
|
109
144
|
handler: next('keyboard'),
|
|
110
145
|
eventType: 'keyup'
|
|
111
|
-
}), /*#__PURE__*/React.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
/*#__PURE__*/
|
|
116
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-20917
|
|
117
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
118
|
-
React.createElement(ArrowRightCircleIcon
|
|
119
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
120
|
-
, {
|
|
121
|
-
primaryColor: "#9FADBC"
|
|
122
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
123
|
-
,
|
|
124
|
-
secondaryColor: "#161A1D",
|
|
125
|
-
size: "xlarge",
|
|
126
|
-
label: "Next"
|
|
127
|
-
})
|
|
146
|
+
}), /*#__PURE__*/React.createElement(NextIcon, {
|
|
147
|
+
label: "Next",
|
|
148
|
+
clickHandler: next,
|
|
149
|
+
testId: nextNavButtonId
|
|
128
150
|
})) : null));
|
|
129
151
|
}
|
|
130
152
|
}]);
|
|
@@ -158,8 +158,6 @@ var arrowStyles = css({
|
|
|
158
158
|
},
|
|
159
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
160
160
|
'&& button': {
|
|
161
|
-
height: 'inherit',
|
|
162
|
-
background: 'none',
|
|
163
161
|
'&:hover': {
|
|
164
162
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
165
163
|
svg: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "49.0
|
|
3
|
+
"version": "49.1.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/"
|