@atlaskit/editor-plugin-primary-toolbar 4.1.1 → 4.1.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 +8 -0
- package/dist/cjs/pm-plugins/toolbar-configuration.js +3 -1
- package/dist/es2019/pm-plugins/toolbar-configuration.js +3 -1
- package/dist/esm/pm-plugins/toolbar-configuration.js +3 -1
- package/dist/types/primaryToolbarPluginType.d.ts +1 -1
- package/dist/types-ts4.5/primaryToolbarPluginType.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-primary-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#192343](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/192343)
|
|
8
|
+
[`9cb0878241016`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9cb0878241016) -
|
|
9
|
+
ED-28736 more extensible selection extensions API
|
|
10
|
+
|
|
3
11
|
## 4.1.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -161,7 +161,9 @@ var pinToolbar = [{
|
|
|
161
161
|
}];
|
|
162
162
|
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
163
163
|
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
164
|
-
return [].concat((0, _toConsumableArray2.default)(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []),
|
|
164
|
+
return [].concat((0, _toConsumableArray2.default)(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, (0, _toConsumableArray2.default)(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
165
|
+
name: 'selectionExtension'
|
|
166
|
+
}], pinToolbar, [{
|
|
165
167
|
name: 'beforePrimaryToolbar'
|
|
166
168
|
}], (0, _toConsumableArray2.default)(shouldShowFindGroup ? findGroup : []));
|
|
167
169
|
};
|
|
@@ -124,6 +124,8 @@ const toolbarConfiguration = shouldShowFindGroup => [...undoRedoGroup, ...spellC
|
|
|
124
124
|
const pinToolbar = [{
|
|
125
125
|
name: 'pinToolbar'
|
|
126
126
|
}];
|
|
127
|
-
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup = false) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []),
|
|
127
|
+
const toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup = false) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), {
|
|
128
|
+
name: 'selectionExtension'
|
|
129
|
+
}, ...pinToolbar, {
|
|
128
130
|
name: 'beforePrimaryToolbar'
|
|
129
131
|
}, ...(shouldShowFindGroup ? findGroup : [])];
|
|
@@ -154,7 +154,9 @@ var pinToolbar = [{
|
|
|
154
154
|
}];
|
|
155
155
|
var toolbarConfigurationV2 = function toolbarConfigurationV2(shouldShowInsertBlock, shouldShowUndoRedoGroup) {
|
|
156
156
|
var shouldShowFindGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
157
|
-
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []),
|
|
157
|
+
return [].concat(_toConsumableArray(shouldShowUndoRedoGroup ? undoRedoGroup : []), blockTypeGroup, textFormattingGroup, textColorGroup, alignmentGroup, listFormattingGroup, hyperlinkGroup, _toConsumableArray(shouldShowInsertBlock ? insertBlockGroup : []), [{
|
|
158
|
+
name: 'selectionExtension'
|
|
159
|
+
}], pinToolbar, [{
|
|
158
160
|
name: 'beforePrimaryToolbar'
|
|
159
161
|
}], _toConsumableArray(shouldShowFindGroup ? findGroup : []));
|
|
160
162
|
};
|
|
@@ -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 = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
|
|
17
|
+
export type ToolbarElementNames = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'selectionExtension' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
|
|
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 = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
|
|
17
|
+
export type ToolbarElementNames = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'selectionExtension' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
|
|
18
18
|
export type ToolbarElementConfig = {
|
|
19
19
|
name: ToolbarElementNames;
|
|
20
20
|
enabled?: (componentRegistry: ComponentRegistry, editorState: EditorState) => boolean;
|