@atlaskit/editor-plugin-panel 9.0.3 → 9.0.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 +13 -0
- package/dist/cjs/pm-plugins/utils/utils.js +8 -0
- package/dist/es2019/pm-plugins/utils/utils.js +9 -0
- package/dist/esm/pm-plugins/utils/utils.js +8 -0
- package/dist/types/panelPluginType.d.ts +1 -0
- package/dist/types-ts4.5/panelPluginType.d.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 9.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 9.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`549df2f66099e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/549df2f66099e) -
|
|
14
|
+
Fixed mixed HTML/Editor content copy/paste issue on Custom Panel node.
|
|
15
|
+
|
|
3
16
|
## 9.0.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
18
|
var findPanel = exports.findPanel = function findPanel(state, selection) {
|
|
@@ -42,6 +43,13 @@ var panelAttrsToDom = exports.panelAttrsToDom = function panelAttrsToDom(attrs,
|
|
|
42
43
|
'data-panel-icon-text': panelIconText
|
|
43
44
|
});
|
|
44
45
|
}
|
|
46
|
+
// Required for parseDOM to correctly parse custom panel when NodeView DOM is copied directly
|
|
47
|
+
// Schema's parseDOM expects data-panel-icon on all custom panels, not just ones with color
|
|
48
|
+
if (isCustomPanel && (0, _expValEquals.expValEquals)('platform_editor_copy_paste_issue_fix', 'isEnabled', true)) {
|
|
49
|
+
panelAttrs = _objectSpread(_objectSpread({}, panelAttrs), {}, {
|
|
50
|
+
'data-panel-icon': panelIcon
|
|
51
|
+
});
|
|
52
|
+
}
|
|
45
53
|
if ((0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid')) {
|
|
46
54
|
panelAttrs = _objectSpread(_objectSpread({}, panelAttrs), {}, {
|
|
47
55
|
'data-local-id': attrs.localId
|
|
@@ -4,6 +4,7 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
export const findPanel = (state, selection) => {
|
|
8
9
|
const {
|
|
9
10
|
panel
|
|
@@ -37,6 +38,14 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
|
|
|
37
38
|
'data-panel-icon-text': panelIconText
|
|
38
39
|
};
|
|
39
40
|
}
|
|
41
|
+
// Required for parseDOM to correctly parse custom panel when NodeView DOM is copied directly
|
|
42
|
+
// Schema's parseDOM expects data-panel-icon on all custom panels, not just ones with color
|
|
43
|
+
if (isCustomPanel && expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true)) {
|
|
44
|
+
panelAttrs = {
|
|
45
|
+
...panelAttrs,
|
|
46
|
+
'data-panel-icon': panelIcon
|
|
47
|
+
};
|
|
48
|
+
}
|
|
40
49
|
if (fg('platform_editor_adf_with_localid')) {
|
|
41
50
|
panelAttrs = {
|
|
42
51
|
...panelAttrs,
|
|
@@ -7,6 +7,7 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
7
7
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
export var findPanel = function findPanel(state, selection) {
|
|
11
12
|
var panel = state.schema.nodes.panel;
|
|
12
13
|
return findSelectedNodeOfType(panel)(selection || state.selection) || findParentNodeOfType(panel)(selection || state.selection);
|
|
@@ -35,6 +36,13 @@ export var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
|
|
|
35
36
|
'data-panel-icon-text': panelIconText
|
|
36
37
|
});
|
|
37
38
|
}
|
|
39
|
+
// Required for parseDOM to correctly parse custom panel when NodeView DOM is copied directly
|
|
40
|
+
// Schema's parseDOM expects data-panel-icon on all custom panels, not just ones with color
|
|
41
|
+
if (isCustomPanel && expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true)) {
|
|
42
|
+
panelAttrs = _objectSpread(_objectSpread({}, panelAttrs), {}, {
|
|
43
|
+
'data-panel-icon': panelIcon
|
|
44
|
+
});
|
|
45
|
+
}
|
|
38
46
|
if (fg('platform_editor_adf_with_localid')) {
|
|
39
47
|
panelAttrs = _objectSpread(_objectSpread({}, panelAttrs), {}, {
|
|
40
48
|
'data-local-id': attrs.localId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.5",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-emoji": "^8.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-toolbar": "^4.
|
|
37
|
+
"@atlaskit/editor-plugin-toolbar": "^4.1.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
40
40
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
41
41
|
"@atlaskit/emoji": "^69.10.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
42
|
+
"@atlaskit/icon": "^30.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/theme": "^21.0.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
46
|
-
"@atlaskit/tokens": "^10.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^16.30.0",
|
|
46
|
+
"@atlaskit/tokens": "^10.1.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"uuid": "^3.1.0"
|
|
49
49
|
},
|