@atlaskit/editor-plugin-block-type 12.1.6 → 12.1.8

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-block-type
2
2
 
3
+ ## 12.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.1.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
14
+ Replace feature experiment util with cross platform alternative for platform_editor_block_menu
15
+ - Updated dependencies
16
+
3
17
  ## 12.1.6
4
18
 
5
19
  ### Patch Changes
@@ -16,7 +16,6 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
16
16
  var _types = require("@atlaskit/editor-common/types");
17
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
18
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
20
19
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
21
20
  var _blockType = require("./pm-plugins/commands/block-type");
22
21
  var _inputRule = _interopRequireDefault(require("./pm-plugins/input-rule"));
@@ -139,7 +138,7 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
139
138
  component: primaryToolbarComponent
140
139
  });
141
140
  }
142
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
141
+ if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
143
142
  var _api$blockMenu;
144
143
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _ui.getBlockTypeComponents)(api));
145
144
  }
@@ -74,7 +74,9 @@ var BlockTypeButton = exports.BlockTypeButton = function BlockTypeButton(props)
74
74
  color: "currentColor",
75
75
  size: "small"
76
76
  }))))
77
- }, !shouldUseIconAsButton && (0, _react2.jsx)(_primitives.Box, {
77
+ }, !shouldUseIconAsButton && (0, _react2.jsx)(_primitives.Box
78
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
79
+ , {
78
80
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
79
81
  }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
80
82
  // Ignored via go/ees005
@@ -253,12 +253,15 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
253
253
  scrollableElement: popupsScrollableElement,
254
254
  zIndex: _editorSharedStyles.akEditorMenuZIndex,
255
255
  fitHeight: 360,
256
- fitWidth: 106,
256
+ fitWidth: 106
257
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
258
+ ,
257
259
  section: {
258
260
  hasSeparator: true
259
261
  },
260
262
  shouldUseDefaultRole: shouldUseDefaultRole
261
263
  // hasSeparator={true}
264
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
262
265
  ,
263
266
  shouldFocusFirstItem: function shouldFocusFirstItem() {
264
267
  if (isOpenedByKeyboard) {
@@ -7,7 +7,6 @@ import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
7
7
  import { ToolbarSize } from '@atlaskit/editor-common/types';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
11
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
11
  import { clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
13
12
  import inputRulePlugin from './pm-plugins/input-rule';
@@ -128,7 +127,7 @@ const blockTypePlugin = ({
128
127
  component: primaryToolbarComponent
129
128
  });
130
129
  }
131
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
130
+ if (editorExperiment('platform_editor_block_menu', true)) {
132
131
  var _api$blockMenu;
133
132
  api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api));
134
133
  }
@@ -65,7 +65,9 @@ export const BlockTypeButton = props => {
65
65
  color: "currentColor",
66
66
  size: "small"
67
67
  }))))
68
- }, !shouldUseIconAsButton && jsx(Box, {
68
+ }, !shouldUseIconAsButton && jsx(Box
69
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
70
+ , {
69
71
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
70
72
  }, jsx(FormattedMessage
71
73
  // Ignored via go/ees005
@@ -223,12 +223,15 @@ class ToolbarBlockType extends React.PureComponent {
223
223
  scrollableElement: popupsScrollableElement,
224
224
  zIndex: akEditorMenuZIndex,
225
225
  fitHeight: 360,
226
- fitWidth: 106,
226
+ fitWidth: 106
227
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
228
+ ,
227
229
  section: {
228
230
  hasSeparator: true
229
231
  },
230
232
  shouldUseDefaultRole: shouldUseDefaultRole
231
233
  // hasSeparator={true}
234
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
232
235
  ,
233
236
  shouldFocusFirstItem: () => {
234
237
  if (isOpenedByKeyboard) {
@@ -11,7 +11,6 @@ import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
11
11
  import { ToolbarSize } from '@atlaskit/editor-common/types';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
15
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
15
  import { clearFormatting as _clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
17
16
  import inputRulePlugin from './pm-plugins/input-rule';
@@ -132,7 +131,7 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
132
131
  component: primaryToolbarComponent
133
132
  });
134
133
  }
135
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
134
+ if (editorExperiment('platform_editor_block_menu', true)) {
136
135
  var _api$blockMenu;
137
136
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api));
138
137
  }
@@ -65,7 +65,9 @@ export var BlockTypeButton = function BlockTypeButton(props) {
65
65
  color: "currentColor",
66
66
  size: "small"
67
67
  }))))
68
- }, !shouldUseIconAsButton && jsx(Box, {
68
+ }, !shouldUseIconAsButton && jsx(Box
69
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
70
+ , {
69
71
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
70
72
  }, jsx(FormattedMessage
71
73
  // Ignored via go/ees005
@@ -249,12 +249,15 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
249
249
  scrollableElement: popupsScrollableElement,
250
250
  zIndex: akEditorMenuZIndex,
251
251
  fitHeight: 360,
252
- fitWidth: 106,
252
+ fitWidth: 106
253
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
254
+ ,
253
255
  section: {
254
256
  hasSeparator: true
255
257
  },
256
258
  shouldUseDefaultRole: shouldUseDefaultRole
257
259
  // hasSeparator={true}
260
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
258
261
  ,
259
262
  shouldFocusFirstItem: function shouldFocusFirstItem() {
260
263
  if (isOpenedByKeyboard) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "12.1.6",
3
+ "version": "12.1.8",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/prosemirror-history": "^0.2.0",
51
51
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
52
52
  "@atlaskit/theme": "^22.0.0",
53
- "@atlaskit/tmp-editor-statsig": "^43.0.0",
53
+ "@atlaskit/tmp-editor-statsig": "^44.0.0",
54
54
  "@atlaskit/tokens": "^11.1.0",
55
55
  "@babel/runtime": "^7.0.0",
56
56
  "@compiled/react": "^0.20.0",