@atlaskit/editor-plugin-toolbar 4.1.11 → 4.1.13

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.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b43aaf2b5d0ff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b43aaf2b5d0ff) -
8
+ Remove platform_editor_toolbar_aifc_undo_redo_confluence feature gate
9
+ - Updated dependencies
10
+
11
+ ## 4.1.12
12
+
13
+ ### Patch Changes
14
+
15
+ - [`fb3129f46e923`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fb3129f46e923) -
16
+ Update config options
17
+ - Updated dependencies
18
+
3
19
  ## 4.1.11
4
20
 
5
21
  ### Patch Changes
@@ -10,7 +10,6 @@ var _react = _interopRequireDefault(require("react"));
10
10
  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
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _consts = require("./consts");
15
14
  var _OverflowMenu = require("./OverflowMenu");
16
15
  var _OverflowMenuSection = require("./OverflowMenuSection");
@@ -209,7 +208,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
209
208
  key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
210
209
  rank: _toolbar.TOOLBAR_RANK[_toolbar.PIN_SECTION.key]
211
210
  }],
212
- component: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref9) {
211
+ component: function component(_ref9) {
213
212
  var children = _ref9.children,
214
213
  parents = _ref9.parents;
215
214
  return /*#__PURE__*/_react.default.createElement(_Section.Section, {
@@ -218,7 +217,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
218
217
  api: api,
219
218
  showSeparatorInFullPagePrimaryToolbar: true
220
219
  }, children);
221
- } : undefined
220
+ }
222
221
  }];
223
222
  components.push({
224
223
  type: _toolbar.OVERFLOW_SECTION_PRIMARY_TOOLBAR.type,
@@ -265,26 +264,24 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
265
264
  components.unshift.apply(components, (0, _toConsumableArray2.default)(getPrimaryToolbarComponents(breakpointPreset)));
266
265
  break;
267
266
  }
268
- if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence')) {
269
- components.push({
270
- type: _toolbar.TRACK_CHANGES_SECTION.type,
271
- key: _toolbar.TRACK_CHANGES_SECTION.key,
272
- parents: [{
273
- type: 'toolbar',
274
- key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
275
- rank: _toolbar.TOOLBAR_RANK[_toolbar.TRACK_CHANGES_SECTION.key]
276
- }],
277
- component: function component(_ref10) {
278
- var children = _ref10.children,
279
- parents = _ref10.parents;
280
- return /*#__PURE__*/_react.default.createElement(_Section.Section, {
281
- testId: "track-changes-section",
282
- parents: parents,
283
- api: api,
284
- showSeparatorInFullPagePrimaryToolbar: true
285
- }, children);
286
- }
287
- });
288
- }
267
+ components.push({
268
+ type: _toolbar.TRACK_CHANGES_SECTION.type,
269
+ key: _toolbar.TRACK_CHANGES_SECTION.key,
270
+ parents: [{
271
+ type: 'toolbar',
272
+ key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
273
+ rank: _toolbar.TOOLBAR_RANK[_toolbar.TRACK_CHANGES_SECTION.key]
274
+ }],
275
+ component: function component(_ref10) {
276
+ var children = _ref10.children,
277
+ parents = _ref10.parents;
278
+ return /*#__PURE__*/_react.default.createElement(_Section.Section, {
279
+ testId: "track-changes-section",
280
+ parents: parents,
281
+ api: api,
282
+ showSeparatorInFullPagePrimaryToolbar: true
283
+ }, children);
284
+ }
285
+ });
289
286
  return components;
290
287
  };
@@ -2,7 +2,6 @@ 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
4
  import { Show, Toolbar } from '@atlaskit/editor-toolbar';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { SELECTION_TOOLBAR_LABEL } from './consts';
7
6
  import { OverflowMenu } from './OverflowMenu';
8
7
  import { OverflowMenuSection } from './OverflowMenuSection';
@@ -203,7 +202,7 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
203
202
  key: TOOLBARS.PRIMARY_TOOLBAR,
204
203
  rank: TOOLBAR_RANK[PIN_SECTION.key]
205
204
  }],
206
- component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? ({
205
+ component: ({
207
206
  children,
208
207
  parents
209
208
  }) => {
@@ -213,7 +212,7 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
213
212
  api: api,
214
213
  showSeparatorInFullPagePrimaryToolbar: true
215
214
  }, children);
216
- } : undefined
215
+ }
217
216
  }];
