@atlaskit/media-viewer 48.4.4 → 48.4.5
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 +7 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/cjs/viewers/codeViewer/styles.js +23 -6
- package/dist/cjs/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/cjs/viewers/doc/pdfRenderer.js +6 -6
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/es2019/viewers/codeViewer/styles.js +21 -21
- package/dist/es2019/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/es2019/viewers/doc/pdfRenderer.js +2 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/archiveSidebar/styleWrappers.js +2 -1
- package/dist/esm/viewers/codeViewer/styles.js +21 -5
- package/dist/esm/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/esm/viewers/doc/pdfRenderer.js +6 -6
- package/dist/types/v2/item-viewer-v2.d.ts +7 -1
- package/dist/types/viewers/doc/pdfRenderer.d.ts +8 -1
- package/dist/types-ts4.5/v2/item-viewer-v2.d.ts +7 -1
- package/dist/types-ts4.5/viewers/doc/pdfRenderer.d.ts +8 -1
- package/example-helpers/styles.ts +39 -41
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 48.4.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007) [`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) - Migrated to the new button component
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 48.4.4
|
|
4
11
|
|
|
5
12
|
### 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 = "48.4.
|
|
13
|
+
var packageVersion = exports.packageVersion = "48.4.5";
|
|
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.4.
|
|
15
|
+
var packageVersion = "48.4.5";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
|
@@ -152,7 +152,8 @@ var ArchiveSidebarFileEntryWrapper = exports.ArchiveSidebarFileEntryWrapper = fu
|
|
|
152
152
|
var ArchiveLayout = exports.ArchiveLayout = function ArchiveLayout(_ref7) {
|
|
153
153
|
var children = _ref7.children;
|
|
154
154
|
return (0, _react.jsx)("div", {
|
|
155
|
-
css: archiveLayoutStyles
|
|
155
|
+
css: archiveLayoutStyles,
|
|
156
|
+
"data-testid": "archive-layout"
|
|
156
157
|
}, children);
|
|
157
158
|
};
|
|
158
159
|
var ArchiveViewerWrapper = exports.ArchiveViewerWrapper = function ArchiveViewerWrapper(_ref8) {
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.codeViewerHeaderBarStyles = exports.codeViewerHTMLStyles = exports.codeViewWrapperStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _theme = require("@atlaskit/theme");
|
|
11
|
-
|
|
9
|
+
// AFP-2532 TODO: Fix automatic suppressions below
|
|
12
10
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
13
|
-
|
|
11
|
+
|
|
12
|
+
var codeViewWrapperStyles = exports.codeViewWrapperStyles = (0, _react.css)({
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
left: 0,
|
|
15
|
+
top: 0,
|
|
16
|
+
right: 0,
|
|
17
|
+
bottom: 0,
|
|
18
|
+
backgroundColor: "var(--ds-surface, ".concat(_theme.colors.N20, ")"),
|
|
19
|
+
overflow: 'auto'
|
|
20
|
+
});
|
|
14
21
|
|
|
15
22
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
16
|
-
var codeViewerHeaderBarStyles = exports.codeViewerHeaderBarStyles = (0, _react.css)(
|
|
23
|
+
var codeViewerHeaderBarStyles = exports.codeViewerHeaderBarStyles = (0, _react.css)({
|
|
24
|
+
height: '75px',
|
|
25
|
+
backgroundColor: '#1d2125'
|
|
26
|
+
});
|
|
17
27
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
18
28
|
|
|
19
|
-
var codeViewerHTMLStyles = exports.codeViewerHTMLStyles = (0, _react.css)(
|
|
29
|
+
var codeViewerHTMLStyles = exports.codeViewerHTMLStyles = (0, _react.css)({
|
|
30
|
+
display: 'flex',
|
|
31
|
+
lineHeight: '20px',
|
|
32
|
+
overflowX: 'auto',
|
|
33
|
+
whiteSpace: 'pre',
|
|
34
|
+
fontSize: '12px',
|
|
35
|
+
padding: "var(--ds-space-100, 8px)"
|
|
36
|
+
});
|
|
@@ -9,7 +9,7 @@ exports.PDFPasswordInput = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = require("react");
|
|
12
|
-
var
|
|
12
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
13
13
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
14
14
|
var _lock = _interopRequireDefault(require("@atlaskit/icon/glyph/lock"));
|
|
15
15
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
@@ -118,7 +118,7 @@ var PDFPasswordInput = exports.PDFPasswordInput = function PDFPasswordInput(_ref
|
|
|
118
118
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.incorrect_password))));
|
|
119
119
|
}), (0, _react2.jsx)(_primitives.Box, {
|
|
120
120
|
xcss: footerStyles
|
|
121
|
-
}, (0, _react2.jsx)(
|
|
121
|
+
}, (0, _react2.jsx)(_new.default, {
|
|
122
122
|
appearance: "primary",
|
|
123
123
|
type: "submit",
|
|
124
124
|
isLoading: submitting
|
|
@@ -91,11 +91,11 @@ var globalStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat
|
|
|
91
91
|
boxShadow: '0 2px 10px rgba(255, 255, 0, 1)'
|
|
92
92
|
}
|
|
93
93
|
}));
|
|
94
|
-
var
|
|
95
|
-
function
|
|
96
|
-
(0, _classCallCheck2.default)(this,
|
|
94
|
+
var CmapFactory = /*#__PURE__*/function () {
|
|
95
|
+
function CmapFactory() {
|
|
96
|
+
(0, _classCallCheck2.default)(this, CmapFactory);
|
|
97
97
|
}
|
|
98
|
-
(0, _createClass2.default)(
|
|
98
|
+
(0, _createClass2.default)(CmapFactory, [{
|
|
99
99
|
key: "fetch",
|
|
100
100
|
value: function () {
|
|
101
101
|
var _fetch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
|
|
@@ -129,7 +129,7 @@ var CmapFacotry = /*#__PURE__*/function () {
|
|
|
129
129
|
return fetch;
|
|
130
130
|
}()
|
|
131
131
|
}]);
|
|
132
|
-
return
|
|
132
|
+
return CmapFactory;
|
|
133
133
|
}();
|
|
134
134
|
var defaultWorkerUrl = '';
|
|
135
135
|
var PDFRendererBase = function PDFRendererBase(_ref2) {
|
|
@@ -187,7 +187,7 @@ var PDFRendererBase = function PDFRendererBase(_ref2) {
|
|
|
187
187
|
_pdf.GlobalWorkerOptions.workerSrc = workerUrl !== null && workerUrl !== void 0 ? workerUrl : defaultWorkerUrl;
|
|
188
188
|
getDocumentTask = (0, _pdf.getDocument)({
|
|
189
189
|
url: src,
|
|
190
|
-
CMapReaderFactory:
|
|
190
|
+
CMapReaderFactory: CmapFactory
|
|
191
191
|
});
|
|
192
192
|
getDocumentTask.onPassword = function (updatePassword, e) {
|
|
193
193
|
updatePasswordRef.current = updatePassword;
|
|
@@ -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.4.
|
|
4
|
+
const packageVersion = "48.4.5";
|
|
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.4.
|
|
5
|
+
const packageVersion = "48.4.5";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -2,28 +2,28 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
3
3
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
4
4
|
import { colors } from '@atlaskit/theme';
|
|
5
|
-
export const codeViewWrapperStyles = css
|
|
6
|
-
position: absolute
|
|
7
|
-
left: 0
|
|
8
|
-
top: 0
|
|
9
|
-
right: 0
|
|
10
|
-
bottom: 0
|
|
11
|
-
|
|
12
|
-
overflow: auto
|
|
13
|
-
|
|
5
|
+
export const codeViewWrapperStyles = css({
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
left: 0,
|
|
8
|
+
top: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
bottom: 0,
|
|
11
|
+
backgroundColor: `var(--ds-surface, ${colors.N20})`,
|
|
12
|
+
overflow: 'auto'
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
16
|
-
export const codeViewerHeaderBarStyles = css
|
|
17
|
-
height: 75px
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export const codeViewerHeaderBarStyles = css({
|
|
17
|
+
height: '75px',
|
|
18
|
+
backgroundColor: '#1d2125'
|
|
19
|
+
});
|
|
20
20
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
21
21
|
|
|
22
|
-
export const codeViewerHTMLStyles = css
|
|
23
|
-
display: flex
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
padding:
|
|
29
|
-
|
|
22
|
+
export const codeViewerHTMLStyles = css({
|
|
23
|
+
display: 'flex',
|
|
24
|
+
lineHeight: '20px',
|
|
25
|
+
overflowX: 'auto',
|
|
26
|
+
whiteSpace: 'pre',
|
|
27
|
+
fontSize: '12px',
|
|
28
|
+
padding: "var(--ds-space-100, 8px)"
|
|
29
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**@jsx jsx */
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import Button from '@atlaskit/button/new';
|
|
5
5
|
import TextField from '@atlaskit/textfield';
|
|
6
6
|
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
7
7
|
import Form, { Field } from '@atlaskit/form';
|
|
@@ -103,7 +103,7 @@ export const PDFPasswordInput = ({
|
|
|
103
103
|
css: errorMessageStyle
|
|
104
104
|
}, jsx(FormattedMessage, messages.incorrect_password))))), jsx(Box, {
|
|
105
105
|
xcss: footerStyles
|
|
106
|
-
}, jsx(
|
|
106
|
+
}, jsx(Button, {
|
|
107
107
|
appearance: "primary",
|
|
108
108
|
type: "submit",
|
|
109
109
|
isLoading: submitting
|
|
@@ -77,7 +77,7 @@ const globalStyles = css({
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
class
|
|
80
|
+
class CmapFactory {
|
|
81
81
|
constructor() {}
|
|
82
82
|
async fetch({
|
|
83
83
|
name
|
|
@@ -126,7 +126,7 @@ const PDFRendererBase = ({
|
|
|
126
126
|
GlobalWorkerOptions.workerSrc = workerUrl !== null && workerUrl !== void 0 ? workerUrl : defaultWorkerUrl;
|
|
127
127
|
const getDocumentTask = getDocument({
|
|
128
128
|
url: src,
|
|
129
|
-
CMapReaderFactory:
|
|
129
|
+
CMapReaderFactory: CmapFactory
|
|
130
130
|
});
|
|
131
131
|
getDocumentTask.onPassword = (updatePassword, e) => {
|
|
132
132
|
updatePasswordRef.current = updatePassword;
|
|
@@ -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 = "48.4.
|
|
4
|
+
var packageVersion = "48.4.5";
|
|
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 = "48.4.
|
|
8
|
+
var packageVersion = "48.4.5";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
|
@@ -146,7 +146,8 @@ export var ArchiveSidebarFileEntryWrapper = function ArchiveSidebarFileEntryWrap
|
|
|
146
146
|
export var ArchiveLayout = function ArchiveLayout(_ref7) {
|
|
147
147
|
var children = _ref7.children;
|
|
148
148
|
return jsx("div", {
|
|
149
|
-
css: archiveLayoutStyles
|
|
149
|
+
css: archiveLayoutStyles,
|
|
150
|
+
"data-testid": "archive-layout"
|
|
150
151
|
}, children);
|
|
151
152
|
};
|
|
152
153
|
export var ArchiveViewerWrapper = function ArchiveViewerWrapper(_ref8) {
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
5
3
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
6
4
|
import { colors } from '@atlaskit/theme';
|
|
7
|
-
export var codeViewWrapperStyles = css(
|
|
5
|
+
export var codeViewWrapperStyles = css({
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
left: 0,
|
|
8
|
+
top: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
bottom: 0,
|
|
11
|
+
backgroundColor: "var(--ds-surface, ".concat(colors.N20, ")"),
|
|
12
|
+
overflow: 'auto'
|
|
13
|
+
});
|
|
8
14
|
|
|
9
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
10
|
-
export var codeViewerHeaderBarStyles = css(
|
|
16
|
+
export var codeViewerHeaderBarStyles = css({
|
|
17
|
+
height: '75px',
|
|
18
|
+
backgroundColor: '#1d2125'
|
|
19
|
+
});
|
|
11
20
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
12
21
|
|
|
13
|
-
export var codeViewerHTMLStyles = css(
|
|
22
|
+
export var codeViewerHTMLStyles = css({
|
|
23
|
+
display: 'flex',
|
|
24
|
+
lineHeight: '20px',
|
|
25
|
+
overflowX: 'auto',
|
|
26
|
+
whiteSpace: 'pre',
|
|
27
|
+
fontSize: '12px',
|
|
28
|
+
padding: "var(--ds-space-100, 8px)"
|
|
29
|
+
});
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
/**@jsx jsx */
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import Button from '@atlaskit/button/new';
|
|
6
6
|
import TextField from '@atlaskit/textfield';
|
|
7
7
|
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
8
8
|
import Form, { Field } from '@atlaskit/form';
|
|
@@ -107,7 +107,7 @@ export var PDFPasswordInput = function PDFPasswordInput(_ref) {
|
|
|
107
107
|
}, jsx(FormattedMessage, messages.incorrect_password))));
|
|
108
108
|
}), jsx(Box, {
|
|
109
109
|
xcss: footerStyles
|
|
110
|
-
}, jsx(
|
|
110
|
+
}, jsx(Button, {
|
|
111
111
|
appearance: "primary",
|
|
112
112
|
type: "submit",
|
|
113
113
|
isLoading: submitting
|
|
@@ -81,11 +81,11 @@ var globalStyles = css(_defineProperty({}, ".".concat(pdfViewerClassName), {
|
|
|
81
81
|
boxShadow: '0 2px 10px rgba(255, 255, 0, 1)'
|
|
82
82
|
}
|
|
83
83
|
}));
|
|
84
|
-
var
|
|
85
|
-
function
|
|
86
|
-
_classCallCheck(this,
|
|
84
|
+
var CmapFactory = /*#__PURE__*/function () {
|
|
85
|
+
function CmapFactory() {
|
|
86
|
+
_classCallCheck(this, CmapFactory);
|
|
87
87
|
}
|
|
88
|
-
_createClass(
|
|
88
|
+
_createClass(CmapFactory, [{
|
|
89
89
|
key: "fetch",
|
|
90
90
|
value: function () {
|
|
91
91
|
var _fetch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
@@ -119,7 +119,7 @@ var CmapFacotry = /*#__PURE__*/function () {
|
|
|
119
119
|
return fetch;
|
|
120
120
|
}()
|
|
121
121
|
}]);
|
|
122
|
-
return
|
|
122
|
+
return CmapFactory;
|
|
123
123
|
}();
|
|
124
124
|
var defaultWorkerUrl = '';
|
|
125
125
|
var PDFRendererBase = function PDFRendererBase(_ref2) {
|
|
@@ -177,7 +177,7 @@ var PDFRendererBase = function PDFRendererBase(_ref2) {
|
|
|
177
177
|
GlobalWorkerOptions.workerSrc = workerUrl !== null && workerUrl !== void 0 ? workerUrl : defaultWorkerUrl;
|
|
178
178
|
getDocumentTask = getDocument({
|
|
179
179
|
url: src,
|
|
180
|
-
CMapReaderFactory:
|
|
180
|
+
CMapReaderFactory: CmapFactory
|
|
181
181
|
});
|
|
182
182
|
getDocumentTask.onPassword = function (updatePassword, e) {
|
|
183
183
|
updatePasswordRef.current = updatePassword;
|
|
@@ -18,4 +18,10 @@ export declare const isExternalImageItem: (fileItem: FileItem) => fileItem is "e
|
|
|
18
18
|
export declare const isFileStateItem: (fileItem: FileItem) => fileItem is FileState;
|
|
19
19
|
export declare const MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER: number;
|
|
20
20
|
export declare const ItemViewerV2Base: ({ identifier, showControls, onClose, previewCount, contextId, createAnalyticsEvent, }: Props) => React.ReactElement | null;
|
|
21
|
-
export declare const ItemViewerV2: React.ForwardRefExoticComponent<Omit<
|
|
21
|
+
export declare const ItemViewerV2: React.ForwardRefExoticComponent<Omit<Readonly<{
|
|
22
|
+
identifier: Identifier;
|
|
23
|
+
onClose?: (() => void) | undefined;
|
|
24
|
+
previewCount: number;
|
|
25
|
+
contextId?: string | undefined;
|
|
26
|
+
featureFlags?: MediaFeatureFlags | undefined;
|
|
27
|
+
}> & WithAnalyticsEventsProps & WithShowControlMethodProp, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -11,4 +11,11 @@ export type Props = {
|
|
|
11
11
|
onSuccess?: () => void;
|
|
12
12
|
onError?: (error: MediaViewerError) => void;
|
|
13
13
|
} & WithAnalyticsEventsProps;
|
|
14
|
-
export declare const PDFRenderer: React.ForwardRefExoticComponent<Omit<
|
|
14
|
+
export declare const PDFRenderer: React.ForwardRefExoticComponent<Omit<{
|
|
15
|
+
item: FileState;
|
|
16
|
+
src: string;
|
|
17
|
+
workerUrl?: string | undefined;
|
|
18
|
+
onClose?: (() => void) | undefined;
|
|
19
|
+
onSuccess?: (() => void) | undefined;
|
|
20
|
+
onError?: ((error: MediaViewerError) => void) | undefined;
|
|
21
|
+
} & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -18,4 +18,10 @@ export declare const isExternalImageItem: (fileItem: FileItem) => fileItem is "e
|
|
|
18
18
|
export declare const isFileStateItem: (fileItem: FileItem) => fileItem is FileState;
|
|
19
19
|
export declare const MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER: number;
|
|
20
20
|
export declare const ItemViewerV2Base: ({ identifier, showControls, onClose, previewCount, contextId, createAnalyticsEvent, }: Props) => React.ReactElement | null;
|
|
21
|
-
export declare const ItemViewerV2: React.ForwardRefExoticComponent<Omit<
|
|
21
|
+
export declare const ItemViewerV2: React.ForwardRefExoticComponent<Omit<Readonly<{
|
|
22
|
+
identifier: Identifier;
|
|
23
|
+
onClose?: (() => void) | undefined;
|
|
24
|
+
previewCount: number;
|
|
25
|
+
contextId?: string | undefined;
|
|
26
|
+
featureFlags?: MediaFeatureFlags | undefined;
|
|
27
|
+
}> & WithAnalyticsEventsProps & WithShowControlMethodProp, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -11,4 +11,11 @@ export type Props = {
|
|
|
11
11
|
onSuccess?: () => void;
|
|
12
12
|
onError?: (error: MediaViewerError) => void;
|
|
13
13
|
} & WithAnalyticsEventsProps;
|
|
14
|
-
export declare const PDFRenderer: React.ForwardRefExoticComponent<Omit<
|
|
14
|
+
export declare const PDFRenderer: React.ForwardRefExoticComponent<Omit<{
|
|
15
|
+
item: FileState;
|
|
16
|
+
src: string;
|
|
17
|
+
workerUrl?: string | undefined;
|
|
18
|
+
onClose?: (() => void) | undefined;
|
|
19
|
+
onSuccess?: (() => void) | undefined;
|
|
20
|
+
onError?: ((error: MediaViewerError) => void) | undefined;
|
|
21
|
+
} & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { token } from '@atlaskit/tokens';
|
|
3
3
|
|
|
4
|
-
export const containerStyles = css
|
|
5
|
-
display: flex
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const groupStyles = css
|
|
10
|
-
width: 250px
|
|
11
|
-
padding:
|
|
12
|
-
|
|
4
|
+
export const containerStyles = css({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'row',
|
|
7
|
+
flexWrap: 'wrap',
|
|
8
|
+
});
|
|
9
|
+
export const groupStyles = css({
|
|
10
|
+
width: '250px',
|
|
11
|
+
padding: token('space.250', '20px'),
|
|
12
|
+
});
|
|
13
13
|
|
|
14
|
-
export const buttonListStyles = css
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
export const buttonListStyles = css({
|
|
15
|
+
paddingLeft: 0,
|
|
16
|
+
listStyle: 'none',
|
|
17
|
+
});
|
|
18
18
|
|
|
19
|
-
export const mVSidebarStyles = css
|
|
20
|
-
height: calc(100vh - 64px)
|
|
21
|
-
padding:
|
|
22
|
-
overflow: auto
|
|
19
|
+
export const mVSidebarStyles = css({
|
|
20
|
+
height: 'calc(100vh - 64px)',
|
|
21
|
+
padding: token('space.400', '32px'),
|
|
22
|
+
overflow: 'auto',
|
|
23
|
+
h2: {
|
|
24
|
+
color: token('color.text', '#c7d1db'),
|
|
25
|
+
marginBottom: token('space.200', '16px'),
|
|
26
|
+
},
|
|
27
|
+
tbody: {
|
|
28
|
+
borderBottom: 'none',
|
|
29
|
+
verticalAlign: 'top',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
export const mVSidebarHeaderStyles = css({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
width: '100%',
|
|
36
|
+
justifyContent: 'space-between',
|
|
37
|
+
});
|
|
28
38
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
width: 100%;
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
export const nativePreviewButtonStyles = css`
|
|
42
|
-
height: 125px;
|
|
43
|
-
width: 156px;
|
|
44
|
-
background: none;
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
appearance: none;
|
|
47
|
-
padding: 0;
|
|
48
|
-
`;
|
|
39
|
+
export const nativePreviewButtonStyles = css({
|
|
40
|
+
height: '125px',
|
|
41
|
+
width: '156px',
|
|
42
|
+
background: 'none',
|
|
43
|
+
overflow: 'hidden',
|
|
44
|
+
appearance: 'none',
|
|
45
|
+
padding: 0,
|
|
46
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "48.4.
|
|
3
|
+
"version": "48.4.5",
|
|
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/"
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/analytics-next": "^9.
|
|
39
|
-
"@atlaskit/button": "^17.
|
|
38
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
39
|
+
"@atlaskit/button": "^17.14.0",
|
|
40
40
|
"@atlaskit/code": "^15.1.0",
|
|
41
|
-
"@atlaskit/form": "^9.
|
|
41
|
+
"@atlaskit/form": "^9.3.0",
|
|
42
42
|
"@atlaskit/icon": "^22.1.0",
|
|
43
43
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
44
|
-
"@atlaskit/media-client": "^26.
|
|
44
|
+
"@atlaskit/media-client": "^26.3.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^11.1.0",
|
|
47
|
-
"@atlaskit/media-ui": "^25.
|
|
47
|
+
"@atlaskit/media-ui": "^25.9.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
49
|
-
"@atlaskit/primitives": "^5.
|
|
49
|
+
"@atlaskit/primitives": "^5.6.0",
|
|
50
50
|
"@atlaskit/side-navigation": "^3.0.0",
|
|
51
51
|
"@atlaskit/spinner": "^16.0.0",
|
|
52
52
|
"@atlaskit/textfield": "^6.1.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@atlaskit/media-core": "^34.2.0",
|
|
78
78
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
79
79
|
"@atlaskit/media-state": "^1.0.0",
|
|
80
|
-
"@atlaskit/media-test-data": "^
|
|
80
|
+
"@atlaskit/media-test-data": "^2.0.0",
|
|
81
81
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
82
82
|
"@atlaskit/ssr": "*",
|
|
83
83
|
"@atlaskit/visual-regression": "*",
|