@atlaskit/editor-tables 2.3.3 → 2.3.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 +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +3 -4
- package/tmp/api-report-tmp.d.ts +181 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-tables
|
|
2
2
|
|
|
3
|
+
## 2.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fa1f53e0ae7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa1f53e0ae7) - [ED-18167] Remove dependency of editor-tables on adf schema library to avoid a circular dependency
|
|
8
|
+
|
|
3
9
|
## 2.3.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-tables",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Editor",
|
|
27
27
|
"deprecatedAutoEntryPoints": true,
|
|
28
|
-
"releaseModel": "
|
|
28
|
+
"releaseModel": "continuous"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.0.0",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"prosemirror-view": "1.23.7"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@atlaskit/
|
|
41
|
-
"@atlaskit/editor-test-helpers": "^18.3.0",
|
|
40
|
+
"@atlaskit/editor-test-helpers": "^18.6.0",
|
|
42
41
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1"
|
|
43
42
|
},
|
|
44
43
|
"techstack": {
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-tables"
|
|
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 { ContentNodeWithPos } from 'prosemirror-utils';
|
|
8
|
+
import { Mapping } from 'prosemirror-transform';
|
|
9
|
+
import { Node as Node_2 } from 'prosemirror-model';
|
|
10
|
+
import { ResolvedPos } from 'prosemirror-model';
|
|
11
|
+
import { Selection as Selection_2 } from 'prosemirror-state';
|
|
12
|
+
import { Slice } from 'prosemirror-model';
|
|
13
|
+
import { Transaction } from 'prosemirror-state';
|
|
14
|
+
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
type Axis = 'horiz' | 'vert';
|
|
17
|
+
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
class CellBookmark {
|
|
20
|
+
constructor(anchor: number, head: number);
|
|
21
|
+
// (undocumented)
|
|
22
|
+
readonly anchor: number;
|
|
23
|
+
// (undocumented)
|
|
24
|
+
readonly head: number;
|
|
25
|
+
// (undocumented)
|
|
26
|
+
map(mapping: Mapping): CellBookmark;
|
|
27
|
+
// (undocumented)
|
|
28
|
+
resolve(doc: Node_2): Selection_2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
export class CellSelection extends Selection_2 {
|
|
33
|
+
// (undocumented)
|
|
34
|
+
readonly $anchorCell: ResolvedPos;
|
|
35
|
+
// (undocumented)
|
|
36
|
+
readonly $headCell: ResolvedPos;
|
|
37
|
+
constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
|
|
38
|
+
// (undocumented)
|
|
39
|
+
static colSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
content(): Slice;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
static create(doc: Node_2, anchorCell: number, headCell?: number): CellSelection;
|
|
44
|
+
// (undocumented)
|
|
45
|
+
eq(other: CellSelection): boolean;
|
|
46
|
+
// (undocumented)
|
|
47
|
+
forEachCell(f: (node: Node_2, pos: number) => void): void;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
|
|
50
|
+
// (undocumented)
|
|
51
|
+
getBookmark(): CellBookmark;
|
|
52
|
+
// (undocumented)
|
|
53
|
+
isColSelection(): boolean;
|
|
54
|
+
// (undocumented)
|
|
55
|
+
isRowSelection(): boolean;
|
|
56
|
+
// (undocumented)
|
|
57
|
+
map(doc: Node_2, mapping: Mapping): Selection_2;
|
|
58
|
+
// (undocumented)
|
|
59
|
+
replace(tr: Transaction, content?: Slice<any>): void;
|
|
60
|
+
// (undocumented)
|
|
61
|
+
replaceWith(tr: Transaction, node: Node_2): void;
|
|
62
|
+
// (undocumented)
|
|
63
|
+
static rowSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
|
|
64
|
+
// (undocumented)
|
|
65
|
+
toJSON(): SerializedCellSelection;
|
|
66
|
+
// (undocumented)
|
|
67
|
+
readonly visible: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// @public (undocumented)
|
|
71
|
+
export const findTable: (selection: Selection_2) => ContentNodeWithPos | undefined;
|
|
72
|
+
|
|
73
|
+
// @public (undocumented)
|
|
74
|
+
export class Rect {
|
|
75
|
+
constructor(left: number, top: number, right: number, bottom: number);
|
|
76
|
+
// (undocumented)
|
|
77
|
+
bottom: number;
|
|
78
|
+
// (undocumented)
|
|
79
|
+
left: number;
|
|
80
|
+
// (undocumented)
|
|
81
|
+
right: number;
|
|
82
|
+
// (undocumented)
|
|
83
|
+
top: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
interface SerializedCellSelection {
|
|
88
|
+
// (undocumented)
|
|
89
|
+
anchor: number;
|
|
90
|
+
// (undocumented)
|
|
91
|
+
head: number;
|
|
92
|
+
// (undocumented)
|
|
93
|
+
type: 'cell';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// @public (undocumented)
|
|
97
|
+
export class TableMap {
|
|
98
|
+
constructor(width: number, height: number, map: number[], problems?: TableProblem[] | null);
|
|
99
|
+
// (undocumented)
|
|
100
|
+
cellsInRect(rect: Rect): number[];
|
|
101
|
+
// (undocumented)
|
|
102
|
+
colCount(pos: number): number;
|
|
103
|
+
// (undocumented)
|
|
104
|
+
findCell(pos: number): Rect;
|
|
105
|
+
// (undocumented)
|
|
106
|
+
static get(table: Node_2): TableMap;
|
|
107
|
+
// (undocumented)
|
|
108
|
+
getMaxColInRow(pos: ResolvedPos): number | undefined;
|
|
109
|
+
// (undocumented)
|
|
110
|
+
height: number;
|
|
111
|
+
// (undocumented)
|
|
112
|
+
isPosMerged(pos: number): boolean;
|
|
113
|
+
// (undocumented)
|
|
114
|
+
map: number[];
|
|
115
|
+
// (undocumented)
|
|
116
|
+
nextCell(pos: number, axis: Axis, dir: number): null | number;
|
|
117
|
+
// (undocumented)
|
|
118
|
+
positionAt(row: number, col: number, table: Node_2): number;
|
|
119
|
+
// (undocumented)
|
|
120
|
+
problems?: TableProblem[] | null;
|
|
121
|
+
// (undocumented)
|
|
122
|
+
rectBetween(a: number, b: number): Rect;
|
|
123
|
+
// (undocumented)
|
|
124
|
+
rowCount(pos: number): number;
|
|
125
|
+
// (undocumented)
|
|
126
|
+
width: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// @public (undocumented)
|
|
130
|
+
type TableProblem = TableProblemColWidthMismatch | TableProblemCollision | TableProblemLongRowspan | TableProblemMissing;
|
|
131
|
+
|
|
132
|
+
// @public (undocumented)
|
|
133
|
+
type TableProblemCollision = {
|
|
134
|
+
type: TableProblemTypes.COLLISION;
|
|
135
|
+
row: number;
|
|
136
|
+
pos: number;
|
|
137
|
+
n: number;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
type TableProblemColWidthMismatch = {
|
|
142
|
+
type: TableProblemTypes;
|
|
143
|
+
pos: number;
|
|
144
|
+
colwidth: number;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// @public (undocumented)
|
|
148
|
+
type TableProblemLongRowspan = {
|
|
149
|
+
type: TableProblemTypes.OVERLONG_ROWSPAN;
|
|
150
|
+
pos: number;
|
|
151
|
+
n: number;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// @public (undocumented)
|
|
155
|
+
type TableProblemMissing = {
|
|
156
|
+
type: TableProblemTypes.MISSING;
|
|
157
|
+
row: number;
|
|
158
|
+
n: number;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// @public (undocumented)
|
|
162
|
+
enum TableProblemTypes {
|
|
163
|
+
// (undocumented)
|
|
164
|
+
COLLISION = "collision",
|
|
165
|
+
// (undocumented)
|
|
166
|
+
COLWIDTH_MISMATCH = "colwidth mismatch",
|
|
167
|
+
// (undocumented)
|
|
168
|
+
MISSING = "missing",
|
|
169
|
+
// (undocumented)
|
|
170
|
+
OVERLONG_ROWSPAN = "overlong_rowspan"
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// @public (undocumented)
|
|
174
|
+
export const uuid: {
|
|
175
|
+
setStatic(value: false | string): void;
|
|
176
|
+
generate(): string;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// (No @packageDocumentation comment for this package)
|
|
180
|
+
|
|
181
|
+
```
|