@atlaskit/editor-plugin-block-controls 7.10.1 → 7.11.0
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 +19 -0
- package/dist/cjs/blockControlsPlugin.js +5 -26
- package/dist/cjs/editor-commands/move-node.js +1 -2
- package/dist/cjs/pm-plugins/decorations-drop-target-active.js +2 -2
- package/dist/cjs/pm-plugins/main.js +2 -3
- package/dist/cjs/pm-plugins/utils/inline-drop-target.js +1 -2
- package/dist/cjs/ui/consts.js +2 -7
- package/dist/cjs/ui/drag-handle.js +19 -59
- package/dist/es2019/blockControlsPlugin.js +5 -27
- package/dist/es2019/editor-commands/move-node.js +1 -2
- package/dist/es2019/pm-plugins/decorations-drop-target-active.js +2 -2
- package/dist/es2019/pm-plugins/main.js +2 -3
- package/dist/es2019/pm-plugins/utils/inline-drop-target.js +1 -2
- package/dist/es2019/ui/consts.js +1 -6
- package/dist/es2019/ui/drag-handle.js +17 -57
- package/dist/esm/blockControlsPlugin.js +5 -26
- package/dist/esm/editor-commands/move-node.js +1 -2
- package/dist/esm/pm-plugins/decorations-drop-target-active.js +2 -2
- package/dist/esm/pm-plugins/main.js +2 -3
- package/dist/esm/pm-plugins/utils/inline-drop-target.js +1 -2
- package/dist/esm/ui/consts.js +1 -6
- package/dist/esm/ui/drag-handle.js +17 -57
- package/dist/types/ui/consts.d.ts +0 -2
- package/dist/types-ts4.5/ui/consts.d.ts +0 -2
- package/package.json +2 -2
- package/dist/cjs/ui/block-menu-items.js +0 -90
- package/dist/cjs/ui/block-menu.js +0 -110
- package/dist/es2019/ui/block-menu-items.js +0 -82
- package/dist/es2019/ui/block-menu.js +0 -108
- package/dist/esm/ui/block-menu-items.js +0 -82
- package/dist/esm/ui/block-menu.js +0 -102
- package/dist/types/ui/block-menu-items.d.ts +0 -15
- package/dist/types/ui/block-menu.d.ts +0 -16
- package/dist/types-ts4.5/ui/block-menu-items.d.ts +0 -15
- package/dist/types-ts4.5/ui/block-menu.d.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 7.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1d4a6d5ffb239`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1d4a6d5ffb239) -
|
|
8
|
+
Remove old block menu implementation in block controls
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 7.10.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`41a91a916c125`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41a91a916c125) -
|
|
19
|
+
EDITOR-2846 Change platform_synced_block to use editorExperiment and add Jira experiment
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 7.10.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -24,8 +24,6 @@ var _editorCommands = require("./pm-plugins/selection-preservation/editor-comman
|
|
|
24
24
|
var _pluginKey = require("./pm-plugins/selection-preservation/plugin-key");
|
|
25
25
|
var _pmPlugin2 = require("./pm-plugins/selection-preservation/pm-plugin");
|
|
26
26
|
var _getSelection = require("./pm-plugins/utils/getSelection");
|
|
27
|
-
var _blockMenu = _interopRequireDefault(require("./ui/block-menu"));
|
|
28
|
-
var _dragHandleMenu = require("./ui/drag-handle-menu");
|
|
29
27
|
var _globalStyles = require("./ui/global-styles");
|
|
30
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -80,8 +78,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
80
78
|
rootPos: rootPos,
|
|
81
79
|
rootAnchorName: rootAnchorName,
|
|
82
80
|
rootNodeType: rootNodeType
|
|
83
|
-
}
|
|
84
|
-
closeMenu: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && !(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? true : undefined
|
|
81
|
+
}
|
|
85
82
|
}));
|
|
86
83
|
return tr;
|
|
87
84
|
};
|
|
@@ -286,28 +283,10 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
286
283
|
}
|
|
287
284
|
return sharedState;
|
|
288
285
|
},
|
|
289
|
-
contentComponent: function contentComponent(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
popupsScrollableElement = _ref8.popupsScrollableElement;
|
|
294
|
-
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
295
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_globalStyles.GlobalStylesWrapper, {
|
|
296
|
-
api: api
|
|
297
|
-
}));
|
|
298
|
-
} else {
|
|
299
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_blockMenu.default, {
|
|
300
|
-
editorView: editorView,
|
|
301
|
-
mountPoint: popupsMountPoint,
|
|
302
|
-
boundariesElement: popupsBoundariesElement,
|
|
303
|
-
scrollableElement: popupsScrollableElement,
|
|
304
|
-
api: api
|
|
305
|
-
}) : /*#__PURE__*/_react.default.createElement(_dragHandleMenu.DragHandleMenu, {
|
|
306
|
-
api: api
|
|
307
|
-
}), /*#__PURE__*/_react.default.createElement(_globalStyles.GlobalStylesWrapper, {
|
|
308
|
-
api: api
|
|
309
|
-
}));
|
|
310
|
-
}
|
|
286
|
+
contentComponent: function contentComponent() {
|
|
287
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.GlobalStylesWrapper, {
|
|
288
|
+
api: api
|
|
289
|
+
});
|
|
311
290
|
}
|
|
312
291
|
};
|
|
313
292
|
};
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
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) {
|
|
@@ -24,7 +24,6 @@ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
25
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
26
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
27
|
-
var _consts = require("../ui/consts");
|
|
28
27
|
var _domAttrName = require("../ui/utils/dom-attr-name");
|
|
29
28
|
var _decorationsAnchor = require("./decorations-anchor");
|
|
30
29
|
var _decorationsDragHandle = require("./decorations-drag-handle");
|
|
@@ -533,7 +532,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
533
532
|
newActiveNode = isEmptyDoc || !(meta !== null && meta !== void 0 && meta.activeNode) && (0, _decorationsDragHandle.findHandleDec)(decorations, (_latestActiveNode11 = latestActiveNode) === null || _latestActiveNode11 === void 0 ? void 0 : _latestActiveNode11.pos, (_latestActiveNode12 = latestActiveNode) === null || _latestActiveNode12 === void 0 ? void 0 : _latestActiveNode12.pos).length === 0 ? null : latestActiveNode;
|
|
534
533
|
}
|
|
535
534
|
var isMenuOpenNew = isMenuOpen;
|
|
536
|
-
if (
|
|
535
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
537
536
|
if (meta !== null && meta !== void 0 && meta.closeMenu) {
|
|
538
537
|
isMenuOpenNew = false;
|
|
539
538
|
} else if (meta !== null && meta !== void 0 && meta.toggleMenu) {
|
|
@@ -556,7 +555,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
556
555
|
isDragging: (_meta$isDragging3 = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging3 !== void 0 ? _meta$isDragging3 : isDragging,
|
|
557
556
|
isMenuOpen: isMenuOpenNew,
|
|
558
557
|
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,
|
|
558
|
+
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
559
|
blockMenuOptions: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? {
|
|
561
560
|
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
561
|
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,
|
|
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') {
|
package/dist/cjs/ui/consts.js
CHANGED
|
@@ -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.topPositionAdjustment = exports.spacingBetweenNodesForPreview = exports.spaceLookupMap = exports.rootElementGap = exports.nodeMargins = exports.getNestedNodeLeftPaddingMargin = exports.dropTargetMarginMap = exports.dragHandleGap = exports.STICKY_CONTROLS_TOP_MARGIN = exports.QUICK_INSERT_WIDTH = exports.QUICK_INSERT_LEFT_OFFSET = exports.QUICK_INSERT_HEIGHT = exports.QUICK_INSERT_DIMENSIONS = exports.DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = exports.DRAG_HANDLE_NARROW_GAP = exports.DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = exports.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = exports.DRAG_HANDLE_MAX_GAP = exports.DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_H6_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H5_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H4_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H3_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H2_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H1_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DEFAULT_GAP = exports.DRAG_HANDLE_BORDER_RADIUS = exports.DEFAULT_COLUMN_DISTRIBUTIONS =
|
|
7
|
+
exports.topPositionAdjustment = exports.spacingBetweenNodesForPreview = exports.spaceLookupMap = exports.rootElementGap = exports.nodeMargins = exports.getNestedNodeLeftPaddingMargin = exports.dropTargetMarginMap = exports.dragHandleGap = exports.STICKY_CONTROLS_TOP_MARGIN = exports.QUICK_INSERT_WIDTH = exports.QUICK_INSERT_LEFT_OFFSET = exports.QUICK_INSERT_HEIGHT = exports.QUICK_INSERT_DIMENSIONS = exports.DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = exports.DRAG_HANDLE_NARROW_GAP = exports.DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = exports.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = exports.DRAG_HANDLE_MAX_GAP = exports.DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_H6_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H5_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H4_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H3_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H2_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H1_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DEFAULT_GAP = exports.DRAG_HANDLE_BORDER_RADIUS = exports.DEFAULT_COLUMN_DISTRIBUTIONS = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -353,9 +353,4 @@ var DEFAULT_COLUMN_DISTRIBUTIONS = exports.DEFAULT_COLUMN_DISTRIBUTIONS = {
|
|
|
353
353
|
3: 33.33,
|
|
354
354
|
4: 25,
|
|
355
355
|
5: 20
|
|
356
|
-
};
|
|
357
|
-
var BLOCK_MENU_WIDTH = exports.BLOCK_MENU_WIDTH = 220;
|
|
358
|
-
|
|
359
|
-
// Temporarily disable BLOCK MENU feature until Q4 FY25.
|
|
360
|
-
// For more details, refer to ticket ED-26972 https://product-fabric.atlassian.net/browse/ED-26972
|
|
361
|
-
var BLOCK_MENU_ENABLED = exports.BLOCK_MENU_ENABLED = false;
|
|
356
|
+
};
|
|
@@ -17,7 +17,7 @@ var _browser = require("@atlaskit/editor-common/browser");
|
|
|
17
17
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
18
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
19
19
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
20
|
-
var
|
|
20
|
+
var _selection = require("@atlaskit/editor-common/selection");
|
|
21
21
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
22
22
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
23
23
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
@@ -39,7 +39,7 @@ var _pluginKey = require("../pm-plugins/selection-preservation/plugin-key");
|
|
|
39
39
|
var _analytics2 = require("../pm-plugins/utils/analytics");
|
|
40
40
|
var _dragHandlePositions = require("../pm-plugins/utils/drag-handle-positions");
|
|
41
41
|
var _getSelection = require("../pm-plugins/utils/getSelection");
|
|
42
|
-
var
|
|
42
|
+
var _selection2 = require("../pm-plugins/utils/selection");
|
|
43
43
|
var _consts2 = require("./consts");
|
|
44
44
|
var _dragPreview = require("./drag-preview");
|
|
45
45
|
var _anchorName = require("./utils/anchor-name");
|
|
@@ -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,
|
|
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)
|
|
@@ -476,53 +476,13 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
476
476
|
var mSelect = api === null || api === void 0 || (_api$blockControls$sh = api.blockControls.sharedState.currentState()) === null || _api$blockControls$sh === void 0 ? void 0 : _api$blockControls$sh.multiSelectDnD;
|
|
477
477
|
var $anchor = (mSelect === null || mSelect === void 0 ? void 0 : mSelect.anchor) !== undefined ? tr.doc.resolve(mSelect === null || mSelect === void 0 ? void 0 : mSelect.anchor) : tr.selection.$anchor;
|
|
478
478
|
if (!isMultiSelect || tr.selection.empty || !e.shiftKey) {
|
|
479
|
-
|
|
480
|
-
var node = tr.doc.nodeAt(startPos);
|
|
481
|
-
var nodeSize = node ? node.nodeSize : 1;
|
|
482
|
-
// It this will be required in other places, where selectNode is used, we should
|
|
483
|
-
// move it inside of the newGetSelection in the selectNode
|
|
484
|
-
if (nodeType === 'blockquote' && (0, _getSelection.isNodeWithCodeBlock)(tr, startPos, nodeSize)) {
|
|
485
|
-
var _selection = new _state.NodeSelection(tr.doc.resolve(startPos));
|
|
486
|
-
tr.setSelection(_selection);
|
|
487
|
-
} else {
|
|
488
|
-
tr = (0, _getSelection.selectNode)(tr, startPos, nodeType, api);
|
|
489
|
-
}
|
|
490
|
-
} else {
|
|
491
|
-
tr = (0, _getSelection.selectNode)(tr, startPos, nodeType, api);
|
|
492
|
-
}
|
|
493
|
-
var rootPos = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? tr.doc.resolve(startPos).before(1) : undefined;
|
|
494
|
-
var triggerByNode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? {
|
|
495
|
-
nodeType: nodeType,
|
|
496
|
-
pos: startPos,
|
|
497
|
-
rootPos: rootPos
|
|
498
|
-
} : undefined;
|
|
499
|
-
if (_consts2.BLOCK_MENU_ENABLED && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
500
|
-
var _api$blockControls3;
|
|
501
|
-
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || _api$blockControls3.commands.toggleBlockMenu({
|
|
502
|
-
anchorName: anchorName,
|
|
503
|
-
triggerByNode: triggerByNode,
|
|
504
|
-
openedViaKeyboard: false
|
|
505
|
-
})({
|
|
506
|
-
tr: tr
|
|
507
|
-
});
|
|
508
|
-
e.stopPropagation();
|
|
509
|
-
} else if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
510
|
-
var _api$blockControls4;
|
|
511
|
-
api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || _api$blockControls4.commands.toggleBlockMenu({
|
|
512
|
-
anchorName: anchorName,
|
|
513
|
-
triggerByNode: triggerByNode,
|
|
514
|
-
openedViaKeyboard: false
|
|
515
|
-
})({
|
|
516
|
-
tr: tr
|
|
517
|
-
});
|
|
518
|
-
e.stopPropagation();
|
|
519
|
-
}
|
|
479
|
+
tr = (0, _getSelection.selectNode)(tr, startPos, nodeType, api);
|
|
520
480
|
} else if (isTopLevelNode && $anchor.depth <= _consts2.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH && e.shiftKey && (0, _platformFeatureFlags.fg)('platform_editor_elements_dnd_shift_click_select')) {
|
|
521
|
-
var _api$
|
|
522
|
-
var alignAnchorHeadToSel = (0,
|
|
523
|
-
var selectionWithExpandedHead = (0,
|
|
481
|
+
var _api$blockControls3;
|
|
482
|
+
var alignAnchorHeadToSel = (0, _selection2.alignAnchorHeadInDirectionOfPos)(tr.selection, startPos);
|
|
483
|
+
var selectionWithExpandedHead = (0, _selection2.expandSelectionHeadToNodeAtPos)(alignAnchorHeadToSel, startPos);
|
|
524
484
|
tr.setSelection(selectionWithExpandedHead);
|
|
525
|
-
api === null || api === void 0 || (_api$
|
|
485
|
+
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || _api$blockControls3.commands.setMultiSelectPositions()({
|
|
526
486
|
tr: tr
|
|
527
487
|
});
|
|
528
488
|
}
|
|
@@ -542,7 +502,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
542
502
|
return tr;
|
|
543
503
|
});
|
|
544
504
|
view.focus();
|
|
545
|
-
}, [isMultiSelect, api, view, dragHandleSelected, getPos, isTopLevelNode, nodeType
|
|
505
|
+
}, [isMultiSelect, api, view, dragHandleSelected, getPos, isTopLevelNode, nodeType]);
|
|
546
506
|
var handleKeyDown = (0, _react.useCallback)(function (e) {
|
|
547
507
|
// allow user to use spacebar to select the node
|
|
548
508
|
if (!e.repeat && e.key === ' ') {
|
|
@@ -584,7 +544,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
584
544
|
e.stopPropagation();
|
|
585
545
|
var startPos = getPos();
|
|
586
546
|
api === null || api === void 0 || (_api$core5 = api.core) === null || _api$core5 === void 0 || _api$core5.actions.execute(function (_ref6) {
|
|
587
|
-
var _api$
|
|
547
|
+
var _api$blockControls4, _api$userIntent;
|
|
588
548
|
var tr = _ref6.tr;
|
|
589
549
|
if (startPos === undefined) {
|
|
590
550
|
return tr;
|
|
@@ -593,13 +553,13 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
593
553
|
!isMultiSelect && tr.setMeta(_main.key, {
|
|
594
554
|
pos: startPos
|
|
595
555
|
});
|
|
596
|
-
var rootPos = (0,
|
|
556
|
+
var rootPos = (0, _experiments.editorExperiment)('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
|
|
597
557
|
var triggerByNode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) ? {
|
|
598
558
|
nodeType: nodeType,
|
|
599
559
|
pos: startPos,
|
|
600
560
|
rootPos: rootPos
|
|
601
561
|
} : undefined;
|
|
602
|
-
api === null || api === void 0 || (_api$
|
|
562
|
+
api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || _api$blockControls4.commands.toggleBlockMenu({
|
|
603
563
|
anchorName: anchorName,
|
|
604
564
|
triggerByNode: triggerByNode,
|
|
605
565
|
openedViaKeyboard: true
|
|
@@ -615,10 +575,10 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
615
575
|
e.preventDefault();
|
|
616
576
|
e.stopPropagation();
|
|
617
577
|
api === null || api === void 0 || api.core.actions.execute(function (_ref7) {
|
|
618
|
-
var _api$
|
|
578
|
+
var _api$blockControls5;
|
|
619
579
|
var tr = _ref7.tr;
|
|
620
|
-
(0,
|
|
621
|
-
api === null || api === void 0 || (_api$
|
|
580
|
+
(0, _selection.deleteSelectedRange)(tr);
|
|
581
|
+
api === null || api === void 0 || (_api$blockControls5 = api.blockControls) === null || _api$blockControls5 === void 0 || _api$blockControls5.commands.toggleBlockMenu({
|
|
622
582
|
closeMenu: true
|
|
623
583
|
})({
|
|
624
584
|
tr: tr
|
|
@@ -659,8 +619,8 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
659
619
|
}
|
|
660
620
|
var newHandlePosCheck = (0, _getSelection.isHandleCorrelatedToSelection)(view.state, tr.selection, handlePos);
|
|
661
621
|
if (!tr.selection.empty && newHandlePosCheck) {
|
|
662
|
-
var _api$
|
|
663
|
-
api === null || api === void 0 || (_api$
|
|
622
|
+
var _api$blockControls6;
|
|
623
|
+
api === null || api === void 0 || (_api$blockControls6 = api.blockControls) === null || _api$blockControls6 === void 0 || _api$blockControls6.commands.setMultiSelectPositions()({
|
|
664
624
|
tr: tr
|
|
665
625
|
});
|
|
666
626
|
} else if ((0, _platformFeatureFlags.fg)('platform_editor_elements_dnd_select_node_on_drag')) {
|
|
@@ -768,7 +728,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
768
728
|
return;
|
|
769
729
|
}
|
|
770
730
|
api === null || api === void 0 || (_api$core7 = api.core) === null || _api$core7 === void 0 || _api$core7.actions.execute(function (_ref1) {
|
|
771
|
-
var _api$blockControls$sh3, _api$
|
|
731
|
+
var _api$blockControls$sh3, _api$blockControls7, _api$analytics3;
|
|
772
732
|
var tr = _ref1.tr;
|
|
773
733
|
var nodeTypes, hasSelectedMultipleNodes;
|
|
774
734
|
var resolvedMovingNode = tr.doc.resolve(start);
|
|
@@ -782,7 +742,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
782
742
|
nodeTypes = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.type.name;
|
|
783
743
|
hasSelectedMultipleNodes = false;
|
|
784
744
|
}
|
|
785
|
-
api === null || api === void 0 || (_api$
|
|
745
|
+
api === null || api === void 0 || (_api$blockControls7 = api.blockControls) === null || _api$blockControls7 === void 0 || _api$blockControls7.commands.setNodeDragged(getPos, anchorName, nodeType)({
|
|
786
746
|
tr: tr
|
|
787
747
|
});
|
|
788
748
|
tr.setMeta('scrollIntoView', false);
|
|
@@ -16,8 +16,6 @@ import { startPreservingSelection, stopPreservingSelection } from './pm-plugins/
|
|
|
16
16
|
import { selectionPreservationPluginKey } from './pm-plugins/selection-preservation/plugin-key';
|
|
17
17
|
import { createSelectionPreservationPlugin } from './pm-plugins/selection-preservation/pm-plugin';
|
|
18
18
|
import { selectNode } from './pm-plugins/utils/getSelection';
|
|
19
|
-
import BlockMenu from './ui/block-menu';
|
|
20
|
-
import { DragHandleMenu } from './ui/drag-handle-menu';
|
|
21
19
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
22
20
|
export const blockControlsPlugin = ({
|
|
23
21
|
api
|
|
@@ -70,8 +68,7 @@ export const blockControlsPlugin = ({
|
|
|
70
68
|
rootPos,
|
|
71
69
|
rootAnchorName,
|
|
72
70
|
rootNodeType
|
|
73
|
-
}
|
|
74
|
-
closeMenu: editorExperiment('platform_editor_controls', 'variant1') && !expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? true : undefined
|
|
71
|
+
}
|
|
75
72
|
});
|
|
76
73
|
return tr;
|
|
77
74
|
},
|
|
@@ -276,28 +273,9 @@ export const blockControlsPlugin = ({
|
|
|
276
273
|
}
|
|
277
274
|
return sharedState;
|
|
278
275
|
},
|
|
279
|
-
contentComponent({
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
popupsScrollableElement
|
|
284
|
-
}) {
|
|
285
|
-
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
286
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GlobalStylesWrapper, {
|
|
287
|
-
api: api
|
|
288
|
-
}));
|
|
289
|
-
} else {
|
|
290
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(BlockMenu, {
|
|
291
|
-
editorView: editorView,
|
|
292
|
-
mountPoint: popupsMountPoint,
|
|
293
|
-
boundariesElement: popupsBoundariesElement,
|
|
294
|
-
scrollableElement: popupsScrollableElement,
|
|
295
|
-
api: api
|
|
296
|
-
}) : /*#__PURE__*/React.createElement(DragHandleMenu, {
|
|
297
|
-
api: api
|
|
298
|
-
}), /*#__PURE__*/React.createElement(GlobalStylesWrapper, {
|
|
299
|
-
api: api
|
|
300
|
-
}));
|
|
301
|
-
}
|
|
276
|
+
contentComponent() {
|
|
277
|
+
return /*#__PURE__*/React.createElement(GlobalStylesWrapper, {
|
|
278
|
+
api: api
|
|
279
|
+
});
|
|
302
280
|
}
|
|
303
281
|
});
|
|
@@ -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' &&
|
|
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 (
|
|
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) || '') &&
|
|
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) {
|
|
@@ -16,7 +16,6 @@ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/ad
|
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
17
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
18
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
|
-
import { BLOCK_MENU_ENABLED } from '../ui/consts';
|
|
20
19
|
import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
|
|
21
20
|
import { findNodeDecs, nodeDecorations } from './decorations-anchor';
|
|
22
21
|
import { dragHandleDecoration, emptyParagraphNodeDecorations, findHandleDec } from './decorations-drag-handle';
|
|
@@ -531,7 +530,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
|
|
|
531
530
|
newActiveNode = isEmptyDoc || !(meta !== null && meta !== void 0 && meta.activeNode) && findHandleDec(decorations, (_latestActiveNode11 = latestActiveNode) === null || _latestActiveNode11 === void 0 ? void 0 : _latestActiveNode11.pos, (_latestActiveNode12 = latestActiveNode) === null || _latestActiveNode12 === void 0 ? void 0 : _latestActiveNode12.pos).length === 0 ? null : latestActiveNode;
|
|
532
531
|
}
|
|
533
532
|
let isMenuOpenNew = isMenuOpen;
|
|
534
|
-
if (
|
|
533
|
+
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
535
534
|
if (meta !== null && meta !== void 0 && meta.closeMenu) {
|
|
536
535
|
isMenuOpenNew = false;
|
|
537
536
|
} else if (meta !== null && meta !== void 0 && meta.toggleMenu) {
|
|
@@ -554,7 +553,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
|
|
|
554
553
|
isDragging: (_meta$isDragging3 = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging3 !== void 0 ? _meta$isDragging3 : isDragging,
|
|
555
554
|
isMenuOpen: isMenuOpenNew,
|
|
556
555
|
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:
|
|
556
|
+
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
557
|
blockMenuOptions: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? {
|
|
559
558
|
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
559
|
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) || '')) &&
|
|
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') {
|
package/dist/es2019/ui/consts.js
CHANGED
|
@@ -362,9 +362,4 @@ export const DEFAULT_COLUMN_DISTRIBUTIONS = {
|
|
|
362
362
|
3: 33.33,
|
|
363
363
|
4: 25,
|
|
364
364
|
5: 20
|
|
365
|
-
};
|
|
366
|
-
export const BLOCK_MENU_WIDTH = 220;
|
|
367
|
-
|
|
368
|
-
// Temporarily disable BLOCK MENU feature until Q4 FY25.
|
|
369
|
-
// For more details, refer to ticket ED-26972 https://product-fabric.atlassian.net/browse/ED-26972
|
|
370
|
-
export const BLOCK_MENU_ENABLED = false;
|
|
365
|
+
};
|