@atlaskit/editor-plugin-table 5.3.24 → 5.3.26

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/commands.js +19 -6
  3. package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin.js +6 -1
  4. package/dist/cjs/plugins/table/transforms/column-width.js +10 -43
  5. package/dist/cjs/plugins/table/ui/FloatingDragMenu/DragMenu.js +26 -1
  6. package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/commands.js +19 -6
  7. package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin.js +6 -1
  8. package/dist/es2019/plugins/table/transforms/column-width.js +10 -43
  9. package/dist/es2019/plugins/table/ui/FloatingDragMenu/DragMenu.js +27 -1
  10. package/dist/esm/plugins/table/pm-plugins/drag-and-drop/commands.js +19 -6
  11. package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin.js +6 -1
  12. package/dist/esm/plugins/table/transforms/column-width.js +10 -43
  13. package/dist/esm/plugins/table/ui/FloatingDragMenu/DragMenu.js +26 -1
  14. package/package.json +2 -5
  15. package/src/plugins/table/pm-plugins/drag-and-drop/commands.ts +31 -7
  16. package/src/plugins/table/pm-plugins/drag-and-drop/plugin.ts +7 -1
  17. package/src/plugins/table/transforms/column-width.ts +14 -60
  18. package/src/plugins/table/ui/FloatingDragMenu/DragMenu.tsx +33 -1
  19. package/src/__tests__/integration/__snapshots__/auto-size.ts.snap +0 -612
  20. package/src/__tests__/integration/__snapshots__/delete-columns.ts.snap +0 -820
  21. package/src/__tests__/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +0 -120
  22. package/src/__tests__/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +0 -120
  23. package/src/__tests__/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +0 -229
  24. package/src/__tests__/integration/__snapshots__/insert-row-inside-layout.ts.snap +0 -239
  25. package/src/__tests__/integration/__snapshots__/resize.ts.snap +0 -2685
  26. package/src/__tests__/integration/__snapshots__/scale.ts.snap +0 -1085
  27. package/src/__tests__/integration/arrow-down-into-table.ts +0 -50
  28. package/src/__tests__/integration/auto-size.ts +0 -92
  29. package/src/__tests__/integration/cell-selection.ts +0 -105
  30. package/src/__tests__/integration/delete-columns.ts +0 -99
  31. package/src/__tests__/integration/delete-last-column-in-full-width.ts +0 -73
  32. package/src/__tests__/integration/delete-last-column-with-empty-action.ts +0 -60
  33. package/src/__tests__/integration/delete-last-row-with-empty-action.ts +0 -99
  34. package/src/__tests__/integration/insert-row-inside-layout.ts +0 -52
  35. package/src/__tests__/integration/resize.ts +0 -333
  36. package/src/__tests__/integration/scale.ts +0 -70
