@atlaskit/media-viewer 48.6.2 → 48.6.3
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 +9 -0
- package/compass.yml +5 -4
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/item-viewer.js +2 -1
- package/dist/cjs/styleWrappers.js +65 -19
- package/dist/cjs/v2/item-viewer-v2.js +4 -6
- package/dist/cjs/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/cjs/viewers/codeViewer/codeViewerRenderer.js +4 -1
- package/dist/cjs/viewers/codeViewer/styles.js +4 -0
- package/dist/cjs/viewers/doc/pdfRenderer.js +11 -0
- package/dist/cjs/viewers/svg/index.js +3 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/item-viewer.js +4 -1
- package/dist/es2019/styleWrappers.js +52 -8
- package/dist/es2019/v2/item-viewer-v2.js +4 -6
- package/dist/es2019/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/es2019/viewers/codeViewer/codeViewerRenderer.js +4 -1
- package/dist/es2019/viewers/codeViewer/styles.js +4 -0
- package/dist/es2019/viewers/doc/pdfRenderer.js +11 -0
- package/dist/es2019/viewers/svg/index.js +3 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/item-viewer.js +2 -1
- package/dist/esm/styleWrappers.js +65 -19
- package/dist/esm/v2/item-viewer-v2.js +4 -6
- package/dist/esm/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/esm/viewers/codeViewer/codeViewerRenderer.js +4 -1
- package/dist/esm/viewers/codeViewer/styles.js +4 -0
- package/dist/esm/viewers/doc/pdfRenderer.js +10 -0
- package/dist/esm/viewers/svg/index.js +3 -1
- package/example-helpers/MainWrapper.tsx +5 -0
- package/example-helpers/NativeMediaPreview.tsx +2 -0
- package/example-helpers/styles.ts +8 -0
- package/generate-cmaps.mjs +16 -13
- package/package.json +119 -119
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 48.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#111350](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111350)
|
|
8
|
+
[`efcf89de4e9ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/efcf89de4e9ab) -
|
|
9
|
+
Added missing metadata in some error events
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 48.6.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/compass.yml
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
name: Media Viewer
|
|
2
2
|
id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/b67342fb-426a-4066-b4d8-f13c0aa2e5ad'
|
|
3
|
-
description:
|
|
3
|
+
description:
|
|
4
|
+
MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and
|
|
5
|
+
extendable yet easy-to-integrate
|
|
4
6
|
configVersion: 1
|
|
5
7
|
typeId: UI_ELEMENT
|
|
6
8
|
ownerId: 'ari:cloud:teams::team/ef910622-ce0a-44a0-b441-ba89efe7891b'
|
|
@@ -23,7 +25,7 @@ links:
|
|
|
23
25
|
- name: ''
|
|
24
26
|
type: REPOSITORY
|
|
25
27
|
url: 'https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/media/media-viewer/'
|
|
26
|
-
- name: ''
|
|
28
|
+
- name: ''
|
|
27
29
|
type: DOCUMENT
|
|
28
30
|
url: 'https://atlaskit.atlassian.com/packages/media/media-viewer'
|
|
29
31
|
- name: '' # Tome Capability
|
|
@@ -45,6 +47,5 @@ relationships:
|
|
|
45
47
|
DEPENDS_ON:
|
|
46
48
|
- 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/652381b6-c323-4b50-bf31-c94941a0b6ef'
|
|
47
49
|
- 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/3bc23fc6-021a-4adf-9602-ade6d8cad7d3'
|
|
48
|
-
|
|
49
50
|
# Learn more about formatting compass.yml:
|
|
50
|
-
# https://go.atlassian.com/compass-yml-format
|
|
51
|
+
# https://go.atlassian.com/compass-yml-format
|
|
@@ -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 = "48.6.
|
|
13
|
+
var packageVersion = exports.packageVersion = "48.6.3";
|
|
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 = "48.6.
|
|
15
|
+
var packageVersion = "48.6.3";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
package/dist/cjs/item-viewer.js
CHANGED
|
@@ -160,8 +160,9 @@ var ItemViewerBase = exports.ItemViewerBase = /*#__PURE__*/function (_React$Comp
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onLoadFail", function (mediaViewerError, data) {
|
|
163
|
+
var item = _this.state.item;
|
|
163
164
|
_this.safeSetState({
|
|
164
|
-
item: _domain.Outcome.failed(mediaViewerError, data)
|
|
165
|
+
item: _domain.Outcome.failed(mediaViewerError, data || item.data)
|
|
165
166
|
});
|
|
166
167
|
});
|
|
167
168
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onExternalImgSuccess", function () {
|
|
@@ -26,7 +26,9 @@ var blanketStyles = (0, _react.css)({
|
|
|
26
26
|
left: 0,
|
|
27
27
|
bottom: 0,
|
|
28
28
|
right: 0,
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
30
|
backgroundColor: _styles.blanketColor,
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
32
|
zIndex: _styles.overlayZindex,
|
|
31
33
|
display: 'flex'
|
|
32
34
|
});
|
|
@@ -39,7 +41,9 @@ var headerWrapperStyles = function headerWrapperStyles(_ref) {
|
|
|
39
41
|
width: '100%',
|
|
40
42
|
height: '98px',
|
|
41
43
|
opacity: 0.85,
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
45
|
background: "linear-gradient( to bottom, ".concat(_modalSpinner.headerAndSidebarBackgroundColor, ", rgba(14, 22, 36, 0) ) no-repeat"),
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
43
47
|
backgroundPosition: isArchiveSideBarVisible ? "".concat(_styles2.ArchiveSideBarWidth, "px 0") : '0',
|
|
44
48
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
45
49
|
color: '#c7d1db',
|
|
@@ -47,6 +51,7 @@ var headerWrapperStyles = function headerWrapperStyles(_ref) {
|
|
|
47
51
|
padding: "var(--ds-space-300, 24px)",
|
|
48
52
|
boxSizing: 'border-box',
|
|
49
53
|
pointerEvents: 'none',
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
55
|
zIndex: _styles.overlayZindex + 1
|
|
51
56
|
});
|
|
52
57
|
};
|
|
@@ -62,11 +67,13 @@ var closeButtonWrapperStyles = (0, _react.css)({
|
|
|
62
67
|
position: 'absolute',
|
|
63
68
|
top: "var(--ds-space-300, 24px)",
|
|
64
69
|
right: "var(--ds-space-250, 20px)",
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
65
71
|
zIndex: _styles.overlayZindex + 2
|
|
66
72
|
});
|
|
67
73
|
var contentWrapperStyles = function contentWrapperStyles(_ref2) {
|
|
68
74
|
var isSidebarVisible = _ref2.isSidebarVisible;
|
|
69
75
|
return (0, _react.css)({
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
70
77
|
width: isSidebarVisible ? "calc(100% - ".concat(SIDEBAR_WIDTH, "px)") : '100%'
|
|
71
78
|
});
|
|
72
79
|
};
|
|
@@ -75,6 +82,7 @@ var zoomWrapperStyles = (0, _react.css)({
|
|
|
75
82
|
position: 'absolute',
|
|
76
83
|
bottom: '0px',
|
|
77
84
|
height: '98px',
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
78
86
|
backgroundImage: "linear-gradient( to top, ".concat(_modalSpinner.headerAndSidebarBackgroundColor, ", rgba(14, 22, 36, 0) )"),
|
|
79
87
|
opacity: 0.85,
|
|
80
88
|
pointerEvents: 'none',
|
|
@@ -88,6 +96,7 @@ var zoomCenterControlsStyles = (0, _react.css)({
|
|
|
88
96
|
display: 'flex',
|
|
89
97
|
justifyContent: 'center',
|
|
90
98
|
gap: "var(--ds-space-100, 10px)",
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
91
100
|
'> *': {
|
|
92
101
|
pointerEvents: 'all'
|
|
93
102
|
}
|
|
@@ -113,6 +122,7 @@ var hdIconGroupWrapperStyles = (0, _react.css)({
|
|
|
113
122
|
gap: "var(--ds-space-100, 10px)",
|
|
114
123
|
position: 'relative',
|
|
115
124
|
width: '24px',
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
116
126
|
'> *': {
|
|
117
127
|
position: 'absolute'
|
|
118
128
|
}
|
|
@@ -121,6 +131,7 @@ var errorMessageWrapperStyles = (0, _react.css)({
|
|
|
121
131
|
textAlign: 'center',
|
|
122
132
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
123
133
|
color: '#c7d1db',
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
124
135
|
p: {
|
|
125
136
|
lineHeight: '100%'
|
|
126
137
|
}
|
|
@@ -145,19 +156,23 @@ var pdfWrapperStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
|
145
156
|
}));
|
|
146
157
|
var arrowStyles = (0, _react.css)({
|
|
147
158
|
cursor: 'pointer',
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
148
160
|
svg: {
|
|
149
161
|
filter: 'drop-shadow(0px 1px 1px rgb(9 30 66 / 25%)) drop-shadow(0px 0px 1px rgb(9 30 66 / 31%))'
|
|
150
162
|
},
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
151
164
|
'&& button': {
|
|
152
165
|
height: 'inherit',
|
|
153
166
|
background: 'none',
|
|
154
167
|
'&:hover': {
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
155
169
|
svg: {
|
|
156
170
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
157
171
|
color: '#b6c2cf'
|
|
158
172
|
}
|
|
159
173
|
},
|
|
160
174
|
'&:active': {
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
161
176
|
svg: {
|
|
162
177
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
163
178
|
color: '#c7d1db'
|
|
@@ -181,11 +196,17 @@ var arrowsWrapperStyles = (0, _react.css)({
|
|
|
181
196
|
});
|
|
182
197
|
var leftWrapperStyles = function leftWrapperStyles(_ref3) {
|
|
183
198
|
var isArchiveSideBarVisible = _ref3.isArchiveSideBarVisible;
|
|
184
|
-
return (
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
199
|
+
return (
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
201
|
+
(0, _react.css)(arrowWrapperStyles, {
|
|
202
|
+
textAlign: 'left',
|
|
203
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
204
|
+
left: isArchiveSideBarVisible ? "".concat(_styles2.ArchiveSideBarWidth, "px") : '0'
|
|
205
|
+
})
|
|
206
|
+
);
|
|
188
207
|
};
|
|
208
|
+
|
|
209
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
189
210
|
var rightWrapperStyles = (0, _react.css)(arrowWrapperStyles, {
|
|
190
211
|
textAlign: 'right',
|
|
191
212
|
right: 0
|
|
@@ -194,12 +215,14 @@ var headerStyles = function headerStyles(_ref4) {
|
|
|
194
215
|
var isArchiveSideBarVisible = _ref4.isArchiveSideBarVisible;
|
|
195
216
|
return (0, _react.css)({
|
|
196
217
|
display: 'flex',
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
197
219
|
paddingLeft: isArchiveSideBarVisible ? "".concat(_styles2.ArchiveSideBarWidth, "px") : '0'
|
|
198
220
|
});
|
|
199
221
|
};
|
|
200
222
|
var leftHeaderStyles = (0, _react.css)({
|
|
201
223
|
flex: 1,
|
|
202
224
|
overflow: 'hidden',
|
|
225
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
203
226
|
'> *': {
|
|
204
227
|
pointerEvents: 'all'
|
|
205
228
|
}
|
|
@@ -224,8 +247,11 @@ var imgStyles = function imgStyles(_ref5) {
|
|
|
224
247
|
display: 'inline-block',
|
|
225
248
|
verticalAlign: 'middle',
|
|
226
249
|
position: 'relative',
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
227
251
|
cursor: cursor
|
|
228
|
-
},
|
|
252
|
+
},
|
|
253
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
254
|
+
shouldPixelate ? "/* Prevent images from being smoothed when scaled up */\n image-rendering: optimizeSpeed; /* Legal fallback */\n image-rendering: -moz-crisp-edges; /* Firefox */\n image-rendering: -o-crisp-edges; /* Opera */\n image-rendering: -webkit-optimize-contrast; /* Safari */\n image-rendering: optimize-contrast; /* CSS3 Proposed */\n image-rendering: crisp-edges; /* CSS4 Proposed */\n image-rendering: pixelated; /* CSS4 Proposed */\n -ms-interpolation-mode: nearest-neighbor; /* IE8+ */" : "");
|
|
229
255
|
};
|
|
230
256
|
var medatadataTextWrapperStyles = (0, _react.css)({
|
|
231
257
|
overflow: 'hidden'
|
|
@@ -233,11 +259,15 @@ var medatadataTextWrapperStyles = (0, _react.css)({
|
|
|
233
259
|
var metadataWrapperStyles = (0, _react.css)({
|
|
234
260
|
display: 'flex'
|
|
235
261
|
});
|
|
262
|
+
|
|
263
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
236
264
|
var metadataFileNameStyles = (0, _react.css)((0, _mediaUi.ellipsis)());
|
|
237
265
|
var metadataSubTextStyles = (0, _react.css)({
|
|
238
266
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
239
267
|
color: '#c7d1db'
|
|
240
|
-
},
|
|
268
|
+
},
|
|
269
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
270
|
+
(0, _mediaUi.ellipsis)());
|
|
241
271
|
var metadataIconWrapperStyles = (0, _primitives.xcss)({
|
|
242
272
|
paddingTop: 'space.050',
|
|
243
273
|
paddingRight: 'space.150'
|
|
@@ -246,6 +276,7 @@ var rightHeaderStyles = (0, _react.css)({
|
|
|
246
276
|
textAlign: 'right',
|
|
247
277
|
marginRight: "var(--ds-space-500, 40px)",
|
|
248
278
|
minWidth: '200px',
|
|
279
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
249
280
|
'> *': {
|
|
250
281
|
pointerEvents: 'all'
|
|
251
282
|
}
|
|
@@ -257,7 +288,9 @@ var customAudioPlayerWrapperStyles = (0, _react.css)({
|
|
|
257
288
|
width: '100%'
|
|
258
289
|
});
|
|
259
290
|
var audioPlayerStyles = (0, _react.css)({
|
|
291
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
260
292
|
backgroundColor: _styles.blanketColor,
|
|
293
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
261
294
|
borderRadius: (0, _constants.borderRadius)(),
|
|
262
295
|
alignItems: 'center',
|
|
263
296
|
justifyContent: 'center',
|
|
@@ -287,6 +320,7 @@ var defaultCoverWrapperStyles = (0, _react.css)({
|
|
|
287
320
|
display: 'flex',
|
|
288
321
|
alignItems: 'center',
|
|
289
322
|
justifyContent: 'center',
|
|
323
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
290
324
|
'> *': {
|
|
291
325
|
transform: 'scale(2)'
|
|
292
326
|
}
|
|
@@ -294,14 +328,16 @@ var defaultCoverWrapperStyles = (0, _react.css)({
|
|
|
294
328
|
var downloadButtonWrapperStyles = (0, _react.css)({
|
|
295
329
|
marginTop: "var(--ds-space-300, 28px)",
|
|
296
330
|
textAlign: 'center',
|
|
331
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
297
332
|
button: {
|
|
298
333
|
'&:hover, &:active': {
|
|
299
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
334
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
300
335
|
color: '#161a1d !important'
|
|
301
336
|
}
|
|
302
337
|
}
|
|
303
338
|
});
|
|
304
339
|
var customVideoPlayerWrapperStyles = (0, _react.css)({
|
|
340
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
305
341
|
video: {
|
|
306
342
|
flex: 1,
|
|
307
343
|
width: '100vw',
|
|
@@ -315,6 +351,7 @@ var sidebarWrapperStyles = (0, _react.css)({
|
|
|
315
351
|
width: "".concat(SIDEBAR_WIDTH, "px"),
|
|
316
352
|
height: '100vh',
|
|
317
353
|
overflow: 'hidden auto',
|
|
354
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
318
355
|
backgroundColor: "var(--ds-surface, ".concat(_modalSpinner.headerAndSidebarBackgroundColor, ")"),
|
|
319
356
|
color: "var(--ds-text, #c7d1db)"
|
|
320
357
|
});
|
|
@@ -344,6 +381,7 @@ var HeaderWrapper = exports.HeaderWrapper = function HeaderWrapper(_ref7) {
|
|
|
344
381
|
children = _ref7.children,
|
|
345
382
|
isArchiveSideBarVisible = _ref7.isArchiveSideBarVisible;
|
|
346
383
|
return (0, _react.jsx)("div", {
|
|
384
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
347
385
|
css: headerWrapperStyles({
|
|
348
386
|
isArchiveSideBarVisible: isArchiveSideBarVisible
|
|
349
387
|
})
|
|
@@ -381,11 +419,14 @@ var CloseButtonWrapper = exports.CloseButtonWrapper = function CloseButtonWrappe
|
|
|
381
419
|
var ContentWrapper = exports.ContentWrapper = function ContentWrapper(_ref11) {
|
|
382
420
|
var isSidebarVisible = _ref11.isSidebarVisible,
|
|
383
421
|
children = _ref11.children;
|
|
384
|
-
return (
|
|
385
|
-
css
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
422
|
+
return (
|
|
423
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
424
|
+
(0, _react.jsx)("div", {
|
|
425
|
+
css: contentWrapperStyles({
|
|
426
|
+
isSidebarVisible: isSidebarVisible
|
|
427
|
+
})
|
|
428
|
+
}, children)
|
|
429
|
+
);
|
|
389
430
|
};
|
|
390
431
|
var ZoomWrapper = exports.ZoomWrapper = function ZoomWrapper(_ref12) {
|
|
391
432
|
var className = _ref12.className,
|
|
@@ -488,11 +529,14 @@ var Arrow = exports.Arrow = function Arrow(_ref21) {
|
|
|
488
529
|
var LeftWrapper = exports.LeftWrapper = function LeftWrapper(_ref22) {
|
|
489
530
|
var children = _ref22.children,
|
|
490
531
|
isArchiveSideBarVisible = _ref22.isArchiveSideBarVisible;
|
|
491
|
-
return (
|
|
492
|
-
css
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
532
|
+
return (
|
|
533
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
534
|
+
(0, _react.jsx)("div", {
|
|
535
|
+
css: leftWrapperStyles({
|
|
536
|
+
isArchiveSideBarVisible: isArchiveSideBarVisible
|
|
537
|
+
})
|
|
538
|
+
}, children)
|
|
539
|
+
);
|
|
496
540
|
};
|
|
497
541
|
var RightWrapper = exports.RightWrapper = function RightWrapper(_ref23) {
|
|
498
542
|
var children = _ref23.children;
|
|
@@ -508,7 +552,7 @@ var Header = exports.Header = function Header(_ref24) {
|
|
|
508
552
|
isArchiveSideBarVisible = _ref24.isArchiveSideBarVisible,
|
|
509
553
|
className = _ref24.className;
|
|
510
554
|
return (
|
|
511
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
555
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
512
556
|
(0, _react.jsx)("div", {
|
|
513
557
|
css: headerStyles({
|
|
514
558
|
isArchiveSideBarVisible: isArchiveSideBarVisible
|
|
@@ -569,7 +613,9 @@ var Img = exports.Img = function Img(_ref27) {
|
|
|
569
613
|
}, [canDrag, isDragging]);
|
|
570
614
|
return (0, _react.jsx)("img", {
|
|
571
615
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
572
|
-
className: className
|
|
616
|
+
className: className
|
|
617
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
618
|
+
,
|
|
573
619
|
css: imgStyles({
|
|
574
620
|
cursor: cursor,
|
|
575
621
|
shouldPixelate: shouldPixelate
|
|
@@ -194,9 +194,9 @@ var ItemViewerV2Base = exports.ItemViewerV2Base = function ItemViewerV2Base(_ref
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
}, [item]);
|
|
197
|
-
var onLoadFail = (0, _react.useCallback)(function (mediaViewerError
|
|
198
|
-
setItem(_domain.Outcome.failed(mediaViewerError,
|
|
199
|
-
}, []);
|
|
197
|
+
var onLoadFail = (0, _react.useCallback)(function (mediaViewerError) {
|
|
198
|
+
setItem(_domain.Outcome.failed(mediaViewerError, fileState));
|
|
199
|
+
}, [fileState]);
|
|
200
200
|
var renderItem = function renderItem(fileItem) {
|
|
201
201
|
var collectionName = (0, _mediaClient.isFileIdentifier)(identifier) ? identifier.collectionName : undefined;
|
|
202
202
|
var viewerProps = {
|
|
@@ -253,9 +253,7 @@ var ItemViewerV2Base = exports.ItemViewerV2Base = function ItemViewerV2Base(_ref
|
|
|
253
253
|
case 'doc':
|
|
254
254
|
return /*#__PURE__*/_react.default.createElement(DocViewerV2, (0, _extends2.default)({
|
|
255
255
|
onSuccess: onSuccess,
|
|
256
|
-
onError:
|
|
257
|
-
onLoadFail(err, fileState);
|
|
258
|
-
}
|
|
256
|
+
onError: onLoadFail
|
|
259
257
|
}, viewerProps));
|
|
260
258
|
case 'archive':
|
|
261
259
|
return /*#__PURE__*/_react.default.createElement(_archiveViewerLoader.default, (0, _extends2.default)({
|
|
@@ -21,6 +21,7 @@ var archiveSideBarStyles = (0, _react.css)({
|
|
|
21
21
|
position: 'absolute',
|
|
22
22
|
left: 0,
|
|
23
23
|
top: 0,
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
25
|
width: "".concat(_styles.ArchiveSideBarWidth, "px"),
|
|
25
26
|
bottom: 0,
|
|
26
27
|
boxSizing: 'border-box',
|
|
@@ -75,7 +76,7 @@ var archiveLayoutStyles = (0, _react.css)({
|
|
|
75
76
|
var archiveViewerWrapperStyles = (0, _react.css)({
|
|
76
77
|
position: 'absolute',
|
|
77
78
|
top: 0,
|
|
78
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
79
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
79
80
|
left: "".concat(_styles.ArchiveSideBarWidth, "px"),
|
|
80
81
|
right: 0,
|
|
81
82
|
bottom: 0,
|
|
@@ -42,6 +42,7 @@ var CodeViewWrapper = exports.CodeViewWrapper = function CodeViewWrapper(_ref) {
|
|
|
42
42
|
}, children));
|
|
43
43
|
};
|
|
44
44
|
var CodeViewerHeaderBar = exports.CodeViewerHeaderBar = function CodeViewerHeaderBar() {
|
|
45
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
45
46
|
return (0, _react.jsx)("div", {
|
|
46
47
|
css: _styles.codeViewerHeaderBarStyles
|
|
47
48
|
});
|
|
@@ -117,7 +118,9 @@ var CodeViewRenderer = exports.CodeViewRenderer = /*#__PURE__*/function (_Compon
|
|
|
117
118
|
//Use src to measure the real file size
|
|
118
119
|
//item.size is incorrect for archives with mutiple docs inside.
|
|
119
120
|
var fileSize = new Blob([src]).size;
|
|
120
|
-
var codeViewer = (0, _util.lineCount)(src) > MAX_FORMATTED_LINES || fileSize > MAX_FILE_SIZE_USE_CODE_VIEWER ?
|
|
121
|
+
var codeViewer = (0, _util.lineCount)(src) > MAX_FORMATTED_LINES || fileSize > MAX_FILE_SIZE_USE_CODE_VIEWER ?
|
|
122
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
123
|
+
(0, _react.jsx)("code", {
|
|
121
124
|
css: _styles.codeViewerHTMLStyles,
|
|
122
125
|
"data-testid": "code-block"
|
|
123
126
|
}, src) : (0, _react.jsx)(_block.default, {
|
|
@@ -9,23 +9,27 @@ var _theme = require("@atlaskit/theme");
|
|
|
9
9
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
10
10
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
11
11
|
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
12
13
|
var codeViewWrapperStyles = exports.codeViewWrapperStyles = (0, _react.css)({
|
|
13
14
|
position: 'absolute',
|
|
14
15
|
left: 0,
|
|
15
16
|
top: 0,
|
|
16
17
|
right: 0,
|
|
17
18
|
bottom: 0,
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
18
20
|
backgroundColor: "var(--ds-surface, ".concat(_theme.colors.N20, ")"),
|
|
19
21
|
overflow: 'auto'
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
23
26
|
var codeViewerHeaderBarStyles = exports.codeViewerHeaderBarStyles = (0, _react.css)({
|
|
24
27
|
height: '75px',
|
|
25
28
|
backgroundColor: '#1d2125'
|
|
26
29
|
});
|
|
27
30
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
28
31
|
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
29
33
|
var codeViewerHTMLStyles = exports.codeViewerHTMLStyles = (0, _react.css)({
|
|
30
34
|
display: 'flex',
|
|
31
35
|
lineHeight: '20px',
|
|
@@ -34,6 +34,8 @@ var _pdfPasswordInput2 = require("../../analytics/events/screen/pdfPasswordInput
|
|
|
34
34
|
var _passwordPdf = require("../../analytics/events/screen/passwordPdf");
|
|
35
35
|
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); }
|
|
36
36
|
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 && Object.prototype.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; }
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
|
|
38
|
+
|
|
37
39
|
var pdfViewerClassName = exports.pdfViewerClassName = 'pdfViewer';
|
|
38
40
|
|
|
39
41
|
// Styles are partially copied from https://github.com/mozilla/pdfjs-dist/blob/v2.9.359/web/pdf_viewer.css
|
|
@@ -42,14 +44,17 @@ var pdfViewerClassName = exports.pdfViewerClassName = 'pdfViewer';
|
|
|
42
44
|
var globalStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat(pdfViewerClassName), {
|
|
43
45
|
marginTop: "var(--ds-space-800, 64px)",
|
|
44
46
|
marginBottom: "var(--ds-space-800, 64px)",
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
48
|
'.page': {
|
|
46
49
|
margin: "1px auto ".concat("var(--ds-space-negative-100, -8px)", " auto"),
|
|
47
50
|
border: '9px solid transparent',
|
|
48
51
|
position: 'relative'
|
|
49
52
|
},
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
50
54
|
'.canvasWrapper': {
|
|
51
55
|
overflow: 'hidden'
|
|
52
56
|
},
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
58
|
'.textLayer': {
|
|
54
59
|
position: 'absolute',
|
|
55
60
|
left: 0,
|
|
@@ -60,6 +65,7 @@ var globalStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat
|
|
|
60
65
|
opacity: 0.2,
|
|
61
66
|
lineHeight: 1
|
|
62
67
|
},
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
69
|
'.textLayer span, .textLayer br': {
|
|
64
70
|
color: 'transparent',
|
|
65
71
|
position: 'absolute',
|
|
@@ -67,16 +73,20 @@ var globalStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat
|
|
|
67
73
|
cursor: 'text',
|
|
68
74
|
transformOrigin: '0% 0%'
|
|
69
75
|
},
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
70
77
|
'.textLayer ::-moz-selection': {
|
|
71
78
|
background: 'rgba(0, 0, 255, 1)'
|
|
72
79
|
},
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
73
81
|
'.textLayer ::selection': {
|
|
74
82
|
background: 'rgba(0, 0, 255, 1)'
|
|
75
83
|
},
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
76
85
|
'.annotationLayer section': {
|
|
77
86
|
position: 'absolute',
|
|
78
87
|
textAlign: 'initial'
|
|
79
88
|
},
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
80
90
|
'.annotationLayer .linkAnnotation > a, .annotationLayer .buttonWidgetAnnotation.pushButton > a': {
|
|
81
91
|
position: 'absolute',
|
|
82
92
|
fontSize: '1em',
|
|
@@ -85,6 +95,7 @@ var globalStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat
|
|
|
85
95
|
width: '100%',
|
|
86
96
|
height: '100%'
|
|
87
97
|
},
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
88
99
|
'.annotationLayer .linkAnnotation > a:hover, .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover': {
|
|
89
100
|
opacity: 0.2,
|
|
90
101
|
background: 'rgba(255, 255, 0, 1)',
|
|
@@ -159,7 +159,9 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
159
159
|
}, /*#__PURE__*/_react.default.createElement(_mediaSvg.default, {
|
|
160
160
|
testId: 'media-viewer-svg',
|
|
161
161
|
identifier: identifier,
|
|
162
|
-
dimensions: imgDimensions
|
|
162
|
+
dimensions: imgDimensions
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
164
|
+
,
|
|
163
165
|
style: imgStyles,
|
|
164
166
|
onLoad: onImgLoad,
|
|
165
167
|
onMouseDown: startDragging
|
|
@@ -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 = "48.6.
|
|
4
|
+
const packageVersion = "48.6.3";
|
|
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 = "48.6.
|
|
5
|
+
const packageVersion = "48.6.3";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -85,8 +85,11 @@ export class ItemViewerBase extends React.Component {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
_defineProperty(this, "onLoadFail", (mediaViewerError, data) => {
|
|
88
|
+
const {
|
|
89
|
+
item
|
|
90
|
+
} = this.state;
|
|
88
91
|
this.safeSetState({
|
|
89
|
-
item: Outcome.failed(mediaViewerError, data)
|
|
92
|
+
item: Outcome.failed(mediaViewerError, data || item.data)
|
|
90
93
|
});
|
|
91
94
|
});
|
|
92
95
|
_defineProperty(this, "onExternalImgSuccess", () => {
|