@atlaskit/editor-plugin-table 5.3.23 → 5.3.24
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 +6 -0
- package/dist/cjs/plugins/table/nodeviews/TableRow.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/keymap.js +1 -1
- package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +1 -1
- package/dist/es2019/plugins/table/nodeviews/TableRow.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +1 -1
- package/dist/esm/plugins/table/nodeviews/TableRow.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +1 -1
- package/package.json +3 -3
- package/src/__tests__/unit/analytics.ts +2 -1
- package/src/__tests__/unit/collab.ts +2 -1
- package/src/__tests__/unit/commands/go-to-next-cell.ts +1 -0
- package/src/__tests__/unit/commands/insert.ts +1 -0
- package/src/__tests__/unit/commands/misc.ts +1 -0
- package/src/__tests__/unit/commands/sort.ts +2 -1
- package/src/__tests__/unit/commands.ts +1 -0
- package/src/__tests__/unit/copy-paste.ts +2 -1
- package/src/__tests__/unit/event-handlers/index.ts +2 -1
- package/src/__tests__/unit/event-handlers.ts +2 -1
- package/src/__tests__/unit/fix-tables.ts +2 -1
- package/src/__tests__/unit/get-toolbar-config.ts +1 -0
- package/src/__tests__/unit/handlers.ts +2 -1
- package/src/__tests__/unit/hover-selection.ts +2 -1
- package/src/__tests__/unit/index.ts +2 -1
- package/src/__tests__/unit/layout.ts +2 -1
- package/src/__tests__/unit/nodeviews/TableComponent.tsx +1 -1
- package/src/__tests__/unit/nodeviews/TableContainer.tsx +1 -1
- package/src/__tests__/unit/nodeviews/cell.ts +2 -1
- package/src/__tests__/unit/nodeviews/table.ts +1 -0
- package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +1 -0
- package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +1 -0
- package/src/__tests__/unit/pm-plugins/main.ts +1 -0
- package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -1
- package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +1 -0
- package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +1 -0
- package/src/__tests__/unit/pm-plugins/table-width.ts +2 -1
- package/src/__tests__/unit/sort-column.ts +2 -1
- package/src/__tests__/unit/toolbar.ts +1 -0
- package/src/__tests__/unit/transforms/delete-columns.ts +2 -1
- package/src/__tests__/unit/transforms/delete-rows.ts +2 -1
- package/src/__tests__/unit/transforms/merging.ts +2 -1
- package/src/__tests__/unit/ui/ContextualMenu.tsx +2 -1
- package/src/__tests__/unit/ui/CornerControls.tsx +2 -1
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +2 -1
- package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +2 -1
- package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingDragMenu.tsx +2 -1
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +1 -1
- package/src/__tests__/unit/ui/NumberColumn.tsx +2 -1
- package/src/__tests__/unit/ui/RowControls.tsx +2 -1
- package/src/__tests__/unit/ui/RowDragControls.tsx +2 -1
- package/src/__tests__/unit/ui/TableFloatingColumnControls.tsx +2 -1
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +2 -1
- package/src/__tests__/unit/undo-redo.ts +1 -0
- package/src/__tests__/unit/utils/collapse.ts +1 -0
- package/src/__tests__/unit/utils/nodes.ts +2 -1
- package/src/__tests__/unit/utils/row-controls.ts +2 -1
- package/src/__tests__/unit/utils.ts +1 -0
- package/src/plugins/table/nodeviews/TableRow.ts +1 -1
- package/src/plugins/table/pm-plugins/drag-and-drop/plugin.ts +1 -1
- package/src/plugins/table/pm-plugins/drag-and-drop/utils/monitor.ts +1 -1
- package/src/plugins/table/pm-plugins/keymap.ts +4 -4
- package/src/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,8 +16,8 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
16
16
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
18
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
|
-
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
20
19
|
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
20
|
+
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
21
21
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
22
22
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
23
23
|
var _commands = require("../pm-plugins/sticky-headers/commands");
|
|
@@ -9,8 +9,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
10
10
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
11
11
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
12
|
-
var _pragmaticDragAndDropReactBeautifulDndAutoscroll = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll");
|
|
13
12
|
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
13
|
+
var _pragmaticDragAndDropReactBeautifulDndAutoscroll = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll");
|
|
14
14
|
var _mergedCells = require("../../utils/merged-cells");
|
|
15
15
|
var _pluginFactory = require("../plugin-factory");
|
|
16
16
|
var _actions = require("./actions");
|
|
@@ -10,8 +10,8 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
10
10
|
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
11
11
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
12
12
|
var _commands2 = require("../commands");
|
|
13
|
-
var _commandsWithAnalytics = require("../commands-with-analytics");
|
|
14
13
|
var _insert = require("../commands/insert");
|
|
14
|
+
var _commandsWithAnalytics = require("../commands-with-analytics");
|
|
15
15
|
var _analytics2 = require("../utils/analytics");
|
|
16
16
|
var createTableWithAnalytics = function createTableWithAnalytics(editorAnalyticsAPI) {
|
|
17
17
|
return (0, _analytics2.withEditorAnalyticsAPI)({
|
package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ColumnDropTarget = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
10
9
|
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
10
|
+
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
var ColumnDropTarget = exports.ColumnDropTarget = function ColumnDropTarget(_ref) {
|
|
@@ -3,8 +3,8 @@ import debounce from 'lodash/debounce';
|
|
|
3
3
|
import throttle from 'lodash/throttle';
|
|
4
4
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
7
6
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
7
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
8
8
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
9
9
|
import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
10
10
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { getCellsInRow } from '@atlaskit/editor-tables/utils';
|
|
4
|
-
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
5
4
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
5
|
+
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
6
6
|
import { hasMergedCellsInColumn, hasMergedCellsInRow } from '../../utils/merged-cells';
|
|
7
7
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
8
8
|
import { DragAndDropActionType } from './actions';
|
|
@@ -3,8 +3,8 @@ import { addColumnAfter, addColumnBefore, addRowAfter, addRowBefore, backspace,
|
|
|
3
3
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
4
4
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
5
5
|
import { createTable, goToNextCell, moveCursorBackward, triggerUnlessTableHeader } from '../commands';
|
|
6
|
-
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
7
6
|
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
7
|
+
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
8
8
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
9
9
|
const createTableWithAnalytics = editorAnalyticsAPI => withEditorAnalyticsAPI({
|
|
10
10
|
action: ACTION.INSERTED,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
2
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
4
4
|
export const ColumnDropTarget = ({
|
|
5
5
|
index,
|
|
6
6
|
localId,
|
|
@@ -11,8 +11,8 @@ import debounce from 'lodash/debounce';
|
|
|
11
11
|
import throttle from 'lodash/throttle';
|
|
12
12
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
15
14
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
15
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
16
16
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
17
17
|
import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
18
18
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
@@ -2,8 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { getCellsInRow } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
6
5
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
6
|
+
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
7
7
|
import { hasMergedCellsInColumn, hasMergedCellsInRow } from '../../utils/merged-cells';
|
|
8
8
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
9
9
|
import { DragAndDropActionType } from './actions';
|
|
@@ -3,8 +3,8 @@ import { addColumnAfter, addColumnBefore, addRowAfter, addRowBefore, backspace,
|
|
|
3
3
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
4
4
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
5
5
|
import { createTable, goToNextCell, moveCursorBackward, triggerUnlessTableHeader } from '../commands';
|
|
6
|
-
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
7
6
|
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
7
|
+
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
8
8
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
9
9
|
var createTableWithAnalytics = function createTableWithAnalytics(editorAnalyticsAPI) {
|
|
10
10
|
return withEditorAnalyticsAPI({
|
package/dist/esm/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
2
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
4
4
|
export var ColumnDropTarget = function ColumnDropTarget(_ref) {
|
|
5
5
|
var index = _ref.index,
|
|
6
6
|
localId = _ref.localId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.24",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^32.0.0",
|
|
31
31
|
"@atlaskit/custom-steps": "^0.0.2",
|
|
32
32
|
"@atlaskit/editor-common": "^76.18.0",
|
|
33
|
-
"@atlaskit/editor-palette": "1.5.
|
|
33
|
+
"@atlaskit/editor-palette": "1.5.2",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
35
35
|
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/pragmatic-drag-and-drop": "^0.24.0",
|
|
45
45
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.12.0",
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.4",
|
|
47
|
-
"@atlaskit/primitives": "^1.
|
|
47
|
+
"@atlaskit/primitives": "^1.10.0",
|
|
48
48
|
"@atlaskit/theme": "^12.6.0",
|
|
49
49
|
"@atlaskit/tokens": "^1.28.0",
|
|
50
50
|
"@atlaskit/tooltip": "^17.8.0",
|
|
@@ -9,6 +9,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
9
9
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
10
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
11
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -30,7 +31,6 @@ import {
|
|
|
30
31
|
import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
|
|
31
32
|
import { B50 } from '@atlaskit/theme/colors';
|
|
32
33
|
|
|
33
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
34
34
|
import {
|
|
35
35
|
deleteColumnsWithAnalytics,
|
|
36
36
|
deleteRowsWithAnalytics,
|
|
@@ -51,6 +51,7 @@ import { handleCut } from '../../plugins/table/event-handlers';
|
|
|
51
51
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
52
52
|
import { replaceSelectedTable } from '../../plugins/table/transforms';
|
|
53
53
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
54
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
54
55
|
|
|
55
56
|
const defaultTableDoc = doc(
|
|
56
57
|
table()(
|
|
@@ -7,6 +7,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import { removeColumnAt } from '@atlaskit/editor-tables/utils';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -23,10 +24,10 @@ import {
|
|
|
23
24
|
tr,
|
|
24
25
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
26
|
|
|
26
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
27
27
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
28
28
|
import { setResizeHandlePos } from '../../plugins/table/pm-plugins/table-resizing/commands';
|
|
29
29
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
30
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
30
31
|
|
|
31
32
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
32
33
|
|
|
@@ -8,6 +8,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
8
8
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
11
12
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
12
13
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
13
14
|
import {
|
|
@@ -10,6 +10,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
10
10
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
11
11
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
12
12
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
14
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
14
15
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
15
16
|
import {
|
|
@@ -9,6 +9,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { isColumnSelected } from '@atlaskit/editor-tables/utils';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -7,6 +7,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
7
7
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
8
8
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -23,8 +24,8 @@ import {
|
|
|
23
24
|
tr,
|
|
24
25
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
26
|
|
|
26
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
27
27
|
import { sortByColumn } from '../../../plugins/table/commands/sort';
|
|
28
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
29
|
|
|
29
30
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
30
31
|
|
|
@@ -17,6 +17,7 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
17
17
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
18
18
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
19
19
|
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
20
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
20
21
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
21
22
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
22
23
|
import {
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
selectColumn,
|
|
29
29
|
selectTable,
|
|
30
30
|
} from '@atlaskit/editor-tables/utils';
|
|
31
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
31
32
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
32
33
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
33
34
|
import {
|
|
@@ -52,7 +53,6 @@ import {
|
|
|
52
53
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
53
54
|
import defaultSchema from '@atlaskit/editor-test-helpers/schema';
|
|
54
55
|
|
|
55
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
56
56
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
57
57
|
import type { PluginConfig, TablePluginState } from '../../plugins/table/types';
|
|
58
58
|
import {
|
|
@@ -62,6 +62,7 @@ import {
|
|
|
62
62
|
transformSliceToRemoveOpenTable,
|
|
63
63
|
unwrapContentFromTable,
|
|
64
64
|
} from '../../plugins/table/utils/paste';
|
|
65
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
65
66
|
|
|
66
67
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
67
68
|
const array = (...args: any): Node[] => args.map((i: any) => i(defaultSchema));
|
|
@@ -7,6 +7,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -22,11 +23,11 @@ import {
|
|
|
22
23
|
tr,
|
|
23
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
24
25
|
|
|
25
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
26
26
|
import { whenTableInFocus } from '../../../plugins/table/event-handlers';
|
|
27
27
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
28
28
|
import { setDragging } from '../../../plugins/table/pm-plugins/table-resizing/commands';
|
|
29
29
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
30
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
31
|
|
|
31
32
|
describe('event-handlers', () => {
|
|
32
33
|
let editor: any;
|
|
@@ -9,6 +9,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
9
9
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
10
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
11
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -27,7 +28,6 @@ import {
|
|
|
27
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
28
29
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
29
30
|
|
|
30
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
31
31
|
import {
|
|
32
32
|
addResizeHandleDecorations,
|
|
33
33
|
showInsertColumnButton,
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
|
|
43
43
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
44
44
|
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
45
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
45
46
|
|
|
46
47
|
describe('table plugin: decorations', () => {
|
|
47
48
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -6,6 +6,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
6
6
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
10
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
10
11
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
11
12
|
import {
|
|
@@ -22,9 +23,9 @@ import {
|
|
|
22
23
|
tr,
|
|
23
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
24
25
|
|
|
25
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
26
26
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
27
27
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
28
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
28
29
|
|
|
29
30
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
30
31
|
|
|
@@ -14,6 +14,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
14
14
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
15
15
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
16
16
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
17
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
17
18
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
18
19
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
19
20
|
import {
|
|
@@ -7,6 +7,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
7
7
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
8
8
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -22,11 +23,11 @@ import {
|
|
|
22
23
|
tr,
|
|
23
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
24
25
|
|
|
25
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
26
26
|
import { handleDocOrSelectionChanged } from '../../plugins/table/handlers';
|
|
27
27
|
import { defaultTableSelection } from '../../plugins/table/pm-plugins/default-table-selection';
|
|
28
28
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
29
29
|
import type { TablePluginState } from '../../plugins/table/types';
|
|
30
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
30
31
|
|
|
31
32
|
describe('table action handlers', () => {
|
|
32
33
|
let editor: any;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
getCellsInRow,
|
|
13
13
|
getCellsInTable,
|
|
14
14
|
} from '@atlaskit/editor-tables/utils';
|
|
15
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
15
16
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
16
17
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
17
18
|
import {
|
|
@@ -30,7 +31,6 @@ import {
|
|
|
30
31
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
31
32
|
import { selectColumns } from '@atlaskit/editor-test-helpers/table';
|
|
32
33
|
|
|
33
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
34
34
|
import {
|
|
35
35
|
clearHoverSelection,
|
|
36
36
|
hoverColumns,
|
|
@@ -41,6 +41,7 @@ import { getDecorations } from '../../plugins/table/pm-plugins/decorations/plugi
|
|
|
41
41
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
42
42
|
import type { TablePluginState } from '../../plugins/table/types';
|
|
43
43
|
import { TableDecorations } from '../../plugins/table/types';
|
|
44
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
44
45
|
|
|
45
46
|
describe('table hover selection plugin', () => {
|
|
46
47
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
selectRow,
|
|
21
21
|
selectTable,
|
|
22
22
|
} from '@atlaskit/editor-tables/utils';
|
|
23
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
23
24
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
24
25
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
25
26
|
import {
|
|
@@ -44,7 +45,6 @@ import {
|
|
|
44
45
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
45
46
|
import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
|
|
46
47
|
|
|
47
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
48
48
|
import {
|
|
49
49
|
createTable,
|
|
50
50
|
insertColumn,
|
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
checkIfHeaderRowEnabled,
|
|
62
62
|
checkIfNumberColumnEnabled,
|
|
63
63
|
} from '../../plugins/table/utils';
|
|
64
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
64
65
|
|
|
65
66
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
66
67
|
|
|
@@ -9,6 +9,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -24,7 +25,6 @@ import {
|
|
|
24
25
|
tr,
|
|
25
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
26
27
|
|
|
27
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
28
28
|
import { toggleTableLayout } from '../../plugins/table/commands';
|
|
29
29
|
import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
|
|
30
30
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
@@ -32,6 +32,7 @@ import type {
|
|
|
32
32
|
PermittedLayoutsDescriptor,
|
|
33
33
|
TablePluginState,
|
|
34
34
|
} from '../../plugins/table/types';
|
|
35
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
35
36
|
|
|
36
37
|
describe('table toolbar', () => {
|
|
37
38
|
const tableOptions = {
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
tr,
|
|
28
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
29
|
|
|
30
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
30
|
import * as commands from '../../../plugins/table/commands';
|
|
32
31
|
import {
|
|
33
32
|
hoverTable,
|
|
@@ -37,6 +36,7 @@ import TableComponent from '../../../plugins/table/nodeviews/TableComponent';
|
|
|
37
36
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
38
37
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
39
38
|
import { TableCssClassName as ClassName } from '../../../plugins/table/types';
|
|
39
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
40
40
|
|
|
41
41
|
jest.mock('../../../plugins/table/utils/nodes', () =>
|
|
42
42
|
Object.assign({}, jest.requireActual('../../../plugins/table/utils/nodes'), {
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
tr,
|
|
24
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
25
|
|
|
26
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
27
26
|
import {
|
|
28
27
|
ResizableTableContainer,
|
|
29
28
|
TableContainer,
|
|
@@ -31,6 +30,7 @@ import {
|
|
|
31
30
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
32
31
|
import { pluginKey as tableResizingPluginKey } from '../../../plugins/table/pm-plugins/table-width';
|
|
33
32
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
33
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
34
34
|
|
|
35
35
|
const mockStartMeasure = jest.fn();
|
|
36
36
|
const mockEndMeasure = jest.fn(() => {
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
findCellClosestToPos,
|
|
16
16
|
setCellAttrs,
|
|
17
17
|
} from '@atlaskit/editor-tables/utils';
|
|
18
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
18
19
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
19
20
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
20
21
|
import {
|
|
@@ -31,10 +32,10 @@ import {
|
|
|
31
32
|
tr,
|
|
32
33
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
33
34
|
|
|
34
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
35
|
import TableCell from '../../../plugins/table/nodeviews/TableCell';
|
|
36
36
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
37
37
|
import type { PluginConfig } from '../../../plugins/table/types';
|
|
38
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
38
39
|
|
|
39
40
|
jest.mock('@atlaskit/editor-common/utils', () => ({
|
|
40
41
|
...jest.requireActual<Object>('@atlaskit/editor-common/utils'),
|
|
@@ -9,6 +9,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -11,6 +11,7 @@ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
13
13
|
import { getCellsInColumn } from '@atlaskit/editor-tables/utils';
|
|
14
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
15
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
15
16
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
16
17
|
import {
|
|
@@ -9,6 +9,7 @@ import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
9
9
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import { addColumnAt } from '@atlaskit/editor-tables/utils';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -10,6 +10,7 @@ import { undo } from '@atlaskit/editor-prosemirror/history';
|
|
|
10
10
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import * as pmUtils from '@atlaskit/editor-prosemirror/utils';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
14
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
14
15
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
15
16
|
import {
|
|
@@ -6,6 +6,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
6
6
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
10
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
10
11
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
11
12
|
import {
|
|
@@ -21,8 +22,8 @@ import {
|
|
|
21
22
|
tr,
|
|
22
23
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
23
24
|
|
|
24
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
25
25
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
26
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
26
27
|
|
|
27
28
|
describe('table/safari-delete-composition-text-issue-workaround', () => {
|
|
28
29
|
let editor: any;
|
|
@@ -16,6 +16,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
16
16
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
17
17
|
import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
18
18
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
19
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
19
20
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
20
21
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
21
22
|
import {
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
akEditorDefaultLayoutWidth,
|
|
20
20
|
akEditorFullPageMaxWidth,
|
|
21
21
|
} from '@atlaskit/editor-shared-styles/consts';
|
|
22
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
22
23
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
23
24
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
24
25
|
import {
|
|
@@ -8,6 +8,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import { undo } from '@atlaskit/editor-prosemirror/history';
|
|
10
10
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
11
12
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
12
13
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
13
14
|
import {
|
|
@@ -24,8 +25,8 @@ import {
|
|
|
24
25
|
tr,
|
|
25
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
26
27
|
|
|
27
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
28
|
import { pluginKey as tablePluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
29
30
|
|
|
30
31
|
const createDoc = (attrs: any) =>
|
|
31
32
|
doc(
|
|
@@ -9,6 +9,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
9
9
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
10
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
11
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -25,13 +26,13 @@ import {
|
|
|
25
26
|
tr,
|
|
26
27
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
28
|
|
|
28
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
29
29
|
import { sortByColumn } from '../../plugins/table/commands';
|
|
30
30
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
31
31
|
import type {
|
|
32
32
|
PermittedLayoutsDescriptor,
|
|
33
33
|
TablePluginState,
|
|
34
34
|
} from '../../plugins/table/types';
|
|
35
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
35
36
|
|
|
36
37
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
37
38
|
|
|
@@ -12,6 +12,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
12
12
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
13
13
|
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
14
14
|
import { splitCell } from '@atlaskit/editor-tables/utils';
|
|
15
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
15
16
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
16
17
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
17
18
|
import {
|
|
@@ -10,6 +10,7 @@ import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
12
12
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
14
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
14
15
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
15
16
|
import {
|
|
@@ -28,10 +29,10 @@ import {
|
|
|
28
29
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
30
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
30
31
|
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
33
33
|
import { deleteColumns } from '../../../plugins/table/transforms';
|
|
34
34
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
36
|
|
|
36
37
|
const colsToRect = (cols: Array<number>, noOfRows: number): Rect => ({
|
|
37
38
|
left: Math.min(...cols),
|
|
@@ -10,6 +10,7 @@ import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
12
12
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
14
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
14
15
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
15
16
|
import {
|
|
@@ -28,10 +29,10 @@ import {
|
|
|
28
29
|
tr,
|
|
29
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
31
|
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
33
33
|
import { deleteRows } from '../../../plugins/table/transforms';
|
|
34
34
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
36
|
|
|
36
37
|
const rowsToRect = (rows: Array<number>, noOfColumns: number): Rect => ({
|
|
37
38
|
left: 0,
|
|
@@ -8,6 +8,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
8
8
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
11
12
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
12
13
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
13
14
|
import {
|
|
@@ -24,10 +25,10 @@ import {
|
|
|
24
25
|
tr,
|
|
25
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
26
27
|
|
|
27
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
28
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
29
|
import { mergeCells } from '../../../plugins/table/transforms';
|
|
30
30
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
31
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
32
|
|
|
32
33
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
33
34
|
|
|
@@ -11,6 +11,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
11
11
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
12
12
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
13
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
15
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
15
16
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
16
17
|
import {
|
|
@@ -28,8 +29,8 @@ import {
|
|
|
28
29
|
tr,
|
|
29
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
31
|
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
import { ContextualMenu } from '../../../plugins/table/ui/FloatingContextualMenu/ContextualMenu';
|
|
33
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
34
|
|
|
34
35
|
describe('ContextualMenu', () => {
|
|
35
36
|
const getEditorContainerWidth = () => ({ width: 500 });
|
|
@@ -12,6 +12,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
12
12
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
13
13
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
14
14
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
15
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
15
16
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
16
17
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
17
18
|
import {
|
|
@@ -26,10 +27,10 @@ import {
|
|
|
26
27
|
tr,
|
|
27
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
28
29
|
|
|
29
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
30
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
31
31
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
32
32
|
import { CornerControls } from '../../../plugins/table/ui/TableFloatingControls/CornerControls';
|
|
33
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
34
|
|
|
34
35
|
describe('CornerControls', () => {
|
|
35
36
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -15,6 +15,7 @@ import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
15
15
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
16
16
|
import * as prosemirrorUtils from '@atlaskit/editor-prosemirror/utils';
|
|
17
17
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
18
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
18
19
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
19
20
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
20
21
|
import {
|
|
@@ -31,9 +32,9 @@ import {
|
|
|
31
32
|
tr,
|
|
32
33
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
33
34
|
|
|
34
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
35
|
import type { Props as FloatingContextualButtonProps } from '../../../plugins/table/ui/FloatingContextualButton';
|
|
36
36
|
import FloatingContextualButton from '../../../plugins/table/ui/FloatingContextualButton';
|
|
37
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
37
38
|
|
|
38
39
|
jest.mock('@atlaskit/editor-prosemirror/utils', () => {
|
|
39
40
|
// Unblock prosemirror bump:
|
|
@@ -11,6 +11,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
11
11
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
12
12
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
13
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
15
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
15
16
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
16
17
|
import {
|
|
@@ -28,9 +29,9 @@ import {
|
|
|
28
29
|
tr,
|
|
29
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
31
|
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
33
33
|
import FloatingContextualMenu from '../../../plugins/table/ui/FloatingContextualMenu';
|
|
34
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
34
35
|
|
|
35
36
|
describe('FloatingContextualMenu', () => {
|
|
36
37
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
21
21
|
import { selectColumns, selectRows } from '@atlaskit/editor-test-helpers/table';
|
|
22
22
|
|
|
23
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
24
23
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
25
24
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
26
25
|
import { TableCssClassName } from '../../../plugins/table/types';
|
|
27
26
|
import type { Props as FloatingDeleteButtonProps } from '../../../plugins/table/ui/FloatingDeleteButton';
|
|
28
27
|
import FloatingDeleteButton from '../../../plugins/table/ui/FloatingDeleteButton';
|
|
29
28
|
import * as tableColumnControlsUtils from '../../../plugins/table/utils/column-controls';
|
|
29
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
30
|
|
|
31
31
|
describe('Floating Delete Button', () => {
|
|
32
32
|
const createEditor = createEditorFactory<TablePluginState>();
|
|
@@ -13,6 +13,7 @@ import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
13
13
|
import * as prosemirrorUtils from '@atlaskit/editor-prosemirror/utils';
|
|
14
14
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
15
15
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
16
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
16
17
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
17
18
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
18
19
|
import {
|
|
@@ -31,8 +32,8 @@ import {
|
|
|
31
32
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
32
33
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
33
34
|
|
|
34
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
35
|
import FloatingDragMenu from '../../../plugins/table/ui/FloatingDragMenu';
|
|
36
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
37
|
|
|
37
38
|
describe('FloatingDragMenu', () => {
|
|
38
39
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -32,13 +32,13 @@ import {
|
|
|
32
32
|
selectRows,
|
|
33
33
|
} from '@atlaskit/editor-test-helpers/table';
|
|
34
34
|
|
|
35
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
35
|
import { setEditorFocus, setTableRef } from '../../../plugins/table/commands';
|
|
37
36
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
38
37
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
39
38
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
40
39
|
import type { Props as FloatingInsertButtonProps } from '../../../plugins/table/ui/FloatingInsertButton';
|
|
41
40
|
import { FloatingInsertButton } from '../../../plugins/table/ui/FloatingInsertButton';
|
|
41
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
42
42
|
|
|
43
43
|
jest.mock('@atlaskit/editor-prosemirror/utils', () => {
|
|
44
44
|
// Unblock prosemirror bump:
|
|
@@ -11,6 +11,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
11
11
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
12
12
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
13
13
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
14
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
15
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
15
16
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
16
17
|
import {
|
|
@@ -26,10 +27,10 @@ import {
|
|
|
26
27
|
tr,
|
|
27
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
28
29
|
|
|
29
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
30
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
31
31
|
import { TableCssClassName as ClassName } from '../../../plugins/table/types';
|
|
32
32
|
import NumberColumn from '../../../plugins/table/ui/TableFloatingControls/NumberColumn';
|
|
33
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
34
|
|
|
34
35
|
describe('NumberColumn', () => {
|
|
35
36
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -13,6 +13,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
13
13
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
14
14
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
15
15
|
import { getSelectionRect, selectRow } from '@atlaskit/editor-tables/utils';
|
|
16
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
16
17
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
17
18
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
18
19
|
import {
|
|
@@ -33,11 +34,11 @@ import {
|
|
|
33
34
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
34
35
|
import { selectRows } from '@atlaskit/editor-test-helpers/table';
|
|
35
36
|
|
|
36
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
37
37
|
import { hoverRows } from '../../../plugins/table/commands';
|
|
38
38
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
39
39
|
import TableFloatingControls from '../../../plugins/table/ui/TableFloatingControls';
|
|
40
40
|
import { RowControls } from '../../../plugins/table/ui/TableFloatingControls/RowControls';
|
|
41
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
41
42
|
|
|
42
43
|
describe('RowControls', () => {
|
|
43
44
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -11,6 +11,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
11
11
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
12
12
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
13
13
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
14
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
15
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
15
16
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
16
17
|
import {
|
|
@@ -27,10 +28,10 @@ import {
|
|
|
27
28
|
tr,
|
|
28
29
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
30
|
|
|
30
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
31
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
32
32
|
// import { TableCssClassName as ClassName } from '../../../plugins/table/types';
|
|
33
33
|
import { DragControls } from '../../../plugins/table/ui/TableFloatingControls/RowControls';
|
|
34
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
34
35
|
|
|
35
36
|
describe('NumberColumn', () => {
|
|
36
37
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -14,6 +14,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
14
14
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
15
15
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
16
16
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
17
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
17
18
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
18
19
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
19
20
|
import {
|
|
@@ -29,10 +30,10 @@ import {
|
|
|
29
30
|
tr,
|
|
30
31
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
31
32
|
|
|
32
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
33
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
34
34
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
35
|
import TableFloatingColumnControls from '../../../plugins/table/ui/TableFloatingColumnControls';
|
|
36
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
37
|
|
|
37
38
|
describe('TableFloatingColumnControls', () => {
|
|
38
39
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -12,6 +12,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
12
12
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
13
13
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
14
14
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
15
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
15
16
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
16
17
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
17
18
|
import {
|
|
@@ -28,12 +29,12 @@ import {
|
|
|
28
29
|
tr,
|
|
29
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
31
|
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
import { hoverTable } from '../../../plugins/table/commands';
|
|
33
33
|
import { getDecorations } from '../../../plugins/table/pm-plugins/decorations/plugin';
|
|
34
34
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
35
35
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
36
36
|
import TableFloatingControls from '../../../plugins/table/ui/TableFloatingControls';
|
|
37
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
37
38
|
|
|
38
39
|
describe('TableFloatingControls', () => {
|
|
39
40
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -10,6 +10,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
10
10
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
11
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
12
12
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
14
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
14
15
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
15
16
|
import {
|
|
@@ -6,6 +6,7 @@ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
|
6
6
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
10
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
10
11
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
11
12
|
import {
|
|
@@ -7,6 +7,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -25,9 +26,9 @@ import {
|
|
|
25
26
|
tr,
|
|
26
27
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
28
|
|
|
28
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
29
29
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
30
30
|
import { containsHeaderColumn } from '../../../plugins/table/utils/nodes';
|
|
31
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
32
|
|
|
32
33
|
describe('table merging logic', () => {
|
|
33
34
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -9,6 +9,7 @@ import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
9
9
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
11
11
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
12
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
12
13
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
13
14
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
15
|
import {
|
|
@@ -25,9 +26,9 @@ import {
|
|
|
25
26
|
th,
|
|
26
27
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
28
|
|
|
28
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
29
29
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
30
30
|
import { copyPreviousRow } from '../../../plugins/table/utils/row-controls';
|
|
31
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
32
|
|
|
32
33
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
33
34
|
|
|
@@ -7,6 +7,7 @@ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
|
7
7
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
11
|
import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
11
12
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
12
13
|
import {
|
|
@@ -6,8 +6,8 @@ import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
|
6
6
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
10
9
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
10
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
11
11
|
|
|
12
12
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
13
13
|
import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -6,8 +6,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import { getCellsInRow } from '@atlaskit/editor-tables/utils';
|
|
9
|
-
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
10
9
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
10
|
+
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
11
11
|
|
|
12
12
|
import type { DraggableSourceData } from '../../types';
|
|
13
13
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
1
2
|
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
2
3
|
import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
|
-
import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
6
|
DraggableData,
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
moveCursorBackward,
|
|
29
29
|
triggerUnlessTableHeader,
|
|
30
30
|
} from '../commands';
|
|
31
|
+
import {
|
|
32
|
+
addColumnAfter as addColumnAfterCommand,
|
|
33
|
+
addColumnBefore as addColumnBeforeCommand,
|
|
34
|
+
} from '../commands/insert';
|
|
31
35
|
import {
|
|
32
36
|
addRowAroundSelection,
|
|
33
37
|
deleteTableIfSelectedWithAnalytics,
|
|
34
38
|
emptyMultipleCellsWithAnalytics,
|
|
35
39
|
} from '../commands-with-analytics';
|
|
36
|
-
import {
|
|
37
|
-
addColumnAfter as addColumnAfterCommand,
|
|
38
|
-
addColumnBefore as addColumnBeforeCommand,
|
|
39
|
-
} from '../commands/insert';
|
|
40
40
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
41
41
|
|
|
42
42
|
const createTableWithAnalytics = (
|
package/src/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
4
3
|
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
|
+
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
5
5
|
|
|
6
6
|
import type { DraggableSourceData } from '../../../types';
|
|
7
7
|
|