@atlaskit/editor-plugin-toolbar 4.1.1 → 4.1.3

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,21 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 4.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`81230b670d02c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81230b670d02c) -
8
+ ED-29744 camel case experience attributes
9
+ - Updated dependencies
10
+
11
+ ## 4.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`3d0b3f8b4d802`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d0b3f8b4d802) -
16
+ Remove platform_editor_toolbar_aifc_responsive experiment
17
+ - Updated dependencies
18
+
3
19
  ## 4.1.1
4
20
 
5
21
  ### Patch Changes
@@ -11,13 +11,13 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var pluginKey = new _state.PluginKey('selectionToolbarOpenExperience');
13
13
  var START_METHOD = {
14
- MOUSE_UP: 'mouse-up',
15
- KEY_DOWN: 'key-down'
14
+ MOUSE_UP: 'mouseUp',
15
+ KEY_DOWN: 'keyDown'
16
16
  };
17
17
  var ABORT_REASON = {
18
- SELECTION_CLEARED: 'selection-cleared',
19
- BLOCK_MENU_OPENED: 'block-menu-opened',
20
- EDITOR_DESTROYED: 'editor-destroyed'
18
+ SELECTION_CLEARED: 'selectionCleared',
19
+ BLOCK_MENU_OPENED: 'blockMenuOpened',
20
+ EDITOR_DESTROYED: 'editorDestroyed'
21
21
  };
22
22
  /**
23
23
  * This experience tracks when the selection toolbar is opened.
@@ -43,8 +43,8 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
43
43
  }
44
44
  return targetEl;
45
45
  };
46
- var experience = new _experiences.Experience('toolbar-open', {
47
- actionSubjectId: 'selection-toolbar',
46
+ var experience = new _experiences.Experience(_experiences.EXPERIENCE_ID.TOOLBAR_OPEN, {
47
+ actionSubjectId: 'selectionToolbar',
48
48
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
49
49
  checks: [new _experiences.ExperienceCheckTimeout({
50
50
  durationMs: 1000,
@@ -11,7 +11,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _toolbar = require("@atlaskit/editor-common/toolbar");
12
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  var _consts = require("./consts");
16
15
  var _OverflowMenu = require("./OverflowMenu");
17
16
  var _OverflowMenuSection = require("./OverflowMenuSection");
@@ -37,17 +36,11 @@ var getPrimaryToolbarComponents = function getPrimaryToolbarComponents(breakpoin
37
36
  return [{
38
37
  type: 'toolbar',
39
38
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
40
- component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref2) {
39
+ component: function component(_ref2) {
41
40
  var children = _ref2.children;
42
41
  return /*#__PURE__*/_react.default.createElement(_PrimaryToolbar.PrimaryToolbar, {
43
42
  breakpointPreset: breakpointPreset
44
43
  }, children);
45
- } : function (_ref3) {
46
- var children = _ref3.children;
47
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.PrimaryToolbar, {
48
- label: "Primary Toolbar",
49
- testId: "primary-toolbar"
50
- }, children);
51
44
  }
52
45
  }];
53
46
  };
@@ -60,23 +53,16 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
60
53
  key: _toolbar.TOOLBARS.INLINE_TEXT_TOOLBAR,
61
54
  rank: _toolbar.TOOLBAR_RANK[_toolbar.TEXT_SECTION.key]
62
55
  }],
63
- component: function component(_ref4) {
64
- var children = _ref4.children,
65
- parents = _ref4.parents;
66
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
67
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
68
- above: "md"
69
- }, /*#__PURE__*/_react.default.createElement(_Section.Section, {
70
- parents: parents,
71
- api: api,
72
- testId: "text-section"
73
- }, children));
74
- }
75
- return /*#__PURE__*/_react.default.createElement(_Section.Section, {
56
+ component: function component(_ref3) {
57
+ var children = _ref3.children,
58
+ parents = _ref3.parents;
59
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
60
+ above: "md"
61
+ }, /*#__PURE__*/_react.default.createElement(_Section.Section, {
76
62
  parents: parents,
77
63
  api: api,
78
64
  testId: "text-section"
79
- }, children);
65
+ }, children));
80
66
  }
81
67
  }, {
82
68
  type: _toolbar.TEXT_SECTION_PRIMARY_TOOLBAR.type,
@@ -86,39 +72,32 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
86
72
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
87
73
  rank: _toolbar.TOOLBAR_RANK[_toolbar.TEXT_SECTION.key]
88
74
  }],
89
- component: function component(_ref5) {
90
- var children = _ref5.children,
91
- parents = _ref5.parents;
92
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
93
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
94
- above: "md"
95
- }, /*#__PURE__*/_react.default.createElement(_Section.Section, {
96
- parents: parents,
97
- api: api,
98
- testId: "text-section"
99
- }, children));
100
- }
101
- return /*#__PURE__*/_react.default.createElement(_Section.Section, {
75
+ component: function component(_ref4) {
76
+ var children = _ref4.children,
77
+ parents = _ref4.parents;
78
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
79
+ above: "md"
80
+ }, /*#__PURE__*/_react.default.createElement(_Section.Section, {
102
81
  parents: parents,
103
82
  api: api,
104
83
  testId: "text-section"
105
- }, children);
84
+ }, children));
106
85
  }
107
- }].concat((0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? [{
86
+ }, {
108
87
  type: _toolbar.TEXT_SECTION_COLLAPSED.type,
109
88
  key: _toolbar.TEXT_SECTION_COLLAPSED.key,
110
89
  parents: [{
111
90
  type: 'toolbar',
112
91
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
113
92
  rank: _toolbar.TOOLBAR_RANK[_toolbar.TEXT_SECTION_COLLAPSED.key]
114
- }, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) && {
93
+ }, {
115
94
  type: 'toolbar',
116
95
  key: _toolbar.TOOLBARS.INLINE_TEXT_TOOLBAR,
117
96
  rank: _toolbar.TOOLBAR_RANK[_toolbar.TEXT_SECTION_COLLAPSED.key]
118
97
  }],
119
- component: function component(_ref6) {
120
- var children = _ref6.children,
121
- parents = _ref6.parents;
98
+ component: function component(_ref5) {
99
+ var children = _ref5.children,
100
+ parents = _ref5.parents;
122
101
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
123
102
  below: "md"
124
103
  }, /*#__PURE__*/_react.default.createElement(_Section.Section, {
@@ -144,7 +123,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
144
123
  rank: 100
145
124
  }],
146
125
  component: _TextCollapsedMenu.TextCollapsedMenu
147
- }] : []), [{
126
+ }, {
148
127
  type: _toolbar.INSERT_BLOCK_SECTION.type,
149
128
  key: _toolbar.INSERT_BLOCK_SECTION.key,
150
129
  parents: [{
@@ -152,9 +131,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
152
131
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
153
132
  rank: _toolbar.TOOLBAR_RANK[_toolbar.INSERT_BLOCK_SECTION.key]
154
133
  }],
155
- component: function component(_ref7) {
156
- var children = _ref7.children,
157
- parents = _ref7.parents;
134
+ component: function component(_ref6) {
135
+ var children = _ref6.children,
136
+ parents = _ref6.parents;
158
137
  return /*#__PURE__*/_react.default.createElement(_Section.Section, {
159
138
  testId: "insert-block-section",
160
139
  parents: parents,
@@ -175,9 +154,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
175
154
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
176
155
  rank: _toolbar.TOOLBAR_RANK[_toolbar.LINKING_SECTION.key]
177
156
  }],
178
- component: function component(_ref8) {
179
- var children = _ref8.children,
180
- parents = _ref8.parents;
157
+ component: function component(_ref7) {
158
+ var children = _ref7.children,
159
+ parents = _ref7.parents;
181
160
  return /*#__PURE__*/_react.default.createElement(_Section.Section, {
182
161
  testId: "link-section",
183
162
  parents: parents,
@@ -209,8 +188,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
209
188
  key: _toolbar.OVERFLOW_GROUP.key,
210
189
  rank: _toolbar.OVERFLOW_GROUP_RANK[_toolbar.OVERFLOW_MENU.key]
211
190
  }],
212
- component: function component(_ref9) {
213
- var children = _ref9.children;
191
+ component: function component(_ref8) {
192
+ var children = _ref8.children;
214
193
  return /*#__PURE__*/_react.default.createElement(_OverflowMenu.OverflowMenu, null, children);
215
194
  }
216
195
  }, {
@@ -230,9 +209,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
230
209
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
231
210
  rank: _toolbar.TOOLBAR_RANK[_toolbar.PIN_SECTION.key]
232
211
  }],
233
- component: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref0) {
234
- var children = _ref0.children,
235
- parents = _ref0.parents;
212
+ component: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref9) {
213
+ var children = _ref9.children,
214
+ parents = _ref9.parents;
236
215
  return /*#__PURE__*/_react.default.createElement(_Section.Section, {
237
216
  testId: "pin-section",
238
217
  parents: parents,
@@ -240,7 +219,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
240
219
  showSeparatorInFullPagePrimaryToolbar: true
241
220
  }, children);
242
221
  } : undefined
243
- }]);
222
+ }];
244
223
  components.push({
245
224
  type: _toolbar.OVERFLOW_SECTION_PRIMARY_TOOLBAR.type,
246
225
  key: _toolbar.OVERFLOW_SECTION_PRIMARY_TOOLBAR.key,
@@ -249,8 +228,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
249
228
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
250
229
  rank: _toolbar.TOOLBAR_RANK[_toolbar.OVERFLOW_SECTION_PRIMARY_TOOLBAR.key]
251
230
  }],
252
- component: function component(_ref1) {
253
- var children = _ref1.children;
231
+ component: function component(_ref0) {
232
+ var children = _ref0.children;
254
233
  return /*#__PURE__*/_react.default.createElement(_OverflowSection.OverflowSection, null, children);
255
234
  }
256
235
  }, {
@@ -269,8 +248,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
269
248
  key: _toolbar.OVERFLOW_GROUP_PRIMARY_TOOLBAR.key,
270
249
  rank: _toolbar.OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK[_toolbar.OVERFLOW_MENU_PRIMARY_TOOLBAR.key]
271
250
  }],
272
- component: function component(_ref10) {
273
- var children = _ref10.children;
251
+ component: function component(_ref1) {
252
+ var children = _ref1.children;
274
253
  return /*#__PURE__*/_react.default.createElement(_OverflowMenu.OverflowMenu, null, children);
275
254
  }
276
255
  });
@@ -295,9 +274,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
295
274
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
296
275
  rank: _toolbar.TOOLBAR_RANK[_toolbar.TRACK_CHANGES_SECTION.key]
297
276
  }],
298
- component: function component(_ref11) {
299
- var children = _ref11.children,
300
- parents = _ref11.parents;
277
+ component: function component(_ref10) {
278
+ var children = _ref10.children,
279
+ parents = _ref10.parents;
301
280
  return /*#__PURE__*/_react.default.createElement(_Section.Section, {
302
281
  testId: "track-changes-section",
303
282
  parents: parents,
@@ -1,15 +1,15 @@
1
- import { Experience, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
1
+ import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  const pluginKey = new PluginKey('selectionToolbarOpenExperience');
5
5
  const START_METHOD = {
6
- MOUSE_UP: 'mouse-up',
7
- KEY_DOWN: 'key-down'
6
+ MOUSE_UP: 'mouseUp',
7
+ KEY_DOWN: 'keyDown'
8
8
  };
9
9
  const ABORT_REASON = {
10
- SELECTION_CLEARED: 'selection-cleared',
11
- BLOCK_MENU_OPENED: 'block-menu-opened',
12
- EDITOR_DESTROYED: 'editor-destroyed'
10
+ SELECTION_CLEARED: 'selectionCleared',
11
+ BLOCK_MENU_OPENED: 'blockMenuOpened',
12
+ EDITOR_DESTROYED: 'editorDestroyed'
13
13
  };
14
14
  /**
15
15
  * This experience tracks when the selection toolbar is opened.
@@ -36,8 +36,8 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
36
36
  }
37
37
  return targetEl;
38
38
  };
39
- const experience = new Experience('toolbar-open', {
40
- actionSubjectId: 'selection-toolbar',
39
+ const experience = new Experience(EXPERIENCE_ID.TOOLBAR_OPEN, {
40
+ actionSubjectId: 'selectionToolbar',
41
41
  dispatchAnalyticsEvent,
42
42
  checks: [new ExperienceCheckTimeout({
43
43
  durationMs: 1000,
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
3
3
  import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS, TRACK_CHANGES_SECTION, OVERFLOW_EXTENSIONS_MENU_SECTION, OVERFLOW_MENU_RANK } from '@atlaskit/editor-common/toolbar';
4
- import { PrimaryToolbar as PrimaryToolbarBase, Show, Toolbar } from '@atlaskit/editor-toolbar';
4
+ import { Show, Toolbar } from '@atlaskit/editor-toolbar';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import { SELECTION_TOOLBAR_LABEL } from './consts';
8
7
  import { OverflowMenu } from './OverflowMenu';
9
8
  import { OverflowMenuSection } from './OverflowMenuSection';
@@ -30,15 +29,10 @@ const getPrimaryToolbarComponents = breakpointPreset => {
30
29
  return [{
31
30
  type: 'toolbar',
32
31
  key: TOOLBARS.PRIMARY_TOOLBAR,
33
- component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
32
+ component: ({
34
33
  children
35
34
  }) => /*#__PURE__*/React.createElement(PrimaryToolbar, {
36
35
  breakpointPreset: breakpointPreset
37
- }, children) : ({
38
- children
39
- }) => /*#__PURE__*/React.createElement(PrimaryToolbarBase, {
40
- label: "Primary Toolbar",
41
- testId: "primary-toolbar"
42
36
  }, children)
43
37
  }];
44
38
  };
@@ -55,20 +49,13 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
55
49
  children,
56
50
  parents
57
51
  }) => {
58
- if (expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
59
- return /*#__PURE__*/React.createElement(Show, {
60
- above: "md"
61
- }, /*#__PURE__*/React.createElement(Section, {
62
- parents: parents,
63
- api: api,
64
- testId: "text-section"
65
- }, children));
66
- }
67
- return /*#__PURE__*/React.createElement(Section, {
52
+ return /*#__PURE__*/React.createElement(Show, {
53
+ above: "md"
54
+ }, /*#__PURE__*/React.createElement(Section, {
68
55
  parents: parents,
69
56
  api: api,
70
57
  testId: "text-section"
71
- }, children);
58
+ }, children));
72
59
  }
73
60
  }, {
74
61
  type: TEXT_SECTION_PRIMARY_TOOLBAR.type,
@@ -82,29 +69,22 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
82
69
  children,
83
70
  parents
84
71
  }) => {
85
- if (expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
86
- return /*#__PURE__*/React.createElement(Show, {
87
- above: "md"
88
- }, /*#__PURE__*/React.createElement(Section, {
89
- parents: parents,
90
- api: api,
91
- testId: "text-section"
92
- }, children));
93
- }
94
- return /*#__PURE__*/React.createElement(Section, {
72
+ return /*#__PURE__*/React.createElement(Show, {
73
+ above: "md"
74
+ }, /*#__PURE__*/React.createElement(Section, {
95
75
  parents: parents,
96
76
  api: api,
97
77
  testId: "text-section"
98
- }, children);
78
+ }, children));
99
79
  }
100
- }, ...(expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? [{
80
+ }, {
101
81
  type: TEXT_SECTION_COLLAPSED.type,
102
82
  key: TEXT_SECTION_COLLAPSED.key,
103
83
  parents: [{
104
84
  type: 'toolbar',
105
85
  key: TOOLBARS.PRIMARY_TOOLBAR,
106
86
  rank: TOOLBAR_RANK[TEXT_SECTION_COLLAPSED.key]
107
- }, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) && {
87
+ }, {
108
88
  type: 'toolbar',
109
89
  key: TOOLBARS.INLINE_TEXT_TOOLBAR,
110
90
  rank: TOOLBAR_RANK[TEXT_SECTION_COLLAPSED.key]
@@ -138,7 +118,7 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
138
118
  rank: 100
139
119
  }],
140
120
  component: TextCollapsedMenu
141
- }] : []), {
121
+ }, {
142
122
  type: INSERT_BLOCK_SECTION.type,
143
123
  key: INSERT_BLOCK_SECTION.key,
144
124
  parents: [{
@@ -1,16 +1,16 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { Experience, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
2
+ import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
5
  var pluginKey = new PluginKey('selectionToolbarOpenExperience');
6
6
  var START_METHOD = {
7
- MOUSE_UP: 'mouse-up',
8
- KEY_DOWN: 'key-down'
7
+ MOUSE_UP: 'mouseUp',
8
+ KEY_DOWN: 'keyDown'
9
9
  };
10
10
  var ABORT_REASON = {
11
- SELECTION_CLEARED: 'selection-cleared',
12
- BLOCK_MENU_OPENED: 'block-menu-opened',
13
- EDITOR_DESTROYED: 'editor-destroyed'
11
+ SELECTION_CLEARED: 'selectionCleared',
12
+ BLOCK_MENU_OPENED: 'blockMenuOpened',
13
+ EDITOR_DESTROYED: 'editorDestroyed'
14
14
  };
15
15
  /**
16
16
  * This experience tracks when the selection toolbar is opened.
@@ -36,8 +36,8 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
36
36
  }
37
37
  return targetEl;
38
38
  };
39
- var experience = new Experience('toolbar-open', {
40
- actionSubjectId: 'selection-toolbar',
39
+ var experience = new Experience(EXPERIENCE_ID.TOOLBAR_OPEN, {
40
+ actionSubjectId: 'selectionToolbar',
41
41
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
42
42
  checks: [new ExperienceCheckTimeout({
43
43
  durationMs: 1000,
@@ -2,9 +2,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import React from 'react';
3
3
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
4
4
  import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS, TRACK_CHANGES_SECTION, OVERFLOW_EXTENSIONS_MENU_SECTION, OVERFLOW_MENU_RANK } from '@atlaskit/editor-common/toolbar';
5
- import { PrimaryToolbar as PrimaryToolbarBase, Show, Toolbar } from '@atlaskit/editor-toolbar';
5
+ import { Show, Toolbar } from '@atlaskit/editor-toolbar';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { SELECTION_TOOLBAR_LABEL } from './consts';
9
8
  import { OverflowMenu } from './OverflowMenu';
10
9
  import { OverflowMenuSection } from './OverflowMenuSection';
@@ -30,17 +29,11 @@ var getPrimaryToolbarComponents = function getPrimaryToolbarComponents(breakpoin
30
29
  return [{
31
30
  type: 'toolbar',
32
31
  key: TOOLBARS.PRIMARY_TOOLBAR,
33
- component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref2) {
32
+ component: function component(_ref2) {
34
33
  var children = _ref2.children;
35
34
  return /*#__PURE__*/React.createElement(PrimaryToolbar, {
36
35
  breakpointPreset: breakpointPreset
37
36
  }, children);
38
- } : function (_ref3) {
39
- var children = _ref3.children;
40
- return /*#__PURE__*/React.createElement(PrimaryToolbarBase, {
41
- label: "Primary Toolbar",
42
- testId: "primary-toolbar"
43
- }, children);
44
37
  }
45
38
  }];
46
39
  };
@@ -53,23 +46,16 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
53
46
  key: TOOLBARS.INLINE_TEXT_TOOLBAR,
54
47
  rank: TOOLBAR_RANK[TEXT_SECTION.key]
55
48
  }],
56
- component: function component(_ref4) {
57
- var children = _ref4.children,
58
- parents = _ref4.parents;
59
- if (expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
60
- return /*#__PURE__*/React.createElement(Show, {
61
- above: "md"
62
- }, /*#__PURE__*/React.createElement(Section, {
63
- parents: parents,
64
- api: api,
65
- testId: "text-section"
66
- }, children));
67
- }
68
- return /*#__PURE__*/React.createElement(Section, {
49
+ component: function component(_ref3) {
50
+ var children = _ref3.children,
51
+ parents = _ref3.parents;
52
+ return /*#__PURE__*/React.createElement(Show, {
53
+ above: "md"
54
+ }, /*#__PURE__*/React.createElement(Section, {
69
55
  parents: parents,
70
56
  api: api,
71
57
  testId: "text-section"
72
- }, children);
58
+ }, children));
73
59
  }
74
60
  }, {
75
61
  type: TEXT_SECTION_PRIMARY_TOOLBAR.type,
@@ -79,39 +65,32 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
79
65
  key: TOOLBARS.PRIMARY_TOOLBAR,
80
66
  rank: TOOLBAR_RANK[TEXT_SECTION.key]
81
67
  }],
82
- component: function component(_ref5) {
83
- var children = _ref5.children,
84
- parents = _ref5.parents;
85
- if (expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true)) {
86
- return /*#__PURE__*/React.createElement(Show, {
87
- above: "md"
88
- }, /*#__PURE__*/React.createElement(Section, {
89
- parents: parents,
90
- api: api,
91
- testId: "text-section"
92
- }, children));
93
- }
94
- return /*#__PURE__*/React.createElement(Section, {
68
+ component: function component(_ref4) {
69
+ var children = _ref4.children,
70
+ parents = _ref4.parents;
71
+ return /*#__PURE__*/React.createElement(Show, {
72
+ above: "md"
73
+ }, /*#__PURE__*/React.createElement(Section, {
95
74
  parents: parents,
96
75
  api: api,
97
76
  testId: "text-section"
98
- }, children);
77
+ }, children));
99
78
  }
100
- }].concat(_toConsumableArray(expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? [{
79
+ }, {
101
80
  type: TEXT_SECTION_COLLAPSED.type,
102
81
  key: TEXT_SECTION_COLLAPSED.key,
103
82
  parents: [{
104
83
  type: 'toolbar',
105
84
  key: TOOLBARS.PRIMARY_TOOLBAR,
106
85
  rank: TOOLBAR_RANK[TEXT_SECTION_COLLAPSED.key]
107
- }, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) && {
86
+ }, {
108
87
  type: 'toolbar',
109
88
  key: TOOLBARS.INLINE_TEXT_TOOLBAR,
110
89
  rank: TOOLBAR_RANK[TEXT_SECTION_COLLAPSED.key]
111
90
  }],
112
- component: function component(_ref6) {
113
- var children = _ref6.children,
114
- parents = _ref6.parents;
91
+ component: function component(_ref5) {
92
+ var children = _ref5.children,
93
+ parents = _ref5.parents;
115
94
  return /*#__PURE__*/React.createElement(Show, {
116
95
  below: "md"
117
96
  }, /*#__PURE__*/React.createElement(Section, {
@@ -137,7 +116,7 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
137
116
  rank: 100
138
117
  }],
139
118
  component: TextCollapsedMenu
140
- }] : []), [{
119
+ }, {
141
120
  type: INSERT_BLOCK_SECTION.type,
142
121
  key: INSERT_BLOCK_SECTION.key,
143
122
  parents: [{
@@ -145,9 +124,9 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
145
124
  key: TOOLBARS.PRIMARY_TOOLBAR,
146
125
  rank: TOOLBAR_RANK[INSERT_BLOCK_SECTION.key]
147
126
  }],
148
- component: function component(_ref7) {
149
- var children = _ref7.children,
150
- parents = _ref7.parents;
127
+ component: function component(_ref6) {
128
+ var children = _ref6.children,
129
+ parents = _ref6.parents;
151
130
  return /*#__PURE__*/React.createElement(Section, {
152
131
  testId: "insert-block-section",
153
132
  parents: parents,
@@ -168,9 +147,9 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
168
147
  key: TOOLBARS.PRIMARY_TOOLBAR,
169
148
  rank: TOOLBAR_RANK[LINKING_SECTION.key]
170
149
  }],
171
- component: function component(_ref8) {
172
- var children = _ref8.children,
173
- parents = _ref8.parents;
150
+ component: function component(_ref7) {
151
+ var children = _ref7.children,
152
+ parents = _ref7.parents;
174
153
  return /*#__PURE__*/React.createElement(Section, {
175
154
  testId: "link-section",
176
155
  parents: parents,
@@ -202,8 +181,8 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
202
181
  key: OVERFLOW_GROUP.key,
203
182
  rank: OVERFLOW_GROUP_RANK[OVERFLOW_MENU.key]
204
183
  }],
205
- component: function component(_ref9) {
206
- var children = _ref9.children;
184
+ component: function component(_ref8) {
185
+ var children = _ref8.children;
207
186
  return /*#__PURE__*/React.createElement(OverflowMenu, null, children);
208
187
  }
209
188
  }, {
@@ -223,9 +202,9 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
223
202
  key: TOOLBARS.PRIMARY_TOOLBAR,
224
203
  rank: TOOLBAR_RANK[PIN_SECTION.key]
225
204
  }],
226
- component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref0) {
227
- var children = _ref0.children,
228
- parents = _ref0.parents;
205
+ component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref9) {
206
+ var children = _ref9.children,
207
+ parents = _ref9.parents;
229
208
  return /*#__PURE__*/React.createElement(Section, {
230
209
  testId: "pin-section",
231
210
  parents: parents,
@@ -233,7 +212,7 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
233
212
  showSeparatorInFullPagePrimaryToolbar: true
234
213
  }, children);
235
214
  } : undefined
236
- }]);
215
+ }];
237
216
  components.push({
238
217
  type: OVERFLOW_SECTION_PRIMARY_TOOLBAR.type,
239
218
  key: OVERFLOW_SECTION_PRIMARY_TOOLBAR.key,
@@ -242,8 +221,8 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
242
221
  key: TOOLBARS.PRIMARY_TOOLBAR,
243
222
  rank: TOOLBAR_RANK[OVERFLOW_SECTION_PRIMARY_TOOLBAR.key]
244
223
  }],
245
- component: function component(_ref1) {
246
- var children = _ref1.children;
224
+ component: function component(_ref0) {
225
+ var children = _ref0.children;
247
226
  return /*#__PURE__*/React.createElement(OverflowSection, null, children);
248
227
  }
249
228
  }, {
@@ -262,8 +241,8 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
262
241
  key: OVERFLOW_GROUP_PRIMARY_TOOLBAR.key,
263
242
  rank: OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK[OVERFLOW_MENU_PRIMARY_TOOLBAR.key]
264
243
  }],
265
- component: function component(_ref10) {
266
- var children = _ref10.children;
244
+ component: function component(_ref1) {
245
+ var children = _ref1.children;
267
246
  return /*#__PURE__*/React.createElement(OverflowMenu, null, children);
268
247
  }
269
248
  });
@@ -288,9 +267,9 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
288
267
  key: TOOLBARS.PRIMARY_TOOLBAR,
289
268
  rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
290
269
  }],
291
- component: function component(_ref11) {
292
- var children = _ref11.children,
293
- parents = _ref11.parents;
270
+ component: function component(_ref10) {
271
+ var children = _ref10.children,
272
+ parents = _ref10.parents;
294
273
  return /*#__PURE__*/React.createElement(Section, {
295
274
  testId: "track-changes-section",
296
275
  parents: parents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,13 +39,13 @@
39
39
  "@atlaskit/editor-toolbar": "^0.19.0",
40
40
  "@atlaskit/editor-toolbar-model": "^0.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^16.30.0",
42
+ "@atlaskit/tmp-editor-statsig": "^16.35.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "bind-event-listener": "^3.0.0",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^111.8.0",
48
+ "@atlaskit/editor-common": "^111.9.0",
49
49
  "react": "^18.2.0"
50
50
  },
51
51
  "platform-feature-flags": {