@atlaskit/editor-plugin-layout 6.2.15 → 6.2.16
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 +8 -0
- package/dist/cjs/pm-plugins/actions.js +1 -1
- package/dist/cjs/ui/toolbar.js +24 -24
- package/dist/es2019/pm-plugins/actions.js +1 -1
- package/dist/es2019/ui/toolbar.js +7 -7
- package/dist/esm/pm-plugins/actions.js +1 -1
- package/dist/esm/ui/toolbar.js +7 -7
- package/package.json +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 6.2.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`90abe9b926a6f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/90abe9b926a6f) -
|
|
8
|
+
Icon entrypoint migration
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 6.2.15
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -211,7 +211,7 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
|
|
|
211
211
|
// check if the column only contains a paragraph with a placeholder text
|
|
212
212
|
// if so, remove the whole column, otherwise just remove the paragraph
|
|
213
213
|
if ((0, _utils.isEmptyDocument)(column)) {
|
|
214
|
-
var fromPos = (0, _experiments.editorExperiment)('single_column_layouts', true)
|
|
214
|
+
var fromPos = (0, _experiments.editorExperiment)('single_column_layouts', true) ? columnPos : columnPos - 1;
|
|
215
215
|
tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), _model.Slice.empty);
|
|
216
216
|
} else {
|
|
217
217
|
tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), _model.Slice.empty);
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -15,13 +15,13 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
|
15
15
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
18
|
+
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
19
|
+
var _layoutOneColumn = _interopRequireDefault(require("@atlaskit/icon/core/layout-one-column"));
|
|
20
|
+
var _layoutThreeColumns = _interopRequireDefault(require("@atlaskit/icon/core/layout-three-columns"));
|
|
21
|
+
var _layoutThreeColumnsSidebars = _interopRequireDefault(require("@atlaskit/icon/core/layout-three-columns-sidebars"));
|
|
22
|
+
var _layoutTwoColumns = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns"));
|
|
23
|
+
var _layoutTwoColumnsSidebarLeft = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns-sidebar-left"));
|
|
24
|
+
var _layoutTwoColumnsSidebarRight = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns-sidebar-right"));
|
|
25
25
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
26
|
var _actions = require("../pm-plugins/actions");
|
|
27
27
|
var _LayoutColumnsIcon = require("./icons/LayoutColumnsIcon");
|
|
@@ -34,34 +34,34 @@ var LAYOUT_TYPES = [{
|
|
|
34
34
|
id: 'editor.layout.twoEquals',
|
|
35
35
|
type: 'two_equal',
|
|
36
36
|
title: _messages.layoutMessages.twoColumns,
|
|
37
|
-
icon:
|
|
37
|
+
icon: _layoutTwoColumns.default
|
|
38
38
|
}, {
|
|
39
39
|
id: 'editor.layout.threeEquals',
|
|
40
40
|
type: 'three_equal',
|
|
41
41
|
title: _messages.layoutMessages.threeColumns,
|
|
42
|
-
icon:
|
|
42
|
+
icon: _layoutThreeColumns.default
|
|
43
43
|
}];
|
|
44
44
|
var LAYOUT_TYPES_WITH_SINGLE_COL = [{
|
|
45
45
|
id: 'editor.layout.singeLayout',
|
|
46
46
|
type: 'single',
|
|
47
47
|
title: _messages.layoutMessages.singleColumn,
|
|
48
|
-
icon:
|
|
48
|
+
icon: _layoutOneColumn.default
|
|
49
49
|
}].concat(LAYOUT_TYPES);
|
|
50
50
|
var SIDEBAR_LAYOUT_TYPES = [{
|
|
51
51
|
id: 'editor.layout.twoRightSidebar',
|
|
52
52
|
type: 'two_right_sidebar',
|
|
53
53
|
title: _messages.layoutMessages.rightSidebar,
|
|
54
|
-
icon:
|
|
54
|
+
icon: _layoutTwoColumnsSidebarRight.default
|
|
55
55
|
}, {
|
|
56
56
|
id: 'editor.layout.twoLeftSidebar',
|
|
57
57
|
type: 'two_left_sidebar',
|
|
58
58
|
title: _messages.layoutMessages.leftSidebar,
|
|
59
|
-
icon:
|
|
59
|
+
icon: _layoutTwoColumnsSidebarLeft.default
|
|
60
60
|
}, {
|
|
61
61
|
id: 'editor.layout.threeWithSidebars',
|
|
62
62
|
type: 'three_with_sidebars',
|
|
63
63
|
title: _messages.layoutMessages.threeColumnsWithSidebars,
|
|
64
|
-
icon:
|
|
64
|
+
icon: _layoutThreeColumnsSidebars.default
|
|
65
65
|
}];
|
|
66
66
|
|
|
67
67
|
// These are used for advanced layout options
|
|
@@ -69,28 +69,28 @@ var LAYOUT_WITH_TWO_COL_DISTRIBUTION = [{
|
|
|
69
69
|
id: 'editor.layout.twoEquals',
|
|
70
70
|
type: 'two_equal',
|
|
71
71
|
title: _messages.layoutMessages.twoColumns,
|
|
72
|
-
icon:
|
|
72
|
+
icon: _layoutTwoColumns.default
|
|
73
73
|
}, {
|
|
74
74
|
id: 'editor.layout.twoRightSidebar',
|
|
75
75
|
type: 'two_right_sidebar',
|
|
76
76
|
title: _messages.layoutMessages.rightSidebar,
|
|
77
|
-
icon:
|
|
77
|
+
icon: _layoutTwoColumnsSidebarRight.default
|
|
78
78
|
}, {
|
|
79
79
|
id: 'editor.layout.twoLeftSidebar',
|
|
80
80
|
type: 'two_left_sidebar',
|
|
81
81
|
title: _messages.layoutMessages.leftSidebar,
|
|
82
|
-
icon:
|
|
82
|
+
icon: _layoutTwoColumnsSidebarLeft.default
|
|
83
83
|
}];
|
|
84
84
|
var LAYOUT_WITH_THREE_COL_DISTRIBUTION = [{
|
|
85
85
|
id: 'editor.layout.threeEquals',
|
|
86
86
|
type: 'three_equal',
|
|
87
87
|
title: _messages.layoutMessages.threeColumns,
|
|
88
|
-
icon:
|
|
88
|
+
icon: _layoutThreeColumns.default
|
|
89
89
|
}, {
|
|
90
90
|
id: 'editor.layout.threeWithSidebars',
|
|
91
91
|
type: 'three_with_sidebars',
|
|
92
92
|
title: _messages.layoutMessages.threeColumnsWithSidebars,
|
|
93
|
-
icon:
|
|
93
|
+
icon: _layoutThreeColumnsSidebars.default
|
|
94
94
|
}, {
|
|
95
95
|
id: 'editor.layout.threeRightSidebars',
|
|
96
96
|
type: 'three_right_sidebars',
|
|
@@ -118,7 +118,7 @@ var buildLayoutButton = function buildLayoutButton(intl, item, currentLayout, ed
|
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
var layoutToolbarTitle = exports.layoutToolbarTitle = 'Layout floating controls';
|
|
121
|
-
var iconPlaceholder =
|
|
121
|
+
var iconPlaceholder = _layoutTwoColumns.default; // TODO: ED-25466 - Replace with proper icon
|
|
122
122
|
|
|
123
123
|
var getLayoutColumnsIcons = function getLayoutColumnsIcons(colCount) {
|
|
124
124
|
if (!(0, _experiments.editorExperiment)('single_column_layouts', true) && !(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
@@ -126,15 +126,15 @@ var getLayoutColumnsIcons = function getLayoutColumnsIcons(colCount) {
|
|
|
126
126
|
}
|
|
127
127
|
switch (colCount) {
|
|
128
128
|
case 1:
|
|
129
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(_layoutOneColumn.default, {
|
|
130
130
|
label: ""
|
|
131
131
|
});
|
|
132
132
|
case 2:
|
|
133
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement(_layoutTwoColumns.default, {
|
|
134
134
|
label: ""
|
|
135
135
|
});
|
|
136
136
|
case 3:
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement(_layoutThreeColumns.default, {
|
|
138
138
|
label: ""
|
|
139
139
|
});
|
|
140
140
|
case 4:
|
|
@@ -235,7 +235,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, pos
|
|
|
235
235
|
type: 'button',
|
|
236
236
|
appearance: 'danger',
|
|
237
237
|
focusEditoronEnter: true,
|
|
238
|
-
icon:
|
|
238
|
+
icon: _delete.default,
|
|
239
239
|
testId: _messages.default.remove.id,
|
|
240
240
|
title: intl.formatMessage(_messages.default.remove),
|
|
241
241
|
onClick: (0, _actions.deleteActiveLayoutNode)(editorAnalyticsAPI, _analytics.INPUT_METHOD.FLOATING_TB),
|
|
@@ -282,7 +282,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, pos
|
|
|
282
282
|
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
283
283
|
title: intl.formatMessage(_messages.default.delete),
|
|
284
284
|
onClick: (0, _actions.deleteActiveLayoutNode)(editorAnalyticsAPI, _analytics.INPUT_METHOD.FLOATING_TB),
|
|
285
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
285
|
+
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
286
286
|
label: ""
|
|
287
287
|
})
|
|
288
288
|
}, hoverDecorationProps(nodeType))]
|
|
@@ -190,7 +190,7 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
|
|
|
190
190
|
// check if the column only contains a paragraph with a placeholder text
|
|
191
191
|
// if so, remove the whole column, otherwise just remove the paragraph
|
|
192
192
|
if (isEmptyDocument(column)) {
|
|
193
|
-
const fromPos = editorExperiment('single_column_layouts', true)
|
|
193
|
+
const fromPos = editorExperiment('single_column_layouts', true) ? columnPos : columnPos - 1;
|
|
194
194
|
tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), Slice.empty);
|
|
195
195
|
} else {
|
|
196
196
|
tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), Slice.empty);
|
|
@@ -5,13 +5,13 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
8
|
-
import DeleteIcon from '@atlaskit/icon/core/
|
|
9
|
-
import LayoutOneColumnIcon from '@atlaskit/icon/core/
|
|
10
|
-
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/
|
|
11
|
-
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/
|
|
12
|
-
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/
|
|
13
|
-
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/
|
|
14
|
-
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/
|
|
8
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
+
import LayoutOneColumnIcon from '@atlaskit/icon/core/layout-one-column';
|
|
10
|
+
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/layout-three-columns';
|
|
11
|
+
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/layout-three-columns-sidebars';
|
|
12
|
+
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/layout-two-columns';
|
|
13
|
+
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-left';
|
|
14
|
+
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-right';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
16
|
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '../pm-plugins/actions';
|
|
17
17
|
import { EditorLayoutFiveColumnsIcon, EditorLayoutFourColumnsIcon } from './icons/LayoutColumnsIcon';
|
|
@@ -202,7 +202,7 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
|
|
|
202
202
|
// check if the column only contains a paragraph with a placeholder text
|
|
203
203
|
// if so, remove the whole column, otherwise just remove the paragraph
|
|
204
204
|
if (isEmptyDocument(column)) {
|
|
205
|
-
var fromPos = editorExperiment('single_column_layouts', true)
|
|
205
|
+
var fromPos = editorExperiment('single_column_layouts', true) ? columnPos : columnPos - 1;
|
|
206
206
|
tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), Slice.empty);
|
|
207
207
|
} else {
|
|
208
208
|
tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), Slice.empty);
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -9,13 +9,13 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
9
9
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
12
|
-
import DeleteIcon from '@atlaskit/icon/core/
|
|
13
|
-
import LayoutOneColumnIcon from '@atlaskit/icon/core/
|
|
14
|
-
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/
|
|
15
|
-
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/
|
|
16
|
-
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/
|
|
17
|
-
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/
|
|
18
|
-
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/
|
|
12
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
13
|
+
import LayoutOneColumnIcon from '@atlaskit/icon/core/layout-one-column';
|
|
14
|
+
import LayoutThreeColumnsIcon from '@atlaskit/icon/core/layout-three-columns';
|
|
15
|
+
import LayoutThreeColumnsSidebarsIcon from '@atlaskit/icon/core/layout-three-columns-sidebars';
|
|
16
|
+
import LayoutTwoColumnsIcon from '@atlaskit/icon/core/layout-two-columns';
|
|
17
|
+
import LayoutTwoColumnsSidebarLeftIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-left';
|
|
18
|
+
import LayoutTwoColumnsSidebarRightIcon from '@atlaskit/icon/core/layout-two-columns-sidebar-right';
|
|
19
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
20
|
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '../pm-plugins/actions';
|
|
21
21
|
import { EditorLayoutFiveColumnsIcon, EditorLayoutFourColumnsIcon } from './icons/LayoutColumnsIcon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.16",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^51.5.
|
|
32
|
+
"@atlaskit/adf-schema": "^51.5.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
34
|
-
"@atlaskit/editor-plugin-block-menu": "^5.
|
|
34
|
+
"@atlaskit/editor-plugin-block-menu": "^5.2.0",
|
|
35
35
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-guideline": "^6.0.0",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^3.4.0",
|
|
41
41
|
"@atlaskit/editor-plugin-width": "^7.0.0",
|
|
42
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
42
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
|
-
"@atlaskit/icon": "^29.
|
|
45
|
+
"@atlaskit/icon": "^29.1.0",
|
|
46
46
|
"@atlaskit/icon-lab": "^5.12.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
49
|
-
"@atlaskit/tokens": "^8.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^15.12.0",
|
|
49
|
+
"@atlaskit/tokens": "^8.5.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^110.
|
|
54
|
+
"@atlaskit/editor-common": "^110.44.0",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
57
57
|
},
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"platform-visual-refresh-icons": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_editor_convert_multiple_columns_to_single": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_column_count_analytics": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
},
|