@atlaskit/editor-plugin-block-controls 7.10.1 → 7.10.2

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,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 7.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41a91a916c125`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41a91a916c125) -
8
+ EDITOR-2846 Change platform_synced_block to use editorExperiment and add Jira experiment
9
+ - Updated dependencies
10
+
3
11
  ## 7.10.1
4
12
 
5
13
  ### Patch Changes
@@ -18,7 +18,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
18
18
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
19
19
  var _utils3 = require("@atlaskit/editor-tables/utils");
20
20
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
23
22
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
24
23
  var _main = require("../pm-plugins/main");
@@ -391,7 +390,7 @@ var moveNode = exports.moveNode = function moveNode(api) {
391
390
 
392
391
  // Currently we don't support breakout mark for children nodes of bodiedSyncBlock node
393
392
  // Hence strip out the mark for now
394
- if (destNode.type.name === 'bodiedSyncBlock' && (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
393
+ if (destNode.type.name === 'bodiedSyncBlock' && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
395
394
  var _convertedNodeSlice2;
396
395
  var nodes = [];
397
396
  (_convertedNodeSlice2 = convertedNodeSlice) === null || _convertedNodeSlice2 === void 0 || _convertedNodeSlice2.content.forEach(function (node) {
@@ -26,7 +26,7 @@ var PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK = [].concat(PARENT_WITH_END_DROP_TARG
26
26
  var NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
27
27
  var UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
28
28
  var isContainerNode = function isContainerNode(node) {
29
- if ((0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
29
+ if ((0, _experiments.editorExperiment)('platform_synced_block', true)) {
30
30
  return PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK.includes(node.type.name);
31
31
  }
32
32
  return PARENT_WITH_END_DROP_TARGET.includes(node.type.name);
@@ -213,7 +213,7 @@ var getActiveDropTargetDecorations = exports.getActiveDropTargetDecorations = fu
213
213
  }
214
214
  if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
215
215
  var _isSameLayout = $activeNodePos && (0, _validation.isInSameLayout)($activeNodePos, state.doc.resolve(rootNodeWithPos.pos));
216
- var hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true);
216
+ var hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && (0, _experiments.editorExperiment)('platform_synced_block', true);
217
217
  if (rootNodeWithPos.node.type.name === 'layoutSection' && !hasUnsupportedContent) {
218
218
  var layoutSectionNode = rootNodeWithPos.node;
219
219
  if (layoutSectionNode.childCount < (0, _consts.maxLayoutColumnSupported)() || _isSameLayout) {
@@ -556,7 +556,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
556
556
  isDragging: (_meta$isDragging3 = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging3 !== void 0 ? _meta$isDragging3 : isDragging,
557
557
  isMenuOpen: isMenuOpenNew,
558
558
  menuTriggerBy: flags.toolbarFlagsEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu = meta.toggleMenu) === null || _meta$toggleMenu === void 0 ? void 0 : _meta$toggleMenu.anchorName) || menuTriggerBy : undefined,
559
- menuTriggerByNode: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
559
+ menuTriggerByNode: (0, _experiments.editorExperiment)('platform_synced_block', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
560
560
  blockMenuOptions: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? {
561
561
  canMoveUp: (meta === null || meta === void 0 || (_meta$toggleMenu3 = meta.toggleMenu) === null || _meta$toggleMenu3 === void 0 ? void 0 : _meta$toggleMenu3.moveUp) !== undefined ? meta === null || meta === void 0 || (_meta$toggleMenu4 = meta.toggleMenu) === null || _meta$toggleMenu4 === void 0 ? void 0 : _meta$toggleMenu4.moveUp : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveUp,
562
562
  canMoveDown: (meta === null || meta === void 0 || (_meta$toggleMenu5 = meta.toggleMenu) === null || _meta$toggleMenu5 === void 0 ? void 0 : _meta$toggleMenu5.moveDown) !== undefined ? meta === null || meta === void 0 || (_meta$toggleMenu6 = meta.toggleMenu) === null || _meta$toggleMenu6 === void 0 ? void 0 : _meta$toggleMenu6.moveDown : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveDown,
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.shouldAllowInlineDropTarget = void 0;
7
7
  var _utils = require("@atlaskit/editor-common/utils");
8
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
8
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
10
9
  var _checkMediaLayout = require("./check-media-layout");
11
10
  var _consts = require("./consts");
@@ -22,7 +21,7 @@ var shouldAllowInlineDropTarget = exports.shouldAllowInlineDropTarget = function
22
21
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) === 'layoutSection') {
23
22
  return false;
24
23
  }
25
- if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
24
+ if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
26
25
  return false;
27
26
  }
28
27
  if ((node === null || node === void 0 ? void 0 : node.type.name) === 'layoutSection') {
@@ -448,7 +448,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
448
448
  api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || _api$blockControls2.commands.toggleBlockMenu({
449
449
  anchorName: anchorName,
450
450
  openedViaKeyboard: false,
451
- triggerByNode: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? {
451
+ triggerByNode: (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
452
452
  nodeType: nodeType,
453
453
  pos: startPos,
454
454
  rootPos: tr.doc.resolve(startPos).before(1)
@@ -490,7 +490,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
490
490
  } else {
491
491
  tr = (0, _getSelection.selectNode)(tr, startPos, nodeType, api);
492
492
  }
493
- var rootPos = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
493
+ var rootPos = (0, _experiments.editorExperiment)('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
494
494
  var triggerByNode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? {
495
495
  nodeType: nodeType,
496
496
  pos: startPos,
@@ -593,7 +593,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
593
593
  !isMultiSelect && tr.setMeta(_main.key, {
594
594
  pos: startPos
595
595
  });
596
- var rootPos = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
596
+ var rootPos = (0, _experiments.editorExperiment)('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
597
597
  var triggerByNode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? {
598
598
  nodeType: nodeType,
599
599
  pos: startPos,
@@ -10,7 +10,6 @@ import { Selection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
10
  import { findChildrenByType, findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
11
11
  import { findTable, isInTable, isTableSelected } from '@atlaskit/editor-tables/utils';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
13
  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 { key } from '../pm-plugins/main';
@@ -393,7 +392,7 @@ export const moveNode = api => (start, to, inputMethod = INPUT_METHOD.DRAG_AND_D
393
392
 
394
393
  // Currently we don't support breakout mark for children nodes of bodiedSyncBlock node
395
394
  // Hence strip out the mark for now
396
- if (destNode.type.name === 'bodiedSyncBlock' && expValEquals('platform_synced_block', 'isEnabled', true)) {
395
+ if (destNode.type.name === 'bodiedSyncBlock' && editorExperiment('platform_synced_block', true)) {
397
396
  var _convertedNodeSlice2;
398
397
  const nodes = [];
399
398
  (_convertedNodeSlice2 = convertedNodeSlice) === null || _convertedNodeSlice2 === void 0 ? void 0 : _convertedNodeSlice2.content.forEach(node => {
@@ -21,7 +21,7 @@ const PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK = [...PARENT_WITH_END_DROP_TARGET,
21
21
  const NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
22
22
  const UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
23
23
  const isContainerNode = node => {
24
- if (expValEquals('platform_synced_block', 'isEnabled', true)) {
24
+ if (editorExperiment('platform_synced_block', true)) {
25
25
  return PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK.includes(node.type.name);
26
26
  }
27
27
  return PARENT_WITH_END_DROP_TARGET.includes(node.type.name);
@@ -196,7 +196,7 @@ export const getActiveDropTargetDecorations = (activeDropTargetNode, state, api,
196
196
  }
197
197
  if (editorExperiment('advanced_layouts', true)) {
198
198
  const isSameLayout = $activeNodePos && isInSameLayout($activeNodePos, state.doc.resolve(rootNodeWithPos.pos));
199
- const hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && expValEquals('platform_synced_block', 'isEnabled', true);
199
+ const hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && editorExperiment('platform_synced_block', true);
200
200
  if (rootNodeWithPos.node.type.name === 'layoutSection' && !hasUnsupportedContent) {
201
201
  const layoutSectionNode = rootNodeWithPos.node;
202
202
  if (layoutSectionNode.childCount < maxLayoutColumnSupported() || isSameLayout) {
@@ -554,7 +554,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
554
554
  isDragging: (_meta$isDragging3 = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging3 !== void 0 ? _meta$isDragging3 : isDragging,
555
555
  isMenuOpen: isMenuOpenNew,
556
556
  menuTriggerBy: flags.toolbarFlagsEnabled || expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? (meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu = meta.toggleMenu) === null || _meta$toggleMenu === void 0 ? void 0 : _meta$toggleMenu.anchorName) || menuTriggerBy : undefined,
557
- menuTriggerByNode: expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? (meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
557
+ menuTriggerByNode: editorExperiment('platform_synced_block', true) ? (meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
558
558
  blockMenuOptions: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? {
559
559
  canMoveUp: (meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu3 = meta.toggleMenu) === null || _meta$toggleMenu3 === void 0 ? void 0 : _meta$toggleMenu3.moveUp) !== undefined ? meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu4 = meta.toggleMenu) === null || _meta$toggleMenu4 === void 0 ? void 0 : _meta$toggleMenu4.moveUp : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveUp,
560
560
  canMoveDown: (meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu5 = meta.toggleMenu) === null || _meta$toggleMenu5 === void 0 ? void 0 : _meta$toggleMenu5.moveDown) !== undefined ? meta === null || meta === void 0 ? void 0 : (_meta$toggleMenu6 = meta.toggleMenu) === null || _meta$toggleMenu6 === void 0 ? void 0 : _meta$toggleMenu6.moveDown : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveDown,
@@ -1,5 +1,4 @@
1
1
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { isWrappedMedia } from './check-media-layout';
5
4
  import { maxLayoutColumnSupported } from './consts';
@@ -18,7 +17,7 @@ isSameLayout = false, activeNode) => {
18
17
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) === 'layoutSection') {
19
18
  return false;
20
19
  }
21
- if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && expValEquals('platform_synced_block', 'isEnabled', true)) {
20
+ if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && editorExperiment('platform_synced_block', true)) {
22
21
  return false;
23
22
  }
24
23
  if ((node === null || node === void 0 ? void 0 : node.type.name) === 'layoutSection') {
@@ -426,7 +426,7 @@ export const DragHandle = ({
426
426
  api === null || api === void 0 ? void 0 : (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.commands.toggleBlockMenu({
427
427
  anchorName,
428
428
  openedViaKeyboard: false,
429
- triggerByNode: expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
429
+ triggerByNode: editorExperiment('platform_synced_block', true) ? {
430
430
  nodeType,
431
431
  pos: startPos,
432
432
  rootPos: tr.doc.resolve(startPos).before(1)
@@ -469,7 +469,7 @@ export const DragHandle = ({
469
469
  } else {
470
470
  tr = selectNode(tr, startPos, nodeType, api);
471
471
  }
472
- const rootPos = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
472
+ const rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
473
473
  const triggerByNode = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
474
474
  nodeType,
475
475
  pos: startPos,
@@ -572,7 +572,7 @@ export const DragHandle = ({
572
572
  !isMultiSelect && tr.setMeta(key, {
573
573
  pos: startPos
574
574
  });
575
- const rootPos = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
575
+ const rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
576
576
  const triggerByNode = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
577
577
  nodeType,
578
578
  pos: startPos,
@@ -13,7 +13,6 @@ import { Selection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { findChildrenByType, findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
14
14
  import { findTable, isInTable, isTableSelected } from '@atlaskit/editor-tables/utils';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
18
  import { key } from '../pm-plugins/main';
@@ -385,7 +384,7 @@ export var moveNode = function moveNode(api) {
385
384
 
386
385
  // Currently we don't support breakout mark for children nodes of bodiedSyncBlock node
387
386
  // Hence strip out the mark for now
388
- if (destNode.type.name === 'bodiedSyncBlock' && expValEquals('platform_synced_block', 'isEnabled', true)) {
387
+ if (destNode.type.name === 'bodiedSyncBlock' && editorExperiment('platform_synced_block', true)) {
389
388
  var _convertedNodeSlice2;
390
389
  var nodes = [];
391
390
  (_convertedNodeSlice2 = convertedNodeSlice) === null || _convertedNodeSlice2 === void 0 || _convertedNodeSlice2.content.forEach(function (node) {
@@ -21,7 +21,7 @@ var PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK = [].concat(PARENT_WITH_END_DROP_TARG
21
21
  var NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
22
22
  var UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
23
23
  var isContainerNode = function isContainerNode(node) {
24
- if (expValEquals('platform_synced_block', 'isEnabled', true)) {
24
+ if (editorExperiment('platform_synced_block', true)) {
25
25
  return PARENT_WITH_END_DROP_TARGET_SYNC_BLOCK.includes(node.type.name);
26
26
  }
27
27
  return PARENT_WITH_END_DROP_TARGET.includes(node.type.name);
@@ -208,7 +208,7 @@ export var getActiveDropTargetDecorations = function getActiveDropTargetDecorati
208
208
  }
209
209
  if (editorExperiment('advanced_layouts', true)) {
210
210
  var _isSameLayout = $activeNodePos && isInSameLayout($activeNodePos, state.doc.resolve(rootNodeWithPos.pos));
211
- var hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && expValEquals('platform_synced_block', 'isEnabled', true);
211
+ var hasUnsupportedContent = UNSUPPORTED_LAYOUT_CONTENT.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') && editorExperiment('platform_synced_block', true);
212
212
  if (rootNodeWithPos.node.type.name === 'layoutSection' && !hasUnsupportedContent) {
213
213
  var layoutSectionNode = rootNodeWithPos.node;
214
214
  if (layoutSectionNode.childCount < maxLayoutColumnSupported() || _isSameLayout) {
@@ -549,7 +549,7 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
549
549
  isDragging: (_meta$isDragging3 = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging3 !== void 0 ? _meta$isDragging3 : isDragging,
550
550
  isMenuOpen: isMenuOpenNew,
551
551
  menuTriggerBy: flags.toolbarFlagsEnabled || expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu = meta.toggleMenu) === null || _meta$toggleMenu === void 0 ? void 0 : _meta$toggleMenu.anchorName) || menuTriggerBy : undefined,
552
- menuTriggerByNode: expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
552
+ menuTriggerByNode: editorExperiment('platform_synced_block', true) ? (meta === null || meta === void 0 || (_meta$toggleMenu2 = meta.toggleMenu) === null || _meta$toggleMenu2 === void 0 ? void 0 : _meta$toggleMenu2.triggerByNode) || menuTriggerByNode : undefined,
553
553
  blockMenuOptions: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? {
554
554
  canMoveUp: (meta === null || meta === void 0 || (_meta$toggleMenu3 = meta.toggleMenu) === null || _meta$toggleMenu3 === void 0 ? void 0 : _meta$toggleMenu3.moveUp) !== undefined ? meta === null || meta === void 0 || (_meta$toggleMenu4 = meta.toggleMenu) === null || _meta$toggleMenu4 === void 0 ? void 0 : _meta$toggleMenu4.moveUp : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveUp,
555
555
  canMoveDown: (meta === null || meta === void 0 || (_meta$toggleMenu5 = meta.toggleMenu) === null || _meta$toggleMenu5 === void 0 ? void 0 : _meta$toggleMenu5.moveDown) !== undefined ? meta === null || meta === void 0 || (_meta$toggleMenu6 = meta.toggleMenu) === null || _meta$toggleMenu6 === void 0 ? void 0 : _meta$toggleMenu6.moveDown : blockMenuOptions === null || blockMenuOptions === void 0 ? void 0 : blockMenuOptions.canMoveDown,
@@ -1,5 +1,4 @@
1
1
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { isWrappedMedia } from './check-media-layout';
5
4
  import { maxLayoutColumnSupported } from './consts';
@@ -16,7 +15,7 @@ export var shouldAllowInlineDropTarget = function shouldAllowInlineDropTarget(is
16
15
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) === 'layoutSection') {
17
16
  return false;
18
17
  }
19
- if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && expValEquals('platform_synced_block', 'isEnabled', true)) {
18
+ if ((syncedBlockTypes.includes((activeNode === null || activeNode === void 0 ? void 0 : activeNode.nodeType) || '') || syncedBlockTypes.includes((node === null || node === void 0 ? void 0 : node.type.name) || '')) && editorExperiment('platform_synced_block', true)) {
20
19
  return false;
21
20
  }
22
21
  if ((node === null || node === void 0 ? void 0 : node.type.name) === 'layoutSection') {
@@ -445,7 +445,7 @@ export var DragHandle = function DragHandle(_ref2) {
445
445
  api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || _api$blockControls2.commands.toggleBlockMenu({
446
446
  anchorName: anchorName,
447
447
  openedViaKeyboard: false,
448
- triggerByNode: expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
448
+ triggerByNode: editorExperiment('platform_synced_block', true) ? {
449
449
  nodeType: nodeType,
450
450
  pos: startPos,
451
451
  rootPos: tr.doc.resolve(startPos).before(1)
@@ -487,7 +487,7 @@ export var DragHandle = function DragHandle(_ref2) {
487
487
  } else {
488
488
  tr = selectNode(tr, startPos, nodeType, api);
489
489
  }
490
- var rootPos = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
490
+ var rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
491
491
  var triggerByNode = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
492
492
  nodeType: nodeType,
493
493
  pos: startPos,
@@ -590,7 +590,7 @@ export var DragHandle = function DragHandle(_ref2) {
590
590
  !isMultiSelect && tr.setMeta(key, {
591
591
  pos: startPos
592
592
  });
593
- var rootPos = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
593
+ var rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
594
594
  var triggerByNode = expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) ? {
595
595
  nodeType: nodeType,
596
596
  pos: startPos,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "7.10.1",
3
+ "version": "7.10.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",