@atlaskit/media-viewer 49.4.2 → 49.4.4

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/media-viewer
2
2
 
3
+ ## 49.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#171994](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171994)
8
+ [`be58e4bb2e387`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be58e4bb2e387) -
9
+ Migrating usages of UNSAFE types and entrypoints that have been renamed in `@atlaskit/icon` and
10
+ `@atlaskit/icon-lab`.
11
+ - Updated dependencies
12
+
13
+ ## 49.4.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [#169090](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169090)
18
+ [`060be8404fd11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/060be8404fd11) -
19
+ Pass collectioName in CustomViewer to the getFileBinary method.
20
+
3
21
  ## 49.4.2
4
22
 
5
23
  ### 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.4.2";
13
+ var packageVersion = exports.packageVersion = "49.4.4";
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.4.2";
15
+ var packageVersion = "49.4.4";
16
16
  var ufoExperience;
17
17
  var getExperience = function getExperience() {
18
18
  if (!ufoExperience) {
@@ -16,6 +16,7 @@ var CustomViewer = exports.CustomViewer = function CustomViewer(_ref) {
16
16
  var mediaClient = _ref.mediaClient,
17
17
  item = _ref.item,
18
18
  customRendererConfig = _ref.customRendererConfig,
19
+ collectionName = _ref.collectionName,
19
20
  onSuccess = _ref.onSuccess,
20
21
  onError = _ref.onError;
21
22
  var _useState = (0, _react.useState)(),
@@ -31,14 +32,14 @@ var CustomViewer = exports.CustomViewer = function CustomViewer(_ref) {
31
32
  if (item.status === 'processed' || item.status === 'failed-processing') {
32
33
  setGetBinaryContent(function () {
33
34
  return function () {
34
- return mediaClient.mediaStore.getFileBinary(item.id, undefined, abortController);
35
+ return mediaClient.mediaStore.getFileBinary(item.id, collectionName, abortController);
35
36
  };
36
37
  });
37
38
  }
38
39
  return function () {
39
40
  return abortController.abort();
40
41
  };
41
- }, [item, mediaClient]);
42
+ }, [collectionName, item, mediaClient]);
42
43
  var onLoadFailed = (0, _react.useCallback)(function (error) {
43
44
  var mediaError = new _errors.MediaViewerError('custom-viewer-error', error);
44
45
  onError(mediaError, item);
@@ -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.4.2";
4
+ const packageVersion = "49.4.4";
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.4.2";
5
+ const packageVersion = "49.4.4";
6
6
  let ufoExperience;
7
7
  const getExperience = () => {
8
8
  if (!ufoExperience) {
@@ -6,6 +6,7 @@ export const CustomViewer = ({
6
6
  mediaClient,
7
7
  item,
8
8
  customRendererConfig,
9
+ collectionName,
9
10
  onSuccess,
10
11
  onError
11
12
  }) => {
@@ -17,10 +18,10 @@ export const CustomViewer = ({
17
18
  // The 'getBinaryContent' function has to be updated when the item changes
18
19
  // This approach handles aborting in-progress request outside of the custom-renderer concern
19
20
  if (item.status === 'processed' || item.status === 'failed-processing') {
20
- setGetBinaryContent(() => () => mediaClient.mediaStore.getFileBinary(item.id, undefined, abortController));
21
+ setGetBinaryContent(() => () => mediaClient.mediaStore.getFileBinary(item.id, collectionName, abortController));
21
22
  }
22
23
  return () => abortController.abort();
23
- }, [item, mediaClient]);
24
+ }, [collectionName, item, mediaClient]);
24
25
  const onLoadFailed = useCallback(error => {
25
26
  const mediaError = new MediaViewerError('custom-viewer-error', error);
26
27
  onError(mediaError, item);
@@ -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.4.2";
4
+ var packageVersion = "49.4.4";
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.4.2";
8
+ var packageVersion = "49.4.4";
9
9
  var ufoExperience;
10
10
  var getExperience = function getExperience() {
11
11
  if (!ufoExperience) {
@@ -7,6 +7,7 @@ export var CustomViewer = function CustomViewer(_ref) {
7
7
  var mediaClient = _ref.mediaClient,
8
8
  item = _ref.item,
9
9
  customRendererConfig = _ref.customRendererConfig,
10
+ collectionName = _ref.collectionName,
10
11
  onSuccess = _ref.onSuccess,
11
12
  onError = _ref.onError;
12
13
  var _useState = useState(),
@@ -22,14 +23,14 @@ export var CustomViewer = function CustomViewer(_ref) {
22
23
  if (item.status === 'processed' || item.status === 'failed-processing') {
23
24
  setGetBinaryContent(function () {
24
25
  return function () {
25
- return mediaClient.mediaStore.getFileBinary(item.id, undefined, abortController);
26
+ return mediaClient.mediaStore.getFileBinary(item.id, collectionName, abortController);
26
27
  };
27
28
  });
28
29
  }
29
30
  return function () {
30
31
  return abortController.abort();
31
32
  };
32
- }, [item, mediaClient]);
33
+ }, [collectionName, item, mediaClient]);
33
34
  var onLoadFailed = useCallback(function (error) {
34
35
  var mediaError = new MediaViewerError('custom-viewer-error', error);
35
36
  onError(mediaError, item);
@@ -6,7 +6,8 @@ export type Props = {
6
6
  mediaClient: MediaClient;
7
7
  item: NonErrorFileState;
8
8
  customRendererConfig: CustomRendererConfig;
9
+ collectionName?: string;
9
10
  onError: (error: MediaViewerError, fileItem?: FileState) => void;
10
11
  onSuccess: () => void;
11
12
  };
12
- export declare const CustomViewer: ({ mediaClient, item, customRendererConfig, onSuccess, onError, }: Props) => JSX.Element;
13
+ export declare const CustomViewer: ({ mediaClient, item, customRendererConfig, collectionName, onSuccess, onError, }: Props) => JSX.Element;
@@ -6,7 +6,8 @@ export type Props = {
6
6
  mediaClient: MediaClient;
7
7
  item: NonErrorFileState;
8
8
  customRendererConfig: CustomRendererConfig;
9
+ collectionName?: string;
9
10
  onError: (error: MediaViewerError, fileItem?: FileState) => void;
10
11
  onSuccess: () => void;
11
12
  };
12
- export declare const CustomViewer: ({ mediaClient, item, customRendererConfig, onSuccess, onError, }: Props) => JSX.Element;
13
+ export declare const CustomViewer: ({ mediaClient, item, customRendererConfig, collectionName, onSuccess, onError, }: Props) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-viewer",
3
- "version": "49.4.2",
3
+ "version": "49.4.4",
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,11 +37,11 @@
37
37
  "@atlaskit/analytics-next": "^10.1.0",
38
38
  "@atlaskit/button": "^20.3.0",
39
39
  "@atlaskit/code": "^15.6.0",
40
- "@atlaskit/form": "^10.5.0",
41
- "@atlaskit/icon": "^22.26.0",
42
- "@atlaskit/icon-file-type": "^6.7.0",
43
- "@atlaskit/media-client": "^28.3.0",
44
- "@atlaskit/media-client-react": "^2.3.0",
40
+ "@atlaskit/form": "^10.6.0",
41
+ "@atlaskit/icon": "^23.0.0",
42
+ "@atlaskit/icon-file-type": "^6.8.0",
43
+ "@atlaskit/media-client": "^28.5.0",
44
+ "@atlaskit/media-client-react": "^2.4.0",
45
45
  "@atlaskit/media-common": "^11.7.0",
46
46
  "@atlaskit/media-svg": "^1.0.0",
47
47
  "@atlaskit/media-ui": "^27.0.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/spinner": "^16.3.0",
52
52
  "@atlaskit/textfield": "^6.6.0",
53
53
  "@atlaskit/theme": "^14.0.0",
54
- "@atlaskit/tokens": "^2.3.0",
54
+ "@atlaskit/tokens": "^2.4.0",
55
55
  "@atlaskit/ufo": "^0.3.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@kenjiuno/msgreader": "^1.2.6",
@@ -77,11 +77,11 @@
77
77
  "@af/visual-regression": "*",
78
78
  "@atlaskit/media-core": "^34.3.0",
79
79
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
80
- "@atlaskit/media-state": "^1.1.0",
80
+ "@atlaskit/media-state": "^1.2.0",
81
81
  "@atlaskit/media-test-data": "^2.7.0",
82
82
  "@atlaskit/media-test-helpers": "^34.6.0",
83
83
  "@atlaskit/ssr": "*",
84
- "@atlaskit/toggle": "13.4.8",
84
+ "@atlaskit/toggle": "13.4.9",
85
85
  "@atlaskit/visual-regression": "*",
86
86
  "@atlassian/feature-flags-test-utils": "*",
87
87
  "@atlassian/ufo": "^0.4.0",