218
217
  components.push({
219
218
  type: OVERFLOW_SECTION_PRIMARY_TOOLBAR.type,
@@ -262,27 +261,25 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, breakpoin
262
261
  components.unshift(...getPrimaryToolbarComponents(breakpointPreset));
263
262
  break;
264
263
  }
265
- if (fg('platform_editor_toolbar_aifc_undo_redo_confluence')) {
266
- components.push({
267
- type: TRACK_CHANGES_SECTION.type,
268
- key: TRACK_CHANGES_SECTION.key,
269
- parents: [{
270
- type: 'toolbar',
271
- key: TOOLBARS.PRIMARY_TOOLBAR,
272
- rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
273
- }],
274
- component: ({
275
- children,
276
- parents
277
- }) => {
278
- return /*#__PURE__*/React.createElement(Section, {
279
- testId: "track-changes-section",
280
- parents: parents,
281
- api: api,
282
- showSeparatorInFullPagePrimaryToolbar: true
283
- }, children);
284
- }
285
- });
286
- }
264
+ components.push({
265
+ type: TRACK_CHANGES_SECTION.type,
266
+ key: TRACK_CHANGES_SECTION.key,
267
+ parents: [{
268
+ type: 'toolbar',
269
+ key: TOOLBARS.PRIMARY_TOOLBAR,
270
+ rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
271
+ }],
272
+ component: ({
273
+ children,
274
+ parents
275
+ }) => {
276
+ return /*#__PURE__*/React.createElement(Section, {
277
+ testId: "track-changes-section",
278
+ parents: parents,
279
+ api: api,
280
+ showSeparatorInFullPagePrimaryToolbar: true
281
+ }, children);
282
+ }
283
+ });
287
284
  return components;
288
285
  };
@@ -3,7 +3,6 @@ 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
5
  import { Show, Toolbar } from '@atlaskit/editor-toolbar';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { SELECTION_TOOLBAR_LABEL } from './consts';
8
7
  import { OverflowMenu } from './OverflowMenu';
9
8
  import { OverflowMenuSection } from './OverflowMenuSection';
@@ -202,7 +201,7 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
202
201
  key: TOOLBARS.PRIMARY_TOOLBAR,
203
202
  rank: TOOLBAR_RANK[PIN_SECTION.key]
204
203
  }],
205
- component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref9) {
204
+ component: function component(_ref9) {
206
205
  var children = _ref9.children,
207
206
  parents = _ref9.parents;
208
207
  return /*#__PURE__*/React.createElement(Section, {
@@ -211,7 +210,7 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
211
210
  api: api,
212
211
  showSeparatorInFullPagePrimaryToolbar: true
213
212
  }, children);
214
- } : undefined
213
+ }
215
214
  }];
216
215
  components.push({
217
216
  type: OVERFLOW_SECTION_PRIMARY_TOOLBAR.type,
@@ -258,26 +257,24 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
258
257
  components.unshift.apply(components, _toConsumableArray(getPrimaryToolbarComponents(breakpointPreset)));
259
258
  break;
260
259
  }
261
- if (fg('platform_editor_toolbar_aifc_undo_redo_confluence')) {
262
- components.push({
263
- type: TRACK_CHANGES_SECTION.type,
264
- key: TRACK_CHANGES_SECTION.key,
265
- parents: [{
266
- type: 'toolbar',
267
- key: TOOLBARS.PRIMARY_TOOLBAR,
268
- rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
269
- }],
270
- component: function component(_ref10) {
271
- var children = _ref10.children,
272
- parents = _ref10.parents;
273
- return /*#__PURE__*/React.createElement(Section, {
274
- testId: "track-changes-section",
275
- parents: parents,
276
- api: api,
277
- showSeparatorInFullPagePrimaryToolbar: true
278
- }, children);
279
- }
280
- });
281
- }
260
+ components.push({
261
+ type: TRACK_CHANGES_SECTION.type,
262
+ key: TRACK_CHANGES_SECTION.key,
263
+ parents: [{
264
+ type: 'toolbar',
265
+ key: TOOLBARS.PRIMARY_TOOLBAR,
266
+ rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
267
+ }],
268
+ component: function component(_ref10) {
269
+ var children = _ref10.children,
270
+ parents = _ref10.parents;
271
+ return /*#__PURE__*/React.createElement(Section, {
272
+ testId: "track-changes-section",
273
+ parents: parents,
274
+ api: api,
275
+ showSeparatorInFullPagePrimaryToolbar: true
276
+ }, children);
277
+ }
278
+ });
282
279
  return components;
283
280
  };
