@atlaskit/editor-plugin-block-controls 2.15.3 → 2.15.4
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 2.15.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#177055](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177055)
|
|
8
|
+
[`5d0549c752360`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5d0549c752360) -
|
|
9
|
+
ED-25056 add exposure for advanced layouts
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.15.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -427,6 +427,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
427
427
|
var isNestedEnabled = (0, _experiments.editorExperiment)('nested-dnd', true, {
|
|
428
428
|
exposure: true
|
|
429
429
|
});
|
|
430
|
+
var isAdvancedLayoutEnabled = (0, _experiments.editorExperiment)('advanced_layouts', true, {
|
|
431
|
+
exposure: true
|
|
432
|
+
});
|
|
430
433
|
var isOptimisedApply = isNestedEnabled && (0, _experiments.editorExperiment)('optimised-apply-dnd', true, {
|
|
431
434
|
exposure: true
|
|
432
435
|
});
|
|
@@ -434,9 +437,6 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
434
437
|
isNestedEnabled: isNestedEnabled,
|
|
435
438
|
isOptimisedApply: isOptimisedApply
|
|
436
439
|
};
|
|
437
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_2')) {
|
|
438
|
-
// TODO: Remove this once FG is used in code
|
|
439
|
-
}
|
|
440
440
|
var anchorRectCache;
|
|
441
441
|
if (!(0, _anchorUtils.isAnchorSupported)() && (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_target_v2')) {
|
|
442
442
|
anchorRectCache = new _anchorUtils.AnchorRectCache();
|
|
@@ -506,7 +506,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
506
506
|
return false;
|
|
507
507
|
},
|
|
508
508
|
dragenter: function dragenter(_view, event) {
|
|
509
|
-
if (
|
|
509
|
+
if (isAdvancedLayoutEnabled) {
|
|
510
510
|
if (isHTMLElement(event.target)) {
|
|
511
511
|
var closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
|
|
512
512
|
if (closestParentElement) {
|
|
@@ -520,7 +520,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
520
520
|
},
|
|
521
521
|
dragstart: function dragstart(view) {
|
|
522
522
|
var _anchorRectCache;
|
|
523
|
-
if (
|
|
523
|
+
if (isAdvancedLayoutEnabled) {
|
|
524
524
|
_activeAnchorTracker.defaultActiveAnchorTracker.reset();
|
|
525
525
|
}
|
|
526
526
|
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.setEditorView(view);
|
|
@@ -402,6 +402,9 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
402
402
|
const isNestedEnabled = editorExperiment('nested-dnd', true, {
|
|
403
403
|
exposure: true
|
|
404
404
|
});
|
|
405
|
+
const isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true, {
|
|
406
|
+
exposure: true
|
|
407
|
+
});
|
|
405
408
|
const isOptimisedApply = isNestedEnabled && editorExperiment('optimised-apply-dnd', true, {
|
|
406
409
|
exposure: true
|
|
407
410
|
});
|
|
@@ -409,9 +412,6 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
409
412
|
isNestedEnabled,
|
|
410
413
|
isOptimisedApply
|
|
411
414
|
};
|
|
412
|
-
if (fg('platform_editor_element_dnd_nested_fix_patch_2')) {
|
|
413
|
-
// TODO: Remove this once FG is used in code
|
|
414
|
-
}
|
|
415
415
|
let anchorRectCache;
|
|
416
416
|
if (!isAnchorSupported() && fg('platform_editor_drag_and_drop_target_v2')) {
|
|
417
417
|
anchorRectCache = new AnchorRectCache();
|
|
@@ -483,7 +483,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
483
483
|
return false;
|
|
484
484
|
},
|
|
485
485
|
dragenter(_view, event) {
|
|
486
|
-
if (
|
|
486
|
+
if (isAdvancedLayoutEnabled) {
|
|
487
487
|
if (isHTMLElement(event.target)) {
|
|
488
488
|
const closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
|
|
489
489
|
if (closestParentElement) {
|
|
@@ -497,7 +497,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
497
497
|
},
|
|
498
498
|
dragstart(view) {
|
|
499
499
|
var _anchorRectCache;
|
|
500
|
-
if (
|
|
500
|
+
if (isAdvancedLayoutEnabled) {
|
|
501
501
|
defaultActiveAnchorTracker.reset();
|
|
502
502
|
}
|
|
503
503
|
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.setEditorView(view);
|
|
@@ -420,6 +420,9 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
420
420
|
var isNestedEnabled = editorExperiment('nested-dnd', true, {
|
|
421
421
|
exposure: true
|
|
422
422
|
});
|
|
423
|
+
var isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true, {
|
|
424
|
+
exposure: true
|
|
425
|
+
});
|
|
423
426
|
var isOptimisedApply = isNestedEnabled && editorExperiment('optimised-apply-dnd', true, {
|
|
424
427
|
exposure: true
|
|
425
428
|
});
|
|
@@ -427,9 +430,6 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
427
430
|
isNestedEnabled: isNestedEnabled,
|
|
428
431
|
isOptimisedApply: isOptimisedApply
|
|
429
432
|
};
|
|
430
|
-
if (fg('platform_editor_element_dnd_nested_fix_patch_2')) {
|
|
431
|
-
// TODO: Remove this once FG is used in code
|
|
432
|
-
}
|
|
433
433
|
var anchorRectCache;
|
|
434
434
|
if (!isAnchorSupported() && fg('platform_editor_drag_and_drop_target_v2')) {
|
|
435
435
|
anchorRectCache = new AnchorRectCache();
|
|
@@ -499,7 +499,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
499
499
|
return false;
|
|
500
500
|
},
|
|
501
501
|
dragenter: function dragenter(_view, event) {
|
|
502
|
-
if (
|
|
502
|
+
if (isAdvancedLayoutEnabled) {
|
|
503
503
|
if (isHTMLElement(event.target)) {
|
|
504
504
|
var closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
|
|
505
505
|
if (closestParentElement) {
|
|
@@ -513,7 +513,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
513
513
|
},
|
|
514
514
|
dragstart: function dragstart(view) {
|
|
515
515
|
var _anchorRectCache;
|
|
516
|
-
if (
|
|
516
|
+
if (isAdvancedLayoutEnabled) {
|
|
517
517
|
defaultActiveAnchorTracker.reset();
|
|
518
518
|
}
|
|
519
519
|
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.setEditorView(view);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.4",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^96.
|
|
34
|
+
"@atlaskit/editor-common": "^96.4.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|