@atlaskit/editor-plugin-table 5.4.4 → 5.4.6

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 (64) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/plugins/table/types.js +1 -1
  3. package/dist/cjs/plugins/table/ui/DragHandle/HandleIconComponent.js +29 -0
  4. package/dist/cjs/plugins/table/ui/DragHandle/index.js +21 -20
  5. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  6. package/dist/cjs/plugins/table/ui/consts.js +1 -2
  7. package/dist/cjs/plugins/table/ui/ui-styles.js +10 -13
  8. package/dist/cjs/plugins/table/utils/decoration.js +7 -6
  9. package/dist/es2019/plugins/table/types.js +1 -1
  10. package/dist/es2019/plugins/table/ui/DragHandle/HandleIconComponent.js +24 -0
  11. package/dist/es2019/plugins/table/ui/DragHandle/index.js +21 -20
  12. package/dist/es2019/plugins/table/ui/common-styles.js +6 -2
  13. package/dist/es2019/plugins/table/ui/consts.js +0 -1
  14. package/dist/es2019/plugins/table/ui/ui-styles.js +18 -12
  15. package/dist/es2019/plugins/table/utils/decoration.js +7 -6
  16. package/dist/esm/plugins/table/types.js +1 -1
  17. package/dist/esm/plugins/table/ui/DragHandle/HandleIconComponent.js +22 -0
  18. package/dist/esm/plugins/table/ui/DragHandle/index.js +21 -20
  19. package/dist/esm/plugins/table/ui/common-styles.js +2 -2
  20. package/dist/esm/plugins/table/ui/consts.js +0 -1
  21. package/dist/esm/plugins/table/ui/ui-styles.js +10 -13
  22. package/dist/esm/plugins/table/utils/decoration.js +7 -6
  23. package/dist/types/plugins/table/types.d.ts +1 -1
  24. package/dist/types/plugins/table/ui/DragHandle/HandleIconComponent.d.ts +13 -0
  25. package/dist/types/plugins/table/ui/consts.d.ts +0 -1
  26. package/dist/types/plugins/table/ui/ui-styles.d.ts +0 -1
  27. package/dist/types-ts4.5/plugins/table/types.d.ts +1 -1
  28. package/dist/types-ts4.5/plugins/table/ui/DragHandle/HandleIconComponent.d.ts +13 -0
  29. package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +0 -1
  30. package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +0 -1
  31. package/package.json +4 -4
  32. package/src/plugins/table/types.ts +1 -1
  33. package/src/plugins/table/ui/DragHandle/HandleIconComponent.tsx +51 -0
  34. package/src/plugins/table/ui/DragHandle/index.tsx +30 -33
  35. package/src/plugins/table/ui/common-styles.ts +5 -2
  36. package/src/plugins/table/ui/consts.ts +0 -5
  37. package/src/plugins/table/ui/ui-styles.ts +17 -12
  38. package/src/plugins/table/utils/decoration.ts +14 -19
  39. package/tsconfig.dev.json +0 -3
  40. package/src/__tests__/integration/__fixtures__/auto-size-documents.ts +0 -434
  41. package/src/__tests__/integration/__fixtures__/basic-table-with-merged-cell.ts +0 -112
  42. package/src/__tests__/integration/__fixtures__/basic-table.ts +0 -120
  43. package/src/__tests__/integration/__fixtures__/empty-layout.ts +0 -35
  44. package/src/__tests__/integration/__fixtures__/empty-paragraph-underneath-table.ts +0 -396
  45. package/src/__tests__/integration/__fixtures__/even-columns.ts +0 -493
  46. package/src/__tests__/integration/__fixtures__/large-table-with-sticky-header.ts +0 -2311
  47. package/src/__tests__/integration/__fixtures__/layout-documents.ts +0 -606
  48. package/src/__tests__/integration/__fixtures__/merged-rows-and-cols-document.ts +0 -343
  49. package/src/__tests__/integration/__fixtures__/nested-in-expand.ts +0 -129
  50. package/src/__tests__/integration/__fixtures__/nested-in-extension.ts +0 -163
  51. package/src/__tests__/integration/__fixtures__/paragraph-and-table-adf.ts +0 -132
  52. package/src/__tests__/integration/__fixtures__/resize-documents.ts +0 -1605
  53. package/src/__tests__/integration/__fixtures__/scale.ts +0 -825
  54. package/src/__tests__/integration/__fixtures__/table-and-paragraph-adf.ts +0 -130
  55. package/src/__tests__/integration/__fixtures__/table-inside-layout.ts +0 -145
  56. package/src/__tests__/integration/__fixtures__/table-with-min-width-columns-document.ts +0 -175
  57. package/src/__tests__/integration/__fixtures__/table-with-multiline-date.adf.json +0 -168
  58. package/src/__tests__/integration/__fixtures__/table-with-text-and-empty-row.ts +0 -216
  59. package/src/__tests__/integration/__snapshots__/copy-button.ts.snap +0 -423
  60. package/src/__tests__/integration/copy-button.ts +0 -179
  61. package/src/__tests__/integration/horizontal-scroll-shadows.ts +0 -197
  62. package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +0 -42
  63. package/src/__tests__/integration/sticky-header.ts +0 -133
  64. package/src/__tests__/integration/table-controls-selection.ts +0 -71
