@atlaskit/editor-plugin-layout 1.9.0 → 1.9.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 +9 -0
- package/dist/cjs/toolbar.js +22 -7
- package/dist/es2019/toolbar.js +22 -7
- package/dist/esm/toolbar.js +22 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 1.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#151707](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151707)
|
|
8
|
+
[`b6edd84148f5e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6edd84148f5e) -
|
|
9
|
+
[ux] ED-25089: Migrated layout toolbar icons
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.9.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -9,6 +9,13 @@ exports.layoutToolbarTitle = exports.buildToolbar = void 0;
|
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
|
+
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
13
|
+
var _layoutOneColumn = _interopRequireDefault(require("@atlaskit/icon/core/layout-one-column"));
|
|
14
|
+
var _layoutThreeColumns = _interopRequireDefault(require("@atlaskit/icon/core/layout-three-columns"));
|
|
15
|
+
var _layoutThreeColumnsSidebars = _interopRequireDefault(require("@atlaskit/icon/core/layout-three-columns-sidebars"));
|
|
16
|
+
var _layoutTwoColumns = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns"));
|
|
17
|
+
var _layoutTwoColumnsSidebarLeft = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns-sidebar-left"));
|
|
18
|
+
var _layoutTwoColumnsSidebarRight = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns-sidebar-right"));
|
|
12
19
|
var _layoutSingle = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-single"));
|
|
13
20
|
var _layoutThreeEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-equal"));
|
|
14
21
|
var _layoutThreeWithSidebars = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-with-sidebars"));
|
|
@@ -23,40 +30,47 @@ var LAYOUT_TYPES = [{
|
|
|
23
30
|
id: 'editor.layout.twoEquals',
|
|
24
31
|
type: 'two_equal',
|
|
25
32
|
title: _messages.layoutMessages.twoColumns,
|
|
26
|
-
icon:
|
|
33
|
+
icon: _layoutTwoColumns.default,
|
|
34
|
+
iconFallback: _layoutTwoEqual.default
|
|
27
35
|
}, {
|
|
28
36
|
id: 'editor.layout.threeEquals',
|
|
29
37
|
type: 'three_equal',
|
|
30
38
|
title: _messages.layoutMessages.threeColumns,
|
|
31
|
-
icon:
|
|
39
|
+
icon: _layoutThreeColumns.default,
|
|
40
|
+
iconFallback: _layoutThreeEqual.default
|
|
32
41
|
}];
|
|
33
42
|
var LAYOUT_TYPES_WITH_SINGLE_COL = [{
|
|
34
43
|
id: 'editor.layout.singeLayout',
|
|
35
44
|
type: 'single',
|
|
36
45
|
title: _messages.layoutMessages.singleColumn,
|
|
37
|
-
icon:
|
|
46
|
+
icon: _layoutOneColumn.default,
|
|
47
|
+
iconFallback: _layoutSingle.default
|
|
38
48
|
}].concat(LAYOUT_TYPES);
|
|
39
49
|
var SIDEBAR_LAYOUT_TYPES = [{
|
|
40
50
|
id: 'editor.layout.twoRightSidebar',
|
|
41
51
|
type: 'two_right_sidebar',
|
|
42
52
|
title: _messages.layoutMessages.rightSidebar,
|
|
43
|
-
icon:
|
|
53
|
+
icon: _layoutTwoColumnsSidebarRight.default,
|
|
54
|
+
iconFallback: _layoutTwoRightSidebar.default
|
|
44
55
|
}, {
|
|
45
56
|
id: 'editor.layout.twoLeftSidebar',
|
|
46
57
|
type: 'two_left_sidebar',
|
|
47
58
|
title: _messages.layoutMessages.leftSidebar,
|
|
48
|
-
icon:
|
|
59
|
+
icon: _layoutTwoColumnsSidebarLeft.default,
|
|
60
|
+
iconFallback: _layoutTwoLeftSidebar.default
|
|
49
61
|
}, {
|
|
50
62
|
id: 'editor.layout.threeWithSidebars',
|
|
51
63
|
type: 'three_with_sidebars',
|
|
52
64
|
title: _messages.layoutMessages.threeColumnsWithSidebars,
|
|
53
|
-
icon:
|
|
65
|
+
icon: _layoutThreeColumnsSidebars.default,
|
|
66
|
+
iconFallback: _layoutThreeWithSidebars.default
|
|
54
67
|
}];
|
|
55
68
|
var buildLayoutButton = function buildLayoutButton(intl, item, currentLayout, editorAnalyticsAPI) {
|
|
56
69
|
return {
|
|
57
70
|
id: item.id,
|
|
58
71
|
type: 'button',
|
|
59
72
|
icon: item.icon,
|
|
73
|
+
iconFallback: item.iconFallback,
|
|
60
74
|
testId: item.title.id ? "".concat(item.title.id) : undefined,
|
|
61
75
|
title: intl.formatMessage(item.title),
|
|
62
76
|
onClick: (0, _actions.setPresetLayout)(editorAnalyticsAPI)(item.type),
|
|
@@ -82,7 +96,8 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, pos
|
|
|
82
96
|
type: 'button',
|
|
83
97
|
appearance: 'danger',
|
|
84
98
|
focusEditoronEnter: true,
|
|
85
|
-
icon:
|
|
99
|
+
icon: _delete.default,
|
|
100
|
+
iconFallback: _remove.default,
|
|
86
101
|
testId: _messages.default.remove.id,
|
|
87
102
|
title: intl.formatMessage(_messages.default.remove),
|
|
88
103
|
onClick: (0, _actions.deleteActiveLayoutNode)(editorAnalyticsAPI),
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import commonMessages, { layoutMessages as toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
2
2
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
4
|
+
import LayoutOneColumnIcon from '@atlaskit/icon/core/layout-one-column';
|
|
5
|
+
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/layout-three-columns';
|
|
6
|
+
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/layout-three-columns-sidebars';
|
|
7
|
+
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/layout-two-columns';
|
|
8
|
+
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-left';
|
|
9
|
+
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-right';
|
|
3
10
|
import EditorLayoutSingleIcon from '@atlaskit/icon/glyph/editor/layout-single';
|
|
4
11
|
import LayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
5
12
|
import LayoutThreeWithSidebarsIcon from '@atlaskit/icon/glyph/editor/layout-three-with-sidebars';
|
|
@@ -12,39 +19,46 @@ const LAYOUT_TYPES = [{
|
|
|
12
19
|
id: 'editor.layout.twoEquals',
|
|
13
20
|
type: 'two_equal',
|
|
14
21
|
title: toolbarMessages.twoColumns,
|
|
15
|
-
icon:
|
|
22
|
+
icon: LayoutTwoColumnsIcon,
|
|
23
|
+
iconFallback: LayoutTwoEqualIcon
|
|
16
24
|
}, {
|
|
17
25
|
id: 'editor.layout.threeEquals',
|
|
18
26
|
type: 'three_equal',
|
|
19
27
|
title: toolbarMessages.threeColumns,
|
|
20
|
-
icon:
|
|
28
|
+
icon: LayoutThreeColumnsIcon,
|
|
29
|
+
iconFallback: LayoutThreeEqualIcon
|
|
21
30
|
}];
|
|
22
31
|
const LAYOUT_TYPES_WITH_SINGLE_COL = [{
|
|
23
32
|
id: 'editor.layout.singeLayout',
|
|
24
33
|
type: 'single',
|
|
25
34
|
title: toolbarMessages.singleColumn,
|
|
26
|
-
icon:
|
|
35
|
+
icon: LayoutOneColumnIcon,
|
|
36
|
+
iconFallback: EditorLayoutSingleIcon
|
|
27
37
|
}, ...LAYOUT_TYPES];
|
|
28
38
|
const SIDEBAR_LAYOUT_TYPES = [{
|
|
29
39
|
id: 'editor.layout.twoRightSidebar',
|
|
30
40
|
type: 'two_right_sidebar',
|
|
31
41
|
title: toolbarMessages.rightSidebar,
|
|
32
|
-
icon:
|
|
42
|
+
icon: LayoutTwoColumnsSidebarRightIcon,
|
|
43
|
+
iconFallback: LayoutTwoRightSidebarIcon
|
|
33
44
|
}, {
|
|
34
45
|
id: 'editor.layout.twoLeftSidebar',
|
|
35
46
|
type: 'two_left_sidebar',
|
|
36
47
|
title: toolbarMessages.leftSidebar,
|
|
37
|
-
icon:
|
|
48
|
+
icon: LayoutTwoColumnsSidebarLeftIcon,
|
|
49
|
+
iconFallback: LayoutTwoLeftSidebarIcon
|
|
38
50
|
}, {
|
|
39
51
|
id: 'editor.layout.threeWithSidebars',
|
|
40
52
|
type: 'three_with_sidebars',
|
|
41
53
|
title: toolbarMessages.threeColumnsWithSidebars,
|
|
42
|
-
icon:
|
|
54
|
+
icon: LayoutThreeColumnsSidebarsIcon,
|
|
55
|
+
iconFallback: LayoutThreeWithSidebarsIcon
|
|
43
56
|
}];
|
|
44
57
|
const buildLayoutButton = (intl, item, currentLayout, editorAnalyticsAPI) => ({
|
|
45
58
|
id: item.id,
|
|
46
59
|
type: 'button',
|
|
47
60
|
icon: item.icon,
|
|
61
|
+
iconFallback: item.iconFallback,
|
|
48
62
|
testId: item.title.id ? `${item.title.id}` : undefined,
|
|
49
63
|
title: intl.formatMessage(item.title),
|
|
50
64
|
onClick: setPresetLayout(editorAnalyticsAPI)(item.type),
|
|
@@ -70,7 +84,8 @@ export const buildToolbar = (state, intl, pos, _allowBreakout, addSidebarLayouts
|
|
|
70
84
|
type: 'button',
|
|
71
85
|
appearance: 'danger',
|
|
72
86
|
focusEditoronEnter: true,
|
|
73
|
-
icon:
|
|
87
|
+
icon: DeleteIcon,
|
|
88
|
+
iconFallback: RemoveIcon,
|
|
74
89
|
testId: commonMessages.remove.id,
|
|
75
90
|
title: intl.formatMessage(commonMessages.remove),
|
|
76
91
|
onClick: deleteActiveLayoutNode(editorAnalyticsAPI),
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import commonMessages, { layoutMessages as toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
5
|
+
import LayoutOneColumnIcon from '@atlaskit/icon/core/layout-one-column';
|
|
6
|
+
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/layout-three-columns';
|
|
7
|
+
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/layout-three-columns-sidebars';
|
|
8
|
+
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/layout-two-columns';
|
|
9
|
+
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-left';
|
|
10
|
+
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-right';
|
|
4
11
|
import EditorLayoutSingleIcon from '@atlaskit/icon/glyph/editor/layout-single';
|
|
5
12
|
import LayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
6
13
|
import LayoutThreeWithSidebarsIcon from '@atlaskit/icon/glyph/editor/layout-three-with-sidebars';
|
|
@@ -13,40 +20,47 @@ var LAYOUT_TYPES = [{
|
|
|
13
20
|
id: 'editor.layout.twoEquals',
|
|
14
21
|
type: 'two_equal',
|
|
15
22
|
title: toolbarMessages.twoColumns,
|
|
16
|
-
icon:
|
|
23
|
+
icon: LayoutTwoColumnsIcon,
|
|
24
|
+
iconFallback: LayoutTwoEqualIcon
|
|
17
25
|
}, {
|
|
18
26
|
id: 'editor.layout.threeEquals',
|
|
19
27
|
type: 'three_equal',
|
|
20
28
|
title: toolbarMessages.threeColumns,
|
|
21
|
-
icon:
|
|
29
|
+
icon: LayoutThreeColumnsIcon,
|
|
30
|
+
iconFallback: LayoutThreeEqualIcon
|
|
22
31
|
}];
|
|
23
32
|
var LAYOUT_TYPES_WITH_SINGLE_COL = [{
|
|
24
33
|
id: 'editor.layout.singeLayout',
|
|
25
34
|
type: 'single',
|
|
26
35
|
title: toolbarMessages.singleColumn,
|
|
27
|
-
icon:
|
|
36
|
+
icon: LayoutOneColumnIcon,
|
|
37
|
+
iconFallback: EditorLayoutSingleIcon
|
|
28
38
|
}].concat(LAYOUT_TYPES);
|
|
29
39
|
var SIDEBAR_LAYOUT_TYPES = [{
|
|
30
40
|
id: 'editor.layout.twoRightSidebar',
|
|
31
41
|
type: 'two_right_sidebar',
|
|
32
42
|
title: toolbarMessages.rightSidebar,
|
|
33
|
-
icon:
|
|
43
|
+
icon: LayoutTwoColumnsSidebarRightIcon,
|
|
44
|
+
iconFallback: LayoutTwoRightSidebarIcon
|
|
34
45
|
}, {
|
|
35
46
|
id: 'editor.layout.twoLeftSidebar',
|
|
36
47
|
type: 'two_left_sidebar',
|
|
37
48
|
title: toolbarMessages.leftSidebar,
|
|
38
|
-
icon:
|
|
49
|
+
icon: LayoutTwoColumnsSidebarLeftIcon,
|
|
50
|
+
iconFallback: LayoutTwoLeftSidebarIcon
|
|
39
51
|
}, {
|
|
40
52
|
id: 'editor.layout.threeWithSidebars',
|
|
41
53
|
type: 'three_with_sidebars',
|
|
42
54
|
title: toolbarMessages.threeColumnsWithSidebars,
|
|
43
|
-
icon:
|
|
55
|
+
icon: LayoutThreeColumnsSidebarsIcon,
|
|
56
|
+
iconFallback: LayoutThreeWithSidebarsIcon
|
|
44
57
|
}];
|
|
45
58
|
var buildLayoutButton = function buildLayoutButton(intl, item, currentLayout, editorAnalyticsAPI) {
|
|
46
59
|
return {
|
|
47
60
|
id: item.id,
|
|
48
61
|
type: 'button',
|
|
49
62
|
icon: item.icon,
|
|
63
|
+
iconFallback: item.iconFallback,
|
|
50
64
|
testId: item.title.id ? "".concat(item.title.id) : undefined,
|
|
51
65
|
title: intl.formatMessage(item.title),
|
|
52
66
|
onClick: setPresetLayout(editorAnalyticsAPI)(item.type),
|
|
@@ -72,7 +86,8 @@ export var buildToolbar = function buildToolbar(state, intl, pos, _allowBreakout
|
|
|
72
86
|
type: 'button',
|
|
73
87
|
appearance: 'danger',
|
|
74
88
|
focusEditoronEnter: true,
|
|
75
|
-
icon:
|
|
89
|
+
icon: DeleteIcon,
|
|
90
|
+
iconFallback: RemoveIcon,
|
|
76
91
|
testId: commonMessages.remove.id,
|
|
77
92
|
title: intl.formatMessage(commonMessages.remove),
|
|
78
93
|
onClick: deleteActiveLayoutNode(editorAnalyticsAPI),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^40.9.4",
|
|
35
|
-
"@atlaskit/editor-common": "^93.
|
|
35
|
+
"@atlaskit/editor-common": "^93.4.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.9.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "6.0.0",
|