@atlaskit/editor-plugin-primary-toolbar 3.2.0 → 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,22 @@
|
|
|
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
|
+
|
|
11
|
+
## 3.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#140839](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140839)
|
|
16
|
+
[`8c413615979d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c413615979d2) -
|
|
17
|
+
[ux] Include element insert plus button on Editor primary toolbar
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 3.2.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -16,11 +16,10 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
16
16
|
if (contextualFormattingEnabled && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
17
17
|
exposure: true
|
|
18
18
|
})) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
var shouldShowInsertBlock = (0, _platformFeatureFlags.fg)('platform_editor_insert_button_on_primary_toolbar');
|
|
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);
|
|
24
23
|
} else {
|
|
25
24
|
configuration = toolbarConfiguration;
|
|
26
25
|
}
|
|
@@ -123,9 +122,10 @@ var findGroup = [{
|
|
|
123
122
|
name: 'findReplace'
|
|
124
123
|
}];
|
|
125
124
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
126
|
-
var toolbarConfigurationV2 =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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 : []), [{
|
|
127
|
+
name: 'overflowMenu'
|
|
128
|
+
}, {
|
|
129
|
+
name: 'beforePrimaryToolbar'
|
|
130
|
+
}], (0, _toConsumableArray2.default)(shouldShowFindGroup ? findGroup : []));
|
|
131
|
+
};
|
|
@@ -9,11 +9,10 @@ export const getToolbarComponents = ({
|
|
|
9
9
|
if (contextualFormattingEnabled && editorExperiment('platform_editor_controls', 'variant1', {
|
|
10
10
|
exposure: true
|
|
11
11
|
})) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
12
|
+
const shouldShowInsertBlock = fg('platform_editor_insert_button_on_primary_toolbar');
|
|
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);
|
|
17
16
|
} else {
|
|
18
17
|
configuration = toolbarConfiguration;
|
|
19
18
|
}
|
|
@@ -98,9 +97,8 @@ const findGroup = [{
|
|
|
98
97
|
name: 'findReplace'
|
|
99
98
|
}];
|
|
100
99
|
const toolbarConfiguration = [...undoRedoGroup, ...spellCheckGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormattingGroup, ...insertBlockGroup, ...others];
|
|
101
|
-
const toolbarConfigurationV2 = [...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, {
|
|
100
|
+
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), {
|
|
102
101
|
name: 'overflowMenu'
|
|
103
102
|
}, {
|
|
104
103
|
name: 'beforePrimaryToolbar'
|
|
105
|
-
}];
|
|
106
|
-
const toolbarConfigurationV2WithUndoRedoAndFindReplace = [...undoRedoGroup, ...toolbarConfigurationV2, ...findGroup];
|
|
104
|
+
}, ...(shouldShowFindGroup ? findGroup : [])];
|
|
@@ -9,11 +9,10 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
9
9
|
if (contextualFormattingEnabled && editorExperiment('platform_editor_controls', 'variant1', {
|
|
10
10
|
exposure: true
|
|
11
11
|
})) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
12
|
+
var shouldShowInsertBlock = fg('platform_editor_insert_button_on_primary_toolbar');
|
|
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);
|
|
17
16
|
} else {
|
|
18
17
|
configuration = toolbarConfiguration;
|
|
19
18
|
}
|
|
@@ -116,9 +115,10 @@ var findGroup = [{
|
|
|
116
115
|
name: 'findReplace'
|
|
117
116
|
}];
|
|
118
117
|
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, others);
|
|
119
|
-
var toolbarConfigurationV2 =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup) {
|
|
119
|
+
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
120
|
+
name: 'overflowMenu'
|
|
121
|
+
}, {
|
|
122
|
+
name: 'beforePrimaryToolbar'
|
|
123
|
+
}], _toConsumableArray(shouldShowFindGroup ? findGroup : []));
|
|
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
|
},
|
|
@@ -87,6 +87,12 @@
|
|
|
87
87
|
"platform-feature-flags": {
|
|
88
88
|
"platform_editor_controls_move_actions": {
|
|
89
89
|
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"platform_editor_insert_button_on_primary_toolbar": {
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"platform_editor_undo_redo_find_on_primary_toolbar": {
|
|
95
|
+
"type": "boolean"
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
98
|
}
|