@atlaskit/editor-plugin-primary-toolbar 3.2.1 → 3.2.2
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-primary-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#146429](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146429)
|
|
8
|
+
[`8273b36d97d65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8273b36d97d65) -
|
|
9
|
+
[ux] Add undo/redo/find&replace back to docked toolbar when the mitigation FG is enabled
|
|
10
|
+
|
|
3
11
|
## 3.2.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -17,8 +17,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
17
17
|
exposure: true
|
|
18
18
|
})) {
|
|
19
19
|
var shouldShowInsertBlock = (0, _platformFeatureFlags.fg)('platform_editor_insert_button_on_primary_toolbar');
|
|
20
|
-
var
|
|
21
|
-
|
|
20
|
+
var shouldShowUndoRedoGroup = (0, _platformFeatureFlags.fg)('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
21
|
+
var shouldShowFindGroup = (0, _platformFeatureFlags.fg)('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
22
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup);
|
|
22
23
|
} else {
|
|
23
24
|
configuration = toolbarConfiguration;
|
|
24
25
|
}
|
|
@@ -121,12 +122,10 @@ var findGroup = [{
|
|
|
121
122
|
name: 'findReplace'
|
|
122
123
|
}];
|
|
123
124
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
124
|
-
var toolbarConfigurationV2 = function toolbarConfigurationV2() {
|
|
125
|
-
|
|
126
|
-
var shouldShowMoveActions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
127
|
-
return [].concat((0, _toConsumableArray2.default)(shouldShowMoveActions ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
125
|
+
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup) {
|
|
126
|
+
return [].concat((0, _toConsumableArray2.default)(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
128
127
|
name: 'overflowMenu'
|
|
129
128
|
}, {
|
|
130
129
|
name: 'beforePrimaryToolbar'
|
|
131
|
-
}], (0, _toConsumableArray2.default)(
|
|
130
|
+
}], (0, _toConsumableArray2.default)(shouldShowFindGroup ? findGroup : []));
|
|
132
131
|
};
|
|
@@ -10,8 +10,9 @@ export const getToolbarComponents = ({
|
|
|
10
10
|
exposure: true
|
|
11
11
|
})) {
|
|
12
12
|
const shouldShowInsertBlock = fg('platform_editor_insert_button_on_primary_toolbar');
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const shouldShowUndoRedoGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
14
|
+
const shouldShowFindGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
15
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup);
|
|
15
16
|
} else {
|
|
16
17
|
configuration = toolbarConfiguration;
|
|
17
18
|
}
|
|
@@ -96,8 +97,8 @@ const findGroup = [{
|
|
|
96
97
|
name: 'findReplace'
|
|
97
98
|
}];
|
|
98
99
|
const toolbarConfiguration = [...undoRedoGroup, ...spellCheckGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormattingGroup, ...insertBlockGroup, ...others];
|
|
99
|
-
const toolbarConfigurationV2 = (shouldShowInsertBlock
|
|
100
|
+
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), {
|
|
100
101
|
name: 'overflowMenu'
|
|
101
102
|
}, {
|
|
102
103
|
name: 'beforePrimaryToolbar'
|
|
103
|
-
}, ...(
|
|
104
|
+
}, ...(shouldShowFindGroup ? findGroup : [])];
|
|
@@ -10,8 +10,9 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
10
10
|
exposure: true
|
|
11
11
|
})) {
|
|
12
12
|
var shouldShowInsertBlock = fg('platform_editor_insert_button_on_primary_toolbar');
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var shouldShowUndoRedoGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
14
|
+
var shouldShowFindGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
15
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup);
|
|
15
16
|
} else {
|
|
16
17
|
configuration = toolbarConfiguration;
|
|
17
18
|
}
|
|
@@ -114,12 +115,10 @@ var findGroup = [{
|
|
|
114
115
|
name: 'findReplace'
|
|
115
116
|
}];
|
|
116
117
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
117
|
-
var toolbarConfigurationV2 = function toolbarConfigurationV2() {
|
|
118
|
-
|
|
119
|
-
var shouldShowMoveActions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
120
|
-
return [].concat(_toConsumableArray(shouldShowMoveActions ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
118
|
+
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup) {
|
|
119
|
+
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
121
120
|
name: 'overflowMenu'
|
|
122
121
|
}, {
|
|
123
122
|
name: 'beforePrimaryToolbar'
|
|
124
|
-
}], _toConsumableArray(
|
|
123
|
+
}], _toConsumableArray(shouldShowFindGroup ? findGroup : []));
|
|
125
124
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-primary-toolbar",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Primary toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
".": "./src/index.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/editor-common": "^103.
|
|
39
|
+
"@atlaskit/editor-common": "^103.17.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
|
@@ -90,6 +90,9 @@
|
|
|
90
90
|
},
|
|
91
91
|
"platform_editor_insert_button_on_primary_toolbar": {
|
|
92
92
|
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"platform_editor_undo_redo_find_on_primary_toolbar": {
|
|
95
|
+
"type": "boolean"
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
}
|