@atlaskit/editor-plugin-primary-toolbar 1.3.1 → 1.3.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,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-primary-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#124654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124654)
|
|
8
|
+
[`3eace5ec6b539`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3eace5ec6b539) -
|
|
9
|
+
[ux] Updated the primary toolbar plugin to allow have a spellcheck button which is next to the
|
|
10
|
+
undo/redo buttons. Also update the ai plugin to support this and fallback to the original "append
|
|
11
|
+
to end" implementation if the toolbar plugin is not enabled
|
|
12
|
+
|
|
3
13
|
## 1.3.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -25,6 +25,14 @@ var undoRedoGroup = [{
|
|
|
25
25
|
return componentRegistry.has('undoRedoPlugin');
|
|
26
26
|
}
|
|
27
27
|
}];
|
|
28
|
+
var spellCheckGroup = [{
|
|
29
|
+
name: 'spellCheck'
|
|
30
|
+
}, {
|
|
31
|
+
name: 'separator',
|
|
32
|
+
enabled: function enabled(componentRegistry) {
|
|
33
|
+
return componentRegistry.has('spellCheck');
|
|
34
|
+
}
|
|
35
|
+
}];
|
|
28
36
|
var blockTypeGroup = [{
|
|
29
37
|
name: 'blockType'
|
|
30
38
|
}, {
|
|
@@ -89,4 +97,4 @@ var others = [{
|
|
|
89
97
|
}, {
|
|
90
98
|
name: 'loom'
|
|
91
99
|
}];
|
|
92
|
-
var toolbarConfiguration = [].concat(undoRedoGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormatting, insertBlockGroup, others);
|
|
100
|
+
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormatting, insertBlockGroup, others);
|
|
@@ -13,6 +13,12 @@ const undoRedoGroup = [{
|
|
|
13
13
|
name: 'separator',
|
|
14
14
|
enabled: componentRegistry => componentRegistry.has('undoRedoPlugin')
|
|
15
15
|
}];
|
|
16
|
+
const spellCheckGroup = [{
|
|
17
|
+
name: 'spellCheck'
|
|
18
|
+
}, {
|
|
19
|
+
name: 'separator',
|
|
20
|
+
enabled: componentRegistry => componentRegistry.has('spellCheck')
|
|
21
|
+
}];
|
|
16
22
|
const blockTypeGroup = [{
|
|
17
23
|
name: 'blockType'
|
|
18
24
|
}, {
|
|
@@ -65,4 +71,4 @@ const others = [{
|
|
|
65
71
|
}, {
|
|
66
72
|
name: 'loom'
|
|
67
73
|
}];
|
|
68
|
-
const toolbarConfiguration = [...undoRedoGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormatting, ...insertBlockGroup, ...others];
|
|
74
|
+
const toolbarConfiguration = [...undoRedoGroup, ...spellCheckGroup, ...blockTypeGroup, ...textFormattingGroup, ...alignmentGroup, ...textColorGroup, ...listFormatting, ...insertBlockGroup, ...others];
|
|
@@ -19,6 +19,14 @@ var undoRedoGroup = [{
|
|
|
19
19
|
return componentRegistry.has('undoRedoPlugin');
|
|
20
20
|
}
|
|
21
21
|
}];
|
|
22
|
+
var spellCheckGroup = [{
|
|
23
|
+
name: 'spellCheck'
|
|
24
|
+
}, {
|
|
25
|
+
name: 'separator',
|
|
26
|
+
enabled: function enabled(componentRegistry) {
|
|
27
|
+
return componentRegistry.has('spellCheck');
|
|
28
|
+
}
|
|
29
|
+
}];
|
|
22
30
|
var blockTypeGroup = [{
|
|
23
31
|
name: 'blockType'
|
|
24
32
|
}, {
|
|
@@ -83,4 +91,4 @@ var others = [{
|
|
|
83
91
|
}, {
|
|
84
92
|
name: 'loom'
|
|
85
93
|
}];
|
|
86
|
-
var toolbarConfiguration = [].concat(undoRedoGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormatting, insertBlockGroup, others);
|
|
94
|
+
var toolbarConfiguration = [].concat(undoRedoGroup, spellCheckGroup, blockTypeGroup, textFormattingGroup, alignmentGroup, textColorGroup, listFormatting, insertBlockGroup, others);
|
package/dist/types/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
|
|
|
9
9
|
};
|
|
10
10
|
}>;
|
|
11
11
|
type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
|
|
12
|
-
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'loom';
|
|
12
|
+
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'loom' | 'spellCheck';
|
|
13
13
|
export type ToolbarElementConfig = {
|
|
14
14
|
name: ToolbarElementNames;
|
|
15
15
|
enabled?: (componentRegistry: ComponentRegistry) => boolean;
|
|
@@ -9,7 +9,7 @@ export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
|
|
|
9
9
|
};
|
|
10
10
|
}>;
|
|
11
11
|
type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
|
|
12
|
-
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'loom';
|
|
12
|
+
export type ToolbarElementNames = 'separator' | 'undoRedoPlugin' | 'blockType' | 'textFormatting' | 'alignment' | 'textColor' | 'highlight' | 'toolbarListsIndentation' | 'insertBlock' | 'beforePrimaryToolbar' | 'avatarGroup' | 'findReplace' | 'aiExperience' | 'loom' | 'spellCheck';
|
|
13
13
|
export type ToolbarElementConfig = {
|
|
14
14
|
name: ToolbarElementNames;
|
|
15
15
|
enabled?: (componentRegistry: ComponentRegistry) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-primary-toolbar",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Primary toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
".": "./src/index.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@atlaskit/editor-common": "^87.
|
|
41
|
+
"@atlaskit/editor-common": "^87.1.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|