@atlaskit/editor-plugin-caption 1.9.8 → 1.10.0

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,13 @@
1
1
  # @atlaskit/editor-plugin-caption
2
2
 
3
+ ## 1.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#146025](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146025)
8
+ [`03eae90c614d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/03eae90c614d1) -
9
+ Remove platform.editor.live-view.disable-editing-in-view-mode_fi1rx feature flag
10
+
3
11
  ## 1.9.8
4
12
 
5
13
  ### Patch Changes
@@ -16,7 +16,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
  var _selectionBasedNodeView = require("@atlaskit/editor-common/selection-based-node-view");
18
18
  var _ui = require("@atlaskit/editor-common/ui");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  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); }; }
21
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
21
  var CaptionNodeView = exports.CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
@@ -28,9 +27,7 @@ var CaptionNodeView = exports.CaptionNodeView = /*#__PURE__*/function (_Selectio
28
27
  _this = _super.call(this, node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate);
29
28
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selected", _this.insideSelection());
30
29
  _this.pluginInjectionApi = pluginInjectionApi;
31
- if ((0, _platformFeatureFlags.fg)('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
32
- _this.handleEditorDisabledChanged();
33
- }
30
+ _this.handleEditorDisabledChanged();
34
31
  return _this;
35
32
  }
36
33
  (0, _createClass2.default)(CaptionNodeView, [{
@@ -43,14 +40,12 @@ var CaptionNodeView = exports.CaptionNodeView = /*#__PURE__*/function (_Selectio
43
40
  }, {
44
41
  key: "getContentDOM",
45
42
  value: function getContentDOM() {
43
+ var _this$pluginInjection;
46
44
  var dom = document.createElement('div');
47
45
  // setting a className prevents PM/Chrome mutation observer from
48
46
  // incorrectly deleting nodes
49
47
  dom.className = 'caption-wrapper';
50
- if ((0, _platformFeatureFlags.fg)('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
51
- var _this$pluginInjection;
52
- dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) !== null && _this$pluginInjection !== void 0 && _this$pluginInjection.editorDisabled ? 'false' : 'true');
53
- }
48
+ dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) !== null && _this$pluginInjection !== void 0 && _this$pluginInjection.editorDisabled ? 'false' : 'true');
54
49
  return {
55
50
  dom: dom
56
51
  };
@@ -2,15 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
4
4
  import { Caption } from '@atlaskit/editor-common/ui';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  export class CaptionNodeView extends SelectionBasedNodeView {
7
6
  constructor(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate, pluginInjectionApi) {
8
7
  super(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate);
9
8
  _defineProperty(this, "selected", this.insideSelection());
10
9
  this.pluginInjectionApi = pluginInjectionApi;
11
- if (fg('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
12
- this.handleEditorDisabledChanged();
13
- }
10
+ this.handleEditorDisabledChanged();
14
11
  }
15
12
  createDomRef() {
16
13
  const domRef = document.createElement('figcaption');
@@ -18,14 +15,12 @@ export class CaptionNodeView extends SelectionBasedNodeView {
18
15
  return domRef;
19
16
  }
20
17
  getContentDOM() {
18
+ var _this$pluginInjection, _this$pluginInjection2, _this$pluginInjection3;
21
19
  const dom = document.createElement('div');
22
20
  // setting a className prevents PM/Chrome mutation observer from
23
21
  // incorrectly deleting nodes
24
22
  dom.className = 'caption-wrapper';
25
- if (fg('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
26
- var _this$pluginInjection, _this$pluginInjection2, _this$pluginInjection3;
27
- dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection2 = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection2 !== void 0 && (_this$pluginInjection3 = _this$pluginInjection2.sharedState.currentState()) !== null && _this$pluginInjection3 !== void 0 && _this$pluginInjection3.editorDisabled ? 'false' : 'true');
28
- }
23
+ dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection2 = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection2 !== void 0 && (_this$pluginInjection3 = _this$pluginInjection2.sharedState.currentState()) !== null && _this$pluginInjection3 !== void 0 && _this$pluginInjection3.editorDisabled ? 'false' : 'true');
29
24
  return {
30
25
  dom
31
26
  };
@@ -10,7 +10,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  import React from 'react';
11
11
  import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
12
12
  import { Caption } from '@atlaskit/editor-common/ui';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  export var CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
15
14
  _inherits(CaptionNodeView, _SelectionBasedNodeVi);
16
15
  var _super = _createSuper(CaptionNodeView);
@@ -20,9 +19,7 @@ export var CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
20
19
  _this = _super.call(this, node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate);
21
20
  _defineProperty(_assertThisInitialized(_this), "selected", _this.insideSelection());
22
21
  _this.pluginInjectionApi = pluginInjectionApi;
23
- if (fg('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
24
- _this.handleEditorDisabledChanged();
25
- }
22
+ _this.handleEditorDisabledChanged();
26
23
  return _this;
27
24
  }
28
25
  _createClass(CaptionNodeView, [{
@@ -35,14 +32,12 @@ export var CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
35
32
  }, {
36
33
  key: "getContentDOM",
37
34
  value: function getContentDOM() {
35
+ var _this$pluginInjection;
38
36
  var dom = document.createElement('div');
39
37
  // setting a className prevents PM/Chrome mutation observer from
40
38
  // incorrectly deleting nodes
41
39
  dom.className = 'caption-wrapper';
42
- if (fg('platform.editor.live-view.disable-editing-in-view-mode_fi1rx')) {
43
- var _this$pluginInjection;
44
- dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) !== null && _this$pluginInjection !== void 0 && _this$pluginInjection.editorDisabled ? 'false' : 'true');
45
- }
40
+ dom.setAttribute('contenteditable', (_this$pluginInjection = this.pluginInjectionApi) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.editorDisabled) !== null && _this$pluginInjection !== void 0 && (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) !== null && _this$pluginInjection !== void 0 && _this$pluginInjection.editorDisabled ? 'false' : 'true');
46
41
  return {
47
42
  dom: dom
48
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-caption",
3
- "version": "1.9.8",
3
+ "version": "1.10.0",
4
4
  "description": "Caption plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,11 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^40.9.0",
35
- "@atlaskit/editor-common": "^91.0.0",
35
+ "@atlaskit/editor-common": "^91.1.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
38
38
  "@atlaskit/editor-prosemirror": "6.0.0",
39
- "@atlaskit/platform-feature-flags": "^0.3.0",
40
39
  "@babel/runtime": "^7.0.0"
41
40
  },
42
41
  "devDependencies": {
@@ -49,7 +48,7 @@
49
48
  "@atlaskit/editor-plugin-guideline": "^1.2.0",
50
49
  "@atlaskit/editor-plugin-selection": "^1.4.0",
51
50
  "@atlaskit/editor-plugin-width": "^1.3.0",
52
- "@atlaskit/renderer": "^110.4.0"
51
+ "@atlaskit/renderer": "^110.5.0"
53
52
  },
54
53
  "peerDependencies": {
55
54
  "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
@@ -83,10 +82,5 @@
83
82
  "emotion"
84
83
  ]
85
84
  }
86
- },
87
- "platform-feature-flags": {
88
- "platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
89
- "type": "boolean"
90
- }
91
85
  }
92
86
  }