@atlaskit/editor-plugin-primary-toolbar 3.2.9 → 3.2.11

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,24 @@
1
1
  # @atlaskit/editor-plugin-primary-toolbar
2
2
 
3
+ ## 3.2.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#163573](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/163573)
8
+ [`21e93839ec382`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21e93839ec382) -
9
+ Convert platform_editor_controls_toolbar_pinning fg to
10
+ platform_editor_controls_toolbar_pinning_exp experiment
11
+ - Updated dependencies
12
+
13
+ ## 3.2.10
14
+
15
+ ### Patch Changes
16
+
17
+ - [#162560](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/162560)
18
+ [`2f1b203a00ccf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f1b203a00ccf) -
19
+ [ux] Removes docking options from the overflow menu and converts them into pin/unpin button.
20
+ - Updated dependencies
21
+
3
22
  ## 3.2.9
4
23
 
5
24
  ### Patch Changes
@@ -133,11 +133,17 @@ 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, _experiments.editorExperiment)('platform_editor_controls_toolbar_pinning_exp', true, {
145
+ exposure: true
146
+ }) ? pinToolbar : overflowMenu), [{
141
147
  name: 'beforePrimaryToolbar'
142
148
  }], (0, _toConsumableArray2.default)(shouldShowFindGroup ? findGroup : []));
143
149
  };
@@ -106,8 +106,14 @@ 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 toolbarConfigurationV2 = (shouldShowInsertBlock, shouldShowUndoRedoGroup, shouldShowFindGroup = false) => [...(shouldShowUndoRedoGroup ? undoRedoGroup : []), ...blockTypeGroup, ...textFormattingGroup, ...textColorGroup, ...alignmentGroup, ...listFormattingGroup, ...hyperlinkGroup, ...(shouldShowInsertBlock ? insertBlockGroup : []), {
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 : []), ...(editorExperiment('platform_editor_controls_toolbar_pinning_exp', true, {
116
+ exposure: true
117
+ }) ? pinToolbar : overflowMenu), {
112
118
  name: 'beforePrimaryToolbar'
113
119
  }, ...(shouldShowFindGroup ? findGroup : [])];
@@ -126,11 +126,17 @@ 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(editorExperiment('platform_editor_controls_toolbar_pinning_exp', true, {
138
+ exposure: true
139
+ }) ? pinToolbar : overflowMenu), [{
134
140
  name: 'beforePrimaryToolbar'
135
141
  }], _toConsumableArray(shouldShowFindGroup ? findGroup : []));
136
142
  };
@@ -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.9",
3
+ "version": "3.2.11",
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": "^106.0.0",
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.2.0",
42
+ "@atlaskit/tmp-editor-statsig": "^5.7.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },