@atlaskit/editor-plugin-primary-toolbar 3.2.1 → 3.2.3
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,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-primary-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#146886](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146886)
|
|
8
|
+
[`c18099d101897`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c18099d101897) -
|
|
9
|
+
[ux] Do not add find&replace back to docked toolbar when the mitigation FG is enabled
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.2.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#146429](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146429)
|
|
17
|
+
[`8273b36d97d65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8273b36d97d65) -
|
|
18
|
+
[ux] Add undo/redo/find&replace back to docked toolbar when the mitigation FG is enabled
|
|
19
|
+
|
|
3
20
|
## 3.2.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -17,8 +17,8 @@ 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
|
-
configuration = toolbarConfigurationV2(shouldShowInsertBlock,
|
|
20
|
+
var shouldShowUndoRedoGroup = (0, _platformFeatureFlags.fg)('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
21
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup);
|
|
22
22
|
} else {
|
|
23
23
|
configuration = toolbarConfiguration;
|
|
24
24
|
}
|
|
@@ -121,12 +121,11 @@ var findGroup = [{
|
|
|
121
121
|
name: 'findReplace'
|
|
122
122
|
}];
|
|
123
123
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
124
|
-
var toolbarConfigurationV2 = function toolbarConfigurationV2() {
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
return [].concat((0, _toConsumableArray2.default)(shouldShowMoveActions ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
124
|
+
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
125
|
+
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
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,8 @@ export const getToolbarComponents = ({
|
|
|
10
10
|
exposure: true
|
|
11
11
|
})) {
|
|
12
12
|
const shouldShowInsertBlock = fg('platform_editor_insert_button_on_primary_toolbar');
|
|
13
|
-
const
|
|
14
|
-
configuration = toolbarConfigurationV2(shouldShowInsertBlock,
|
|
13
|
+
const shouldShowUndoRedoGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
14
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup);
|
|
15
15
|
} else {
|
|
16
16
|
configuration = toolbarConfiguration;
|
|
17
17
|
}
|
|
@@ -96,8 +96,8 @@ const findGroup = [{
|
|
|
96
96
|
name: 'findReplace'
|
|
97
97
|
}];
|
|
98
98
|
const toolbarConfiguration = [...undoRedoGroup, ...spellCheckGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormattingGroup, ...insertBlockGroup, ...others];
|
|
99
|
-
const toolbarConfigurationV2 = (shouldShowInsertBlock
|
|
99
|
+
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup = false) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), {
|
|
100
100
|
name: 'overflowMenu'
|
|
101
101
|
}, {
|
|
102
102
|
name: 'beforePrimaryToolbar'
|
|
103
|
-
}, ...(
|
|
103
|
+
}, ...(shouldShowFindGroup ? findGroup : [])];
|
|
@@ -10,8 +10,8 @@ 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
|
-
configuration = toolbarConfigurationV2(shouldShowInsertBlock,
|
|
13
|
+
var shouldShowUndoRedoGroup = fg('platform_editor_undo_redo_find_on_primary_toolbar');
|
|
14
|
+
configuration = toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup);
|
|
15
15
|
} else {
|
|
16
16
|
configuration = toolbarConfiguration;
|
|
17
17
|
}
|
|
@@ -114,12 +114,11 @@ var findGroup = [{
|
|
|
114
114
|
name: 'findReplace'
|
|
115
115
|
}];
|
|
116
116
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
117
|
-
var toolbarConfigurationV2 = function toolbarConfigurationV2() {
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
return [].concat(_toConsumableArray(shouldShowMoveActions ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
117
|
+
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
118
|
+
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
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.3",
|
|
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.18.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
|
}
|