@atlaskit/editor-plugin-block-controls 8.6.1 → 8.6.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,19 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 8.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.6.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ddbc57daa880f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ddbc57daa880f) -
14
+ EDITOR-4477 Removed the heading with alignment patch in the newGetSelection
15
+ - Updated dependencies
16
+
3
17
  ## 8.6.1
4
18
 
5
19
  ### Patch Changes
@@ -9,6 +9,7 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _utils = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _utils2 = require("@atlaskit/editor-tables/utils");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
13
14
  var getInlineNodePos = exports.getInlineNodePos = function getInlineNodePos(doc, start, nodeSize) {
14
15
  var $startPos = doc.resolve(start);
@@ -108,7 +109,7 @@ var newGetSelection = exports.newGetSelection = function newGetSelection(doc, se
108
109
  // Results in block menu not open on the first 2 clicks for a heading with alignment nested inside a layout column
109
110
  if (nodeName === 'heading' && node !== null && node !== void 0 && node.marks.some(function (mark) {
110
111
  return mark.type.name === 'alignment';
111
- }) && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn') {
112
+ }) && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn' && !(0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3')) {
112
113
  return _state.TextSelection.create(doc, start, start + nodeSize);
113
114
  }
114
115
  return new _state.NodeSelection(doc.resolve(start));
@@ -3,6 +3,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
3
3
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
8
  export const getInlineNodePos = (doc, start, nodeSize) => {
8
9
  const $startPos = doc.resolve(start);
@@ -101,7 +102,7 @@ export const newGetSelection = (doc, selectionEmpty, start) => {
101
102
  // if heading with alignment nested inside a layout column, return TextSelection
102
103
  // As NodeSelection cause the desc.selectNode is not a function error in the syncNodeSelection in prosemirror view
103
104
  // Results in block menu not open on the first 2 clicks for a heading with alignment nested inside a layout column
104
- if (nodeName === 'heading' && node !== null && node !== void 0 && node.marks.some(mark => mark.type.name === 'alignment') && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn') {
105
+ if (nodeName === 'heading' && node !== null && node !== void 0 && node.marks.some(mark => mark.type.name === 'alignment') && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn' && !fg('platform_editor_block_menu_v2_patch_3')) {
105
106
  return TextSelection.create(doc, start, start + nodeSize);
106
107
  }
107
108
  return new NodeSelection(doc.resolve(start));
@@ -3,6 +3,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
3
3
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
8
  export var getInlineNodePos = function getInlineNodePos(doc, start, nodeSize) {
8
9
  var $startPos = doc.resolve(start);
@@ -102,7 +103,7 @@ export var newGetSelection = function newGetSelection(doc, selectionEmpty, start
102
103
  // Results in block menu not open on the first 2 clicks for a heading with alignment nested inside a layout column
103
104
  if (nodeName === 'heading' && node !== null && node !== void 0 && node.marks.some(function (mark) {
104
105
  return mark.type.name === 'alignment';
105
- }) && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn') {
106
+ }) && ((_doc$nodeAt = doc.nodeAt(start - 1)) === null || _doc$nodeAt === void 0 ? void 0 : _doc$nodeAt.type.name) === 'layoutColumn' && !fg('platform_editor_block_menu_v2_patch_3')) {
106
107
  return TextSelection.create(doc, start, start + nodeSize);
107
108
  }
108
109
  return new NodeSelection(doc.resolve(start));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "8.6.1",
3
+ "version": "8.6.3",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^18.0.0",
58
58
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^29.6.0",
59
+ "@atlaskit/tmp-editor-statsig": "^31.0.0",
60
60
  "@atlaskit/tokens": "^11.0.0",
61
61
  "@atlaskit/tooltip": "^20.14.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -138,6 +138,9 @@
138
138
  "platform_editor_content_mode_button_mvp": {
139
139
  "type": "boolean"
140
140
  },
141
+ "platform_editor_block_menu_v2_patch_3": {
142
+ "type": "boolean"
143
+ },
141
144
  "platform_editor_table_sticky_header_patch_6": {
142
145
  "type": "boolean"
143
146
  },