@atlaskit/editor-plugin-block-type 5.2.3 → 5.2.5

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,22 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 5.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#176627](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176627)
8
+ [`fe6d06a268e3b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fe6d06a268e3b) -
9
+ Add support for future versions for react-intl
10
+ - Updated dependencies
11
+
12
+ ## 5.2.4
13
+
14
+ ### Patch Changes
15
+
16
+ - [#173846](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173846)
17
+ [`852a3c0aec64b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/852a3c0aec64b) -
18
+ Clean up platform_editor_controls_patch_10
19
+
3
20
  ## 5.2.3
4
21
 
5
22
  ### Patch Changes
@@ -85,7 +85,11 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
85
85
  var isActive = currentBlockType === blockType;
86
86
  var tagName = blockType.tagName || 'p';
87
87
  var Tag = tagName;
88
- var keyMap = (0, _keymaps.findKeymapByDescription)(blockType.title.defaultMessage);
88
+ var defaultMessage = Array.isArray(blockType.title.defaultMessage) ? blockType.title.defaultMessage.find(function (message) {
89
+ return 'value' in message;
90
+ }) : blockType.title.defaultMessage;
91
+ var description = typeof defaultMessage === 'string' ? defaultMessage : defaultMessage && 'value' in defaultMessage ? defaultMessage.value : '';
92
+ var keyMap = (0, _keymaps.findKeymapByDescription)(description);
89
93
  var icon = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? blockType === null || blockType === void 0 ? void 0 : blockType.icon : blockType.LEGACY_icon;
90
94
  var item = {
91
95
  content:
@@ -290,7 +294,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
290
294
  formatMessage: formatMessage,
291
295
  "aria-expanded": active,
292
296
  blockTypeName: currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name,
293
- blockTypeIcon: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_10') ? currentIcon || defaultIcon : undefined
297
+ blockTypeIcon: currentIcon || defaultIcon
294
298
  }), !(api !== null && api !== void 0 && api.primaryToolbar) && (0, _react2.jsx)("span", {
295
299
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
296
300
  css: _styles.separatorStyles
@@ -71,7 +71,9 @@ class ToolbarBlockType extends React.PureComponent {
71
71
  const isActive = currentBlockType === blockType;
72
72
  const tagName = blockType.tagName || 'p';
73
73
  const Tag = tagName;
74
- const keyMap = findKeymapByDescription(blockType.title.defaultMessage);
74
+ const defaultMessage = Array.isArray(blockType.title.defaultMessage) ? blockType.title.defaultMessage.find(message => 'value' in message) : blockType.title.defaultMessage;
75
+ const description = typeof defaultMessage === 'string' ? defaultMessage : defaultMessage && 'value' in defaultMessage ? defaultMessage.value : '';
76
+ const keyMap = findKeymapByDescription(description);
75
77
  const icon = fg('platform_editor_controls_patch_4') ? blockType === null || blockType === void 0 ? void 0 : blockType.icon : blockType.LEGACY_icon;
76
78
  const item = {
77
79
  content:
@@ -263,7 +265,7 @@ class ToolbarBlockType extends React.PureComponent {
263
265
  formatMessage: formatMessage,
264
266
  "aria-expanded": active,
265
267
  blockTypeName: currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name,
266
- blockTypeIcon: fg('platform_editor_controls_patch_10') ? currentIcon || defaultIcon : undefined
268
+ blockTypeIcon: currentIcon || defaultIcon
267
269
  }), !(api !== null && api !== void 0 && api.primaryToolbar) && jsx("span", {
268
270
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
269
271
  css: separatorStyles
@@ -81,7 +81,11 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
81
81
  var isActive = currentBlockType === blockType;
82
82
  var tagName = blockType.tagName || 'p';
83
83
  var Tag = tagName;
84
- var keyMap = findKeymapByDescription(blockType.title.defaultMessage);
84
+ var defaultMessage = Array.isArray(blockType.title.defaultMessage) ? blockType.title.defaultMessage.find(function (message) {
85
+ return 'value' in message;
86
+ }) : blockType.title.defaultMessage;
87
+ var description = typeof defaultMessage === 'string' ? defaultMessage : defaultMessage && 'value' in defaultMessage ? defaultMessage.value : '';
88
+ var keyMap = findKeymapByDescription(description);
85
89
  var icon = fg('platform_editor_controls_patch_4') ? blockType === null || blockType === void 0 ? void 0 : blockType.icon : blockType.LEGACY_icon;
86
90
  var item = {
87
91
  content:
@@ -286,7 +290,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
286
290
  formatMessage: formatMessage,
287
291
  "aria-expanded": active,
288
292
  blockTypeName: currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name,
289
- blockTypeIcon: fg('platform_editor_controls_patch_10') ? currentIcon || defaultIcon : undefined
293
+ blockTypeIcon: currentIcon || defaultIcon
290
294
  }), !(api !== null && api !== void 0 && api.primaryToolbar) && jsx("span", {
291
295
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
292
296
  css: separatorStyles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "5.2.3",
3
+ "version": "5.2.5",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,21 +36,21 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@atlaskit/adf-schema": "^47.6.0",
39
- "@atlaskit/editor-common": "^107.0.0",
39
+ "@atlaskit/editor-common": "^107.2.0",
40
40
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
41
41
  "@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
42
42
  "@atlaskit/editor-plugin-selection-toolbar": "^3.7.0",
43
43
  "@atlaskit/editor-prosemirror": "7.0.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.4.0",
45
45
  "@atlaskit/editor-tables": "^2.9.0",
46
- "@atlaskit/icon": "^27.0.0",
46
+ "@atlaskit/icon": "^27.2.0",
47
47
  "@atlaskit/icon-lab": "^5.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/primitives": "^14.9.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
51
51
  "@atlaskit/theme": "^18.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^8.0.0",
53
- "@atlaskit/tokens": "^5.3.0",
52
+ "@atlaskit/tmp-editor-statsig": "^8.2.0",
53
+ "@atlaskit/tokens": "^5.4.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"
56
56
  },
@@ -114,9 +114,6 @@
114
114
  "platform_editor_nested_dnd_styles_changes": {
115
115
  "type": "boolean"
116
116
  },
117
- "platform_editor_controls_patch_10": {
118
- "type": "boolean"
119
- },
120
117
  "platform_editor_controls_patch_13": {
121
118
  "type": "boolean"
122
119
  },