@atlaskit/editor-plugin-media 1.12.1 → 1.12.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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.12.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83306](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83306) [`7f90ec235c28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7f90ec235c28) - [ux] Disable MediaSingle resizing when Editor in disabled or view mode states
|
|
8
|
+
|
|
3
9
|
## 1.12.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -342,7 +342,8 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
342
342
|
lineLength = _this$props2.lineLength,
|
|
343
343
|
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
|
|
344
344
|
editorViewMode = _this$props2.editorViewMode,
|
|
345
|
-
mediaPluginState = _this$props2.mediaPluginState
|
|
345
|
+
mediaPluginState = _this$props2.mediaPluginState,
|
|
346
|
+
editorDisabled = _this$props2.editorDisabled;
|
|
346
347
|
var _ref4 = node.attrs,
|
|
347
348
|
layout = _ref4.layout,
|
|
348
349
|
widthType = _ref4.widthType,
|
|
@@ -413,7 +414,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
413
414
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
414
415
|
pluginInjectionApi: pluginInjectionApi
|
|
415
416
|
}, mediaSingleProps);
|
|
416
|
-
var canResize = !!this.props.mediaOptions.allowResizing;
|
|
417
|
+
var canResize = !!this.props.mediaOptions.allowResizing && !editorDisabled && !editorViewMode;
|
|
417
418
|
if (!this.props.mediaOptions.allowResizingInTables) {
|
|
418
419
|
// If resizing not allowed in tables, check parents for tables
|
|
419
420
|
var pos = getPos();
|
|
@@ -448,7 +449,11 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
448
449
|
lineLength: contentWidthForLegacyExperience,
|
|
449
450
|
pctWidth: mediaSingleWidthAttribute
|
|
450
451
|
}), MediaChildren) : (0, _react2.jsx)(_ui.MediaSingle, (0, _extends2.default)({}, mediaSingleProps, {
|
|
451
|
-
pctWidth: mediaSingleWidthAttribute
|
|
452
|
+
pctWidth: mediaSingleWidthAttribute,
|
|
453
|
+
size: {
|
|
454
|
+
width: mediaSingleWidthAttribute,
|
|
455
|
+
widthType: widthType
|
|
456
|
+
}
|
|
452
457
|
}), MediaChildren));
|
|
453
458
|
}
|
|
454
459
|
}]);
|
|
@@ -245,7 +245,8 @@ export default class MediaSingleNode extends Component {
|
|
|
245
245
|
lineLength,
|
|
246
246
|
dispatchAnalyticsEvent,
|
|
247
247
|
editorViewMode,
|
|
248
|
-
mediaPluginState
|
|
248
|
+
mediaPluginState,
|
|
249
|
+
editorDisabled
|
|
249
250
|
} = this.props;
|
|
250
251
|
const {
|
|
251
252
|
layout,
|
|
@@ -324,7 +325,7 @@ export default class MediaSingleNode extends Component {
|
|
|
324
325
|
pluginInjectionApi: pluginInjectionApi,
|
|
325
326
|
...mediaSingleProps
|
|
326
327
|
};
|
|
327
|
-
let canResize = !!this.props.mediaOptions.allowResizing;
|
|
328
|
+
let canResize = !!this.props.mediaOptions.allowResizing && !editorDisabled && !editorViewMode;
|
|
328
329
|
if (!this.props.mediaOptions.allowResizingInTables) {
|
|
329
330
|
// If resizing not allowed in tables, check parents for tables
|
|
330
331
|
const pos = getPos();
|
|
@@ -361,7 +362,11 @@ export default class MediaSingleNode extends Component {
|
|
|
361
362
|
lineLength: contentWidthForLegacyExperience,
|
|
362
363
|
pctWidth: mediaSingleWidthAttribute
|
|
363
364
|
}), MediaChildren) : jsx(MediaSingle, _extends({}, mediaSingleProps, {
|
|
364
|
-
pctWidth: mediaSingleWidthAttribute
|
|
365
|
+
pctWidth: mediaSingleWidthAttribute,
|
|
366
|
+
size: {
|
|
367
|
+
width: mediaSingleWidthAttribute,
|
|
368
|
+
widthType: widthType
|
|
369
|
+
}
|
|
365
370
|
}), MediaChildren));
|
|
366
371
|
}
|
|
367
372
|
}
|
|
@@ -334,7 +334,8 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
334
334
|
lineLength = _this$props2.lineLength,
|
|
335
335
|
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
|
|
336
336
|
editorViewMode = _this$props2.editorViewMode,
|
|
337
|
-
mediaPluginState = _this$props2.mediaPluginState
|
|
337
|
+
mediaPluginState = _this$props2.mediaPluginState,
|
|
338
|
+
editorDisabled = _this$props2.editorDisabled;
|
|
338
339
|
var _ref4 = node.attrs,
|
|
339
340
|
layout = _ref4.layout,
|
|
340
341
|
widthType = _ref4.widthType,
|
|
@@ -405,7 +406,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
405
406
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
406
407
|
pluginInjectionApi: pluginInjectionApi
|
|
407
408
|
}, mediaSingleProps);
|
|
408
|
-
var canResize = !!this.props.mediaOptions.allowResizing;
|
|
409
|
+
var canResize = !!this.props.mediaOptions.allowResizing && !editorDisabled && !editorViewMode;
|
|
409
410
|
if (!this.props.mediaOptions.allowResizingInTables) {
|
|
410
411
|
// If resizing not allowed in tables, check parents for tables
|
|
411
412
|
var pos = getPos();
|
|
@@ -440,7 +441,11 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
440
441
|
lineLength: contentWidthForLegacyExperience,
|
|
441
442
|
pctWidth: mediaSingleWidthAttribute
|
|
442
443
|
}), MediaChildren) : jsx(MediaSingle, _extends({}, mediaSingleProps, {
|
|
443
|
-
pctWidth: mediaSingleWidthAttribute
|
|
444
|
+
pctWidth: mediaSingleWidthAttribute,
|
|
445
|
+
size: {
|
|
446
|
+
width: mediaSingleWidthAttribute,
|
|
447
|
+
widthType: widthType
|
|
448
|
+
}
|
|
444
449
|
}), MediaChildren));
|
|
445
450
|
}
|
|
446
451
|
}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
39
39
|
"@atlaskit/button": "^17.7.0",
|
|
40
|
-
"@atlaskit/editor-common": "^78.
|
|
40
|
+
"@atlaskit/editor-common": "^78.20.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.3",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-annotation": "1.5.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-plugin-width": "^1.0.0",
|
|
52
52
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
53
53
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
54
|
-
"@atlaskit/editor-tables": "^2.
|
|
54
|
+
"@atlaskit/editor-tables": "^2.6.0",
|
|
55
55
|
"@atlaskit/form": "^9.1.0",
|
|
56
56
|
"@atlaskit/icon": "^22.1.0",
|
|
57
57
|
"@atlaskit/media-card": "^77.10.0",
|