@atlaskit/media-viewer 54.5.3 → 54.5.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 +15 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/base-viewer.js +4 -28
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/base-viewer.js +3 -25
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/base-viewer.js +4 -28
- package/dist/types/viewers/base-viewer.d.ts +0 -1
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 54.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 54.5.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`dbc145df6b864`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dbc145df6b864) -
|
|
14
|
+
Clean up feature gate `platform_media_package_react19_lifecycle_fix`. The React 19-safe lifecycle
|
|
15
|
+
behaviour is now permanent: prop-change reactions run in `componentDidUpdate` and the legacy
|
|
16
|
+
`UNSAFE_componentWillReceiveProps` paths have been removed.
|
|
17
|
+
|
|
3
18
|
## 54.5.3
|
|
4
19
|
|
|
5
20
|
### 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 = "54.5.
|
|
13
|
+
var packageVersion = exports.packageVersion = "54.5.4";
|
|
14
14
|
function getFileAttributes(fileState) {
|
|
15
15
|
if (!fileState) {
|
|
16
16
|
return {
|
|
@@ -13,7 +13,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
13
13
|
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; }
|
|
14
14
|
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; }
|
|
15
15
|
var packageName = "@atlaskit/media-viewer";
|
|
16
|
-
var packageVersion = "54.5.
|
|
16
|
+
var packageVersion = "54.5.4";
|
|
17
17
|
var ufoExperience;
|
|
18
18
|
var getExperience = function getExperience() {
|
|
19
19
|
if (!ufoExperience) {
|
|
@@ -17,7 +17,6 @@ var _reactIntl = require("react-intl");
|
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
18
|
var _deepEqual = _interopRequireDefault(require("deep-equal"));
|
|
19
19
|
var _mediaClient = require("@atlaskit/media-client");
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
20
|
var _errorMessage = _interopRequireDefault(require("../errorMessage"));
|
|
22
21
|
var _loading = require("../loading");
|
|
23
22
|
var _download = require("../download");
|
|
@@ -65,36 +64,13 @@ var BaseViewer = exports.BaseViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
65
64
|
this.setState(_objectSpread(_objectSpread({}, this.state), newState));
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
|
-
|
|
69
|
-
// NOTE: We've moved parts of the logic to reset a component into this method
|
|
70
|
-
// to optimise the performance. Resetting the state before the `componentDidUpdate`
|
|
71
|
-
// lifecycle event allows us avoid one additional render cycle.
|
|
72
|
-
// However, this lifecycle method might eventually be deprecated, so be careful
|
|
73
|
-
// when working with it.
|
|
74
|
-
}, {
|
|
75
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
76
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
77
|
-
if ((0, _platformFeatureFlags.fg)('platform_media_package_react19_lifecycle_fix')) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (this.needsReset(nextProps, this.props)) {
|
|
81
|
-
this.release();
|
|
82
|
-
this.setState(this.initialState);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
67
|
}, {
|
|
86
68
|
key: "componentDidUpdate",
|
|
87
69
|
value: function componentDidUpdate(prevProps) {
|
|
88
|
-
if ((
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.init();
|
|
93
|
-
}
|
|
94
|
-
} else {
|
|
95
|
-
if (this.needsReset(prevProps, this.props)) {
|
|
96
|
-
this.init();
|
|
97
|
-
}
|
|
70
|
+
if (this.needsReset(prevProps, this.props)) {
|
|
71
|
+
this.release();
|
|
72
|
+
this.setState(this.initialState);
|
|
73
|
+
this.init();
|
|
98
74
|
}
|
|
99
75
|
}
|
|
100
76
|
}, {
|
|
@@ -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 = "54.5.
|
|
4
|
+
const packageVersion = "54.5.4";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -3,7 +3,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
3
3
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
const packageName = "@atlaskit/media-viewer";
|
|
6
|
-
const packageVersion = "54.5.
|
|
6
|
+
const packageVersion = "54.5.4";
|
|
7
7
|
let ufoExperience;
|
|
8
8
|
const getExperience = () => {
|
|
9
9
|
if (!ufoExperience) {
|
|
@@ -4,7 +4,6 @@ import { FormattedMessage } from 'react-intl';
|
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
5
|
import deepEqual from 'deep-equal';
|
|
6
6
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import ErrorMessage from '../errorMessage';
|
|
9
8
|
import { Spinner } from '../loading';
|
|
10
9
|
import { ErrorViewDownloadButton } from '../download';
|
|
@@ -39,32 +38,11 @@ export class BaseViewer extends React.Component {
|
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// to optimise the performance. Resetting the state before the `componentDidUpdate`
|
|
45
|
-
// lifecycle event allows us avoid one additional render cycle.
|
|
46
|
-
// However, this lifecycle method might eventually be deprecated, so be careful
|
|
47
|
-
// when working with it.
|
|
48
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
49
|
-
if (fg('platform_media_package_react19_lifecycle_fix')) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (this.needsReset(nextProps, this.props)) {
|
|
41
|
+
componentDidUpdate(prevProps) {
|
|
42
|
+
if (this.needsReset(prevProps, this.props)) {
|
|
53
43
|
this.release();
|
|
54
44
|
this.setState(this.initialState);
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
componentDidUpdate(prevProps) {
|
|
58
|
-
if (fg('platform_media_package_react19_lifecycle_fix')) {
|
|
59
|
-
if (this.needsReset(prevProps, this.props)) {
|
|
60
|
-
this.release();
|
|
61
|
-
this.setState(this.initialState);
|
|
62
|
-
this.init();
|
|
63
|
-
}
|
|
64
|
-
} else {
|
|
65
|
-
if (this.needsReset(prevProps, this.props)) {
|
|
66
|
-
this.init();
|
|
67
|
-
}
|
|
45
|
+
this.init();
|
|
68
46
|
}
|
|
69
47
|
}
|
|
70
48
|
render() {
|
|
@@ -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 = "54.5.
|
|
4
|
+
var packageVersion = "54.5.4";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -6,7 +6,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
var packageName = "@atlaskit/media-viewer";
|
|
9
|
-
var packageVersion = "54.5.
|
|
9
|
+
var packageVersion = "54.5.4";
|
|
10
10
|
var ufoExperience;
|
|
11
11
|
var getExperience = function getExperience() {
|
|
12
12
|
if (!ufoExperience) {
|
|
@@ -13,7 +13,6 @@ import { FormattedMessage } from 'react-intl';
|
|
|
13
13
|
import { messages } from '@atlaskit/media-ui';
|
|
14
14
|
import deepEqual from 'deep-equal';
|
|
15
15
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import ErrorMessage from '../errorMessage';
|
|
18
17
|
import { Spinner } from '../loading';
|
|
19
18
|
import { ErrorViewDownloadButton } from '../download';
|
|
@@ -56,36 +55,13 @@ export var BaseViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
56
55
|
this.setState(_objectSpread(_objectSpread({}, this.state), newState));
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
// NOTE: We've moved parts of the logic to reset a component into this method
|
|
61
|
-
// to optimise the performance. Resetting the state before the `componentDidUpdate`
|
|
62
|
-
// lifecycle event allows us avoid one additional render cycle.
|
|
63
|
-
// However, this lifecycle method might eventually be deprecated, so be careful
|
|
64
|
-
// when working with it.
|
|
65
|
-
}, {
|
|
66
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
67
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
68
|
-
if (fg('platform_media_package_react19_lifecycle_fix')) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (this.needsReset(nextProps, this.props)) {
|
|
72
|
-
this.release();
|
|
73
|
-
this.setState(this.initialState);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
58
|
}, {
|
|
77
59
|
key: "componentDidUpdate",
|
|
78
60
|
value: function componentDidUpdate(prevProps) {
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.init();
|
|
84
|
-
}
|
|
85
|
-
} else {
|
|
86
|
-
if (this.needsReset(prevProps, this.props)) {
|
|
87
|
-
this.init();
|
|
88
|
-
}
|
|
61
|
+
if (this.needsReset(prevProps, this.props)) {
|
|
62
|
+
this.release();
|
|
63
|
+
this.setState(this.initialState);
|
|
64
|
+
this.init();
|
|
89
65
|
}
|
|
90
66
|
}
|
|
91
67
|
}, {
|
|
@@ -18,7 +18,6 @@ export declare abstract class BaseViewer<Content, Props extends BaseProps, State
|
|
|
18
18
|
componentDidMount(): void;
|
|
19
19
|
componentWillUnmount(): void;
|
|
20
20
|
protected safeSetState(newState: Partial<State>): void;
|
|
21
|
-
UNSAFE_componentWillReceiveProps(nextProps: Readonly<Props>): void;
|
|
22
21
|
componentDidUpdate(prevProps: Props): void;
|
|
23
22
|
render(): React.JSX.Element;
|
|
24
23
|
private getInitialState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "54.5.
|
|
3
|
+
"version": "54.5.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/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/css": "^1.0.0",
|
|
37
37
|
"@atlaskit/form": "^16.1.0",
|
|
38
38
|
"@atlaskit/heading": "^6.2.0",
|
|
39
|
-
"@atlaskit/icon": "^
|
|
39
|
+
"@atlaskit/icon": "^37.0.0",
|
|
40
40
|
"@atlaskit/icon-file-type": "^8.1.0",
|
|
41
41
|
"@atlaskit/icon-lab": "^7.3.0",
|
|
42
42
|
"@atlaskit/media-client": "^37.2.0",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"@atlaskit/portal": "^6.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^20.5.0",
|
|
52
52
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
53
|
-
"@atlaskit/side-navigation": "^12.
|
|
53
|
+
"@atlaskit/side-navigation": "^12.3.0",
|
|
54
54
|
"@atlaskit/spinner": "^20.1.0",
|
|
55
55
|
"@atlaskit/textfield": "^9.1.0",
|
|
56
56
|
"@atlaskit/theme": "^26.1.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^124.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^124.1.0",
|
|
58
58
|
"@atlaskit/tokens": "^15.5.0",
|
|
59
59
|
"@atlaskit/tooltip": "^23.1.0",
|
|
60
60
|
"@atlaskit/ufo": "^1.0.0",
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
"@atlaskit/ssr": "workspace:^",
|
|
94
94
|
"@atlaskit/toggle": "^17.1.0",
|
|
95
95
|
"@atlassian/a11y-jest-testing": "^0.13.0",
|
|
96
|
-
"@atlassian/feature-flags-test-utils": "^1.
|
|
97
|
-
"@atlassian/testing-library": "^0.
|
|
98
|
-
"@atlassian/ufo": "^0.
|
|
96
|
+
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
97
|
+
"@atlassian/testing-library": "^0.11.0",
|
|
98
|
+
"@atlassian/ufo": "^0.9.0",
|
|
99
99
|
"@testing-library/dom": "^10.1.0",
|
|
100
100
|
"@testing-library/react": "^16.3.0",
|
|
101
101
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -132,9 +132,6 @@
|
|
|
132
132
|
"platform_media_react19_support": {
|
|
133
133
|
"type": "boolean"
|
|
134
134
|
},
|
|
135
|
-
"platform_media_package_react19_lifecycle_fix": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
135
|
"platform_media_a11y_suppression_fixes": {
|
|
139
136
|
"type": "boolean"
|
|
140
137
|
},
|