@atlaskit/editor-plugin-panel 3.2.6 → 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,25 @@
|
|
|
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
|
+
|
|
11
|
+
## 3.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
|
|
16
|
+
[`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
|
|
17
|
+
Bumped editor-prosemirror version to 7.0.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 3.2.6
|
|
4
24
|
|
|
5
25
|
### Patch 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
|
-
|
|
97
|
-
|
|
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:
|
|
111
|
-
})
|
|
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
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
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
|
-
|
|
91
|
-
|
|
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:
|
|
105
|
-
})
|
|
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
|
-
|
|
124
|
-
this.nodeViewPortalProviderAPI.remove(this.key);
|
|
125
|
-
}
|
|
112
|
+
this.nodeViewPortalProviderAPI.remove(this.key);
|
|
126
113
|
}
|
|
127
114
|
}]);
|
|
128
115
|
}();
|
|
@@ -4,7 +4,7 @@ import { PanelType } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ExtractInjectionAPI, getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { PanelPlugin, PanelPluginOptions } from '../panelPluginType';
|
|
10
10
|
export declare const panelIcons: {
|
|
@@ -20,7 +20,7 @@ interface PanelIconAttributes {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const PanelIcon: (props: PanelIconAttributes) => React.JSX.Element;
|
|
22
22
|
declare class PanelNodeView {
|
|
23
|
-
node:
|
|
23
|
+
node: PMNode;
|
|
24
24
|
dom: HTMLElement;
|
|
25
25
|
contentDOM: HTMLElement;
|
|
26
26
|
icon: HTMLElement;
|
|
@@ -30,12 +30,12 @@ declare class PanelNodeView {
|
|
|
30
30
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
31
31
|
pluginOptions: PanelPluginOptions;
|
|
32
32
|
key: string;
|
|
33
|
-
constructor(node:
|
|
33
|
+
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory);
|
|
34
34
|
ignoreMutation(mutation: MutationRecord | {
|
|
35
35
|
type: 'selection';
|
|
36
|
-
target:
|
|
36
|
+
target: Node;
|
|
37
37
|
}): boolean;
|
|
38
38
|
destroy(): void;
|
|
39
39
|
}
|
|
40
|
-
export declare const getPanelNodeView: (pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory) => (node:
|
|
40
|
+
export declare const getPanelNodeView: (pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory) => (node: PMNode, view: EditorView, getPos: getPosHandler) => PanelNodeView;
|
|
41
41
|
export {};
|
|
@@ -4,7 +4,7 @@ import { PanelType } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ExtractInjectionAPI, getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { PanelPlugin, PanelPluginOptions } from '../panelPluginType';
|
|
10
10
|
export declare const panelIcons: {
|
|
@@ -20,7 +20,7 @@ interface PanelIconAttributes {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const PanelIcon: (props: PanelIconAttributes) => React.JSX.Element;
|
|
22
22
|
declare class PanelNodeView {
|
|
23
|
-
node:
|
|
23
|
+
node: PMNode;
|
|
24
24
|
dom: HTMLElement;
|
|
25
25
|
contentDOM: HTMLElement;
|
|
26
26
|
icon: HTMLElement;
|
|
@@ -30,12 +30,12 @@ declare class PanelNodeView {
|
|
|
30
30
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
31
31
|
pluginOptions: PanelPluginOptions;
|
|
32
32
|
key: string;
|
|
33
|
-
constructor(node:
|
|
33
|
+
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory);
|
|
34
34
|
ignoreMutation(mutation: MutationRecord | {
|
|
35
35
|
type: 'selection';
|
|
36
|
-
target:
|
|
36
|
+
target: Node;
|
|
37
37
|
}): boolean;
|
|
38
38
|
destroy(): void;
|
|
39
39
|
}
|
|
40
|
-
export declare const getPanelNodeView: (pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory) => (node:
|
|
40
|
+
export declare const getPanelNodeView: (pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory) => (node: PMNode, view: EditorView, getPos: getPosHandler) => PanelNodeView;
|
|
41
41
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "3.
|
|
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": "^
|
|
35
|
-
"@atlaskit/editor-common": "^99.
|
|
34
|
+
"@atlaskit/adf-schema": "^47.2.1",
|
|
35
|
+
"@atlaskit/editor-common": "^99.14.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.7.0",
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
38
|
-
"@atlaskit/editor-plugin-decorations": "^1.
|
|
39
|
-
"@atlaskit/editor-plugin-emoji": "^2.
|
|
40
|
-
"@atlaskit/editor-prosemirror": "
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^1.12.0",
|
|
38
|
+
"@atlaskit/editor-plugin-decorations": "^1.5.0",
|
|
39
|
+
"@atlaskit/editor-plugin-emoji": "^2.9.0",
|
|
40
|
+
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
42
|
-
"@atlaskit/emoji": "^67.
|
|
43
|
-
"@atlaskit/icon": "^23.
|
|
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.
|
|
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": {
|