@atlaskit/media-viewer 49.2.4 → 49.2.6

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,22 @@
1
1
  # @atlaskit/media-viewer
2
2
 
3
+ ## 49.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#160376](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/160376)
8
+ [`5eebcd17b41ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5eebcd17b41ce) -
9
+ fix React 18 strict mode issue and clean-up examples
10
+
11
+ ## 49.2.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#158851](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/158851)
16
+ [`f5c5983855cae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f5c5983855cae) -
17
+ Fixed logging of file state error events
18
+ - Updated dependencies
19
+
3
20
  ## 49.2.4
4
21
 
5
22
  ### 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.2.4";
13
+ var packageVersion = exports.packageVersion = "49.2.6";
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.2.4";
15
+ var packageVersion = "49.2.6";
16
16
  var ufoExperience;
17
17
  var getExperience = function getExperience() {
18
18
  if (!ufoExperience) {
@@ -19,6 +19,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
19
19
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
20
20
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
21
21
  var _mediaClient = require("@atlaskit/media-client");
22
+ var _mediaClientReact = require("@atlaskit/media-client-react");
22
23
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
23
24
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
25
  var MediaViewerError = exports.MediaViewerError = /*#__PURE__*/function (_Error) {
@@ -72,6 +73,8 @@ function getSecondaryErrorReason(error) {
72
73
  if (secondaryError) {
73
74
  if ((0, _mediaClient.isMediaClientError)(secondaryError)) {
74
75
  return (0, _mediaClient.getMediaClientErrorReason)(secondaryError);
76
+ } else if ((0, _mediaClientReact.isMediaFileStateError)(secondaryError)) {
77
+ return (0, _mediaClientReact.getFileStateErrorReason)(secondaryError);
75
78
  }
76
79
  return 'nativeError';
77
80
  }
@@ -99,6 +99,7 @@ var PDFPasswordInput = exports.PDFPasswordInput = function PDFPasswordInput(_ref
99
99
  }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.password_protected_pdf))), (0, _react2.jsx)(_form.Field, {
100
100
  "aria-required": true,
101
101
  name: "password",
102
+ defaultValue: "",
102
103
  isRequired: true
103
104
  }, function (_ref3) {
104
105
  var fieldProps = _ref3.fieldProps;
@@ -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.2.4";
4
+ const packageVersion = "49.2.6";
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.2.4";
5
+ const packageVersion = "49.2.6";
6
6
  let ufoExperience;
7
7
  const getExperience = () => {
8
8
  if (!ufoExperience) {
@@ -1,4 +1,5 @@
1
1
  import { getMediaClientErrorReason, isMediaClientError, isRequestError, isMediaStoreError } from '@atlaskit/media-client';
2
+ import { isMediaFileStateError, getFileStateErrorReason } from '@atlaskit/media-client-react';
2
3
  export class MediaViewerError extends Error {
3
4
  constructor(primaryReason, secondaryError) {
4
5
  super(primaryReason);
@@ -40,6 +41,8 @@ export function getSecondaryErrorReason(error) {
40
41
  if (secondaryError) {
41
42
  if (isMediaClientError(secondaryError)) {
42
43
  return getMediaClientErrorReason(secondaryError);
44
+ } else if (isMediaFileStateError(secondaryError)) {
45
+ return getFileStateErrorReason(secondaryError);
43
46
  }
44
47
  return 'nativeError';
45
48
  }
@@ -84,6 +84,7 @@ export const PDFPasswordInput = ({
84
84
  }, jsx(FormattedMessage, messages.password_protected_pdf))), jsx(Field, {
85
85
  "aria-required": true,
86
86
  name: "password",
87
+ defaultValue: "",
87
88
  isRequired: true
88
89
  }, ({
89
90
  fieldProps
@@ -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.2.4";
4
+ var packageVersion = "49.2.6";
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.2.4";
8
+ var packageVersion = "49.2.6";
9
9
  var ufoExperience;
10
10
  var getExperience = function getExperience() {
11
11
  if (!ufoExperience) {
@@ -8,6 +8,7 @@ import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
8
8
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import { getMediaClientErrorReason, isMediaClientError, isRequestError, isMediaStoreError } from '@atlaskit/media-client';
11
+ import { isMediaFileStateError, getFileStateErrorReason } from '@atlaskit/media-client-react';
11
12
  export var MediaViewerError = /*#__PURE__*/function (_Error) {
12
13
  _inherits(MediaViewerError, _Error);
13
14
  var _super = _createSuper(MediaViewerError);
@@ -59,6 +60,8 @@ export function getSecondaryErrorReason(error) {
59
60
  if (secondaryError) {
60
61
  if (isMediaClientError(secondaryError)) {
61
62
  return getMediaClientErrorReason(secondaryError);
63
+ } else if (isMediaFileStateError(secondaryError)) {
64
+ return getFileStateErrorReason(secondaryError);
62
65
  }
63
66
  return 'nativeError';
64
67
  }
@@ -87,6 +87,7 @@ export var PDFPasswordInput = function PDFPasswordInput(_ref) {
87
87
  }, jsx(FormattedMessage, messages.password_protected_pdf))), jsx(Field, {
88
88
  "aria-required": true,
89
89
  name: "password",
90
+ defaultValue: "",
90
91
  isRequired: true
91
92
  }, function (_ref3) {
92
93
  var fieldProps = _ref3.fieldProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-viewer",
3
- "version": "49.2.4",
3
+ "version": "49.2.6",
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/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/icon": "^22.24.0",
42
42
  "@atlaskit/icon-file-type": "^6.7.0",
43
43
  "@atlaskit/media-client": "^28.0.0",
44
- "@atlaskit/media-client-react": "^2.2.0",
44
+ "@atlaskit/media-client-react": "^2.3.0",
45
45
  "@atlaskit/media-common": "^11.7.0",
46
46
  "@atlaskit/media-svg": "^0.2.0",
47
47
  "@atlaskit/media-ui": "^26.0.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/spinner": "^16.3.0",
52
52
  "@atlaskit/textfield": "^6.5.0",
53
53
  "@atlaskit/theme": "^14.0.0",
54
- "@atlaskit/tokens": "^2.0.0",
54
+ "@atlaskit/tokens": "^2.1.0",
55
55
  "@atlaskit/ufo": "^0.3.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@kenjiuno/msgreader": "^1.2.6",