@atlaskit/editor-plugin-primary-toolbar 3.2.8 → 3.2.10
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 +15 -0
- package/dist/cjs/pm-plugins/toolbar-configuration.js +7 -3
- package/dist/es2019/pm-plugins/toolbar-configuration.js +6 -2
- package/dist/esm/pm-plugins/toolbar-configuration.js +7 -3
- package/dist/types/primaryToolbarPluginType.d.ts +1 -1
- package/dist/types-ts4.5/primaryToolbarPluginType.d.ts +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-primary-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#162560](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/162560)
|
|
8
|
+
[`2f1b203a00ccf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f1b203a00ccf) -
|
|
9
|
+
[ux] Removes docking options from the overflow menu and converts them into pin/unpin button.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.2.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.2.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -133,11 +133,15 @@ var findGroup = [{
|
|
|
133
133
|
var toolbarConfiguration = function toolbarConfiguration(shouldShowFindGroup) {
|
|
134
134
|
return [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, (0, _toConsumableArray2.default)(shouldShowFindGroup ? others : othersGroupNoFind));
|
|
135
135
|
};
|
|
136
|
+
var overflowMenu = [{
|
|
137
|
+
name: 'overflowMenu'
|
|
138
|
+
}];
|
|
139
|
+
var pinToolbar = [{
|
|
140
|
+
name: 'pinToolbar'
|
|
141
|
+
}];
|
|
136
142
|
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
137
143
|
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
138
|
-
return [].concat((0, _toConsumableArray2.default)(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
139
|
-
name: 'overflowMenu'
|
|
140
|
-
}, {
|
|
144
|
+
return [].concat((0, _toConsumableArray2.default)(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), (0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_pinning') ? pinToolbar : overflowMenu), [{
|
|
141
145
|
name: 'beforePrimaryToolbar'
|
|
142
146
|
}], (0, _toConsumableArray2.default)(shouldShowFindGroup ? findGroup : []));
|
|
143
147
|
};
|
|
@@ -106,8 +106,12 @@ const findGroup = [{
|
|
|
106
106
|
name: 'findReplace'
|
|
107
107
|
}];
|
|
108
108
|
const toolbarConfiguration = shouldShowFindGroup => [...undoRedoGroup, ...spellCheckGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormattingGroup, ...insertBlockGroup, ...(shouldShowFindGroup ? others : othersGroupNoFind)];
|
|
109
|
-
const
|
|
109
|
+
const overflowMenu = [{
|
|
110
110
|
name: 'overflowMenu'
|
|
111
|
-
}
|
|
111
|
+
}];
|
|
112
|
+
const pinToolbar = [{
|
|
113
|
+
name: 'pinToolbar'
|
|
114
|
+
}];
|
|
115
|
+
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup = false) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), ...(fg('platform_editor_controls_toolbar_pinning') ? pinToolbar : overflowMenu), {
|
|
112
116
|
name: 'beforePrimaryToolbar'
|
|
113
117
|
}, ...(shouldShowFindGroup ? findGroup : [])];
|
|
@@ -126,11 +126,15 @@ var findGroup = [{
|
|
|
126
126
|
var toolbarConfiguration = function toolbarConfiguration(shouldShowFindGroup) {
|
|
127
127
|
return [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormattingGroup, insertBlockGroup, _toConsumableArray(shouldShowFindGroup ? others : othersGroupNoFind));
|
|
128
128
|
};
|
|
129
|
+
var overflowMenu = [{
|
|
130
|
+
name: 'overflowMenu'
|
|
131
|
+
}];
|
|
132
|
+
var pinToolbar = [{
|
|
133
|
+
name: 'pinToolbar'
|
|
134
|
+
}];
|
|
129
135
|
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
130
136
|
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
131
|
-
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
132
|
-
name: 'overflowMenu'
|
|
133
|
-
}, {
|
|
137
|
+
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), _toConsumableArray(fg('platform_editor_controls_toolbar_pinning') ? pinToolbar : overflowMenu), [{
|
|
134
138
|
name: 'beforePrimaryToolbar'
|
|
135
139
|
}], _toConsumableArray(shouldShowFindGroup ? findGroup : []));
|
|
136
140
|
};
|
|
@@ -14,7 +14,7 @@ export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
|
|
|
14
14
|
pluginConfiguration?: PrimaryToolbarPluginOptions;
|
|
15
15
|
}>;
|
|
16
16
|
export type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
|
|
17
|
-
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'hyperlink' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'aiSimplified' | 'loom' | 'spellCheck' | 'overflowMenu';
|
|
17
|
+
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'hyperlink' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'aiSimplified' | 'loom' | 'spellCheck' | 'overflowMenu' | 'pinToolbar';
|
|
18
18
|
export type ToolbarElementConfig = {
|
|
19
19
|
name: ToolbarElementNames;
|
|
20
20
|
enabled?: (componentRegistry: ComponentRegistry, editorState: EditorState) => boolean;
|
|
@@ -14,7 +14,7 @@ export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
|
|
|
14
14
|
pluginConfiguration?: PrimaryToolbarPluginOptions;
|
|
15
15
|
}>;
|
|
16
16
|
export type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
|
|
17
|
-
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'hyperlink' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'aiSimplified' | 'loom' | 'spellCheck' | 'overflowMenu';
|
|
17
|
+
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'hyperlink' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'aiSimplified' | 'loom' | 'spellCheck' | 'overflowMenu' | 'pinToolbar';
|
|
18
18
|
export type ToolbarElementConfig = {
|
|
19
19
|
name: ToolbarElementNames;
|
|
20
20
|
enabled?: (componentRegistry: ComponentRegistry, editorState: EditorState) => boolean;
|
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.10",
|
|
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": "^
|
|
39
|
+
"@atlaskit/editor-common": "^106.1.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^5.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^5.5.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
|
@@ -93,6 +93,9 @@
|
|
|
93
93
|
},
|
|
94
94
|
"platform_editor_controls_fix_toolbar_config_embeds": {
|
|
95
95
|
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"platform_editor_controls_toolbar_pinning": {
|
|
98
|
+
"type": "boolean"
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
}
|