@atlaskit/editor-core 190.1.12 → 190.1.14
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 +12 -0
- package/dist/cjs/plugins/extension/toolbar.js +4 -18
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/toolbar.js +5 -25
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/toolbar.js +4 -18
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#62765](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62765) [`ec6a2bbae20e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ec6a2bbae20e) - ED-21606: Width options support for MBE renderer and adding back edit option on toolbar
|
|
8
|
+
|
|
9
|
+
## 190.1.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 190.1.12
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -59,21 +59,12 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
59
59
|
layoutSection = _state$schema$nodes.layoutSection,
|
|
60
60
|
table = _state$schema$nodes.table,
|
|
61
61
|
expand = _state$schema$nodes.expand,
|
|
62
|
+
multiBodiedExtension = _state$schema$nodes.multiBodiedExtension,
|
|
62
63
|
selection = state.selection;
|
|
63
64
|
if (!selectedExtNode) {
|
|
64
65
|
return false;
|
|
65
66
|
}
|
|
66
|
-
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !(0, _utils.hasParentNodeOfType)([bodiedExtension, table, expand].filter(Boolean))(selection)) && !(0, _utils.hasParentNodeOfType)([layoutSection])(selection));
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// Edit is not supported for multiBodiedExtension
|
|
70
|
-
var isEditSupported = function isEditSupported(state, selectedExtNode) {
|
|
71
|
-
var _selectedExtNode$node;
|
|
72
|
-
var multiBodiedExtension = state.schema.nodes.multiBodiedExtension;
|
|
73
|
-
if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 || (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
67
|
+
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === multiBodiedExtension || selectedExtNode.node.type === extension && !(0, _utils.hasParentNodeOfType)([bodiedExtension, table, expand].filter(Boolean))(selection)) && !(0, _utils.hasParentNodeOfType)([layoutSection])(selection));
|
|
77
68
|
};
|
|
78
69
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
79
70
|
var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
|
|
@@ -106,15 +97,10 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
106
97
|
}
|
|
107
98
|
return [];
|
|
108
99
|
};
|
|
109
|
-
var editButton = function editButton(
|
|
110
|
-
var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
|
|
100
|
+
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
111
101
|
if (!extensionState.showEditButton) {
|
|
112
102
|
return [];
|
|
113
103
|
}
|
|
114
|
-
// For multiBodiedExtension case, edit is not supported
|
|
115
|
-
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
116
|
-
return [];
|
|
117
|
-
}
|
|
118
104
|
return [{
|
|
119
105
|
id: 'editor.extension.edit',
|
|
120
106
|
type: 'button',
|
|
@@ -144,7 +130,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
144
130
|
var extensionState = (0, _main.getPluginState)(state);
|
|
145
131
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
146
132
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
147
|
-
var editButtonArray = editButton(
|
|
133
|
+
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
148
134
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
149
135
|
var extensionObj = (0, _utils2.getSelectedExtension)(state, true);
|
|
150
136
|
|
|
@@ -52,7 +52,8 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
52
52
|
extension,
|
|
53
53
|
layoutSection,
|
|
54
54
|
table,
|
|
55
|
-
expand
|
|
55
|
+
expand,
|
|
56
|
+
multiBodiedExtension
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
selection
|
|
@@ -60,23 +61,7 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
60
61
|
if (!selectedExtNode) {
|
|
61
62
|
return false;
|
|
62
63
|
}
|
|
63
|
-
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Edit is not supported for multiBodiedExtension
|
|
67
|
-
const isEditSupported = (state, selectedExtNode) => {
|
|
68
|
-
var _selectedExtNode$node;
|
|
69
|
-
const {
|
|
70
|
-
schema: {
|
|
71
|
-
nodes: {
|
|
72
|
-
multiBodiedExtension
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
} = state;
|
|
76
|
-
if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 ? void 0 : (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
return true;
|
|
64
|
+
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === multiBodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
80
65
|
};
|
|
81
66
|
const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled) => {
|
|
82
67
|
const nodeWithPos = getSelectedExtension(state, true);
|
|
@@ -111,15 +96,10 @@ const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled)
|
|
|
111
96
|
}
|
|
112
97
|
return [];
|
|
113
98
|
};
|
|
114
|
-
const editButton = (
|
|
115
|
-
const nodeWithPos = getSelectedExtension(state, true);
|
|
99
|
+
const editButton = (formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
|
|
116
100
|
if (!extensionState.showEditButton) {
|
|
117
101
|
return [];
|
|
118
102
|
}
|
|
119
|
-
// For multiBodiedExtension case, edit is not supported
|
|
120
|
-
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
121
|
-
return [];
|
|
122
|
-
}
|
|
123
103
|
return [{
|
|
124
104
|
id: 'editor.extension.edit',
|
|
125
105
|
type: 'button',
|
|
@@ -151,7 +131,7 @@ export const getToolbarConfig = ({
|
|
|
151
131
|
const extensionState = getPluginState(state);
|
|
152
132
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
153
133
|
const nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
154
|
-
const editButtonArray = editButton(
|
|
134
|
+
const editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
155
135
|
const breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
156
136
|
const extensionObj = getSelectedExtension(state, true);
|
|
157
137
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.14";
|
|
@@ -52,21 +52,12 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
52
52
|
layoutSection = _state$schema$nodes.layoutSection,
|
|
53
53
|
table = _state$schema$nodes.table,
|
|
54
54
|
expand = _state$schema$nodes.expand,
|
|
55
|
+
multiBodiedExtension = _state$schema$nodes.multiBodiedExtension,
|
|
55
56
|
selection = state.selection;
|
|
56
57
|
if (!selectedExtNode) {
|
|
57
58
|
return false;
|
|
58
59
|
}
|
|
59
|
-
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Edit is not supported for multiBodiedExtension
|
|
63
|
-
var isEditSupported = function isEditSupported(state, selectedExtNode) {
|
|
64
|
-
var _selectedExtNode$node;
|
|
65
|
-
var multiBodiedExtension = state.schema.nodes.multiBodiedExtension;
|
|
66
|
-
if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 || (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
60
|
+
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === multiBodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
70
61
|
};
|
|
71
62
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
72
63
|
var nodeWithPos = getSelectedExtension(state, true);
|
|
@@ -99,15 +90,10 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
99
90
|
}
|
|
100
91
|
return [];
|
|
101
92
|
};
|
|
102
|
-
var editButton = function editButton(
|
|
103
|
-
var nodeWithPos = getSelectedExtension(state, true);
|
|
93
|
+
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
104
94
|
if (!extensionState.showEditButton) {
|
|
105
95
|
return [];
|
|
106
96
|
}
|
|
107
|
-
// For multiBodiedExtension case, edit is not supported
|
|
108
|
-
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
109
|
-
return [];
|
|
110
|
-
}
|
|
111
97
|
return [{
|
|
112
98
|
id: 'editor.extension.edit',
|
|
113
99
|
type: 'button',
|
|
@@ -137,7 +123,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
137
123
|
var extensionState = getPluginState(state);
|
|
138
124
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
139
125
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
140
|
-
var editButtonArray = editButton(
|
|
126
|
+
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
141
127
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
142
128
|
var extensionObj = getSelectedExtension(state, true);
|
|
143
129
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.1.
|
|
2
|
+
export var version = "190.1.14";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "190.1.
|
|
3
|
+
"version": "190.1.14",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/checkbox": "^13.0.0",
|
|
52
52
|
"@atlaskit/date": "^0.10.0",
|
|
53
53
|
"@atlaskit/datetime-picker": "^13.0.3",
|
|
54
|
-
"@atlaskit/editor-common": "^76.
|
|
54
|
+
"@atlaskit/editor-common": "^76.28.0",
|
|
55
55
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
56
56
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
57
57
|
"@atlaskit/editor-plugin-alignment": "^0.1.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@atlaskit/editor-plugin-list": "^3.0.0",
|
|
95
95
|
"@atlaskit/editor-plugin-loom": "^0.2.0",
|
|
96
96
|
"@atlaskit/editor-plugin-max-content-size": "^0.1.0",
|
|
97
|
-
"@atlaskit/editor-plugin-media": "^0.
|
|
97
|
+
"@atlaskit/editor-plugin-media": "^0.7.0",
|
|
98
98
|
"@atlaskit/editor-plugin-mentions": "^0.1.0",
|
|
99
99
|
"@atlaskit/editor-plugin-panel": "^0.1.0",
|
|
100
100
|
"@atlaskit/editor-plugin-paste": "^0.1.0",
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
189
189
|
"@atlaskit/menu": "^2.1.0",
|
|
190
190
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
191
|
-
"@atlaskit/renderer": "^109.
|
|
191
|
+
"@atlaskit/renderer": "^109.1.0",
|
|
192
192
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
193
193
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
194
194
|
"@atlaskit/visual-regression": "*",
|