@atlaskit/editor-plugin-block-controls 3.13.10 → 3.13.11
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
|
+
## 3.13.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152853](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152853)
|
|
8
|
+
[`73092ef06444a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73092ef06444a) -
|
|
9
|
+
[ux] ED-27602 fix drag handle shifting above table when hovering in top cell
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.13.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.handleMouseOver = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
8
9
|
var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(target) {
|
|
9
10
|
if (target instanceof HTMLHeadingElement || target instanceof HTMLParagraphElement) {
|
|
@@ -47,7 +48,18 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
|
|
|
47
48
|
var parentElementType = parentElement === null || parentElement === void 0 ? void 0 : parentElement.getAttribute('data-drag-handler-node-type');
|
|
48
49
|
if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
|
|
49
50
|
// We want to exclude handles from showing for direct descendant of table nodes (i.e. nodes in cells)
|
|
50
|
-
if (
|
|
51
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_table_drag_handle_shift_fix')) {
|
|
52
|
+
if (parentElement && parentElementType === 'table') {
|
|
53
|
+
rootElement = parentElement;
|
|
54
|
+
} else if (parentElement && parentElementType === 'tableRow') {
|
|
55
|
+
var _parentElement$parent;
|
|
56
|
+
var grandparentElement = parentElement === null || parentElement === void 0 || (_parentElement$parent = parentElement.parentElement) === null || _parentElement$parent === void 0 ? void 0 : _parentElement$parent.closest('[data-drag-handler-anchor-name]');
|
|
57
|
+
var grandparentElementType = grandparentElement === null || grandparentElement === void 0 ? void 0 : grandparentElement.getAttribute('data-drag-handler-node-type');
|
|
58
|
+
if (grandparentElement && grandparentElementType === 'table') {
|
|
59
|
+
rootElement = grandparentElement;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} else if (parentElement && (parentElementType === 'table' || parentElementType === 'tableRow')) {
|
|
51
63
|
rootElement = parentElement;
|
|
52
64
|
}
|
|
53
65
|
} else {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
const isEmptyNestedParagraphOrHeading = target => {
|
|
3
4
|
if (target instanceof HTMLHeadingElement || target instanceof HTMLParagraphElement) {
|
|
@@ -42,7 +43,18 @@ export const handleMouseOver = (view, event, api) => {
|
|
|
42
43
|
const parentElementType = parentElement === null || parentElement === void 0 ? void 0 : parentElement.getAttribute('data-drag-handler-node-type');
|
|
43
44
|
if (editorExperiment('advanced_layouts', true)) {
|
|
44
45
|
// We want to exclude handles from showing for direct descendant of table nodes (i.e. nodes in cells)
|
|
45
|
-
if (
|
|
46
|
+
if (fg('platform_editor_table_drag_handle_shift_fix')) {
|
|
47
|
+
if (parentElement && parentElementType === 'table') {
|
|
48
|
+
rootElement = parentElement;
|
|
49
|
+
} else if (parentElement && parentElementType === 'tableRow') {
|
|
50
|
+
var _parentElement$parent;
|
|
51
|
+
const grandparentElement = parentElement === null || parentElement === void 0 ? void 0 : (_parentElement$parent = parentElement.parentElement) === null || _parentElement$parent === void 0 ? void 0 : _parentElement$parent.closest('[data-drag-handler-anchor-name]');
|
|
52
|
+
const grandparentElementType = grandparentElement === null || grandparentElement === void 0 ? void 0 : grandparentElement.getAttribute('data-drag-handler-node-type');
|
|
53
|
+
if (grandparentElement && grandparentElementType === 'table') {
|
|
54
|
+
rootElement = grandparentElement;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
} else if (parentElement && (parentElementType === 'table' || parentElementType === 'tableRow')) {
|
|
46
58
|
rootElement = parentElement;
|
|
47
59
|
}
|
|
48
60
|
} else {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(target) {
|
|
3
4
|
if (target instanceof HTMLHeadingElement || target instanceof HTMLParagraphElement) {
|
|
@@ -41,7 +42,18 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
|
|
|
41
42
|
var parentElementType = parentElement === null || parentElement === void 0 ? void 0 : parentElement.getAttribute('data-drag-handler-node-type');
|
|
42
43
|
if (editorExperiment('advanced_layouts', true)) {
|
|
43
44
|
// We want to exclude handles from showing for direct descendant of table nodes (i.e. nodes in cells)
|
|
44
|
-
if (
|
|
45
|
+
if (fg('platform_editor_table_drag_handle_shift_fix')) {
|
|
46
|
+
if (parentElement && parentElementType === 'table') {
|
|
47
|
+
rootElement = parentElement;
|
|
48
|
+
} else if (parentElement && parentElementType === 'tableRow') {
|
|
49
|
+
var _parentElement$parent;
|
|
50
|
+
var grandparentElement = parentElement === null || parentElement === void 0 || (_parentElement$parent = parentElement.parentElement) === null || _parentElement$parent === void 0 ? void 0 : _parentElement$parent.closest('[data-drag-handler-anchor-name]');
|
|
51
|
+
var grandparentElementType = grandparentElement === null || grandparentElement === void 0 ? void 0 : grandparentElement.getAttribute('data-drag-handler-node-type');
|
|
52
|
+
if (grandparentElement && grandparentElementType === 'table') {
|
|
53
|
+
rootElement = grandparentElement;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
} else if (parentElement && (parentElementType === 'table' || parentElementType === 'tableRow')) {
|
|
45
57
|
rootElement = parentElement;
|
|
46
58
|
}
|
|
47
59
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.11",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
36
|
-
"@atlaskit/editor-common": "^105.
|
|
36
|
+
"@atlaskit/editor-common": "^105.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "^2.
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
41
41
|
"@atlaskit/editor-plugin-interaction": "^1.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-metrics": "^3.4.0",
|
|
43
43
|
"@atlaskit/editor-plugin-quick-insert": "^2.5.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.2.0",
|
|
45
|
-
"@atlaskit/editor-plugin-type-ahead": "^2.
|
|
45
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.7.0",
|
|
46
46
|
"@atlaskit/editor-plugin-user-intent": "^0.1.0",
|
|
47
47
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.1.0",
|
|
56
56
|
"@atlaskit/primitives": "^14.7.0",
|
|
57
57
|
"@atlaskit/theme": "^18.0.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^4.21.0",
|
|
59
59
|
"@atlaskit/tokens": "^4.8.0",
|
|
60
60
|
"@atlaskit/tooltip": "^20.0.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
@@ -186,6 +186,9 @@
|
|
|
186
186
|
},
|
|
187
187
|
"platform_editor_fix_widget_destroy": {
|
|
188
188
|
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
"platform_editor_table_drag_handle_shift_fix": {
|
|
191
|
+
"type": "boolean"
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
}
|