@atlaskit/editor-plugin-media 1.16.4 → 1.16.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.16.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#94413](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94413) [`6fa79788f5a8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6fa79788f5a8) - Disallow editing of Media caption in live view mode
8
+ - Updated dependencies
9
+
3
10
  ## 1.16.4
4
11
 
5
12
  ### Patch Changes
@@ -431,6 +431,9 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
431
431
  }
432
432
  }
433
433
  var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof _state.NodeSelection;
434
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
435
+ shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
436
+ }
434
437
  var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
435
438
  var MediaChildren = (0, _react2.jsx)("figure", {
436
439
  ref: this.mediaSingleWrapperRef,
@@ -343,7 +343,10 @@ export default class MediaSingleNode extends Component {
343
343
  canResize = canResize && !disabledNode;
344
344
  }
345
345
  }
346
- const shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
346
+ let shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
347
+ if (getBooleanFF('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
348
+ shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
349
+ }
347
350
  const isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 ? void 0 : (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
348
351
  const MediaChildren = jsx("figure", {
349
352
  ref: this.mediaSingleWrapperRef,
@@ -423,6 +423,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
423
423
  }
424
424
  }
425
425
  var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
426
+ if (getBooleanFF('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
427
+ shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
428
+ }
426
429
  var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
427
430
  var MediaChildren = jsx("figure", {
428
431
  ref: this.mediaSingleWrapperRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/analytics-next": "^9.3.0",
39
39
  "@atlaskit/button": "^17.14.0",
40
40
  "@atlaskit/editor-common": "^78.36.0",
41
- "@atlaskit/editor-palette": "1.5.3",
41
+ "@atlaskit/editor-palette": "1.6.0",
42
42
  "@atlaskit/editor-plugin-analytics": "^1.1.0",
43
43
  "@atlaskit/editor-plugin-annotation": "1.6.2",
44
44
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/media-ui": "^25.9.0",
65
65
  "@atlaskit/media-viewer": "^48.4.0",
66
66
  "@atlaskit/platform-feature-flags": "^0.2.0",
67
- "@atlaskit/primitives": "^5.6.0",
67
+ "@atlaskit/primitives": "^5.7.0",
68
68
  "@atlaskit/textfield": "^6.1.0",
69
69
  "@atlaskit/theme": "^12.7.0",
70
70
  "@atlaskit/tokens": "^1.44.0",
@@ -153,6 +153,9 @@
153
153
  },
154
154
  "platform.editor.media.preview-in-full-page": {
155
155
  "type": "boolean"
156
+ },
157
+ "platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
158
+ "type": "boolean"
156
159
  }
157
160
  },
158
161
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",