@atlaskit/editor-plugin-block-type 3.15.3 → 3.15.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 +18 -0
- package/dist/cjs/plugin/commands/delete-block-content.js +7 -6
- package/dist/cjs/plugin/index.js +3 -0
- package/dist/es2019/plugin/commands/delete-block-content.js +7 -6
- package/dist/es2019/plugin/index.js +4 -1
- package/dist/esm/plugin/commands/delete-block-content.js +7 -6
- 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.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#146455](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146455)
|
8
|
+
[`b692485729f1c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b692485729f1c) -
|
9
|
+
improve comment editor toolbar responsiveness
|
10
|
+
- Updated dependencies
|
11
|
+
|
12
|
+
## 3.15.4
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- [#145991](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145991)
|
17
|
+
[`07586b8ad11ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/07586b8ad11ec) -
|
18
|
+
[ux] [ED-24900] This change handles deleting nested media groups inside blockquotes via the
|
19
|
+
backspace key.
|
20
|
+
|
3
21
|
## 3.15.3
|
4
22
|
|
5
23
|
### Patch Changes
|
@@ -50,12 +50,13 @@ function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
50
50
|
return false;
|
51
51
|
}
|
52
52
|
var isParentNodeOfTypePanel = (0, _utils.hasParentNodeOfType)([state.schema.nodes.panel])(state.selection);
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
if (isParentNodeOfTypePanel &&
|
58
|
-
tr.setSelection(new _state.TextSelection(tr.doc.resolve($from.before())))
|
53
|
+
var isParentNodeOfTypeBlockQuote = (0, _utils.hasParentNodeOfType)([state.schema.nodes.blockquote])(state.selection);
|
54
|
+
if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
|
55
|
+
return false;
|
56
|
+
}
|
57
|
+
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
58
|
+
tr.setSelection(new _state.TextSelection(tr.doc.resolve($from.before())));
|
59
|
+
tr.delete($from.before(), $from.after());
|
59
60
|
} else {
|
60
61
|
tr.delete($from.pos, $to.pos);
|
61
62
|
}
|
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,
|
@@ -48,12 +48,13 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
48
48
|
return false;
|
49
49
|
}
|
50
50
|
const isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
if (isParentNodeOfTypePanel &&
|
56
|
-
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())))
|
51
|
+
const isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
|
52
|
+
if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
|
53
|
+
return false;
|
54
|
+
}
|
55
|
+
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
56
|
+
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
|
57
|
+
tr.delete($from.before(), $from.after());
|
57
58
|
} else {
|
58
59
|
tr.delete($from.pos, $to.pos);
|
59
60
|
}
|
@@ -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,
|
@@ -45,12 +45,13 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
|
|
45
45
|
return false;
|
46
46
|
}
|
47
47
|
var isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
if (isParentNodeOfTypePanel &&
|
53
|
-
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())))
|
48
|
+
var isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
|
49
|
+
if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
|
50
|
+
return false;
|
51
|
+
}
|
52
|
+
if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
|
53
|
+
tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
|
54
|
+
tr.delete($from.before(), $from.after());
|
54
55
|
} else {
|
55
56
|
tr.delete($from.pos, $to.pos);
|
56
57
|
}
|
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.5",
|
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
|
}
|