@atlaskit/editor-plugin-panel 2.1.0 → 2.2.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,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 2.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#124134](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124134)
|
|
8
|
+
[`66625e5ffed2f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66625e5ffed2f) -
|
|
9
|
+
Removed FF platform.editor.allow-custom-cut-for-panel
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#124209](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124209)
|
|
17
|
+
[`8aa1792f12ed3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8aa1792f12ed3) -
|
|
18
|
+
bump @atlaskit/editor-prosemirror to 5.0.0, bump @atlaskit/adf-schema to 40.1.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 2.1.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -7,7 +7,6 @@ exports.createPlugin = void 0;
|
|
|
7
7
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
8
8
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
9
9
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _panel2 = require("../nodeviews/panel");
|
|
12
11
|
var _types = require("../types");
|
|
13
12
|
var _utils = require("../utils");
|
|
@@ -17,13 +16,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
17
16
|
return new _safePlugin.SafePlugin({
|
|
18
17
|
key: _types.pluginKey,
|
|
19
18
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return (0, _utils.handleCut)(newState, oldState);
|
|
26
|
-
}
|
|
19
|
+
var tr = transactions.find(function (tr) {
|
|
20
|
+
return tr.getMeta('uiEvent') === 'cut';
|
|
21
|
+
});
|
|
22
|
+
if (tr) {
|
|
23
|
+
return (0, _utils.handleCut)(newState, oldState);
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
26
|
props: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { getPanelNodeView } from '../nodeviews/panel';
|
|
6
5
|
import { pluginKey } from '../types';
|
|
7
6
|
import { handleCut } from '../utils';
|
|
@@ -12,11 +11,9 @@ export const createPlugin = (dispatch, providerFactory, pluginOptions) => {
|
|
|
12
11
|
return new SafePlugin({
|
|
13
12
|
key: pluginKey,
|
|
14
13
|
appendTransaction: (transactions, oldState, newState) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return handleCut(newState, oldState);
|
|
19
|
-
}
|
|
14
|
+
const tr = transactions.find(tr => tr.getMeta('uiEvent') === 'cut');
|
|
15
|
+
if (tr) {
|
|
16
|
+
return handleCut(newState, oldState);
|
|
20
17
|
}
|
|
21
18
|
},
|
|
22
19
|
props: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { getPanelNodeView } from '../nodeviews/panel';
|
|
6
5
|
import { pluginKey } from '../types';
|
|
7
6
|
import { handleCut } from '../utils';
|
|
@@ -11,13 +10,11 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, plugi
|
|
|
11
10
|
return new SafePlugin({
|
|
12
11
|
key: pluginKey,
|
|
13
12
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return handleCut(newState, oldState);
|
|
20
|
-
}
|
|
13
|
+
var tr = transactions.find(function (tr) {
|
|
14
|
+
return tr.getMeta('uiEvent') === 'cut';
|
|
15
|
+
});
|
|
16
|
+
if (tr) {
|
|
17
|
+
return handleCut(newState, oldState);
|
|
21
18
|
}
|
|
22
19
|
},
|
|
23
20
|
props: {
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PanelAttributes } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
|
|
4
|
+
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
export declare const findPanel: (state: EditorState, selection?: Selection | null) => ReturnType<ReturnType<typeof findSelectedNodeOfType>> | ReturnType<ReturnType<typeof findParentNodeOfType>>;
|
|
5
6
|
export declare const panelAttrsToDom: (attrs: PanelAttributes, allowCustomPanel: boolean) => DOMOutputSpec;
|
|
6
7
|
export declare const handleCut: (newState: EditorState, oldState: EditorState) => import("prosemirror-state").Transaction | undefined;
|
|
7
8
|
export declare const panelContentCheck: (newState: EditorState, oldState: EditorState) => boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PanelAttributes } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
|
|
4
|
+
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
export declare const findPanel: (state: EditorState, selection?: Selection | null) => ReturnType<ReturnType<typeof findSelectedNodeOfType>> | ReturnType<ReturnType<typeof findParentNodeOfType>>;
|
|
5
6
|
export declare const panelAttrsToDom: (attrs: PanelAttributes, allowCustomPanel: boolean) => DOMOutputSpec;
|
|
6
7
|
export declare const handleCut: (newState: EditorState, oldState: EditorState) => import("prosemirror-state").Transaction | undefined;
|
|
7
8
|
export declare const panelContentCheck: (newState: EditorState, oldState: EditorState) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,15 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^40.3.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^87.0.0",
|
|
38
38
|
"@atlaskit/editor-palette": "1.6.0",
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^1.
|
|
41
|
-
"@atlaskit/editor-prosemirror": "
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^1.2.0",
|
|
41
|
+
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
43
43
|
"@atlaskit/emoji": "^67.6.0",
|
|
44
44
|
"@atlaskit/icon": "^22.7.0",
|
|
45
|
-
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
45
|
"@atlaskit/theme": "^12.11.0",
|
|
47
46
|
"@babel/runtime": "^7.0.0"
|
|
48
47
|
},
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@atlaskit/editor-plugin-feature-flags": "^1.
|
|
54
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
56
55
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
57
56
|
"react-dom": "^16.8.0",
|
|
58
57
|
"typescript": "~5.4.2"
|
|
@@ -90,11 +89,6 @@
|
|
|
90
89
|
]
|
|
91
90
|
}
|
|
92
91
|
},
|
|
93
|
-
"platform-feature-flags": {
|
|
94
|
-
"platform.editor.allow-custom-cut-for-panel": {
|
|
95
|
-
"type": "boolean"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
92
|
"stricter": {
|
|
99
93
|
"no-unused-dependencies": {
|
|
100
94
|
"checkDevDependencies": true
|