@atlaskit/editor-plugin-table 5.4.2 → 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 +13 -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/RowControls/DragControls.js +2 -1
- package/dist/cjs/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/dist/cjs/plugins/table/ui/common-styles.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/RowControls/DragControls.js +2 -1
- package/dist/es2019/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +1 -2
- 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/RowControls/DragControls.js +2 -1
- package/dist/esm/plugins/table/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +2 -2
- 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/RowControls/DragControls.tsx +3 -2
- package/src/plugins/table/ui/TableFloatingControls/RowDropTarget/index.tsx +1 -1
- package/src/plugins/table/ui/common-styles.ts +0 -2
- package/tmp/api-report-tmp.d.ts +0 -100
|
@@ -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
|
|
|
@@ -167,8 +167,9 @@ const DragControlsComponent = ({
|
|
|
167
167
|
style={{
|
|
168
168
|
gridTemplateRows: heights,
|
|
169
169
|
gridTemplateColumns: isDragging
|
|
170
|
-
? `${dropTargetExtendedWidth}px
|
|
171
|
-
:
|
|
170
|
+
? `${dropTargetExtendedWidth}px 28px ${tableWidth}px`
|
|
171
|
+
: 'none',
|
|
172
|
+
left: isDragging ? `-${dropTargetExtendedWidth + 2}px` : `-2px`,
|
|
172
173
|
}}
|
|
173
174
|
onMouseMove={handleMouseMove}
|
|
174
175
|
contentEditable={false}
|
|
@@ -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
|
|
|
@@ -30,7 +30,6 @@ import { TableCssClassName as ClassName } from '../types';
|
|
|
30
30
|
|
|
31
31
|
import {
|
|
32
32
|
columnControlsDecorationHeight,
|
|
33
|
-
dropTargetExtendedWidth,
|
|
34
33
|
resizeHandlerAreaWidth,
|
|
35
34
|
resizeLineWidth,
|
|
36
35
|
rowControlsZIndex,
|
|
@@ -736,7 +735,6 @@ export const tableStyles = (
|
|
|
736
735
|
display: grid;
|
|
737
736
|
align-items: center;
|
|
738
737
|
position: absolute;
|
|
739
|
-
left: -${dropTargetExtendedWidth}px;
|
|
740
738
|
z-index: ${akEditorUnitZIndex};
|
|
741
739
|
|
|
742
740
|
.${ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER} {
|
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
|
-
```
|