@atlaskit/editor-tables 2.5.2 → 2.5.3
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-tables
|
|
2
2
|
|
|
3
|
+
## 2.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#70718](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70718) [`e5d2832002bb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e5d2832002bb) - Patched a bug in the table paste logic which was throwing an error during the selection phase of the paste event when the pasted data contained a table row ending with a merged cell. The error from the selection is causing the table data to be injected as plain text inline.
|
|
8
|
+
|
|
3
9
|
## 2.5.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -399,6 +399,6 @@ function insertCells(state, dispatch, tableStart, rect, cells) {
|
|
|
399
399
|
}
|
|
400
400
|
recomp();
|
|
401
401
|
applyHeaderCells(tr, map, state, tableStart, table, headerRowEnabled, headerColumnEnabled);
|
|
402
|
-
tr.setSelection(new _cellSelection.CellSelection(tr.doc.resolve(tableStart + map.
|
|
402
|
+
tr.setSelection(new _cellSelection.CellSelection(tr.doc.resolve(tableStart + map.map[top * map.width + left]), tr.doc.resolve(tableStart + map.map[(bottom - 1) * map.width + right - 1])));
|
|
403
403
|
dispatch(tr);
|
|
404
404
|
}
|
|
@@ -406,6 +406,6 @@ export function insertCells(state, dispatch, tableStart, rect, cells) {
|
|
|
406
406
|
}
|
|
407
407
|
recomp();
|
|
408
408
|
applyHeaderCells(tr, map, state, tableStart, table, headerRowEnabled, headerColumnEnabled);
|
|
409
|
-
tr.setSelection(new CellSelection(tr.doc.resolve(tableStart + map.
|
|
409
|
+
tr.setSelection(new CellSelection(tr.doc.resolve(tableStart + map.map[top * map.width + left]), tr.doc.resolve(tableStart + map.map[(bottom - 1) * map.width + right - 1])));
|
|
410
410
|
dispatch(tr);
|
|
411
411
|
}
|
|
@@ -393,6 +393,6 @@ export function insertCells(state, dispatch, tableStart, rect, cells) {
|
|
|
393
393
|
}
|
|
394
394
|
recomp();
|
|
395
395
|
applyHeaderCells(tr, map, state, tableStart, table, headerRowEnabled, headerColumnEnabled);
|
|
396
|
-
tr.setSelection(new CellSelection(tr.doc.resolve(tableStart + map.
|
|
396
|
+
tr.setSelection(new CellSelection(tr.doc.resolve(tableStart + map.map[top * map.width + left]), tr.doc.resolve(tableStart + map.map[(bottom - 1) * map.width + right - 1])));
|
|
397
397
|
dispatch(tr);
|
|
398
398
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { NodeType, Node as PMNode
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { Rect } from '../table-map';
|
|
5
|
+
import type { CellSelectionRect, Dispatch } from '../types';
|
|
5
6
|
export declare function pastedCells(slice: Slice): CellSelectionRect | null;
|
|
6
7
|
export declare function fitSlice(nodeType: NodeType, slice: Slice): PMNode;
|
|
7
8
|
export declare function clipCells({ width: currentWidth, height: currentHeight, rows: currentRows, }: CellSelectionRect, newWidth: number, newHeight: number): CellSelectionRect;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { NodeType, Node as PMNode
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { Rect } from '../table-map';
|
|
5
|
+
import type { CellSelectionRect, Dispatch } from '../types';
|
|
5
6
|
export declare function pastedCells(slice: Slice): CellSelectionRect | null;
|
|
6
7
|
export declare function fitSlice(nodeType: NodeType, slice: Slice): PMNode;
|
|
7
8
|
export declare function clipCells({ width: currentWidth, height: currentHeight, rows: currentRows, }: CellSelectionRect, newWidth: number, newHeight: number): CellSelectionRect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-tables",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "A package that contains common classes and utility functions for editor tables",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
37
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
37
|
+
"@atlassian/feature-flags-test-utils": "^0.2.0"
|
|
38
38
|
},
|
|
39
39
|
"techstack": {
|
|
40
40
|
"@atlassian/frontend": {
|