@@ -1,434 +0,0 @@
1
- const autoSizeToDefaultLayout = {
2
- version: 1,
3
- type: 'doc',
4
- content: [
5
- {
6
- type: 'table',
7
- attrs: {
8
- isNumberColumnEnabled: false,
9
- layout: 'default',
10
- __autoSize: true,
11
- localId: 'abc-123',
12
- },
13
- content: [
14
- {
15
- type: 'tableRow',
16
- content: [
17
- {
18
- type: 'tableHeader',
19
- attrs: {},
20
- content: [
21
- {
22
- type: 'paragraph',
23
- content: [
24
- {
25
- type: 'text',
26
- text: 'Lorem ipsum dolor sit amet',
27
- },
28
- ],
29
- },
30
- ],
31
- },
32
- {
33
- type: 'tableHeader',
34
- attrs: {},
35
- content: [
36
- {
37
- type: 'paragraph',
38
- content: [],
39
- },
40
- ],
41
- },
42
- {
43
- type: 'tableHeader',
44
- attrs: {},
45
- content: [
46
- {
47
- type: 'paragraph',
48
- content: [
49
- {
50
- type: 'text',
51
- text: 'Lorem ipsum dolor sit amet',
52
- },
53
- ],
54
- },
55
- ],
56
- },
57
- ],
58
- },
59
- {
60
- type: 'tableRow',
61
- content: [
62
- {
63
- type: 'tableCell',
64
- attrs: {},
65
- content: [
66
- {
67
- type: 'paragraph',
68
- content: [],
69
- },
70
- ],
71
- },
72
- {
73
- type: 'tableCell',
74
- attrs: {},
75
- content: [
76
- {
77
- type: 'panel',
78
- attrs: {
79
- panelType: 'error',
80
- },
81
- content: [
82
- {
83
- type: 'paragraph',
84
- content: [
85
- {
86
- type: 'text',
87
- text: 'foo',
88
- },
89
- ],
90
- },
91
- ],
92
- },
93
- ],
94
- },
95
- {
96
- type: 'tableCell',
97
- attrs: {},
98
- content: [
99
- {
100
- type: 'paragraph',
101
- content: [],
102
- },
103
- ],
104
- },
105
- ],
106
- },
107
- {
108
- type: 'tableRow',
109
- content: [
110
- {
111
- type: 'tableCell',
112
- attrs: {},
113
- content: [
114
- {
115
- type: 'paragraph',
116
- content: [],
117
- },
118
- ],
119
- },
120
- {
121
- type: 'tableCell',
122
- attrs: {},
123
- content: [
124
- {
125
- type: 'paragraph',
126
- content: [],
127
- },
128
- ],
129
- },
130
- {
131
- type: 'tableCell',
132
- attrs: {},
133
- content: [
134
- {
135
- type: 'paragraph',
136
- content: [],
137
- },
138
- ],
139
- },
140
- ],
141
- },
142
- ],
143
- },
144
- ],
145
- };
146
-
147
- const autoSizeToWideLayout = {
148
- version: 1,
149
- type: 'doc',
150
- content: [
151
- {
152
- type: 'table',
153
- attrs: {
154
- isNumberColumnEnabled: false,
155
- layout: 'default',
156
- __autoSize: true,
157
- localId: 'abc-123',
158
- },
159
- content: [
160
- {
161
- type: 'tableRow',
162
- content: [
163
- {
164
- type: 'tableHeader',
165
- attrs: {},
166
- content: [
167
- {
168
- type: 'paragraph',
169
- content: [
170
- {
171
- type: 'text',
172
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
173
- },
174
- ],
175
- },
176
- ],
177
- },
178
- {
179
- type: 'tableHeader',
180
- attrs: {},
181
- content: [
182
- {
183
- type: 'paragraph',
184
- content: [],
185
- },
186
- ],
187
- },
188
- {
189
- type: 'tableHeader',
190
- attrs: {},
191
- content: [
192
- {
193
- type: 'paragraph',
194
- content: [
195
- {
196
- type: 'text',
197
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
198
- },
199
- ],
200
- },
201
- ],
202
- },
203
- ],
204
- },
205
- {
206
- type: 'tableRow',
207
- content: [
208
- {
209
- type: 'tableCell',
210
- attrs: {},
211
- content: [
212
- {
213
- type: 'paragraph',
214
- content: [],
215
- },
216
- ],
217
- },
218
- {
219
- type: 'tableCell',
220
- attrs: {},
221
- content: [
222
- {
223
- type: 'panel',
224
- attrs: {
225
- panelType: 'error',
226
- },
227
- content: [
228
- {
229
- type: 'paragraph',
230
- content: [
231
- {
232
- type: 'text',
233
- text: 'foo',
234
- },
235
- ],
236
- },
237
- ],
238
- },
239
- ],
240
- },
241
- {
242
- type: 'tableCell',
243
- attrs: {},
244
- content: [
245
- {
246
- type: 'paragraph',
247
- content: [],
248
- },
249
- ],
250
- },
251
- ],
252
- },
253
- {
254
- type: 'tableRow',
255
- content: [
256
- {
257
- type: 'tableCell',
258
- attrs: {},
259
- content: [
260
- {
261
- type: 'paragraph',
262
- content: [],
263
- },
264
- ],
265
- },
266
- {
267
- type: 'tableCell',
268
- attrs: {},
269
- content: [
270
- {
271
- type: 'paragraph',
272
- content: [],
273
- },
274
- ],
275
- },
276
- {
277
- type: 'tableCell',
278
- attrs: {},
279
- content: [
280
- {
281
- type: 'paragraph',
282
- content: [],
283
- },
284
- ],
285
- },
286
- ],
287
- },
288
- ],
289
- },
290
- ],
291
- };
292
- const autoSizeToFullWidthLayout = {
293
- version: 1,
294
- type: 'doc',
295
- content: [
296
- {
297
- type: 'table',
298
- attrs: {
299
- isNumberColumnEnabled: false,
300
- layout: 'default',
301
- __autoSize: true,
302
- localId: 'abc-123',
303
- },
304
- content: [
305
- {
306
- type: 'tableRow',
307
- content: [
308
- {
309
- type: 'tableHeader',
310
- attrs: {},
311
- content: [
312
- {
313
- type: 'paragraph',
314
- content: [
315
- {
316
- type: 'text',
317
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mi nisl, venenatis eget auctor vitae, venenatis quis lorem. Suspendisse maximus tortor vel dui tincidunt cursus. Vestibulum magna nibh, auctor non auctor id, finibus vitae orci. Nulla viverra ipsum et nunc fringilla ultricies. Pellentesque vitae felis molestie justo finibus accumsan. Suspendisse potenti. Nulla facilisi. Integer dignissim quis velit quis elementum. Sed sit amet varius ante. Duis vestibulum porta augue eu laoreet. Morbi id risus et augue sollicitudin aliquam. In et ligula dolor. Nam ac aliquet diam.',
318
- },
319
- ],
320
- },
321
- ],
322
- },
323
- {
324
- type: 'tableHeader',
325
- attrs: {},
326
- content: [
327
- {
328
- type: 'paragraph',
329
- content: [],
330
- },
331
- ],
332
- },
333
- {
334
- type: 'tableHeader',
335
- attrs: {},
336
- content: [
337
- {
338
- type: 'paragraph',
339
- content: [],
340
- },
341
- ],
342
- },
343
- ],
344
- },
345
- {
346
- type: 'tableRow',
347
- content: [
348
- {
349
- type: 'tableCell',
350
- attrs: {},
351
- content: [
352
- {
353
- type: 'paragraph',
354
- content: [],
355
- },
356
- ],
357
- },
358
- {
359
- type: 'tableCell',
360
- attrs: {},
361
- content: [
362
- {
363
- type: 'paragraph',
364
- content: [
365
- {
366
- type: 'text',
367
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mi nisl, venenatis eget auctor vitae, venenatis quis lorem. Suspendisse maximus tortor vel dui tincidunt cursus. Vestibulum magna nibh, auctor non auctor id, finibus vitae orci. Nulla viverra ipsum et nunc fringilla ultricies. Pellentesque vitae felis molestie justo finibus accumsan. Suspendisse potenti. Nulla facilisi. Integer dignissim quis velit quis elementum. Sed sit amet varius ante. Duis vestibulum porta augue eu laoreet. Morbi id risus et augue sollicitudin aliquam. In et ligula dolor. Nam ac aliquet diam.',
368
- },
369
- ],
370
- },
371
- ],
372
- },
373
- {
374
- type: 'tableCell',
375
- attrs: {},
376
- content: [
377
- {
378
- type: 'paragraph',
379
- content: [],
380
- },
381
- ],
382
- },
383
- ],
384
- },
385
- {
386
- type: 'tableRow',
387
- content: [
388
- {
389
- type: 'tableCell',
390
- attrs: {},
391
- content: [
392
- {
393
- type: 'paragraph',
394
- content: [],
395
- },
396
- ],
397
- },
398
- {
399
- type: 'tableCell',
400
- attrs: {},
401
- content: [
402
- {
403
- type: 'paragraph',
404
- content: [],
405
- },
406
- ],
407
- },
408
- {
409
- type: 'tableCell',
410
- attrs: {},
411
- content: [
412
- {
413
- type: 'paragraph',
414
- content: [
415
- {
416
- type: 'text',
417
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mi nisl, venenatis eget auctor vitae, venenatis quis lorem. Suspendisse maximus tortor vel dui tincidunt cursus. Vestibulum magna nibh, auctor non auctor id, finibus vitae orci. Nulla viverra ipsum et nunc fringilla ultricies. Pellentesque vitae felis molestie justo finibus accumsan. Suspendisse potenti. Nulla facilisi. Integer dignissim quis velit quis elementum. Sed sit amet varius ante. Duis vestibulum porta augue eu laoreet. Morbi id risus et augue sollicitudin aliquam. In et ligula dolor. Nam ac aliquet diam.',
418
- },
419
- ],
420
- },
421
- ],
422
- },
423
- ],
424
- },
425
- ],
426
- },
427
- ],
428
- };
429
-
430
- export {
431
- autoSizeToDefaultLayout,
432
- autoSizeToWideLayout,
433
- autoSizeToFullWidthLayout,
434
- };
@@ -1,112 +0,0 @@
1
- export default {
2
- version: 1,
3
- type: 'doc',
4
- content: [
5
- {
6
- type: 'table',
7
- attrs: {
8
- isNumberColumnEnabled: false,
9
- layout: 'default',
10
- },
11
- content: [
12
- {
13
- type: 'tableRow',
14
- content: [
15
- {
16
- type: 'tableHeader',
17
- attrs: {},
18
- content: [
19
- {
20
- type: 'paragraph',
21
- content: [],
22
- },
23
- ],
24
- },
25
- {
26
- type: 'tableHeader',
27
- attrs: {},
28
- content: [
29
- {
30
- type: 'paragraph',
31
- content: [],
32
- },
33
- ],
34
- },
35
- {
36
- type: 'tableHeader',
37
- attrs: {},
38
- content: [
39
- {
40
- type: 'paragraph',
41
- content: [],
42
- },
43
- ],
44
- },
45
- ],
46
- },
47
- {
48
- type: 'tableRow',
49
- content: [
50
- {
51
- type: 'tableCell',
52
- attrs: {},
53
- content: [
54
- {
55
- type: 'paragraph',
56
- content: [],
57
- },
58
- ],
59
- },
60
- {
61
- type: 'tableCell',
62
- attrs: {},
63
- content: [
64
- {
65
- type: 'paragraph',
66
- content: [],
67
- },
68
- ],
69
- },
70
- {
71
- type: 'tableCell',
72
- attrs: {},
73
- content: [
74
- {
75
- type: 'paragraph',
76
- content: [],
77
- },
78
- ],
79
- },
80
- ],
81
- },
82
- {
83
- type: 'tableRow',
84
- content: [
85
- {
86
- type: 'tableCell',
87
- attrs: {},
88
- content: [
89
- {
90
- type: 'paragraph',
91
- content: [],
92
- },
93
- ],
94
- },
95
- {
96
- type: 'tableCell',
97
- attrs: {
98
- colspan: 2,
99
- },
100
- content: [
101
- {
102
- type: 'paragraph',
103
- content: [],
104
- },
105
- ],
106
- },
107
- ],
108
- },
109
- ],
110
- },
111
- ],
112
- };
@@ -1,120 +0,0 @@
1
- export default {
2
- version: 1,
3
- type: 'doc',
4
- content: [
5
- {
6
- type: 'table',
7
- attrs: {
8
- isNumberColumnEnabled: false,
9
- layout: 'default',
10
- },
11
- content: [
12
- {
13
- type: 'tableRow',
14
- content: [
15
- {
16
- type: 'tableHeader',
17
- attrs: {},
18
- content: [
19
- {
20
- type: 'paragraph',
21
- content: [],
22
- },
23
- ],
24
- },
25
- {
26
- type: 'tableHeader',
27
- attrs: {},
28
- content: [
29
- {
30
- type: 'paragraph',
31
- content: [],
32
- },
33
- ],
34
- },
35
- {
36
- type: 'tableHeader',
37
- attrs: {},
38
- content: [
39
- {
40
- type: 'paragraph',
41
- content: [],
42
- },
43
- ],
44
- },
45
- ],
46
- },
47
- {
48
- type: 'tableRow',
49
- content: [
50
- {
51
- type: 'tableCell',
52
- attrs: {},
53
- content: [
54
- {
55
- type: 'paragraph',
56
- content: [],
57
- },
58
- ],
59
- },
60
- {
61
- type: 'tableCell',
62
- attrs: {},
63
- content: [
64
- {
65
- type: 'paragraph',
66
- content: [],
67
- },
68
- ],
69
- },
70
- {
71
- type: 'tableCell',
72
- attrs: {},
73
- content: [
74
- {
75
- type: 'paragraph',
76
- content: [],
77
- },
78
- ],
79
- },
80
- ],
81
- },
82
- {
83
- type: 'tableRow',
84
- content: [
85
- {
86
- type: 'tableCell',
87
- attrs: {},
88
- content: [
89
- {
90
- type: 'paragraph',
91
- content: [],
92
- },
93
- ],
94
- },
95
- {
96
- type: 'tableCell',
97
- attrs: {},
98
- content: [
99
- {
100
- type: 'paragraph',
101
- content: [],
102
- },
103
- ],
104
- },
105
- {
106
- type: 'tableCell',
107
- attrs: {},
108
- content: [
109
- {
110
- type: 'paragraph',
111
- content: [],
112
- },
113
- ],
114
- },
115
- ],
116
- },
117
- ],
118
- },
119
- ],
120
- };
@@ -1,35 +0,0 @@
1
- export const emptyLayout = {
2
- version: 1,
3
- type: 'doc',
4
- content: [
5
- {
6
- type: 'layoutSection',
7
- content: [
8
- {
9
- type: 'layoutColumn',
10
- attrs: {
11
- width: 50,
12
- },
13
- content: [
14
- {
15
- type: 'paragraph',
16
- content: [],
17
- },
18
- ],
19
- },
20
- {
21
- type: 'layoutColumn',
22
- attrs: {
23
- width: 50,
24
- },
25
- content: [
26
- {
27
- type: 'paragraph',
28
- content: [],
29
- },
30
- ],
31
- },
32
- ],
33
- },
34
- ],
35
- };