@atlaskit/editor-plugin-media 0.3.5 → 0.3.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 +6 -0
- package/dist/cjs/nodeviews/mediaSingle.js +3 -3
- package/dist/es2019/nodeviews/mediaSingle.js +2 -2
- package/dist/esm/nodeviews/mediaSingle.js +4 -4
- package/dist/types/nodeviews/mediaSingle.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41747](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41747) [`8b2001e7bbe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b2001e7bbe) - Extend mediaSingle from Component as props were not causing PureComponent to rerender correctly
|
|
8
|
+
|
|
3
9
|
## 0.3.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -47,8 +47,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
47
47
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
48
48
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
49
49
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
50
|
-
var MediaSingleNode = exports.default = /*#__PURE__*/function (
|
|
51
|
-
(0, _inherits2.default)(MediaSingleNode,
|
|
50
|
+
var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
51
|
+
(0, _inherits2.default)(MediaSingleNode, _Component);
|
|
52
52
|
var _super = _createSuper(MediaSingleNode);
|
|
53
53
|
function MediaSingleNode() {
|
|
54
54
|
var _this;
|
|
@@ -442,7 +442,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
442
442
|
}
|
|
443
443
|
}]);
|
|
444
444
|
return MediaSingleNode;
|
|
445
|
-
}(_react.
|
|
445
|
+
}(_react.Component);
|
|
446
446
|
(0, _defineProperty2.default)(MediaSingleNode, "defaultProps", {
|
|
447
447
|
mediaOptions: {}
|
|
448
448
|
});
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { Component } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
@@ -26,7 +26,7 @@ import { hasPrivateAttrsChanged } from './helpers';
|
|
|
26
26
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
27
27
|
import { figureWrapper, MediaSingleNodeSelector } from './styles';
|
|
28
28
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
29
|
-
export default class MediaSingleNode extends
|
|
29
|
+
export default class MediaSingleNode extends Component {
|
|
30
30
|
constructor(...args) {
|
|
31
31
|
super(...args);
|
|
32
32
|
_defineProperty(this, "mediaNodeUpdater", null);
|
|
@@ -15,7 +15,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
15
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
|
|
18
|
-
import React, {
|
|
18
|
+
import React, { Component } from 'react';
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
20
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
@@ -39,8 +39,8 @@ import { hasPrivateAttrsChanged } from './helpers';
|
|
|
39
39
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
40
40
|
import { figureWrapper, MediaSingleNodeSelector } from './styles';
|
|
41
41
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
42
|
-
var MediaSingleNode = /*#__PURE__*/function (
|
|
43
|
-
_inherits(MediaSingleNode,
|
|
42
|
+
var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
43
|
+
_inherits(MediaSingleNode, _Component);
|
|
44
44
|
var _super = _createSuper(MediaSingleNode);
|
|
45
45
|
function MediaSingleNode() {
|
|
46
46
|
var _this;
|
|
@@ -434,7 +434,7 @@ var MediaSingleNode = /*#__PURE__*/function (_PureComponent) {
|
|
|
434
434
|
}
|
|
435
435
|
}]);
|
|
436
436
|
return MediaSingleNode;
|
|
437
|
-
}(
|
|
437
|
+
}(Component);
|
|
438
438
|
_defineProperty(MediaSingleNode, "defaultProps", {
|
|
439
439
|
mediaOptions: {}
|
|
440
440
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { MouseEvent } from 'react';
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -25,7 +25,7 @@ export interface MediaSingleNodeState {
|
|
|
25
25
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
26
26
|
isCopying: boolean;
|
|
27
27
|
}
|
|
28
|
-
export default class MediaSingleNode extends
|
|
28
|
+
export default class MediaSingleNode extends Component<MediaSingleNodeProps, MediaSingleNodeState> {
|
|
29
29
|
static defaultProps: Partial<MediaSingleNodeProps>;
|
|
30
30
|
static displayName: string;
|
|
31
31
|
mediaNodeUpdater: MediaNodeUpdater | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { MouseEvent } from 'react';
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -25,7 +25,7 @@ export interface MediaSingleNodeState {
|
|
|
25
25
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
26
26
|
isCopying: boolean;
|
|
27
27
|
}
|
|
28
|
-
export default class MediaSingleNode extends
|
|
28
|
+
export default class MediaSingleNode extends Component<MediaSingleNodeProps, MediaSingleNodeState> {
|
|
29
29
|
static defaultProps: Partial<MediaSingleNodeProps>;
|
|
30
30
|
static displayName: string;
|
|
31
31
|
mediaNodeUpdater: MediaNodeUpdater | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
63
63
|
"@atlaskit/textfield": "^5.6.0",
|
|
64
64
|
"@atlaskit/theme": "^12.6.0",
|
|
65
|
-
"@atlaskit/tokens": "^1.
|
|
65
|
+
"@atlaskit/tokens": "^1.27.0",
|
|
66
66
|
"@atlaskit/tooltip": "^17.8.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|