@atlaskit/editor-core 190.1.0 → 190.1.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 +6 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/plugins/extension/pm-plugins/unique-id.js +2 -2
- package/dist/cjs/plugins/extension/toolbar.js +17 -2
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/plugins/extension/pm-plugins/unique-id.js +2 -2
- package/dist/es2019/plugins/extension/toolbar.js +23 -2
- package/dist/es2019/ui/ContentStyles/extension.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/plugins/extension/pm-plugins/unique-id.js +2 -2
- package/dist/esm/plugins/extension/toolbar.js +17 -2
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61696) [`fcc2b35ad97b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcc2b35ad97b) - ED-21505: Added better selections and highlights for MBE nodes on Editor
|
|
8
|
+
|
|
3
9
|
## 190.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/cjs/i18n/ja.js
CHANGED
|
@@ -33,6 +33,7 @@ var _default = exports.default = {
|
|
|
33
33
|
'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
|
|
34
34
|
'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
|
|
35
35
|
'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
|
|
36
|
+
'fabric.editor.configPanel.help': 'お困りですか?',
|
|
36
37
|
'fabric.editor.configPanel.invalid': '無効なフィールド',
|
|
37
38
|
'fabric.editor.configPanel.required': '必須フィールド',
|
|
38
39
|
'fabric.editor.configPanel.submit': '送信',
|
|
@@ -51,8 +51,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
|
|
|
51
51
|
}));
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* If it's a bodiedExtension, we'll need to keep digging;
|
|
55
|
-
* can have more extension nodes within the contents of that
|
|
54
|
+
* If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
|
|
55
|
+
* since we can have more extension nodes within the contents of that
|
|
56
56
|
*/
|
|
57
57
|
if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
|
|
58
58
|
return true;
|
|
@@ -65,6 +65,16 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
65
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
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;
|
|
77
|
+
};
|
|
68
78
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
69
79
|
var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
|
|
70
80
|
|
|
@@ -96,10 +106,15 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
96
106
|
}
|
|
97
107
|
return [];
|
|
98
108
|
};
|
|
99
|
-
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
109
|
+
var editButton = function editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
110
|
+
var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
|
|
100
111
|
if (!extensionState.showEditButton) {
|
|
101
112
|
return [];
|
|
102
113
|
}
|
|
114
|
+
// For multiBodiedExtension case, edit is not supported
|
|
115
|
+
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
103
118
|
return [{
|
|
104
119
|
id: 'editor.extension.edit',
|
|
105
120
|
type: 'button',
|
|
@@ -129,7 +144,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
129
144
|
var extensionState = (0, _main.getPluginState)(state);
|
|
130
145
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
131
146
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
132
|
-
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
147
|
+
var editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
133
148
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
134
149
|
var extensionObj = (0, _utils2.getSelectedExtension)(state, true);
|
|
135
150
|
|
|
@@ -10,4 +10,4 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _templateObject;
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
-
var extensionStyles = exports.extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin);
|
|
13
|
+
var extensionStyles = exports.extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin);
|
package/dist/es2019/i18n/ja.js
CHANGED
|
@@ -27,6 +27,7 @@ export default {
|
|
|
27
27
|
'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
|
|
28
28
|
'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
|
|
29
29
|
'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
|
|
30
|
+
'fabric.editor.configPanel.help': 'お困りですか?',
|
|
30
31
|
'fabric.editor.configPanel.invalid': '無効なフィールド',
|
|
31
32
|
'fabric.editor.configPanel.required': '必須フィールド',
|
|
32
33
|
'fabric.editor.configPanel.submit': '送信',
|
|
@@ -40,8 +40,8 @@ const createPlugin = () => new SafePlugin({
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* If it's a bodiedExtension, we'll need to keep digging;
|
|
44
|
-
* can have more extension nodes within the contents of that
|
|
43
|
+
* If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
|
|
44
|
+
* since we can have more extension nodes within the contents of that
|
|
45
45
|
*/
|
|
46
46
|
if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
|
|
47
47
|
return true;
|
|
@@ -62,6 +62,22 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
62
62
|
}
|
|
63
63
|
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
64
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;
|
|
80
|
+
};
|
|
65
81
|
const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled) => {
|
|
66
82
|
const nodeWithPos = getSelectedExtension(state, true);
|
|
67
83
|
|
|
@@ -95,10 +111,15 @@ const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled)
|
|
|
95
111
|
}
|
|
96
112
|
return [];
|
|
97
113
|
};
|
|
98
|
-
const editButton = (formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
|
|
114
|
+
const editButton = (state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
|
|
115
|
+
const nodeWithPos = getSelectedExtension(state, true);
|
|
99
116
|
if (!extensionState.showEditButton) {
|
|
100
117
|
return [];
|
|
101
118
|
}
|
|
119
|
+
// For multiBodiedExtension case, edit is not supported
|
|
120
|
+
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
102
123
|
return [{
|
|
103
124
|
id: 'editor.extension.edit',
|
|
104
125
|
type: 'button',
|
|
@@ -130,7 +151,7 @@ export const getToolbarConfig = ({
|
|
|
130
151
|
const extensionState = getPluginState(state);
|
|
131
152
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
132
153
|
const nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
133
|
-
const editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
154
|
+
const editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
134
155
|
const breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
135
156
|
const extensionObj = getSelectedExtension(state, true);
|
|
136
157
|
|
|
@@ -6,6 +6,18 @@ export const extensionStyles = css`
|
|
|
6
6
|
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.multiBodiedExtensionView-content-wrap {
|
|
10
|
+
&.danger > span > .multiBodiedExtension--container {
|
|
11
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
|
|
12
|
+
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
13
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
|
|
14
|
+
}
|
|
15
|
+
.multiBodiedExtension--container {
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-width: 100%; // ensure width can't go over 100%;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
9
21
|
.extensionView-content-wrap,
|
|
10
22
|
.multiBodiedExtensionView-content-wrap,
|
|
11
23
|
.bodiedExtensionView-content-wrap {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.1";
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -27,6 +27,7 @@ export default {
|
|
|
27
27
|
'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
|
|
28
28
|
'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
|
|
29
29
|
'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
|
|
30
|
+
'fabric.editor.configPanel.help': 'お困りですか?',
|
|
30
31
|
'fabric.editor.configPanel.invalid': '無効なフィールド',
|
|
31
32
|
'fabric.editor.configPanel.required': '必須フィールド',
|
|
32
33
|
'fabric.editor.configPanel.submit': '送信',
|
|
@@ -44,8 +44,8 @@ var createPlugin = function createPlugin() {
|
|
|
44
44
|
}));
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* If it's a bodiedExtension, we'll need to keep digging;
|
|
48
|
-
* can have more extension nodes within the contents of that
|
|
47
|
+
* If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
|
|
48
|
+
* since we can have more extension nodes within the contents of that
|
|
49
49
|
*/
|
|
50
50
|
if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
|
|
51
51
|
return true;
|
|
@@ -58,6 +58,16 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
58
58
|
}
|
|
59
59
|
return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
|
|
60
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;
|
|
70
|
+
};
|
|
61
71
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
62
72
|
var nodeWithPos = getSelectedExtension(state, true);
|
|
63
73
|
|
|
@@ -89,10 +99,15 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
89
99
|
}
|
|
90
100
|
return [];
|
|
91
101
|
};
|
|
92
|
-
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
102
|
+
var editButton = function editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
103
|
+
var nodeWithPos = getSelectedExtension(state, true);
|
|
93
104
|
if (!extensionState.showEditButton) {
|
|
94
105
|
return [];
|
|
95
106
|
}
|
|
107
|
+
// For multiBodiedExtension case, edit is not supported
|
|
108
|
+
if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
96
111
|
return [{
|
|
97
112
|
id: 'editor.extension.edit',
|
|
98
113
|
type: 'button',
|
|
@@ -122,7 +137,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
122
137
|
var extensionState = getPluginState(state);
|
|
123
138
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
124
139
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
125
|
-
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
140
|
+
var editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
126
141
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
|
|
127
142
|
var extensionObj = getSelectedExtension(state, true);
|
|
128
143
|
|
|
@@ -3,4 +3,4 @@ var _templateObject;
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
6
|
-
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
|
|
6
|
+
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.1.
|
|
2
|
+
export var version = "190.1.1";
|
package/dist/types/i18n/ja.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
|
|
26
26
|
'fabric.editor.configPanel.formType.addField': string;
|
|
27
27
|
'fabric.editor.configPanel.formType.removeField': string;
|
|
28
|
+
'fabric.editor.configPanel.help': string;
|
|
28
29
|
'fabric.editor.configPanel.invalid': string;
|
|
29
30
|
'fabric.editor.configPanel.required': string;
|
|
30
31
|
'fabric.editor.configPanel.submit': string;
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
|
|
26
26
|
'fabric.editor.configPanel.formType.addField': string;
|
|
27
27
|
'fabric.editor.configPanel.formType.removeField': string;
|
|
28
|
+
'fabric.editor.configPanel.help': string;
|
|
28
29
|
'fabric.editor.configPanel.invalid': string;
|
|
29
30
|
'fabric.editor.configPanel.required': string;
|
|
30
31
|
'fabric.editor.configPanel.submit': string;
|