@@ -30,7 +30,8 @@ export type ToolbarPlugin = NextEditorPlugin<'toolbar', {
30
30
  * @returns The active contextual formatting mode:
31
31
  * - `always-inline`: Formatting controls appear in a floating toolbar near selected text
32
32
  * - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
33
- * - `controlled`: Both inline and primary toolbars are available
33
+ * - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
34
+ * userPreferencesProvider to control the toolbar pinning.
34
35
  */
35
36
  contextualFormattingMode: () => ContextualFormattingEnabledOptions;
36
37
  /**
@@ -10,12 +10,21 @@ export type ToolbarPluginOptions = {
10
10
  * Controls which toolbars are available for in the editor.
11
11
  *
12
12
  * The contextual formatting toolbar provides text formatting options (bold, italic, links, etc.)
13
- * that appear contextually based on user selection and interaction.
13
+ * that appear contextually based on user selection.
14
+ *
15
+ * **Notes:**
16
+ * - The inline text toolbar has only been tested to work in the full-page and chromless editor appearances.
17
+ *
18
+ * **Options:**
19
+ * - `always-inline`: Formatting controls appear in a floating toolbar near selected text
20
+ * - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
21
+ * - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
22
+ * userPreferencesProvider to control the toolbar pinning.
14
23
  *
15
24
  * @remarks
16
25
  * This option determines where and when the formatting toolbar is displayed:
17
- * - **Primary Toolbar**: The toolbar mounted at the top of the editor that is always visible
18
- * - **Inline Text Toolbar**: A floating toolbar that appears near the selected text
26
+ * - **Primary toolbar**: The toolbar mounted at the top of the editor that is always visible
27
+ * - **Inline text toolbar**: A floating toolbar that appears near the selected text
19
28
  *
20
29
  * @example
21
30
  * ```tsx
@@ -35,6 +44,7 @@ export type ToolbarPluginOptions = {
35
44
  *
36
45
  * @example
37
46
  * ```tsx
47
+ * // Must have editor-plugin-selection-toolbar configured with userPreferencesProvider
38
48
  * // Allow dynamic control of toolbar placement (both inline and primary available)
39
49
  * const toolbarPlugin = createToolbarPlugin({
40
50
  * contextualFormattingEnabled: 'controlled',
@@ -30,7 +30,8 @@ export type ToolbarPlugin = NextEditorPlugin<'toolbar', {
30
30
  * @returns The active contextual formatting mode:
31
31
  * - `always-inline`: Formatting controls appear in a floating toolbar near selected text
32
32
  * - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
33
- * - `controlled`: Both inline and primary toolbars are available
33
+ * - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
34
+ * userPreferencesProvider to control the toolbar pinning.
34
35
  */
35
36
  contextualFormattingMode: () => ContextualFormattingEnabledOptions;
36
37
  /**
@@ -10,12 +10,21 @@ export type ToolbarPluginOptions = {
10
10
  * Controls which toolbars are available for in the editor.
11
11
  *
12
12
  * The contextual formatting toolbar provides text formatting options (bold, italic, links, etc.)
13
- * that appear contextually based on user selection and interaction.
13
+ * that appear contextually based on user selection.
14
+ *
15
+ * **Notes:**
16
+ * - The inline text toolbar has only been tested to work in the full-page and chromless editor appearances.
17
+ *
18
+ * **Options:**
19
+ * - `always-inline`: Formatting controls appear in a floating toolbar near selected text
20
+ * - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
21
+ * - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
22
+ * userPreferencesProvider to control the toolbar pinning.
14
23
  *
15
24
  * @remarks
16
25
  * This option determines where and when the formatting toolbar is displayed:
17
- * - **Primary Toolbar**: The toolbar mounted at the top of the editor that is always visible
18
- * - **Inline Text Toolbar**: A floating toolbar that appears near the selected text
26
+ * - **Primary toolbar**: The toolbar mounted at the top of the editor that is always visible
27
+ * - **Inline text toolbar**: A floating toolbar that appears near the selected text
19
28
  *
20
29
  * @example
21
30
  * ```tsx
@@ -35,6 +44,7 @@ export type ToolbarPluginOptions = {
35
44
  *
36
45
  * @example
37
46
  * ```tsx
47
+ * // Must have editor-plugin-selection-toolbar configured with userPreferencesProvider
38
48
  * // Allow dynamic control of toolbar placement (both inline and primary available)
39
49
  * const toolbarPlugin = createToolbarPlugin({
40
50
  * contextualFormattingEnabled: 'controlled',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "4.1.11",
3
+ "version": "4.1.13",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
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": "^21.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^22.1.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"
@@ -51,9 +51,6 @@
51
51
  "platform-feature-flags": {
52
52
  "platform_editor_toolbar_aifc_placement_overridden": {
53
53
  "type": "boolean"
54
- },
55
- "platform_editor_toolbar_aifc_undo_redo_confluence": {
56
- "type": "boolean"
57
54
  }
58
55
  },
59
56
  "techstack": {