@atlaskit/editor-plugin-table 5.4.3 → 5.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/plugins/table/nodeviews/TableComponent.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/cjs/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/dist/es2019/plugins/table/nodeviews/TableComponent.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/es2019/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/dist/esm/plugins/table/nodeviews/TableComponent.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/dist/esm/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/package.json +3 -3
- package/src/__tests__/unit/analytics.ts +1 -1
- package/src/__tests__/unit/collab.ts +1 -1
- package/src/__tests__/unit/commands/sort.ts +1 -1
- package/src/__tests__/unit/copy-paste.ts +1 -1
- package/src/__tests__/unit/event-handlers/index.ts +1 -1
- package/src/__tests__/unit/event-handlers.ts +1 -1
- package/src/__tests__/unit/fix-tables.ts +1 -1
- package/src/__tests__/unit/handlers.ts +1 -1
- package/src/__tests__/unit/hover-selection.ts +1 -1
- package/src/__tests__/unit/index.ts +1 -1
- package/src/__tests__/unit/layout.ts +1 -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 +1 -1
- package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +1 -1
- package/src/__tests__/unit/pm-plugins/table-width.ts +1 -1
- package/src/__tests__/unit/sort-column.ts +1 -1
- package/src/__tests__/unit/transforms/delete-columns.ts +1 -1
- package/src/__tests__/unit/transforms/delete-rows.ts +1 -1
- package/src/__tests__/unit/transforms/merging.ts +1 -1
- package/src/__tests__/unit/ui/ContextualMenu.tsx +1 -1
- package/src/__tests__/unit/ui/CornerControls.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingDragMenu.tsx +1 -1
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +1 -1
- package/src/__tests__/unit/ui/NumberColumn.tsx +1 -1
- package/src/__tests__/unit/ui/RowControls.tsx +1 -1
- package/src/__tests__/unit/ui/RowDragControls.tsx +1 -1
- package/src/__tests__/unit/ui/TableFloatingColumnControls.tsx +1 -1
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +1 -1
- package/src/__tests__/unit/utils/nodes.ts +1 -1
- package/src/__tests__/unit/utils/row-controls.ts +1 -1
- package/src/plugins/table/nodeviews/TableComponent.tsx +2 -2
- 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/src/plugins/table/ui/TableFloatingControls/RowDropTarget/index.tsx +1 -1
- package/tmp/api-report-tmp.d.ts +0 -100
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#56790](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/56790) [`ff577a7969d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff577a7969d4) - ED-21266: Updated @atlaskit/adf-schema to 34.0.1
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 5.4.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -24,9 +24,9 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
25
|
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
26
26
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
|
-
var _combine = require("@atlaskit/pragmatic-drag-and-drop/util/combine");
|
|
28
27
|
var _element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
29
28
|
var _element2 = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element");
|
|
29
|
+
var _combine = require("@atlaskit/pragmatic-drag-and-drop/util/combine");
|
|
30
30
|
var _commands = require("../commands");
|
|
31
31
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
32
32
|
var _stickyHeaders = require("../pm-plugins/sticky-headers");
|
|
@@ -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 _insert = require("../commands/insert");
|
|
14
13
|
var _commandsWithAnalytics = require("../commands-with-analytics");
|
|
14
|
+
var _insert = require("../commands/insert");
|
|
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 _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
10
9
|
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
10
|
+
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
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) {
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
10
9
|
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
|
|
10
|
+
var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
|
|
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 RowDropTarget = function RowDropTarget(_ref) {
|
|
@@ -11,9 +11,9 @@ import { analyticsEventKey, browser, isValidPosition } from '@atlaskit/editor-co
|
|
|
11
11
|
import { MAX_BROWSER_SCROLLBAR_HEIGHT, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
13
13
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
15
14
|
import { autoScrollForElements, autoScrollWindowForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
16
15
|
import { unsafeOverflowAutoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element';
|
|
16
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
17
17
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
18
18
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
19
19
|
import { findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers';
|
|
@@ -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 { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
7
6
|
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
7
|
+
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
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 { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
2
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
4
|
export const ColumnDropTarget = ({
|
|
5
5
|
index,
|
|
6
6
|
localId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
2
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
4
|
const RowDropTarget = ({
|
|
5
5
|
index,
|
|
6
6
|
localId,
|
|
@@ -21,9 +21,9 @@ import { analyticsEventKey, browser, isValidPosition } from '@atlaskit/editor-co
|
|
|
21
21
|
import { MAX_BROWSER_SCROLLBAR_HEIGHT, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
|
|
22
22
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
23
23
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
24
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
25
24
|
import { autoScrollForElements, autoScrollWindowForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
26
25
|
import { unsafeOverflowAutoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element';
|
|
26
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
27
27
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
28
28
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
29
29
|
import { findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers';
|
|
@@ -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 { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
7
6
|
import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
|
|
7
|
+
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
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 { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
2
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
4
|
export var ColumnDropTarget = function ColumnDropTarget(_ref) {
|
|
5
5
|
var index = _ref.index,
|
|
6
6
|
localId = _ref.localId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
3
2
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
4
|
var RowDropTarget = function RowDropTarget(_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.4.
|
|
3
|
+
"version": "5.4.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"releaseModel": "continuous"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^34.0.
|
|
31
|
-
"@atlaskit/custom-steps": "^0.0.
|
|
30
|
+
"@atlaskit/adf-schema": "^34.0.1",
|
|
31
|
+
"@atlaskit/custom-steps": "^0.0.5",
|
|
32
32
|
"@atlaskit/editor-common": "^76.23.0",
|
|
33
33
|
"@atlaskit/editor-palette": "1.5.2",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
|
|
32
32
|
import { B50 } from '@atlaskit/theme/colors';
|
|
33
33
|
|
|
34
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
34
35
|
import {
|
|
35
36
|
deleteColumnsWithAnalytics,
|
|
36
37
|
deleteRowsWithAnalytics,
|
|
@@ -51,7 +52,6 @@ import { handleCut } from '../../plugins/table/event-handlers';
|
|
|
51
52
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
52
53
|
import { replaceSelectedTable } from '../../plugins/table/transforms';
|
|
53
54
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
54
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
55
55
|
|
|
56
56
|
const defaultTableDoc = doc(
|
|
57
57
|
table()(
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
tr,
|
|
25
25
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
26
26
|
|
|
27
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
27
28
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
28
29
|
import { setResizeHandlePos } from '../../plugins/table/pm-plugins/table-resizing/commands';
|
|
29
30
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
30
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
31
31
|
|
|
32
32
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
33
33
|
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
tr,
|
|
25
25
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
26
26
|
|
|
27
|
-
import { sortByColumn } from '../../../plugins/table/commands/sort';
|
|
28
27
|
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
|
+
import { sortByColumn } from '../../../plugins/table/commands/sort';
|
|
29
29
|
|
|
30
30
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
31
31
|
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
54
54
|
import defaultSchema from '@atlaskit/editor-test-helpers/schema';
|
|
55
55
|
|
|
56
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
56
57
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
57
58
|
import type { PluginConfig, TablePluginState } from '../../plugins/table/types';
|
|
58
59
|
import {
|
|
@@ -62,7 +63,6 @@ import {
|
|
|
62
63
|
transformSliceToRemoveOpenTable,
|
|
63
64
|
unwrapContentFromTable,
|
|
64
65
|
} from '../../plugins/table/utils/paste';
|
|
65
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
66
66
|
|
|
67
67
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
68
68
|
const array = (...args: any): Node[] => args.map((i: any) => i(defaultSchema));
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
tr,
|
|
24
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
25
|
|
|
26
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
26
27
|
import { whenTableInFocus } from '../../../plugins/table/event-handlers';
|
|
27
28
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
28
29
|
import { setDragging } from '../../../plugins/table/pm-plugins/table-resizing/commands';
|
|
29
30
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
30
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
31
|
|
|
32
32
|
describe('event-handlers', () => {
|
|
33
33
|
let editor: any;
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
29
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
30
30
|
|
|
31
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
31
32
|
import {
|
|
32
33
|
addResizeHandleDecorations,
|
|
33
34
|
showInsertColumnButton,
|
|
@@ -42,7 +43,6 @@ import {
|
|
|
42
43
|
import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
|
|
43
44
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
44
45
|
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
45
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
46
46
|
|
|
47
47
|
describe('table plugin: decorations', () => {
|
|
48
48
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
tr,
|
|
24
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
25
|
|
|
26
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
26
27
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
27
28
|
import type { PluginConfig } from '../../plugins/table/types';
|
|
28
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
29
29
|
|
|
30
30
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
31
31
|
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
tr,
|
|
24
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
25
|
|
|
26
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
26
27
|
import { handleDocOrSelectionChanged } from '../../plugins/table/handlers';
|
|
27
28
|
import { defaultTableSelection } from '../../plugins/table/pm-plugins/default-table-selection';
|
|
28
29
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
29
30
|
import type { TablePluginState } from '../../plugins/table/types';
|
|
30
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
31
31
|
|
|
32
32
|
describe('table action handlers', () => {
|
|
33
33
|
let editor: any;
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
32
32
|
import { selectColumns } from '@atlaskit/editor-test-helpers/table';
|
|
33
33
|
|
|
34
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
34
35
|
import {
|
|
35
36
|
clearHoverSelection,
|
|
36
37
|
hoverColumns,
|
|
@@ -41,7 +42,6 @@ import { getDecorations } from '../../plugins/table/pm-plugins/decorations/plugi
|
|
|
41
42
|
import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
42
43
|
import type { TablePluginState } from '../../plugins/table/types';
|
|
43
44
|
import { TableDecorations } from '../../plugins/table/types';
|
|
44
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
45
45
|
|
|
46
46
|
describe('table hover selection plugin', () => {
|
|
47
47
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
46
46
|
import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
|
|
47
47
|
|
|
48
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
48
49
|
import {
|
|
49
50
|
createTable,
|
|
50
51
|
insertColumn,
|
|
@@ -61,7 +62,6 @@ import {
|
|
|
61
62
|
checkIfHeaderRowEnabled,
|
|
62
63
|
checkIfNumberColumnEnabled,
|
|
63
64
|
} from '../../plugins/table/utils';
|
|
64
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
65
65
|
|
|
66
66
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
67
67
|
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
tr,
|
|
26
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
27
|
|
|
28
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
28
29
|
import { toggleTableLayout } from '../../plugins/table/commands';
|
|
29
30
|
import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
|
|
30
31
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
@@ -32,7 +33,6 @@ import type {
|
|
|
32
33
|
PermittedLayoutsDescriptor,
|
|
33
34
|
TablePluginState,
|
|
34
35
|
} from '../../plugins/table/types';
|
|
35
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
36
36
|
|
|
37
37
|
describe('table toolbar', () => {
|
|
38
38
|
const tableOptions = {
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
tr,
|
|
28
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
29
|
|
|
30
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
31
|
import * as commands from '../../../plugins/table/commands';
|
|
31
32
|
import {
|
|
32
33
|
hoverTable,
|
|
@@ -36,7 +37,6 @@ import TableComponent from '../../../plugins/table/nodeviews/TableComponent';
|
|
|
36
37
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
37
38
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
38
39
|
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,6 +23,7 @@ import {
|
|
|
23
23
|
tr,
|
|
24
24
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
25
25
|
|
|
26
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
26
27
|
import {
|
|
27
28
|
ResizableTableContainer,
|
|
28
29
|
TableContainer,
|
|
@@ -30,7 +31,6 @@ import {
|
|
|
30
31
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
31
32
|
import { pluginKey as tableResizingPluginKey } from '../../../plugins/table/pm-plugins/table-width';
|
|
32
33
|
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(() => {
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
tr,
|
|
33
33
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
34
34
|
|
|
35
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
36
|
import TableCell from '../../../plugins/table/nodeviews/TableCell';
|
|
36
37
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
37
38
|
import type { PluginConfig } from '../../../plugins/table/types';
|
|
38
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
39
39
|
|
|
40
40
|
jest.mock('@atlaskit/editor-common/utils', () => ({
|
|
41
41
|
...jest.requireActual<Object>('@atlaskit/editor-common/utils'),
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
tr,
|
|
23
23
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
24
24
|
|
|
25
|
-
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
26
25
|
import tablePlugin from '../../../plugins/table-plugin';
|
|
26
|
+
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
27
27
|
|
|
28
28
|
describe('table/safari-delete-composition-text-issue-workaround', () => {
|
|
29
29
|
let editor: any;
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
tr,
|
|
26
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
27
|
|
|
28
|
-
import { pluginKey as tablePluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
28
|
import tablePlugin from '../../../plugins/table-plugin';
|
|
29
|
+
import { pluginKey as tablePluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
30
30
|
|
|
31
31
|
const createDoc = (attrs: any) =>
|
|
32
32
|
doc(
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
tr,
|
|
27
27
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
28
28
|
|
|
29
|
+
import tablePlugin from '../../plugins/table-plugin';
|
|
29
30
|
import { sortByColumn } from '../../plugins/table/commands';
|
|
30
31
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
31
32
|
import type {
|
|
32
33
|
PermittedLayoutsDescriptor,
|
|
33
34
|
TablePluginState,
|
|
34
35
|
} from '../../plugins/table/types';
|
|
35
|
-
import tablePlugin from '../../plugins/table-plugin';
|
|
36
36
|
|
|
37
37
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
38
38
|
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
30
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
31
31
|
|
|
32
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
33
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
33
34
|
import { deleteColumns } from '../../../plugins/table/transforms';
|
|
34
35
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
36
|
|
|
37
37
|
const colsToRect = (cols: Array<number>, noOfRows: number): Rect => ({
|
|
38
38
|
left: Math.min(...cols),
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
tr,
|
|
30
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
31
31
|
|
|
32
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
33
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
33
34
|
import { deleteRows } from '../../../plugins/table/transforms';
|
|
34
35
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
36
|
|
|
37
37
|
const rowsToRect = (rows: Array<number>, noOfColumns: number): Rect => ({
|
|
38
38
|
left: 0,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
tr,
|
|
26
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
27
|
|
|
28
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
29
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
30
|
import { mergeCells } from '../../../plugins/table/transforms';
|
|
30
31
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
31
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
32
|
|
|
33
33
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
34
34
|
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
tr,
|
|
30
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
31
31
|
|
|
32
|
-
import { ContextualMenu } from '../../../plugins/table/ui/FloatingContextualMenu/ContextualMenu';
|
|
33
32
|
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
|
+
import { ContextualMenu } from '../../../plugins/table/ui/FloatingContextualMenu/ContextualMenu';
|
|
34
34
|
|
|
35
35
|
describe('ContextualMenu', () => {
|
|
36
36
|
const getEditorContainerWidth = () => ({ width: 500 });
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
tr,
|
|
28
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
29
|
|
|
30
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
31
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
31
32
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
32
33
|
import { CornerControls } from '../../../plugins/table/ui/TableFloatingControls/CornerControls';
|
|
33
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
34
34
|
|
|
35
35
|
describe('CornerControls', () => {
|
|
36
36
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
tr,
|
|
33
33
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
34
34
|
|
|
35
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
36
|
import type { Props as FloatingContextualButtonProps } from '../../../plugins/table/ui/FloatingContextualButton';
|
|
36
37
|
import FloatingContextualButton from '../../../plugins/table/ui/FloatingContextualButton';
|
|
37
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
38
38
|
|
|
39
39
|
jest.mock('@atlaskit/editor-prosemirror/utils', () => {
|
|
40
40
|
// Unblock prosemirror bump:
|
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
tr,
|
|
30
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
31
31
|
|
|
32
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
33
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
33
34
|
import FloatingContextualMenu from '../../../plugins/table/ui/FloatingContextualMenu';
|
|
34
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
35
|
|
|
36
36
|
describe('FloatingContextualMenu', () => {
|
|
37
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';
|
|
23
24
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
24
25
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
25
26
|
import { TableCssClassName } from '../../../plugins/table/types';
|
|
26
27
|
import type { Props as FloatingDeleteButtonProps } from '../../../plugins/table/ui/FloatingDeleteButton';
|
|
27
28
|
import FloatingDeleteButton from '../../../plugins/table/ui/FloatingDeleteButton';
|
|
28
29
|
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>();
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
33
33
|
import { ffTest } from '@atlassian/feature-flags-test-utils';
|
|
34
34
|
|
|
35
|
-
import FloatingDragMenu from '../../../plugins/table/ui/FloatingDragMenu';
|
|
36
35
|
import tablePlugin from '../../../plugins/table-plugin';
|
|
36
|
+
import FloatingDragMenu from '../../../plugins/table/ui/FloatingDragMenu';
|
|
37
37
|
|
|
38
38
|
describe('FloatingDragMenu', () => {
|
|
39
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';
|
|
35
36
|
import { setEditorFocus, setTableRef } from '../../../plugins/table/commands';
|
|
36
37
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
37
38
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
38
39
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
39
40
|
import type { Props as FloatingInsertButtonProps } from '../../../plugins/table/ui/FloatingInsertButton';
|
|
40
41
|
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:
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
tr,
|
|
28
28
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
29
29
|
|
|
30
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
30
31
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
31
32
|
import { TableCssClassName as ClassName } from '../../../plugins/table/types';
|
|
32
33
|
import NumberColumn from '../../../plugins/table/ui/TableFloatingControls/NumberColumn';
|
|
33
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
34
34
|
|
|
35
35
|
describe('NumberColumn', () => {
|
|
36
36
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
35
35
|
import { selectRows } from '@atlaskit/editor-test-helpers/table';
|
|
36
36
|
|
|
37
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
37
38
|
import { hoverRows } from '../../../plugins/table/commands';
|
|
38
39
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
39
40
|
import TableFloatingControls from '../../../plugins/table/ui/TableFloatingControls';
|
|
40
41
|
import { RowControls } from '../../../plugins/table/ui/TableFloatingControls/RowControls';
|
|
41
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
42
42
|
|
|
43
43
|
describe('RowControls', () => {
|
|
44
44
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
tr,
|
|
29
29
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
30
30
|
|
|
31
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
32
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
32
33
|
// import { TableCssClassName as ClassName } from '../../../plugins/table/types';
|
|
33
34
|
import { DragControls } from '../../../plugins/table/ui/TableFloatingControls/RowControls';
|
|
34
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
35
35
|
|
|
36
36
|
describe('NumberColumn', () => {
|
|
37
37
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
tr,
|
|
31
31
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
32
32
|
|
|
33
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
33
34
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
34
35
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
35
36
|
import TableFloatingColumnControls from '../../../plugins/table/ui/TableFloatingColumnControls';
|
|
36
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
37
37
|
|
|
38
38
|
describe('TableFloatingColumnControls', () => {
|
|
39
39
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -29,12 +29,12 @@ import {
|
|
|
29
29
|
tr,
|
|
30
30
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
31
31
|
|
|
32
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
32
33
|
import { hoverTable } from '../../../plugins/table/commands';
|
|
33
34
|
import { getDecorations } from '../../../plugins/table/pm-plugins/decorations/plugin';
|
|
34
35
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
35
36
|
import type { TablePluginState } from '../../../plugins/table/types';
|
|
36
37
|
import TableFloatingControls from '../../../plugins/table/ui/TableFloatingControls';
|
|
37
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
38
38
|
|
|
39
39
|
describe('TableFloatingControls', () => {
|
|
40
40
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
tr,
|
|
26
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
27
|
|
|
28
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
29
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
30
|
import { containsHeaderColumn } from '../../../plugins/table/utils/nodes';
|
|
30
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
31
|
|
|
32
32
|
describe('table merging logic', () => {
|
|
33
33
|
const createEditor = createProsemirrorEditorFactory();
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
th,
|
|
26
26
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
27
27
|
|
|
28
|
+
import tablePlugin from '../../../plugins/table-plugin';
|
|
28
29
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
29
30
|
import { copyPreviousRow } from '../../../plugins/table/utils/row-controls';
|
|
30
|
-
import tablePlugin from '../../../plugins/table-plugin';
|
|
31
31
|
|
|
32
32
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
33
33
|
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
} from '@atlaskit/editor-shared-styles';
|
|
34
34
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
35
35
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
36
|
-
import type { CleanupFn } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
37
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
38
36
|
import {
|
|
39
37
|
autoScrollForElements,
|
|
40
38
|
autoScrollWindowForElements,
|
|
41
39
|
} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
42
40
|
import { unsafeOverflowAutoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element';
|
|
41
|
+
import type { CleanupFn } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
42
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
|
|
43
43
|
|
|
44
44
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
45
45
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
2
1
|
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
3
2
|
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';
|
|
35
31
|
import {
|
|
36
32
|
addRowAroundSelection,
|
|
37
33
|
deleteTableIfSelectedWithAnalytics,
|
|
38
34
|
emptyMultipleCellsWithAnalytics,
|
|
39
35
|
} 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 { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
3
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
4
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
5
5
|
|
|
6
6
|
import type { DraggableSourceData } from '../../../types';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
4
3
|
import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
|
|
4
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
|
|
5
5
|
|
|
6
6
|
import type { DraggableSourceData } from '../../../types';
|
|
7
7
|
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-table"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
11
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
12
|
-
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
13
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
15
|
-
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
16
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
20
|
-
|
|
21
|
-
// @public (undocumented)
|
|
22
|
-
type PermittedLayoutsDescriptor = 'all' | TableLayout[];
|
|
23
|
-
|
|
24
|
-
// @public (undocumented)
|
|
25
|
-
interface PluginConfig {
|
|
26
|
-
// (undocumented)
|
|
27
|
-
advanced?: boolean;
|
|
28
|
-
// (undocumented)
|
|
29
|
-
allowAddColumnWithCustomStep?: boolean;
|
|
30
|
-
// (undocumented)
|
|
31
|
-
allowBackgroundColor?: boolean;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
allowCellOptionsInFloatingToolbar?: boolean;
|
|
34
|
-
// (undocumented)
|
|
35
|
-
allowCollapse?: boolean;
|
|
36
|
-
// (undocumented)
|
|
37
|
-
allowColumnResizing?: boolean;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
allowColumnSorting?: boolean;
|
|
40
|
-
// (undocumented)
|
|
41
|
-
allowControls?: boolean;
|
|
42
|
-
// (undocumented)
|
|
43
|
-
allowDistributeColumns?: boolean;
|
|
44
|
-
// (undocumented)
|
|
45
|
-
allowHeaderColumn?: boolean;
|
|
46
|
-
// (undocumented)
|
|
47
|
-
allowHeaderRow?: boolean;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
allowMergeCells?: boolean;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
allowNumberColumn?: boolean;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
isHeaderRowRequired?: boolean;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
permittedLayouts?: PermittedLayoutsDescriptor;
|
|
56
|
-
// (undocumented)
|
|
57
|
-
stickyHeaders?: boolean;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// @public (undocumented)
|
|
61
|
-
export type TablePlugin = NextEditorPlugin<'table', {
|
|
62
|
-
pluginConfiguration: TablePluginOptions | undefined;
|
|
63
|
-
actions: {
|
|
64
|
-
insertTable: InsertTableAction;
|
|
65
|
-
};
|
|
66
|
-
dependencies: [
|
|
67
|
-
AnalyticsPlugin,
|
|
68
|
-
ContentInsertionPlugin,
|
|
69
|
-
WidthPlugin,
|
|
70
|
-
GuidelinePlugin,
|
|
71
|
-
SelectionPlugin
|
|
72
|
-
];
|
|
73
|
-
}>;
|
|
74
|
-
|
|
75
|
-
// @public (undocumented)
|
|
76
|
-
interface TablePluginOptions {
|
|
77
|
-
// (undocumented)
|
|
78
|
-
allowContextualMenu?: boolean;
|
|
79
|
-
// (undocumented)
|
|
80
|
-
breakoutEnabled?: boolean;
|
|
81
|
-
// (undocumented)
|
|
82
|
-
dragAndDropEnabled?: boolean;
|
|
83
|
-
// (undocumented)
|
|
84
|
-
fullWidthEnabled?: boolean;
|
|
85
|
-
// (undocumented)
|
|
86
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
87
|
-
// (undocumented)
|
|
88
|
-
tableOptions: PluginConfig;
|
|
89
|
-
// (undocumented)
|
|
90
|
-
tableResizingEnabled?: boolean;
|
|
91
|
-
// (undocumented)
|
|
92
|
-
wasFullWidthEnabled?: boolean;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// @public
|
|
96
|
-
export const tablesPlugin: TablePlugin;
|
|
97
|
-
|
|
98
|
-
// (No @packageDocumentation comment for this package)
|
|
99
|
-
|
|
100
|
-
```
|