@atlaskit/editor-plugin-extension 1.15.0 → 1.15.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 +12 -0
- package/dist/cjs/toolbar.js +16 -6
- package/dist/es2019/toolbar.js +17 -7
- package/dist/esm/toolbar.js +17 -7
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 1.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152399](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152399)
|
|
8
|
+
[`fbd7217f0cb51`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fbd7217f0cb51) -
|
|
9
|
+
[ux] ED-25092: Migrated table toolbar icons
|
|
10
|
+
- [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
|
|
11
|
+
[`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
|
|
12
|
+
bump adf-schema to 42.0.1
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 1.15.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -11,7 +11,12 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
|
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
14
|
-
var
|
|
14
|
+
var _contentWidthNarrow = _interopRequireDefault(require("@atlaskit/icon/core/content-width-narrow"));
|
|
15
|
+
var _contentWidthWide = _interopRequireDefault(require("@atlaskit/icon/core/content-width-wide"));
|
|
16
|
+
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
17
|
+
var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
18
|
+
var _expandHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/expand-horizontal"));
|
|
19
|
+
var _edit2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/edit"));
|
|
15
20
|
var _mediaCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-center"));
|
|
16
21
|
var _mediaFullWidth = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-full-width"));
|
|
17
22
|
var _mediaWide = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wide"));
|
|
@@ -34,7 +39,7 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
34
39
|
if (!selectedExtNode) {
|
|
35
40
|
return false;
|
|
36
41
|
}
|
|
37
|
-
var isMultiBodiedExtension = (0, _platformFeatureFlags.
|
|
42
|
+
var isMultiBodiedExtension = (0, _platformFeatureFlags.fg)('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
38
43
|
var isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !(0, _utils2.hasParentNodeOfType)([multiBodiedExtension].filter(Boolean))(selection);
|
|
39
44
|
var isNonEmbeddedExtension = selectedExtNode.node.type === extension && !(0, _utils2.hasParentNodeOfType)([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
40
45
|
|
|
@@ -50,21 +55,24 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
50
55
|
var layout = nodeWithPos.node.attrs.layout;
|
|
51
56
|
return [{
|
|
52
57
|
type: 'button',
|
|
53
|
-
icon:
|
|
58
|
+
icon: _contentWidthNarrow.default,
|
|
59
|
+
iconFallback: _mediaCenter.default,
|
|
54
60
|
onClick: (0, _commands.updateExtensionLayout)('default', editorAnalyticsAPI),
|
|
55
61
|
selected: layout === 'default',
|
|
56
62
|
title: formatMessage(_messages.default.layoutFixedWidth),
|
|
57
63
|
tabIndex: null
|
|
58
64
|
}, {
|
|
59
65
|
type: 'button',
|
|
60
|
-
icon:
|
|
66
|
+
icon: _contentWidthWide.default,
|
|
67
|
+
iconFallback: _mediaWide.default,
|
|
61
68
|
onClick: (0, _commands.updateExtensionLayout)('wide', editorAnalyticsAPI),
|
|
62
69
|
selected: layout === 'wide',
|
|
63
70
|
title: formatMessage(_messages.default.layoutWide),
|
|
64
71
|
tabIndex: null
|
|
65
72
|
}, {
|
|
66
73
|
type: 'button',
|
|
67
|
-
icon:
|
|
74
|
+
icon: _expandHorizontal.default,
|
|
75
|
+
iconFallback: _mediaFullWidth.default,
|
|
68
76
|
onClick: (0, _commands.updateExtensionLayout)('full-width', editorAnalyticsAPI),
|
|
69
77
|
selected: layout === 'full-width',
|
|
70
78
|
title: formatMessage(_messages.default.layoutFullWidth),
|
|
@@ -81,6 +89,7 @@ var editButton = function editButton(formatMessage, extensionState, applyChangeT
|
|
|
81
89
|
id: 'editor.extension.edit',
|
|
82
90
|
type: 'button',
|
|
83
91
|
icon: _edit.default,
|
|
92
|
+
iconFallback: _edit2.default,
|
|
84
93
|
testId: 'extension-toolbar-edit-button',
|
|
85
94
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
86
95
|
onClick: function onClick(state, dispatch, view) {
|
|
@@ -179,7 +188,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
179
188
|
}, {
|
|
180
189
|
id: 'editor.extension.delete',
|
|
181
190
|
type: 'button',
|
|
182
|
-
icon:
|
|
191
|
+
icon: _delete.default,
|
|
192
|
+
iconFallback: _remove.default,
|
|
183
193
|
appearance: 'danger',
|
|
184
194
|
onClick: (0, _commands.removeExtension)(editorAnalyticsAPI),
|
|
185
195
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -3,12 +3,17 @@ import commonMessages from '@atlaskit/editor-common/messages';
|
|
|
3
3
|
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { getChildrenInfo, getNodeName, isReferencedSource } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import
|
|
6
|
+
import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
7
|
+
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
8
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
+
import EditIcon from '@atlaskit/icon/core/edit';
|
|
10
|
+
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
11
|
+
import LegacyEditIcon from '@atlaskit/icon/glyph/editor/edit';
|
|
7
12
|
import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
8
13
|
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
9
14
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
10
15
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
11
|
-
import {
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
17
|
import { editExtension } from './actions';
|
|
13
18
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from './commands';
|
|
14
19
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
@@ -31,7 +36,7 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
31
36
|
if (!selectedExtNode) {
|
|
32
37
|
return false;
|
|
33
38
|
}
|
|
34
|
-
const isMultiBodiedExtension =
|
|
39
|
+
const isMultiBodiedExtension = fg('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
35
40
|
const isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !hasParentNodeOfType([multiBodiedExtension].filter(Boolean))(selection);
|
|
36
41
|
const isNonEmbeddedExtension = selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
37
42
|
|
|
@@ -49,21 +54,24 @@ const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled,
|
|
|
49
54
|
} = nodeWithPos.node.attrs;
|
|
50
55
|
return [{
|
|
51
56
|
type: 'button',
|
|
52
|
-
icon:
|
|
57
|
+
icon: ContentWidthNarrowIcon,
|
|
58
|
+
iconFallback: CenterIcon,
|
|
53
59
|
onClick: updateExtensionLayout('default', editorAnalyticsAPI),
|
|
54
60
|
selected: layout === 'default',
|
|
55
61
|
title: formatMessage(commonMessages.layoutFixedWidth),
|
|
56
62
|
tabIndex: null
|
|
57
63
|
}, {
|
|
58
64
|
type: 'button',
|
|
59
|
-
icon:
|
|
65
|
+
icon: ContentWidthWideIcon,
|
|
66
|
+
iconFallback: WideIcon,
|
|
60
67
|
onClick: updateExtensionLayout('wide', editorAnalyticsAPI),
|
|
61
68
|
selected: layout === 'wide',
|
|
62
69
|
title: formatMessage(commonMessages.layoutWide),
|
|
63
70
|
tabIndex: null
|
|
64
71
|
}, {
|
|
65
72
|
type: 'button',
|
|
66
|
-
icon:
|
|
73
|
+
icon: ExpandHorizontalIcon,
|
|
74
|
+
iconFallback: FullWidthIcon,
|
|
67
75
|
onClick: updateExtensionLayout('full-width', editorAnalyticsAPI),
|
|
68
76
|
selected: layout === 'full-width',
|
|
69
77
|
title: formatMessage(commonMessages.layoutFullWidth),
|
|
@@ -80,6 +88,7 @@ const editButton = (formatMessage, extensionState, applyChangeToContextPanel, ed
|
|
|
80
88
|
id: 'editor.extension.edit',
|
|
81
89
|
type: 'button',
|
|
82
90
|
icon: EditIcon,
|
|
91
|
+
iconFallback: LegacyEditIcon,
|
|
83
92
|
testId: 'extension-toolbar-edit-button',
|
|
84
93
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
85
94
|
onClick: (state, dispatch, view) => {
|
|
@@ -176,7 +185,8 @@ export const getToolbarConfig = ({
|
|
|
176
185
|
}, {
|
|
177
186
|
id: 'editor.extension.delete',
|
|
178
187
|
type: 'button',
|
|
179
|
-
icon:
|
|
188
|
+
icon: DeleteIcon,
|
|
189
|
+
iconFallback: RemoveIcon,
|
|
180
190
|
appearance: 'danger',
|
|
181
191
|
onClick: removeExtension(editorAnalyticsAPI),
|
|
182
192
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -4,12 +4,17 @@ import commonMessages from '@atlaskit/editor-common/messages';
|
|
|
4
4
|
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { getChildrenInfo as _getChildrenInfo, getNodeName, isReferencedSource } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import
|
|
7
|
+
import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
8
|
+
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
9
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
10
|
+
import EditIcon from '@atlaskit/icon/core/edit';
|
|
11
|
+
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
12
|
+
import LegacyEditIcon from '@atlaskit/icon/glyph/editor/edit';
|
|
8
13
|
import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
9
14
|
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
10
15
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
11
16
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
12
|
-
import {
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
18
|
import { editExtension } from './actions';
|
|
14
19
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from './commands';
|
|
15
20
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
@@ -27,7 +32,7 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
27
32
|
if (!selectedExtNode) {
|
|
28
33
|
return false;
|
|
29
34
|
}
|
|
30
|
-
var isMultiBodiedExtension =
|
|
35
|
+
var isMultiBodiedExtension = fg('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
31
36
|
var isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !hasParentNodeOfType([multiBodiedExtension].filter(Boolean))(selection);
|
|
32
37
|
var isNonEmbeddedExtension = selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
33
38
|
|
|
@@ -43,21 +48,24 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
43
48
|
var layout = nodeWithPos.node.attrs.layout;
|
|
44
49
|
return [{
|
|
45
50
|
type: 'button',
|
|
46
|
-
icon:
|
|
51
|
+
icon: ContentWidthNarrowIcon,
|
|
52
|
+
iconFallback: CenterIcon,
|
|
47
53
|
onClick: updateExtensionLayout('default', editorAnalyticsAPI),
|
|
48
54
|
selected: layout === 'default',
|
|
49
55
|
title: formatMessage(commonMessages.layoutFixedWidth),
|
|
50
56
|
tabIndex: null
|
|
51
57
|
}, {
|
|
52
58
|
type: 'button',
|
|
53
|
-
icon:
|
|
59
|
+
icon: ContentWidthWideIcon,
|
|
60
|
+
iconFallback: WideIcon,
|
|
54
61
|
onClick: updateExtensionLayout('wide', editorAnalyticsAPI),
|
|
55
62
|
selected: layout === 'wide',
|
|
56
63
|
title: formatMessage(commonMessages.layoutWide),
|
|
57
64
|
tabIndex: null
|
|
58
65
|
}, {
|
|
59
66
|
type: 'button',
|
|
60
|
-
icon:
|
|
67
|
+
icon: ExpandHorizontalIcon,
|
|
68
|
+
iconFallback: FullWidthIcon,
|
|
61
69
|
onClick: updateExtensionLayout('full-width', editorAnalyticsAPI),
|
|
62
70
|
selected: layout === 'full-width',
|
|
63
71
|
title: formatMessage(commonMessages.layoutFullWidth),
|
|
@@ -74,6 +82,7 @@ var editButton = function editButton(formatMessage, extensionState, applyChangeT
|
|
|
74
82
|
id: 'editor.extension.edit',
|
|
75
83
|
type: 'button',
|
|
76
84
|
icon: EditIcon,
|
|
85
|
+
iconFallback: LegacyEditIcon,
|
|
77
86
|
testId: 'extension-toolbar-edit-button',
|
|
78
87
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
79
88
|
onClick: function onClick(state, dispatch, view) {
|
|
@@ -172,7 +181,8 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
172
181
|
}, {
|
|
173
182
|
id: 'editor.extension.delete',
|
|
174
183
|
type: 'button',
|
|
175
|
-
icon:
|
|
184
|
+
icon: DeleteIcon,
|
|
185
|
+
iconFallback: RemoveIcon,
|
|
176
186
|
appearance: 'danger',
|
|
177
187
|
onClick: removeExtension(editorAnalyticsAPI),
|
|
178
188
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
".": "./src/index.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-schema": "^
|
|
26
|
+
"@atlaskit/adf-schema": "^42.0.2",
|
|
27
27
|
"@atlaskit/adf-utils": "^19.9.0",
|
|
28
28
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
29
29
|
"@atlaskit/avatar": "^21.15.0",
|
|
30
30
|
"@atlaskit/button": "^20.2.0",
|
|
31
31
|
"@atlaskit/checkbox": "^14.0.0",
|
|
32
32
|
"@atlaskit/datetime-picker": "^15.3.0",
|
|
33
|
-
"@atlaskit/editor-common": "^93.
|
|
33
|
+
"@atlaskit/editor-common": "^93.5.0",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.19.0",
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
35
|
+
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-panel": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@atlaskit/tabs": "^16.5.0",
|
|
56
56
|
"@atlaskit/textarea": "^5.6.0",
|
|
57
57
|
"@atlaskit/textfield": "^6.5.0",
|
|
58
|
-
"@atlaskit/theme": "^13.
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
58
|
+
"@atlaskit/theme": "^13.1.0",
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^2.5.0",
|
|
60
60
|
"@atlaskit/toggle": "^13.4.0",
|
|
61
61
|
"@atlaskit/tokens": "^2.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^18.8.0",
|