@@ -1,120 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Delete last table column in full-width mode 1`] = `
4
- Object {
5
- "content": Array [
6
- Object {
7
- "attrs": Object {
8
- "__autoSize": false,
9
- "isNumberColumnEnabled": false,
10
- "layout": "full-width",
11
- "localId": "abc-123",
12
- "width": null,
13
- },
14
- "content": Array [
15
- Object {
16
- "content": Array [
17
- Object {
18
- "attrs": Object {
19
- "background": null,
20
- "colspan": 1,
21
- "colwidth": null,
22
- "rowspan": 1,
23
- },
24
- "content": Array [
25
- Object {
26
- "type": "paragraph",
27
- },
28
- ],
29
- "type": "tableHeader",
30
- },
31
- Object {
32
- "attrs": Object {
33
- "background": null,
34
- "colspan": 1,
35
- "colwidth": null,
36
- "rowspan": 1,
37
- },
38
- "content": Array [
39
- Object {
40
- "type": "paragraph",
41
- },
42
- ],
43
- "type": "tableHeader",
44
- },
45
- ],
46
- "type": "tableRow",
47
- },
48
- Object {
49
- "content": Array [
50
- Object {
51
- "attrs": Object {
52
- "background": null,
53
- "colspan": 1,
54
- "colwidth": null,
55
- "rowspan": 1,
56
- },
57
- "content": Array [
58
- Object {
59
- "type": "paragraph",
60
- },
61
- ],
62
- "type": "tableCell",
63
- },
64
- Object {
65
- "attrs": Object {
66
- "background": null,
67
- "colspan": 1,
68
- "colwidth": null,
69
- "rowspan": 1,
70
- },
71
- "content": Array [
72
- Object {
73
- "type": "paragraph",
74
- },
75
- ],
76
- "type": "tableCell",
77
- },
78
- ],
79
- "type": "tableRow",
80
- },
81
- Object {
82
- "content": Array [
83
- Object {
84
- "attrs": Object {
85
- "background": null,
86
- "colspan": 1,
87
- "colwidth": null,
88
- "rowspan": 1,
89
- },
90
- "content": Array [
91
- Object {
92
- "type": "paragraph",
93
- },
94
- ],
95
- "type": "tableCell",
96
- },
97
- Object {
98
- "attrs": Object {
99
- "background": null,
100
- "colspan": 1,
101
- "colwidth": null,
102
- "rowspan": 1,
103
- },
104
- "content": Array [
105
- Object {
106
- "type": "paragraph",
107
- },
108
- ],
109
- "type": "tableCell",
110
- },
111
- ],
112
- "type": "tableRow",
113
- },
114
- ],
115
- "type": "table",
116
- },
117
- ],
118
- "type": "doc",
119
- }
120
- `;
@@ -1,120 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`delete-last-column-with-empty-action.ts: Delete last table column with empty action 1`] = `
4
- Object {
5
- "content": Array [
6
- Object {
7
- "attrs": Object {
8
- "__autoSize": false,
9
- "isNumberColumnEnabled": false,
10
- "layout": "default",
11
- "localId": "abc-123",
12
- "width": null,
13
- },
14
- "content": Array [
15
- Object {
16
- "content": Array [
17
- Object {
18
- "attrs": Object {
19
- "background": null,
20
- "colspan": 1,
21
- "colwidth": null,
22
- "rowspan": 1,
23
- },
24
- "content": Array [
25
- Object {
26
- "type": "paragraph",
27
- },
28
- ],
29
- "type": "tableHeader",
30
- },
31
- Object {
32
- "attrs": Object {
33
- "background": null,
34
- "colspan": 1,
35
- "colwidth": null,
36
- "rowspan": 1,
37
- },
38
- "content": Array [
39
- Object {
40
- "type": "paragraph",
41
- },
42
- ],
43
- "type": "tableHeader",
44
- },
45
- ],
46
- "type": "tableRow",
47
- },
48
- Object {
49
- "content": Array [
50
- Object {
51
- "attrs": Object {
52
- "background": null,
53
- "colspan": 1,
54
- "colwidth": null,
55
- "rowspan": 1,
56
- },
57
- "content": Array [
58
- Object {
59
- "type": "paragraph",
60
- },
61
- ],
62
- "type": "tableCell",
63
- },
64
- Object {
65
- "attrs": Object {
66
- "background": null,
67
- "colspan": 1,
68
- "colwidth": null,
69
- "rowspan": 1,
70
- },
71
- "content": Array [
72
- Object {
73
- "type": "paragraph",
74
- },
75
- ],
76
- "type": "tableCell",
77
- },
78
- ],
79
- "type": "tableRow",
80
- },
81
- Object {
82
- "content": Array [
83
- Object {
84
- "attrs": Object {
85
- "background": null,
86
- "colspan": 1,
87
- "colwidth": null,
88
- "rowspan": 1,
89
- },
90
- "content": Array [
91
- Object {
92
- "type": "paragraph",
93
- },
94
- ],
95
- "type": "tableCell",
96
- },
97
- Object {
98
- "attrs": Object {
99
- "background": null,
100
- "colspan": 1,
101
- "colwidth": null,
102
- "rowspan": 1,
103
- },
104
- "content": Array [
105
- Object {
106
- "type": "paragraph",
107
- },
108
- ],
109
- "type": "tableCell",
110
- },
111
- ],
112
- "type": "tableRow",
113
- },
114
- ],
115
- "type": "table",
116
- },
117
- ],
118
- "type": "doc",
119
- }
120
- `;
@@ -1,229 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`delete-last-row.ts: Delete last table row with empty action 1`] = `
4
- Object {
5
- "content": Array [
6
- Object {
7
- "attrs": Object {
8
- "__autoSize": false,
9
- "isNumberColumnEnabled": false,
10
- "layout": "default",
11
- "localId": "abc-123",
12
- "width": null,
13
- },
14
- "content": Array [
15
- Object {
16
- "content": Array [
17
- Object {
18
- "attrs": Object {
19
- "background": null,
20
- "colspan": 1,
21
- "colwidth": null,
22
- "rowspan": 1,
23
- },
24
- "content": Array [
25
- Object {
26
- "type": "paragraph",
27
- },
28
- ],
29
- "type": "tableHeader",
30
- },
31
- Object {
32
- "attrs": Object {
33
- "background": null,
34
- "colspan": 1,
35
- "colwidth": null,
36
- "rowspan": 1,
37
- },
38
- "content": Array [
39
- Object {
40
- "type": "paragraph",
41
- },
42
- ],
43
- "type": "tableHeader",
44
- },
45
- Object {
46
- "attrs": Object {
47
- "background": null,
48
- "colspan": 1,
49
- "colwidth": null,
50
- "rowspan": 1,
51
- },
52
- "content": Array [
53
- Object {
54
- "type": "paragraph",
55
- },
56
- ],
57
- "type": "tableHeader",
58
- },
59
- ],
60
- "type": "tableRow",
61
- },
62
- Object {
63
- "content": Array [
64
- Object {
65
- "attrs": Object {
66
- "background": null,
67
- "colspan": 1,
68
- "colwidth": null,
69
- "rowspan": 1,
70
- },
71
- "content": Array [
72
- Object {
73
- "type": "paragraph",
74
- },
75
- ],
76
- "type": "tableCell",
77
- },
78
- Object {
79
- "attrs": Object {
80
- "background": null,
81
- "colspan": 1,
82
- "colwidth": null,
83
- "rowspan": 1,
84
- },
85
- "content": Array [
86
- Object {
87
- "type": "paragraph",
88
- },
89
- ],
90
- "type": "tableCell",
91
- },
92
- Object {
93
- "attrs": Object {
94
- "background": null,
95
- "colspan": 1,
96
- "colwidth": null,
97
- "rowspan": 1,
98
- },
99
- "content": Array [
100
- Object {
101
- "type": "paragraph",
102
- },
103
- ],
104
- "type": "tableCell",
105
- },
106
- ],
107
- "type": "tableRow",
108
- },
109
- ],
110
- "type": "table",
111
- },
112
- ],
113
- "type": "doc",
114
- }
115
- `;
116
-
117
- exports[`delete-last-row.ts: Delete last table row with empty action, chrome 1`] = `
118
- Object {
119
- "content": Array [
120
- Object {
121
- "attrs": Object {
122
- "__autoSize": false,
123
- "isNumberColumnEnabled": false,
124
- "layout": "default",
125
- "localId": "abc-123",
126
- "width": null,
127
- },
128
- "content": Array [
129
- Object {
130
- "content": Array [
131
- Object {
132
- "attrs": Object {
133
- "background": null,
134
- "colspan": 1,
135
- "colwidth": null,
136
- "rowspan": 1,
137
- },
138
- "content": Array [
139
- Object {
140
- "type": "paragraph",
141
- },
142
- ],
143
- "type": "tableHeader",
144
- },
145
- Object {
146
- "attrs": Object {
147
- "background": null,
148
- "colspan": 1,
149
- "colwidth": null,
150
- "rowspan": 1,
151
- },
152
- "content": Array [
153
- Object {
154
- "type": "paragraph",
155
- },
156
- ],
157
- "type": "tableHeader",
158
- },
159
- Object {
160
- "attrs": Object {
161
- "background": null,
162
- "colspan": 1,
163
- "colwidth": null,
164
- "rowspan": 1,
165
- },
166
- "content": Array [
167
- Object {
168
- "type": "paragraph",
169
- },
170
- ],
171
- "type": "tableHeader",
172
- },
173
- ],
174
- "type": "tableRow",
175
- },
176
- Object {
177
- "content": Array [
178
- Object {
179
- "attrs": Object {
180
- "background": null,
181
- "colspan": 1,
182
- "colwidth": null,
183
- "rowspan": 1,
184
- },
185
- "content": Array [
186
- Object {
187
- "type": "paragraph",
188
- },
189
- ],
190
- "type": "tableCell",
191
- },
192
- Object {
193
- "attrs": Object {
194
- "background": null,
195
- "colspan": 1,
196
- "colwidth": null,
197
- "rowspan": 1,
198
- },
199
- "content": Array [
200
- Object {
201
- "type": "paragraph",
202
- },
203
- ],
204
- "type": "tableCell",
205
- },
206
- Object {
207
- "attrs": Object {
208
- "background": null,
209
- "colspan": 1,
210
- "colwidth": null,
211
- "rowspan": 1,
212
- },
213
- "content": Array [
214
- Object {
215
- "type": "paragraph",
216
- },
217
- ],
218
- "type": "tableCell",
219
- },
220
- ],
221
- "type": "tableRow",
222
- },
223
- ],
224
- "type": "table",
225
- },
226
- ],
227
- "type": "doc",
228
- }
229
- `;
@@ -1,239 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Should scale remaining columns when adding a new column preventing from going to overflow 1`] = `
4
- Object {
5
- "content": Array [
6
- Object {
7
- "content": Array [
8
- Object {
9
- "attrs": Object {
10
- "width": 50,
11
- },
12
- "content": Array [
13
- Object {
14
- "type": "paragraph",
15
- },
16
- ],
17
- "type": "layoutColumn",
18
- },
19
- Object {
20
- "attrs": Object {
21
- "width": 50,
22
- },
23
- "content": Array [
24
- Object {
25
- "attrs": Object {
26
- "__autoSize": false,
27
- "isNumberColumnEnabled": false,
28
- "layout": "default",
29
- "localId": "abc-123",
30
- "width": null,
31
- },
32
- "content": Array [
33
- Object {
34
- "content": Array [
35
- Object {
36
- "attrs": Object {
37
- "background": null,
38
- "colspan": 1,
39
- "colwidth": null,
40
- "rowspan": 1,
41
- },
42
- "content": Array [
43
- Object {
44
- "type": "paragraph",
45
- },
46
- ],
47
- "type": "tableHeader",
48
- },
49
- Object {
50
- "attrs": Object {
51
- "background": null,
52
- "colspan": 1,
53
- "colwidth": null,
54
- "rowspan": 1,
55
- },
56
- "content": Array [
57
- Object {
58
- "type": "paragraph",
59
- },
60
- ],
61
- "type": "tableHeader",
62
- },
63
- Object {
64
- "attrs": Object {
65
- "background": null,
66
- "colspan": 1,
67
- "colwidth": null,
68
- "rowspan": 1,
69
- },
70
- "content": Array [
71
- Object {
72
- "type": "paragraph",
73
- },
74
- ],
75
- "type": "tableHeader",
76
- },
77
- ],
78
- "type": "tableRow",
79
- },
80
- Object {
81
- "content": Array [
82
- Object {
83
- "attrs": Object {
84
- "background": null,
85
- "colspan": 1,
86
- "colwidth": null,
87
- "rowspan": 1,
88
- },
89
- "content": Array [
90
- Object {
91
- "content": Array [
92
- Object {
93
- "text": "should be inside of the table",
94
- "type": "text",
95
- },
96
- ],
97
- "type": "paragraph",
98
- },
99
- ],
100
- "type": "tableCell",
101
- },
102
- Object {
103
- "attrs": Object {
104
- "background": null,
105
- "colspan": 1,
106
- "colwidth": null,
107
- "rowspan": 1,
108
- },
109
- "content": Array [
110
- Object {
111
- "type": "paragraph",
112
- },
113
- ],
114
- "type": "tableCell",
115
- },
116
- Object {
117
- "attrs": Object {
118
- "background": null,
119
- "colspan": 1,
120
- "colwidth": null,
121
- "rowspan": 1,
122
- },
123
- "content": Array [
124
- Object {
125
- "type": "paragraph",
126
- },
127
- ],
128
- "type": "tableCell",
129
- },
130
- ],
131
- "type": "tableRow",
132
- },
133
- Object {
134
- "content": Array [
135
- Object {
136
- "attrs": Object {
137
- "background": null,
138
- "colspan": 1,
139
- "colwidth": null,
140
- "rowspan": 1,
141
- },
142
- "content": Array [
143
- Object {
144
- "type": "paragraph",
145
- },
146
- ],
147
- "type": "tableCell",
148
- },
149
- Object {
150
- "attrs": Object {
151
- "background": null,
152
- "colspan": 1,
153
- "colwidth": null,
154
- "rowspan": 1,
155
- },
156
- "content": Array [
157
- Object {
158
- "type": "paragraph",
159
- },
160
- ],
161
- "type": "tableCell",
162
- },
163
- Object {
164
- "attrs": Object {
165
- "background": null,
166
- "colspan": 1,
167
- "colwidth": null,
168
- "rowspan": 1,
169
- },
170
- "content": Array [
171
- Object {
172
- "type": "paragraph",
173
- },
174
- ],
175
- "type": "tableCell",
176
- },
177
- ],
178
- "type": "tableRow",
179
- },
180
- Object {
181
- "content": Array [
182
- Object {
183
- "attrs": Object {
184
- "background": null,
185
- "colspan": 1,
186
- "colwidth": null,
187
- "rowspan": 1,
188
- },
189
- "content": Array [
190
- Object {
191
- "type": "paragraph",
192
- },
193
- ],
194
- "type": "tableCell",
195
- },
196
- Object {
197
- "attrs": Object {
198
- "background": null,
199
- "colspan": 1,
200
- "colwidth": null,
201
- "rowspan": 1,
202
- },
203
- "content": Array [
204
- Object {
205
- "type": "paragraph",
206
- },
207
- ],
208
- "type": "tableCell",
209
- },
210
- Object {
211
- "attrs": Object {
212
- "background": null,
213
- "colspan": 1,
214
- "colwidth": null,
215
- "rowspan": 1,
216
- },
217
- "content": Array [
218
- Object {
219
- "type": "paragraph",
220
- },
221
- ],
222
- "type": "tableCell",
223
- },
224
- ],
225
- "type": "tableRow",
226
- },
227
- ],
228
- "type": "table",
229
- },
230
- ],
231
- "type": "layoutColumn",
232
- },
233
- ],
234
- "type": "layoutSection",
235
- },
236
- ],
237
- "type": "doc",
238
- }
239
- `;