@atlaskit/editor-plugin-text-formatting 6.0.2 → 6.0.4

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,19 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 6.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`2f81c0f3bf21d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f81c0f3bf21d) -
14
+ [ux] ED-29318 [CR-6b] Add new toolbar icons to comment editor
15
+ - Updated dependencies
16
+
3
17
  ## 6.0.2
4
18
 
5
19
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.textFormattingMenuGroup = void 0;
7
+ exports.textFormattingMenuGroup = exports.getFormatMenuItems = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireDefault(require("react"));
@@ -13,7 +13,7 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  var _Component = require("./Component");
15
15
  var _utils = require("./utils");
16
- var getFormatMenuItems = function getFormatMenuItems(api) {
16
+ var getFormatMenuItems = exports.getFormatMenuItems = function getFormatMenuItems(api) {
17
17
  return Object.entries((0, _utils.formatOptions)()).map(function (_ref) {
18
18
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
19
19
  optionType = _ref2[0],
@@ -77,7 +77,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
77
77
  rank: _toolbar.TEXT_COLLAPSED_MENU_RANK[_toolbar.TEXT_FORMATTING_MENU_SECTION.key]
78
78
  }] : [])),
79
79
  component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? _Component.MenuSection : undefined
80
- }, {
80
+ }].concat((0, _toConsumableArray2.default)((0, _TextFormattingMenuGroup.getFormatMenuItems)(api)), [{
81
81
  type: _toolbar.CLEAR_FORMARTTING_MENU_SECTION.type,
82
82
  key: _toolbar.CLEAR_FORMARTTING_MENU_SECTION.key,
83
83
  parents: [{
@@ -110,7 +110,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
110
110
  api: api
111
111
  }));
112
112
  }
113
- }];
113
+ }]);
114
114
  };
115
115
  var getToolbarComponentsResponsivenessUpdate = exports.getToolbarComponentsResponsivenessUpdate = function getToolbarComponentsResponsivenessUpdate(api) {
116
116
  return [].concat((0, _toConsumableArray2.default)((0, _TextFormattingGroups.textFormattingGroupForPrimaryToolbar)(api)), (0, _toConsumableArray2.default)((0, _TextFormattingGroupForInlineToolbar.textFormattingGroupForInlineToolbar)(api)), (0, _toConsumableArray2.default)((0, _BoldButtonGroup.boldButtonGroup)(api)), (0, _toConsumableArray2.default)((0, _UnderlineButtonGroup.underlineButtonGroup)(api)), (0, _toConsumableArray2.default)((0, _TextFormattingMenuGroup.textFormattingMenuGroup)(api)));
@@ -4,7 +4,7 @@ import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
4
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { ClearFormatMenuItem, MoreFormattingMenu, MenuSection, FormatMenuItem } from './Component';
6
6
  import { formatOptions } from './utils';
7
- const getFormatMenuItems = api => {
7
+ export const getFormatMenuItems = api => {
8
8
  return Object.entries(formatOptions()).map(([optionType, {
9
9
  icon,
10
10
  shortcut,
@@ -6,7 +6,7 @@ import { boldButtonGroup } from './Toolbar/components/BoldButtonGroup';
6
6
  import { FormatButton, ClearFormatMenuItem, MoreFormattingMenu, MenuSection } from './Toolbar/components/Component';
7
7
  import { textFormattingGroupForInlineToolbar } from './Toolbar/components/TextFormattingGroupForInlineToolbar';
8
8
  import { textFormattingGroupForPrimaryToolbar } from './Toolbar/components/TextFormattingGroups';
9
- import { textFormattingMenuGroup } from './Toolbar/components/TextFormattingMenuGroup';
9
+ import { textFormattingMenuGroup, getFormatMenuItems } from './Toolbar/components/TextFormattingMenuGroup';
10
10
  import { underlineButtonGroup } from './Toolbar/components/UnderlineButtonGroup';
11
11
  import { formatOptions } from './Toolbar/components/utils';
12
12
  import { FormatOptions } from './Toolbar/types';
@@ -71,7 +71,7 @@ export const getToolbarComponents = api => expValEquals('platform_editor_toolbar
71
71
  rank: TEXT_COLLAPSED_MENU_RANK[TEXT_FORMATTING_MENU_SECTION.key]
72
72
  }] : [])],
73
73
  component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? MenuSection : undefined
74
- }, {
74
+ }, ...getFormatMenuItems(api), {
75
75
  type: CLEAR_FORMARTTING_MENU_SECTION.type,
76
76
  key: CLEAR_FORMARTTING_MENU_SECTION.key,
77
77
  parents: [{
@@ -6,7 +6,7 @@ import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
7
  import { ClearFormatMenuItem, MoreFormattingMenu, MenuSection, FormatMenuItem } from './Component';
8
8
  import { formatOptions } from './utils';
9
- var getFormatMenuItems = function getFormatMenuItems(api) {
9
+ export var getFormatMenuItems = function getFormatMenuItems(api) {
10
10
  return Object.entries(formatOptions()).map(function (_ref) {
11
11
  var _ref2 = _slicedToArray(_ref, 2),
12
12
  optionType = _ref2[0],
@@ -7,7 +7,7 @@ import { boldButtonGroup } from './Toolbar/components/BoldButtonGroup';
7
7
  import { FormatButton, ClearFormatMenuItem, MoreFormattingMenu, MenuSection } from './Toolbar/components/Component';
8
8
  import { textFormattingGroupForInlineToolbar } from './Toolbar/components/TextFormattingGroupForInlineToolbar';
9
9
  import { textFormattingGroupForPrimaryToolbar } from './Toolbar/components/TextFormattingGroups';
10
- import { textFormattingMenuGroup } from './Toolbar/components/TextFormattingMenuGroup';
10
+ import { textFormattingMenuGroup, getFormatMenuItems } from './Toolbar/components/TextFormattingMenuGroup';
11
11
  import { underlineButtonGroup } from './Toolbar/components/UnderlineButtonGroup';
12
12
  import { formatOptions } from './Toolbar/components/utils';
13
13
  import { FormatOptions } from './Toolbar/types';
@@ -70,7 +70,7 @@ export var getToolbarComponents = function getToolbarComponents(api) {
70
70
  rank: TEXT_COLLAPSED_MENU_RANK[TEXT_FORMATTING_MENU_SECTION.key]
71
71
  }] : [])),
72
72
  component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? MenuSection : undefined
73
- }, {
73
+ }].concat(_toConsumableArray(getFormatMenuItems(api)), [{
74
74
  type: CLEAR_FORMARTTING_MENU_SECTION.type,
75
75
  key: CLEAR_FORMARTTING_MENU_SECTION.key,
76
76
  parents: [{
@@ -103,7 +103,7 @@ export var getToolbarComponents = function getToolbarComponents(api) {
103
103
  api: api
104
104
  }));
105
105
  }
106
- }];
106
+ }]);
107
107
  };
108
108
  export var getToolbarComponentsResponsivenessUpdate = function getToolbarComponentsResponsivenessUpdate(api) {
109
109
  return [].concat(_toConsumableArray(textFormattingGroupForPrimaryToolbar(api)), _toConsumableArray(textFormattingGroupForInlineToolbar(api)), _toConsumableArray(boldButtonGroup(api)), _toConsumableArray(underlineButtonGroup(api)), _toConsumableArray(textFormattingMenuGroup(api)));
@@ -1,4 +1,5 @@
1
1
  import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import { type RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
3
  import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
4
+ export declare const getFormatMenuItems: (api?: ExtractInjectionAPI<TextFormattingPlugin>) => RegisterComponent[];
4
5
  export declare const textFormattingMenuGroup: (api?: ExtractInjectionAPI<TextFormattingPlugin>) => RegisterComponent[];
@@ -1,4 +1,5 @@
1
1
  import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import { type RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
3
  import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
4
+ export declare const getFormatMenuItems: (api?: ExtractInjectionAPI<TextFormattingPlugin>) => RegisterComponent[];
4
5
  export declare const textFormattingMenuGroup: (api?: ExtractInjectionAPI<TextFormattingPlugin>) => RegisterComponent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/icon": "^28.3.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
46
- "@atlaskit/tmp-editor-statsig": "^12.33.0",
46
+ "@atlaskit/tmp-editor-statsig": "^13.0.0",
47
47
  "@atlaskit/tokens": "^6.4.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@emotion/react": "^11.7.1",