@atlaskit/editor-plugin-block-type 3.15.4 → 3.15.6
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 +18 -0
- package/dist/cjs/plugin/commands/delete-block-content.js +1 -4
- package/dist/cjs/plugin/index.js +3 -0
- package/dist/es2019/plugin/commands/delete-block-content.js +1 -4
- package/dist/es2019/plugin/index.js +4 -1
- package/dist/esm/plugin/commands/delete-block-content.js +1 -4
- package/dist/esm/plugin/index.js +3 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 3.15.6
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#147080](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147080)
|
8
|
+
[`3c9bbcfd3436f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c9bbcfd3436f) -
|
9
|
+
[ux] [ED-24900] This change fixes a bug when deleting media groups from empty panels and
|
10
|
+
blockquotes with Backspace.
|
11
|
+
|
12
|
+
## 3.15.5
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- [#146455](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146455)
|
17
|
+
[`b692485729f1c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b692485729f1c) -
|
18
|
+
improve comment editor toolbar responsiveness
|
19
|
+
- Updated dependencies
|
20
|
+
|
3
21
|
## 3.15.4
|
4
22
|
|
5
23
|
### Patch Changes
|
@@ -51,10 +51,7 @@ function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
51
51
|
}
|
52
52
|
var isParentNodeOfTypePanel = (0, _utils.hasParentNodeOfType)([state.schema.nodes.panel])(state.selection);
|
53
53
|
var isParentNodeOfTypeBlockQuote = (0, _utils.hasParentNodeOfType)([state.schema.nodes.blockquote])(state.selection);
|
54
|
-
if (
|
55
|
-
return false;
|
56
|
-
}
|
57
|
-
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
54
|
+
if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
58
55
|
tr.setSelection(new _state.TextSelection(tr.doc.resolve($from.before())));
|
59
56
|
tr.delete($from.before(), $from.after());
|
60
57
|
} else {
|
package/dist/cjs/plugin/index.js
CHANGED
@@ -114,6 +114,9 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
114
114
|
disabled = _ref4.disabled,
|
115
115
|
isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
|
116
116
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < _types.ToolbarSize.XXL : toolbarSize < _types.ToolbarSize.XL;
|
117
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_responsive_fixes')) {
|
118
|
+
isSmall = toolbarSize < _types.ToolbarSize.XXL;
|
119
|
+
}
|
117
120
|
return /*#__PURE__*/_react.default.createElement(_PrimaryToolbarComponent.PrimaryToolbarComponent, {
|
118
121
|
isSmall: isSmall,
|
119
122
|
disabled: disabled,
|
@@ -49,10 +49,7 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
49
49
|
}
|
50
50
|
const isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
|
51
51
|
const isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
|
52
|
-
if (
|
53
|
-
return false;
|
54
|
-
}
|
55
|
-
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
52
|
+
if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
56
53
|
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
|
57
54
|
tr.delete($from.before(), $from.after());
|
58
55
|
} else {
|
@@ -99,7 +99,10 @@ const blockTypePlugin = ({
|
|
99
99
|
disabled,
|
100
100
|
isToolbarReducedSpacing
|
101
101
|
}) => {
|
102
|
-
|
102
|
+
let isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
103
|
+
if (fg('platform_editor_toolbar_responsive_fixes')) {
|
104
|
+
isSmall = toolbarSize < ToolbarSize.XXL;
|
105
|
+
}
|
103
106
|
return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
|
104
107
|
isSmall: isSmall,
|
105
108
|
disabled: disabled,
|
@@ -46,10 +46,7 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
46
46
|
}
|
47
47
|
var isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
|
48
48
|
var isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
|
49
|
-
if (
|
50
|
-
return false;
|
51
|
-
}
|
52
|
-
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
49
|
+
if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
53
50
|
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
|
54
51
|
tr.delete($from.before(), $from.after());
|
55
52
|
} else {
|
package/dist/esm/plugin/index.js
CHANGED
@@ -101,6 +101,9 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
101
101
|
disabled = _ref4.disabled,
|
102
102
|
isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
|
103
103
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
104
|
+
if (fg('platform_editor_toolbar_responsive_fixes')) {
|
105
|
+
isSmall = toolbarSize < ToolbarSize.XXL;
|
106
|
+
}
|
104
107
|
return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
|
105
108
|
isSmall: isSmall,
|
106
109
|
disabled: disabled,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "3.15.
|
3
|
+
"version": "3.15.6",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -34,13 +34,13 @@
|
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
36
|
"@atlaskit/adf-schema": "^40.9.0",
|
37
|
-
"@atlaskit/editor-common": "^91.
|
37
|
+
"@atlaskit/editor-common": "^91.2.0",
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
39
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.0.0",
|
42
42
|
"@atlaskit/editor-tables": "^2.8.0",
|
43
|
-
"@atlaskit/icon": "^22.
|
43
|
+
"@atlaskit/icon": "^22.19.0",
|
44
44
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
46
46
|
"@atlaskit/theme": "^13.0.0",
|
@@ -103,6 +103,9 @@
|
|
103
103
|
"editor_nest_media_and_codeblock_in_quotes_jira": {
|
104
104
|
"type": "boolean"
|
105
105
|
},
|
106
|
+
"platform_editor_toolbar_responsive_fixes": {
|
107
|
+
"type": "boolean"
|
108
|
+
},
|
106
109
|
"platform_editor_nest_in_quotes_adf_change": {
|
107
110
|
"type": "boolean"
|
108
111
|
}
|