@atlaskit/editor-plugin-layout 1.10.0 → 1.11.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 +20 -0
- package/dist/cjs/toolbar.js +35 -3
- package/dist/es2019/toolbar.js +35 -3
- package/dist/esm/toolbar.js +35 -3
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 1.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#161230](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161230)
|
|
8
|
+
[`70a438baa282b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/70a438baa282b) -
|
|
9
|
+
[ux] Add equal distribution button on layout toolbar
|
|
10
|
+
|
|
11
|
+
## 1.11.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#159018](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159018)
|
|
16
|
+
[`14d5e189df870`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14d5e189df870) -
|
|
17
|
+
[ux] ED-25367-remove-copy-button-from-view-mode-when-its-the-only-item
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 1.10.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -23,6 +23,7 @@ var _layoutTwoEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/edito
|
|
|
23
23
|
var _layoutTwoLeftSidebar = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-two-left-sidebar"));
|
|
24
24
|
var _layoutTwoRightSidebar = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-two-right-sidebar"));
|
|
25
25
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
26
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
27
|
var _actions = require("./actions");
|
|
27
28
|
var _preRelease = require("./utils/preRelease");
|
|
28
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -66,9 +67,40 @@ var SIDEBAR_LAYOUT_TYPES = [{
|
|
|
66
67
|
icon: _layoutThreeColumnsSidebars.default,
|
|
67
68
|
iconFallback: _layoutThreeWithSidebars.default
|
|
68
69
|
}];
|
|
70
|
+
var LAYOUT_DISTRIBUTION_TYPES = [{
|
|
71
|
+
id: 'editor.layout.twoEquals',
|
|
72
|
+
type: 'two_equal',
|
|
73
|
+
title: _messages.layoutMessages.twoColumns,
|
|
74
|
+
icon: _layoutTwoColumns.default,
|
|
75
|
+
iconFallback: _layoutTwoEqual.default
|
|
76
|
+
}, {
|
|
77
|
+
id: 'editor.layout.twoRightSidebar',
|
|
78
|
+
type: 'two_right_sidebar',
|
|
79
|
+
title: _messages.layoutMessages.rightSidebar,
|
|
80
|
+
icon: _layoutTwoColumnsSidebarRight.default,
|
|
81
|
+
iconFallback: _layoutTwoRightSidebar.default
|
|
82
|
+
}, {
|
|
83
|
+
id: 'editor.layout.twoLeftSidebar',
|
|
84
|
+
type: 'two_left_sidebar',
|
|
85
|
+
title: _messages.layoutMessages.leftSidebar,
|
|
86
|
+
icon: _layoutTwoColumnsSidebarLeft.default,
|
|
87
|
+
iconFallback: _layoutTwoLeftSidebar.default
|
|
88
|
+
}, {
|
|
89
|
+
id: 'editor.layout.threeEquals',
|
|
90
|
+
type: 'three_equal',
|
|
91
|
+
title: _messages.layoutMessages.threeColumns,
|
|
92
|
+
icon: _layoutThreeColumns.default,
|
|
93
|
+
iconFallback: _layoutThreeEqual.default
|
|
94
|
+
}, {
|
|
95
|
+
id: 'editor.layout.threeWithSidebars',
|
|
96
|
+
type: 'three_with_sidebars',
|
|
97
|
+
title: _messages.layoutMessages.threeColumnsWithSidebars,
|
|
98
|
+
icon: _layoutThreeColumnsSidebars.default,
|
|
99
|
+
iconFallback: _layoutThreeWithSidebars.default
|
|
100
|
+
}];
|
|
69
101
|
var SIDEBAR_LAYOUT_TYPES_BY_COLUMNS = {
|
|
70
|
-
2: [
|
|
71
|
-
3: [
|
|
102
|
+
2: [LAYOUT_DISTRIBUTION_TYPES[0], LAYOUT_DISTRIBUTION_TYPES[1], LAYOUT_DISTRIBUTION_TYPES[2]],
|
|
103
|
+
3: [LAYOUT_DISTRIBUTION_TYPES[3], LAYOUT_DISTRIBUTION_TYPES[4]],
|
|
72
104
|
4: [],
|
|
73
105
|
5: []
|
|
74
106
|
};
|
|
@@ -175,7 +207,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, pos
|
|
|
175
207
|
return buildLayoutButton(intl, i, currentLayout, editorAnalyticsAPI);
|
|
176
208
|
}) : []), [separator, {
|
|
177
209
|
type: 'copy-button',
|
|
178
|
-
supportsViewMode:
|
|
210
|
+
supportsViewMode: !(0, _platformFeatureFlags.fg)('platform_editor_remove_copy_button_from_view_mode'),
|
|
179
211
|
items: [{
|
|
180
212
|
state: state,
|
|
181
213
|
formatMessage: intl.formatMessage,
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -14,6 +14,7 @@ import LayoutTwoEqualIcon from '@atlaskit/icon/glyph/editor/layout-two-equal';
|
|
|
14
14
|
import LayoutTwoLeftSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-left-sidebar';
|
|
15
15
|
import LayoutTwoRightSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-right-sidebar';
|
|
16
16
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from './actions';
|
|
18
19
|
import { isPreRelease2 } from './utils/preRelease';
|
|
19
20
|
const LAYOUT_TYPES = [{
|
|
@@ -55,9 +56,40 @@ const SIDEBAR_LAYOUT_TYPES = [{
|
|
|
55
56
|
icon: LayoutThreeColumnsSidebarsIcon,
|
|
56
57
|
iconFallback: LayoutThreeWithSidebarsIcon
|
|
57
58
|
}];
|
|
59
|
+
const LAYOUT_DISTRIBUTION_TYPES = [{
|
|
60
|
+
id: 'editor.layout.twoEquals',
|
|
61
|
+
type: 'two_equal',
|
|
62
|
+
title: toolbarMessages.twoColumns,
|
|
63
|
+
icon: LayoutTwoColumnsIcon,
|
|
64
|
+
iconFallback: LayoutTwoEqualIcon
|
|
65
|
+
}, {
|
|
66
|
+
id: 'editor.layout.twoRightSidebar',
|
|
67
|
+
type: 'two_right_sidebar',
|
|
68
|
+
title: toolbarMessages.rightSidebar,
|
|
69
|
+
icon: LayoutTwoColumnsSidebarRightIcon,
|
|
70
|
+
iconFallback: LayoutTwoRightSidebarIcon
|
|
71
|
+
}, {
|
|
72
|
+
id: 'editor.layout.twoLeftSidebar',
|
|
73
|
+
type: 'two_left_sidebar',
|
|
74
|
+
title: toolbarMessages.leftSidebar,
|
|
75
|
+
icon: LayoutTwoColumnsSidebarLeftIcon,
|
|
76
|
+
iconFallback: LayoutTwoLeftSidebarIcon
|
|
77
|
+
}, {
|
|
78
|
+
id: 'editor.layout.threeEquals',
|
|
79
|
+
type: 'three_equal',
|
|
80
|
+
title: toolbarMessages.threeColumns,
|
|
81
|
+
icon: LayoutThreeColumnsIcon,
|
|
82
|
+
iconFallback: LayoutThreeEqualIcon
|
|
83
|
+
}, {
|
|
84
|
+
id: 'editor.layout.threeWithSidebars',
|
|
85
|
+
type: 'three_with_sidebars',
|
|
86
|
+
title: toolbarMessages.threeColumnsWithSidebars,
|
|
87
|
+
icon: LayoutThreeColumnsSidebarsIcon,
|
|
88
|
+
iconFallback: LayoutThreeWithSidebarsIcon
|
|
89
|
+
}];
|
|
58
90
|
const SIDEBAR_LAYOUT_TYPES_BY_COLUMNS = {
|
|
59
|
-
2: [
|
|
60
|
-
3: [
|
|
91
|
+
2: [LAYOUT_DISTRIBUTION_TYPES[0], LAYOUT_DISTRIBUTION_TYPES[1], LAYOUT_DISTRIBUTION_TYPES[2]],
|
|
92
|
+
3: [LAYOUT_DISTRIBUTION_TYPES[3], LAYOUT_DISTRIBUTION_TYPES[4]],
|
|
61
93
|
4: [],
|
|
62
94
|
5: []
|
|
63
95
|
};
|
|
@@ -155,7 +187,7 @@ export const buildToolbar = (state, intl, pos, _allowBreakout, addSidebarLayouts
|
|
|
155
187
|
testId: 'column-options-button'
|
|
156
188
|
}, sidebarTypesByColumns.length > 0 && separator] : []), ...layoutTypes.map(i => buildLayoutButton(intl, i, currentLayout, editorAnalyticsAPI)), ...(addSidebarLayouts ? isPreRelease2() ? sidebarTypesByColumns.map(i => buildLayoutButton(intl, i, currentLayout, editorAnalyticsAPI)) : SIDEBAR_LAYOUT_TYPES.map(i => buildLayoutButton(intl, i, currentLayout, editorAnalyticsAPI)) : []), separator, {
|
|
157
189
|
type: 'copy-button',
|
|
158
|
-
supportsViewMode:
|
|
190
|
+
supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
|
|
159
191
|
items: [{
|
|
160
192
|
state,
|
|
161
193
|
formatMessage: intl.formatMessage,
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -15,6 +15,7 @@ import LayoutTwoEqualIcon from '@atlaskit/icon/glyph/editor/layout-two-equal';
|
|
|
15
15
|
import LayoutTwoLeftSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-left-sidebar';
|
|
16
16
|
import LayoutTwoRightSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-right-sidebar';
|
|
17
17
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from './actions';
|
|
19
20
|
import { isPreRelease2 } from './utils/preRelease';
|
|
20
21
|
var LAYOUT_TYPES = [{
|
|
@@ -56,9 +57,40 @@ var SIDEBAR_LAYOUT_TYPES = [{
|
|
|
56
57
|
icon: LayoutThreeColumnsSidebarsIcon,
|
|
57
58
|
iconFallback: LayoutThreeWithSidebarsIcon
|
|
58
59
|
}];
|
|
60
|
+
var LAYOUT_DISTRIBUTION_TYPES = [{
|
|
61
|
+
id: 'editor.layout.twoEquals',
|
|
62
|
+
type: 'two_equal',
|
|
63
|
+
title: toolbarMessages.twoColumns,
|
|
64
|
+
icon: LayoutTwoColumnsIcon,
|
|
65
|
+
iconFallback: LayoutTwoEqualIcon
|
|
66
|
+
}, {
|
|
67
|
+
id: 'editor.layout.twoRightSidebar',
|
|
68
|
+
type: 'two_right_sidebar',
|
|
69
|
+
title: toolbarMessages.rightSidebar,
|
|
70
|
+
icon: LayoutTwoColumnsSidebarRightIcon,
|
|
71
|
+
iconFallback: LayoutTwoRightSidebarIcon
|
|
72
|
+
}, {
|
|
73
|
+
id: 'editor.layout.twoLeftSidebar',
|
|
74
|
+
type: 'two_left_sidebar',
|
|
75
|
+
title: toolbarMessages.leftSidebar,
|
|
76
|
+
icon: LayoutTwoColumnsSidebarLeftIcon,
|
|
77
|
+
iconFallback: LayoutTwoLeftSidebarIcon
|
|
78
|
+
}, {
|
|
79
|
+
id: 'editor.layout.threeEquals',
|
|
80
|
+
type: 'three_equal',
|
|
81
|
+
title: toolbarMessages.threeColumns,
|
|
82
|
+
icon: LayoutThreeColumnsIcon,
|
|
83
|
+
iconFallback: LayoutThreeEqualIcon
|
|
84
|
+
}, {
|
|
85
|
+
id: 'editor.layout.threeWithSidebars',
|
|
86
|
+
type: 'three_with_sidebars',
|
|
87
|
+
title: toolbarMessages.threeColumnsWithSidebars,
|
|
88
|
+
icon: LayoutThreeColumnsSidebarsIcon,
|
|
89
|
+
iconFallback: LayoutThreeWithSidebarsIcon
|
|
90
|
+
}];
|
|
59
91
|
var SIDEBAR_LAYOUT_TYPES_BY_COLUMNS = {
|
|
60
|
-
2: [
|
|
61
|
-
3: [
|
|
92
|
+
2: [LAYOUT_DISTRIBUTION_TYPES[0], LAYOUT_DISTRIBUTION_TYPES[1], LAYOUT_DISTRIBUTION_TYPES[2]],
|
|
93
|
+
3: [LAYOUT_DISTRIBUTION_TYPES[3], LAYOUT_DISTRIBUTION_TYPES[4]],
|
|
62
94
|
4: [],
|
|
63
95
|
5: []
|
|
64
96
|
};
|
|
@@ -165,7 +197,7 @@ export var buildToolbar = function buildToolbar(state, intl, pos, _allowBreakout
|
|
|
165
197
|
return buildLayoutButton(intl, i, currentLayout, editorAnalyticsAPI);
|
|
166
198
|
}) : []), [separator, {
|
|
167
199
|
type: 'copy-button',
|
|
168
|
-
supportsViewMode:
|
|
200
|
+
supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
|
|
169
201
|
items: [{
|
|
170
202
|
state: state,
|
|
171
203
|
formatMessage: intl.formatMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.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": "^44.2.0",
|
|
35
|
-
"@atlaskit/editor-common": "^94.
|
|
35
|
+
"@atlaskit/editor-common": "^94.13.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
41
|
"@atlaskit/icon": "^22.24.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
44
|
-
"@atlaskit/tokens": "^2.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^2.12.0",
|
|
44
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1"
|
|
47
47
|
},
|
|
@@ -94,6 +94,9 @@
|
|
|
94
94
|
"platform_editor_advanced_layouts_pre_release_2": {
|
|
95
95
|
"type": "boolean"
|
|
96
96
|
},
|
|
97
|
+
"platform_editor_remove_copy_button_from_view_mode": {
|
|
98
|
+
"type": "boolean"
|
|
99
|
+
},
|
|
97
100
|
"platform_editor_advanced_layouts_breakout_resizing": {
|
|
98
101
|
"type": "boolean"
|
|
99
102
|
}
|