@atlaskit/media-viewer 52.4.0 → 52.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/doc-next/doc-viewer.js +3 -1
- package/dist/cjs/viewers/doc-next/index.js +1 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/doc-next/doc-viewer.js +3 -1
- package/dist/es2019/viewers/doc-next/index.js +1 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/doc-next/doc-viewer.js +3 -1
- package/dist/esm/viewers/doc-next/index.js +1 -0
- package/dist/types/viewers/doc-next/doc-viewer.d.ts +2 -1
- package/dist/types-ts4.5/viewers/doc-next/doc-viewer.d.ts +2 -1
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 52.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#179532](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/179532)
|
|
8
|
+
[`096312eadd358`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/096312eadd358) -
|
|
9
|
+
Fixed success analytics and metrics for doc-next viewer
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 52.4.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 52.4.0
|
|
4
19
|
|
|
5
20
|
### Minor 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 = "52.
|
|
13
|
+
var packageVersion = exports.packageVersion = "52.4.1";
|
|
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 = "52.
|
|
15
|
+
var packageVersion = "52.4.1";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
|
@@ -64,6 +64,7 @@ var DocViewer = exports.DocViewer = function DocViewer(_ref) {
|
|
|
64
64
|
fileState = _ref.fileState,
|
|
65
65
|
collectionName = _ref.collectionName,
|
|
66
66
|
onError = _ref.onError,
|
|
67
|
+
onSuccess = _ref.onSuccess,
|
|
67
68
|
traceContext = _ref.traceContext;
|
|
68
69
|
var _useReducer = (0, _react.useReducer)(reducer, initialState),
|
|
69
70
|
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
@@ -192,7 +193,8 @@ var DocViewer = exports.DocViewer = function DocViewer(_ref) {
|
|
|
192
193
|
}, /*#__PURE__*/React.createElement(_mediaDocumentViewer.DocumentViewer, {
|
|
193
194
|
getContent: getContent,
|
|
194
195
|
getPageImageUrl: getPageImageUrl,
|
|
195
|
-
zoom: state.zoomLevel.value
|
|
196
|
+
zoom: state.zoomLevel.value,
|
|
197
|
+
onSuccess: onSuccess
|
|
196
198
|
}), /*#__PURE__*/React.createElement(_zoomControls.ZoomControls, {
|
|
197
199
|
onChange: onZoomChange,
|
|
198
200
|
zoomLevel: state.zoomLevel
|
|
@@ -92,6 +92,7 @@ var DocViewer = exports.DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
92
92
|
fileState: this.props.item,
|
|
93
93
|
collectionName: this.props.collectionName,
|
|
94
94
|
onError: this.props.onError,
|
|
95
|
+
onSuccess: this.props.onSuccess,
|
|
95
96
|
traceContext: this.props.traceContext
|
|
96
97
|
});
|
|
97
98
|
}
|
|
@@ -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 = "52.
|
|
4
|
+
const packageVersion = "52.4.1";
|
|
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 = "52.
|
|
5
|
+
const packageVersion = "52.4.1";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -54,6 +54,7 @@ export const DocViewer = ({
|
|
|
54
54
|
fileState,
|
|
55
55
|
collectionName,
|
|
56
56
|
onError,
|
|
57
|
+
onSuccess,
|
|
57
58
|
traceContext
|
|
58
59
|
}) => {
|
|
59
60
|
const [state, dispatch] = useReducer(reducer, initialState);
|
|
@@ -129,7 +130,8 @@ export const DocViewer = ({
|
|
|
129
130
|
}, /*#__PURE__*/React.createElement(DocumentViewer, {
|
|
130
131
|
getContent: getContent,
|
|
131
132
|
getPageImageUrl: getPageImageUrl,
|
|
132
|
-
zoom: state.zoomLevel.value
|
|
133
|
+
zoom: state.zoomLevel.value,
|
|
134
|
+
onSuccess: onSuccess
|
|
133
135
|
}), /*#__PURE__*/React.createElement(ZoomControls, {
|
|
134
136
|
onChange: onZoomChange,
|
|
135
137
|
zoomLevel: state.zoomLevel
|
|
@@ -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 = "52.
|
|
4
|
+
var packageVersion = "52.4.1";
|
|
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 = "52.
|
|
8
|
+
var packageVersion = "52.4.1";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
|
@@ -55,6 +55,7 @@ export var DocViewer = function DocViewer(_ref) {
|
|
|
55
55
|
fileState = _ref.fileState,
|
|
56
56
|
collectionName = _ref.collectionName,
|
|
57
57
|
onError = _ref.onError,
|
|
58
|
+
onSuccess = _ref.onSuccess,
|
|
58
59
|
traceContext = _ref.traceContext;
|
|
59
60
|
var _useReducer = useReducer(reducer, initialState),
|
|
60
61
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -183,7 +184,8 @@ export var DocViewer = function DocViewer(_ref) {
|
|
|
183
184
|
}, /*#__PURE__*/React.createElement(DocumentViewer, {
|
|
184
185
|
getContent: getContent,
|
|
185
186
|
getPageImageUrl: getPageImageUrl,
|
|
186
|
-
zoom: state.zoomLevel.value
|
|
187
|
+
zoom: state.zoomLevel.value,
|
|
188
|
+
onSuccess: onSuccess
|
|
187
189
|
}), /*#__PURE__*/React.createElement(ZoomControls, {
|
|
188
190
|
onChange: onZoomChange,
|
|
189
191
|
zoomLevel: state.zoomLevel
|
|
@@ -8,6 +8,7 @@ type Props = {
|
|
|
8
8
|
collectionName?: string;
|
|
9
9
|
onError: (error: MediaViewerError) => void;
|
|
10
10
|
traceContext: MediaTraceContext;
|
|
11
|
+
onSuccess?: () => void;
|
|
11
12
|
};
|
|
12
|
-
export declare const DocViewer: ({ mediaClient, fileState, collectionName, onError, traceContext, }: Props) => JSX.Element;
|
|
13
|
+
export declare const DocViewer: ({ mediaClient, fileState, collectionName, onError, onSuccess, traceContext, }: Props) => JSX.Element;
|
|
13
14
|
export default DocViewer;
|
|
@@ -8,6 +8,7 @@ type Props = {
|
|
|
8
8
|
collectionName?: string;
|
|
9
9
|
onError: (error: MediaViewerError) => void;
|
|
10
10
|
traceContext: MediaTraceContext;
|
|
11
|
+
onSuccess?: () => void;
|
|
11
12
|
};
|
|
12
|
-
export declare const DocViewer: ({ mediaClient, fileState, collectionName, onError, traceContext, }: Props) => JSX.Element;
|
|
13
|
+
export declare const DocViewer: ({ mediaClient, fileState, collectionName, onError, onSuccess, traceContext, }: Props) => JSX.Element;
|
|
13
14
|
export default DocViewer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "52.4.
|
|
3
|
+
"version": "52.4.2",
|
|
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/"
|
|
@@ -32,28 +32,27 @@
|
|
|
32
32
|
"team": "Media Exif",
|
|
33
33
|
"website": {
|
|
34
34
|
"name": "Media Viewer"
|
|
35
|
-
}
|
|
36
|
-
"runReact18": true
|
|
35
|
+
}
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
40
39
|
"@atlaskit/button": "^23.2.0",
|
|
41
40
|
"@atlaskit/code": "^17.2.0",
|
|
42
|
-
"@atlaskit/css": "^0.
|
|
41
|
+
"@atlaskit/css": "^0.12.0",
|
|
43
42
|
"@atlaskit/form": "^12.0.0",
|
|
44
43
|
"@atlaskit/heading": "^5.2.0",
|
|
45
44
|
"@atlaskit/icon": "^27.2.0",
|
|
46
45
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
47
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon-lab": "^5.1.0",
|
|
48
47
|
"@atlaskit/media-client": "^34.2.0",
|
|
49
48
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
50
49
|
"@atlaskit/media-common": "^12.3.0",
|
|
51
|
-
"@atlaskit/media-document-viewer": "^0.
|
|
50
|
+
"@atlaskit/media-document-viewer": "^0.3.0",
|
|
52
51
|
"@atlaskit/media-svg": "^2.1.0",
|
|
53
52
|
"@atlaskit/media-ui": "^28.5.0",
|
|
54
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
54
|
"@atlaskit/portal": "^5.1.0",
|
|
56
|
-
"@atlaskit/primitives": "^14.
|
|
55
|
+
"@atlaskit/primitives": "^14.10.0",
|
|
57
56
|
"@atlaskit/side-navigation": "^11.0.0",
|
|
58
57
|
"@atlaskit/spinner": "^18.0.0",
|
|
59
58
|
"@atlaskit/textfield": "^8.0.0",
|
|
@@ -91,7 +90,7 @@
|
|
|
91
90
|
"@af/visual-regression": "workspace:^",
|
|
92
91
|
"@atlaskit/media-core": "^37.0.0",
|
|
93
92
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
94
|
-
"@atlaskit/media-state": "^1.
|
|
93
|
+
"@atlaskit/media-state": "^1.7.0",
|
|
95
94
|
"@atlaskit/media-test-data": "^3.1.0",
|
|
96
95
|
"@atlaskit/media-test-helpers": "^37.0.0",
|
|
97
96
|
"@atlaskit/ssr": "workspace:^",
|