@atlaskit/editor-plugin-panel 3.3.0 → 3.3.1

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-panel
2
2
 
3
+ ## 3.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#112186](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112186)
8
+ [`9462d8ca2405a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9462d8ca2405a) -
9
+ Bump adf-schema to 47.2.1
10
+
3
11
  ## 3.3.0
4
12
 
5
13
  ### Minor Changes
@@ -8,7 +8,6 @@ exports.panelIcons = exports.getPanelNodeView = exports.PanelIcon = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
- var _reactDom = _interopRequireDefault(require("react-dom"));
12
11
  var _v = _interopRequireDefault(require("uuid/v4"));
13
12
  var _adfSchema = require("@atlaskit/adf-schema");
14
13
  var _emoji = require("@atlaskit/editor-common/emoji");
@@ -18,7 +17,6 @@ var _panel = require("@atlaskit/editor-common/panel");
18
17
  var _model = require("@atlaskit/editor-prosemirror/model");
19
18
  var _consts = require("@atlaskit/editor-shared-styles/consts");
20
19
  var _hint = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/hint"));
21
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
20
  var _utils = require("../pm-plugins/utils/utils");
23
21
  /* eslint-disable @atlaskit/editor/no-re-export */
24
22
  // Mapping export
@@ -93,23 +91,14 @@ var PanelNodeView = /*#__PURE__*/function () {
93
91
  }
94
92
  // set contentEditable as false to be able to select the custom panels with keyboard
95
93
  this.icon.contentEditable = 'false';
96
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_plugin_portalprovider')) {
97
- this.nodeViewPortalProviderAPI.render(function () {
98
- return /*#__PURE__*/_react.default.createElement(PanelIcon, {
99
- pluginInjectionApi: api,
100
- allowCustomPanel: pluginOptions.allowCustomPanel,
101
- panelAttributes: node.attrs,
102
- providerFactory: _this.providerFactory
103
- });
104
- }, this.icon, this.key);
105
- } else {
106
- _reactDom.default.render( /*#__PURE__*/_react.default.createElement(PanelIcon, {
94
+ this.nodeViewPortalProviderAPI.render(function () {
95
+ return /*#__PURE__*/_react.default.createElement(PanelIcon, {
107
96
  pluginInjectionApi: api,
108
97
  allowCustomPanel: pluginOptions.allowCustomPanel,
109
98
  panelAttributes: node.attrs,
110
- providerFactory: this.providerFactory
111
- }), this.icon);
112
- }
99
+ providerFactory: _this.providerFactory
100
+ });
101
+ }, this.icon, this.key);
113
102
  }
114
103
  return (0, _createClass2.default)(PanelNodeView, [{
115
104
  key: "ignoreMutation",
@@ -126,9 +115,7 @@ var PanelNodeView = /*#__PURE__*/function () {
126
115
  }, {
127
116
  key: "destroy",
128
117
  value: function destroy() {
129
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_plugin_portalprovider')) {
130
- this.nodeViewPortalProviderAPI.remove(this.key);
131
- }
118
+ this.nodeViewPortalProviderAPI.remove(this.key);
132
119
  }
133
120
  }]);
134
121
  }();
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
3
2
  import uuid from 'uuid/v4';
4
3
  import { PanelType } from '@atlaskit/adf-schema';
5
4
  import { Emoji } from '@atlaskit/editor-common/emoji';
@@ -9,7 +8,6 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
9
8
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
10
9
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
11
10
  import TipIcon from '@atlaskit/icon/glyph/editor/hint';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
11
  import { panelAttrsToDom } from '../pm-plugins/utils/utils';
14
12
 
15
13
  /* eslint-disable @atlaskit/editor/no-re-export */
@@ -88,21 +86,12 @@ class PanelNodeView {
88
86
  }
89
87
  // set contentEditable as false to be able to select the custom panels with keyboard
90
88
  this.icon.contentEditable = 'false';
91
- if (fg('platform_editor_react18_plugin_portalprovider')) {
92
- this.nodeViewPortalProviderAPI.render(() => /*#__PURE__*/React.createElement(PanelIcon, {
93
- pluginInjectionApi: api,
94
- allowCustomPanel: pluginOptions.allowCustomPanel,
95
- panelAttributes: node.attrs,
96
- providerFactory: this.providerFactory
97
- }), this.icon, this.key);
98
- } else {
99
- ReactDOM.render( /*#__PURE__*/React.createElement(PanelIcon, {
100
- pluginInjectionApi: api,
101
- allowCustomPanel: pluginOptions.allowCustomPanel,
102
- panelAttributes: node.attrs,
103
- providerFactory: this.providerFactory
104
- }), this.icon);
105
- }
89
+ this.nodeViewPortalProviderAPI.render(() => /*#__PURE__*/React.createElement(PanelIcon, {
90
+ pluginInjectionApi: api,
91
+ allowCustomPanel: pluginOptions.allowCustomPanel,
92
+ panelAttributes: node.attrs,
93
+ providerFactory: this.providerFactory
94
+ }), this.icon, this.key);
106
95
  }
107
96
  ignoreMutation(mutation) {
108
97
  // ignore mutation if it caused by the icon.
@@ -115,9 +104,7 @@ class PanelNodeView {
115
104
  return isIcon || isInsideIcon;
116
105
  }
117
106
  destroy() {
118
- if (fg('platform_editor_react18_plugin_portalprovider')) {
119
- this.nodeViewPortalProviderAPI.remove(this.key);
120
- }
107
+ this.nodeViewPortalProviderAPI.remove(this.key);
121
108
  }
122
109
  }
123
110
  export const getPanelNodeView = (pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) => (node, view, getPos) => {
@@ -1,7 +1,6 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import React from 'react';
4
- import ReactDOM from 'react-dom';
5
4
  import uuid from 'uuid/v4';
6
5
  import { PanelType } from '@atlaskit/adf-schema';
7
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
@@ -11,7 +10,6 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
11
10
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
12
11
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
13
12
  import TipIcon from '@atlaskit/icon/glyph/editor/hint';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
13
  import { panelAttrsToDom } from '../pm-plugins/utils/utils';
16
14
 
17
15
  /* eslint-disable @atlaskit/editor/no-re-export */
@@ -87,23 +85,14 @@ var PanelNodeView = /*#__PURE__*/function () {
87
85
  }
88
86
  // set contentEditable as false to be able to select the custom panels with keyboard
89
87
  this.icon.contentEditable = 'false';
90
- if (fg('platform_editor_react18_plugin_portalprovider')) {
91
- this.nodeViewPortalProviderAPI.render(function () {
92
- return /*#__PURE__*/React.createElement(PanelIcon, {
93
- pluginInjectionApi: api,
94
- allowCustomPanel: pluginOptions.allowCustomPanel,
95
- panelAttributes: node.attrs,
96
- providerFactory: _this.providerFactory
97
- });
98
- }, this.icon, this.key);
99
- } else {
100
- ReactDOM.render( /*#__PURE__*/React.createElement(PanelIcon, {
88
+ this.nodeViewPortalProviderAPI.render(function () {
89
+ return /*#__PURE__*/React.createElement(PanelIcon, {
101
90
  pluginInjectionApi: api,
102
91
  allowCustomPanel: pluginOptions.allowCustomPanel,
103
92
  panelAttributes: node.attrs,
104
- providerFactory: this.providerFactory
105
- }), this.icon);
106
- }
93
+ providerFactory: _this.providerFactory
94
+ });
95
+ }, this.icon, this.key);
107
96
  }
108
97
  return _createClass(PanelNodeView, [{
109
98
  key: "ignoreMutation",
@@ -120,9 +109,7 @@ var PanelNodeView = /*#__PURE__*/function () {
120
109
  }, {
121
110
  key: "destroy",
122
111
  value: function destroy() {
123
- if (fg('platform_editor_react18_plugin_portalprovider')) {
124
- this.nodeViewPortalProviderAPI.remove(this.key);
125
- }
112
+ this.nodeViewPortalProviderAPI.remove(this.key);
126
113
  }
127
114
  }]);
128
115
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,19 +31,19 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^99.10.0",
34
+ "@atlaskit/adf-schema": "^47.2.1",
35
+ "@atlaskit/editor-common": "^99.14.0",
36
36
  "@atlaskit/editor-palette": "1.7.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.12.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^1.5.0",
39
39
  "@atlaskit/editor-plugin-emoji": "^2.9.0",
40
40
  "@atlaskit/editor-prosemirror": "7.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^3.2.0",
42
- "@atlaskit/emoji": "^67.13.0",
43
- "@atlaskit/icon": "^23.7.0",
42
+ "@atlaskit/emoji": "^67.14.0",
43
+ "@atlaskit/icon": "^23.9.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.0.0",
45
45
  "@atlaskit/theme": "^15.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^2.43.0",
46
+ "@atlaskit/tmp-editor-statsig": "^2.46.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "uuid": "^3.1.0"
49
49
  },
@@ -94,9 +94,6 @@
94
94
  "platform-feature-flags": {
95
95
  "platform_editor_remove_copy_button_from_view_mode": {
96
96
  "type": "boolean"
97
- },
98
- "platform_editor_react18_plugin_portalprovider": {
99
- "type": "boolean"
100
97
  }
101
98
  },
102
99
  "stricter": {