@atlaskit/editor-plugin-table 5.3.3 → 5.3.5
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 +12 -0
- package/dist/cjs/plugins/table/nodeviews/TableRow.js +53 -35
- package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/commands.js +35 -9
- package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin-factory.js +1 -4
- package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin.js +9 -9
- package/dist/es2019/plugins/table/nodeviews/TableRow.js +22 -7
- package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/commands.js +30 -5
- package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin-factory.js +1 -4
- package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin.js +11 -10
- package/dist/esm/plugins/table/nodeviews/TableRow.js +53 -35
- package/dist/esm/plugins/table/pm-plugins/drag-and-drop/commands.js +30 -4
- package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin-factory.js +1 -4
- package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin.js +9 -9
- package/dist/types/plugins/table/nodeviews/TableRow.d.ts +1 -0
- package/dist/types/plugins/table/pm-plugins/drag-and-drop/commands.d.ts +3 -1
- package/dist/types-ts4.5/plugins/table/nodeviews/TableRow.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/pm-plugins/drag-and-drop/commands.d.ts +3 -1
- package/package.json +1 -1
- package/src/plugins/table/nodeviews/TableRow.ts +12 -6
- package/src/plugins/table/pm-plugins/drag-and-drop/commands.ts +42 -6
- package/src/plugins/table/pm-plugins/drag-and-drop/plugin-factory.ts +0 -3
- package/src/plugins/table/pm-plugins/drag-and-drop/plugin.ts +19 -12
- package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/handlers.js +0 -24
- package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/handlers.js +0 -10
- package/dist/esm/plugins/table/pm-plugins/drag-and-drop/handlers.js +0 -18
- package/dist/types/plugins/table/pm-plugins/drag-and-drop/handlers.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/drag-and-drop/handlers.d.ts +0 -3
- package/src/plugins/table/pm-plugins/drag-and-drop/handlers.ts +0 -35
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { DragAndDropPluginState } from './types';
|
|
3
|
-
export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, pluginState: DragAndDropPluginState) => DragAndDropPluginState;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { DragAndDropPluginState } from './types';
|
|
3
|
-
export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, pluginState: DragAndDropPluginState) => DragAndDropPluginState;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
|
|
2
|
-
import type {
|
|
3
|
-
ReadonlyTransaction,
|
|
4
|
-
Transaction,
|
|
5
|
-
} from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
8
|
-
|
|
9
|
-
import type { DragAndDropPluginState } from './types';
|
|
10
|
-
|
|
11
|
-
type BuilderDragAndDropPluginState = (props: {
|
|
12
|
-
tr: Transaction | ReadonlyTransaction;
|
|
13
|
-
table?: ContentNodeWithPos;
|
|
14
|
-
}) => (pluginState: DragAndDropPluginState) => DragAndDropPluginState;
|
|
15
|
-
|
|
16
|
-
const buildPluginState =
|
|
17
|
-
(
|
|
18
|
-
builders: Array<BuilderDragAndDropPluginState>,
|
|
19
|
-
): BuilderDragAndDropPluginState =>
|
|
20
|
-
(props) =>
|
|
21
|
-
(pluginState) => {
|
|
22
|
-
return builders.reduce(
|
|
23
|
-
(_pluginState, transform) => transform(props)(_pluginState),
|
|
24
|
-
pluginState,
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const handleDocOrSelectionChanged = (
|
|
29
|
-
tr: Transaction | ReadonlyTransaction,
|
|
30
|
-
pluginState: DragAndDropPluginState,
|
|
31
|
-
): DragAndDropPluginState =>
|
|
32
|
-
buildPluginState([])({
|
|
33
|
-
tr,
|
|
34
|
-
table: findTable(tr.selection),
|
|
35
|
-
})(pluginState);
|