@atlaskit/editor-plugin-block-controls 3.13.10 → 3.14.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 +18 -0
- package/dist/cjs/pm-plugins/handle-mouse-over.js +13 -1
- package/dist/es2019/pm-plugins/handle-mouse-over.js +13 -1
- package/dist/esm/pm-plugins/handle-mouse-over.js +13 -1
- package/dist/types/blockControlsPluginType.d.ts +1 -1
- package/dist/types/pm-plugins/handle-mouse-down.d.ts +2 -2
- package/dist/types/ui/visibility-container.d.ts +1 -1
- package/dist/types-ts4.5/blockControlsPluginType.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/handle-mouse-down.d.ts +2 -2
- package/dist/types-ts4.5/ui/visibility-container.d.ts +1 -1
- package/package.json +18 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 3.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157076](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157076)
|
|
8
|
+
[`474f9d0d4dbd0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/474f9d0d4dbd0) -
|
|
9
|
+
We are testing the migration to the ADS Link component behind a feature flag. If this fix is
|
|
10
|
+
successful it will be available in a later release.
|
|
11
|
+
|
|
12
|
+
## 3.13.11
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#152853](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152853)
|
|
17
|
+
[`73092ef06444a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73092ef06444a) -
|
|
18
|
+
[ux] ED-27602 fix drag handle shifting above table when hovering in top cell
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 3.13.10
|
|
4
22
|
|
|
5
23
|
### 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 {
|
|
@@ -5,7 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
7
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
-
import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
8
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
9
9
|
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
10
10
|
import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
11
11
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
3
|
+
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
4
4
|
export declare const handleMouseDown: (api?: ExtractInjectionAPI<BlockControlsPlugin>) => (view: EditorView, event: MouseEvent) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
3
|
+
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
4
4
|
interface VisibilityContainerProps {
|
|
5
5
|
api?: ExtractInjectionAPI<BlockControlsPlugin>;
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -5,7 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
7
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
-
import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
8
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
9
9
|
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
10
10
|
import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
11
11
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
3
|
+
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
4
4
|
export declare const handleMouseDown: (api?: ExtractInjectionAPI<BlockControlsPlugin>) => (view: EditorView, event: MouseEvent) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
3
|
+
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
4
4
|
interface VisibilityContainerProps {
|
|
5
5
|
api?: ExtractInjectionAPI<BlockControlsPlugin>;
|
|
6
6
|
children: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,30 +33,31 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
36
|
-
"@atlaskit/editor-common": "^105.
|
|
36
|
+
"@atlaskit/editor-common": "^105.6.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
|
-
"@atlaskit/editor-plugin-interaction": "^1.
|
|
41
|
+
"@atlaskit/editor-plugin-interaction": "^1.1.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",
|
|
49
49
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
51
|
-
"@atlaskit/icon": "^26.
|
|
51
|
+
"@atlaskit/icon": "^26.1.0",
|
|
52
|
+
"@atlaskit/link": "^3.2.0",
|
|
52
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
|
-
"@atlaskit/pragmatic-drag-and-drop": "^1.
|
|
54
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
54
55
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
55
|
-
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.
|
|
56
|
-
"@atlaskit/primitives": "^14.
|
|
56
|
+
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
|
+
"@atlaskit/primitives": "^14.8.0",
|
|
57
58
|
"@atlaskit/theme": "^18.0.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
59
|
-
"@atlaskit/tokens": "^4.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^4.22.0",
|
|
60
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
60
61
|
"@atlaskit/tooltip": "^20.0.0",
|
|
61
62
|
"@babel/runtime": "^7.0.0",
|
|
62
63
|
"@emotion/react": "^11.7.1",
|
|
@@ -186,6 +187,12 @@
|
|
|
186
187
|
},
|
|
187
188
|
"platform_editor_fix_widget_destroy": {
|
|
188
189
|
"type": "boolean"
|
|
190
|
+
},
|
|
191
|
+
"platform_editor_table_drag_handle_shift_fix": {
|
|
192
|
+
"type": "boolean"
|
|
193
|
+
},
|
|
194
|
+
"dst-a11y__replace-anchor-with-link__editor-jenga": {
|
|
195
|
+
"type": "boolean"
|
|
189
196
|
}
|
|
190
197
|
}
|
|
191
198
|
}
|