@atlaskit/media-viewer 48.2.5 → 48.2.7
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 +12 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/doc/pdfRenderer.js +2 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/doc/pdfRenderer.js +2 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/doc/pdfRenderer.js +2 -0
- package/package.json +6 -5
- package/tmp/api-report-tmp.d.ts +0 -97
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 48.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 48.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#56641](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/56641) [`abc1714faf21`](https://bitbucket.org/atlassian/atlassian-frontend/commits/abc1714faf21) - Bug fix to ensure that PDFRenderer uses the latest version of the `onError` and `onSuccess` callbacks, and not just their initial values
|
|
14
|
+
|
|
3
15
|
## 48.2.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ exports.packageVersion = exports.packageName = void 0;
|
|
|
10
10
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
11
11
|
var componentName = exports.component = exports.componentName = 'mediaViewer';
|
|
12
12
|
var packageName = exports.packageName = "@atlaskit/media-viewer";
|
|
13
|
-
var packageVersion = exports.packageVersion = "48.2.
|
|
13
|
+
var packageVersion = exports.packageVersion = "48.2.7";
|
|
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.2.
|
|
15
|
+
var packageVersion = "48.2.7";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
|
@@ -98,7 +98,9 @@ var PDFRenderer = exports.PDFRenderer = function PDFRenderer(_ref2) {
|
|
|
98
98
|
var docRef = (0, _react.useRef)();
|
|
99
99
|
var pdfViewerRef = (0, _react.useRef)();
|
|
100
100
|
var onSuccessRef = (0, _react.useRef)(onSuccess);
|
|
101
|
+
onSuccessRef.current = onSuccess;
|
|
101
102
|
var onErrorRef = (0, _react.useRef)(onError);
|
|
103
|
+
onErrorRef.current = onError;
|
|
102
104
|
(0, _react.useEffect)(function () {
|
|
103
105
|
var isSubscribed = true;
|
|
104
106
|
var fetchDoc = /*#__PURE__*/function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "48.2.
|
|
4
|
+
const packageVersion = "48.2.7";
|
|
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.2.
|
|
5
|
+
const packageVersion = "48.2.7";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -116,7 +116,9 @@ export const PDFRenderer = ({
|
|
|
116
116
|
const docRef = useRef();
|
|
117
117
|
const pdfViewerRef = useRef();
|
|
118
118
|
const onSuccessRef = useRef(onSuccess);
|
|
119
|
+
onSuccessRef.current = onSuccess;
|
|
119
120
|
const onErrorRef = useRef(onError);
|
|
121
|
+
onErrorRef.current = onError;
|
|
120
122
|
useEffect(() => {
|
|
121
123
|
let isSubscribed = true;
|
|
122
124
|
const fetchDoc = async () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "48.2.
|
|
4
|
+
var packageVersion = "48.2.7";
|
|
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.2.
|
|
8
|
+
var packageVersion = "48.2.7";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
|
@@ -88,7 +88,9 @@ export var PDFRenderer = function PDFRenderer(_ref2) {
|
|
|
88
88
|
var docRef = useRef();
|
|
89
89
|
var pdfViewerRef = useRef();
|
|
90
90
|
var onSuccessRef = useRef(onSuccess);
|
|
91
|
+
onSuccessRef.current = onSuccess;
|
|
91
92
|
var onErrorRef = useRef(onError);
|
|
93
|
+
onErrorRef.current = onError;
|
|
92
94
|
useEffect(function () {
|
|
93
95
|
var isSubscribed = true;
|
|
94
96
|
var fetchDoc = /*#__PURE__*/function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "48.2.
|
|
3
|
+
"version": "48.2.7",
|
|
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/"
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
39
39
|
"@atlaskit/button": "^16.17.0",
|
|
40
|
-
"@atlaskit/code": "^15.
|
|
40
|
+
"@atlaskit/code": "^15.1.0",
|
|
41
41
|
"@atlaskit/icon": "^22.0.0",
|
|
42
42
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
43
|
-
"@atlaskit/media-client": "^25.
|
|
44
|
-
"@atlaskit/media-client-react": "^
|
|
43
|
+
"@atlaskit/media-client": "^25.1.0",
|
|
44
|
+
"@atlaskit/media-client-react": "^2.0.0",
|
|
45
45
|
"@atlaskit/media-common": "^11.0.0",
|
|
46
46
|
"@atlaskit/media-ui": "^25.0.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
48
48
|
"@atlaskit/side-navigation": "^3.0.0",
|
|
49
49
|
"@atlaskit/spinner": "^16.0.0",
|
|
50
50
|
"@atlaskit/theme": "^12.6.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
51
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
52
52
|
"@atlaskit/ufo": "^0.2.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@kenjiuno/msgreader": "^1.2.6",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@atlaskit/media-core": "^34.1.0",
|
|
73
73
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
74
74
|
"@atlaskit/media-state": "^1.0.0",
|
|
75
|
+
"@atlaskit/media-test-data": "^1.0.0",
|
|
75
76
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
76
77
|
"@atlaskit/ssr": "*",
|
|
77
78
|
"@atlaskit/visual-regression": "*",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/media-viewer"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { Identifier } from '@atlaskit/media-client';
|
|
8
|
-
import { MediaClient } from '@atlaskit/media-client';
|
|
9
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
|
-
import { default as React_2 } from 'react';
|
|
11
|
-
import { ReactNode } from 'react';
|
|
12
|
-
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
13
|
-
|
|
14
|
-
// @public (undocumented)
|
|
15
|
-
interface AsyncMediaViewerState {
|
|
16
|
-
// (undocumented)
|
|
17
|
-
MediaViewer?: MediaViewerWithMediaClientConfigComponent;
|
|
18
|
-
// (undocumented)
|
|
19
|
-
MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// @public (undocumented)
|
|
23
|
-
export type MediaMessage = {
|
|
24
|
-
source: 'media';
|
|
25
|
-
event: 'mediaViewerClosed' | 'mediaViewerOpened';
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// @public (undocumented)
|
|
29
|
-
export class MediaViewer extends React_2.PureComponent<MediaViewerWithMediaClientConfigProps, AsyncMediaViewerState> {
|
|
30
|
-
// (undocumented)
|
|
31
|
-
static displayName: string;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
static MediaViewer?: MediaViewerWithMediaClientConfigComponent;
|
|
34
|
-
// (undocumented)
|
|
35
|
-
static MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
36
|
-
// (undocumented)
|
|
37
|
-
render(): JSX.Element;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
state: AsyncMediaViewerState;
|
|
40
|
-
// (undocumented)
|
|
41
|
-
UNSAFE_componentWillMount(): Promise<void>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// @public (undocumented)
|
|
45
|
-
type MediaViewerAnalyticsErrorBoundaryProps = {
|
|
46
|
-
data?: {
|
|
47
|
-
[k: string]: any;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// @public (undocumented)
|
|
52
|
-
type MediaViewerErrorBoundaryComponent = React_2.ComponentType<MediaViewerAnalyticsErrorBoundaryProps>;
|
|
53
|
-
|
|
54
|
-
// @public (undocumented)
|
|
55
|
-
export interface MediaViewerExtensions {
|
|
56
|
-
// (undocumented)
|
|
57
|
-
sidebar?: {
|
|
58
|
-
icon: ReactNode;
|
|
59
|
-
renderer: (selectedIdentifier: Identifier, actions: MediaViewerExtensionsActions) => ReactNode;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// @public (undocumented)
|
|
64
|
-
export interface MediaViewerExtensionsActions {
|
|
65
|
-
// (undocumented)
|
|
66
|
-
close: () => void;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// @public (undocumented)
|
|
70
|
-
export interface MediaViewerProps {
|
|
71
|
-
// (undocumented)
|
|
72
|
-
readonly collectionName: string;
|
|
73
|
-
// (undocumented)
|
|
74
|
-
readonly contextId?: string;
|
|
75
|
-
// (undocumented)
|
|
76
|
-
readonly extensions?: MediaViewerExtensions;
|
|
77
|
-
// (undocumented)
|
|
78
|
-
readonly featureFlags?: MediaFeatureFlags;
|
|
79
|
-
// (undocumented)
|
|
80
|
-
readonly items: Array<Identifier>;
|
|
81
|
-
// (undocumented)
|
|
82
|
-
readonly mediaClient: MediaClient;
|
|
83
|
-
// (undocumented)
|
|
84
|
-
readonly onClose?: () => void;
|
|
85
|
-
// (undocumented)
|
|
86
|
-
readonly selectedItem: Identifier;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// @public (undocumented)
|
|
90
|
-
type MediaViewerWithMediaClientConfigComponent = React_2.ComponentType<MediaViewerWithMediaClientConfigProps>;
|
|
91
|
-
|
|
92
|
-
// @public (undocumented)
|
|
93
|
-
type MediaViewerWithMediaClientConfigProps = WithMediaClientConfigProps<MediaViewerProps>;
|
|
94
|
-
|
|
95
|
-
// (No @packageDocumentation comment for this package)
|
|
96
|
-
|
|
97
|
-
```
|