@atlaskit/editor-plugin-table 3.0.2 → 3.0.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +12 -1
  3. package/dist/cjs/plugins/table/ui/consts.js +6 -4
  4. package/dist/cjs/plugins/table/ui/ui-styles.js +1 -1
  5. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +14 -3
  6. package/dist/es2019/plugins/table/ui/consts.js +5 -4
  7. package/dist/es2019/plugins/table/ui/ui-styles.js +2 -2
  8. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +14 -3
  9. package/dist/esm/plugins/table/ui/consts.js +5 -4
  10. package/dist/esm/plugins/table/ui/ui-styles.js +1 -1
  11. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +6 -5
  12. package/dist/types/plugins/table/pm-plugins/sticky-headers/util.d.ts +1 -1
  13. package/dist/types/plugins/table/ui/consts.d.ts +2 -1
  14. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +6 -5
  15. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/util.d.ts +1 -1
  16. package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +2 -1
  17. package/package.json +4 -4
  18. package/src/__tests__/integration/arrow-down-into-table.ts +2 -0
  19. package/src/__tests__/integration/auto-size.ts +3 -0
  20. package/src/__tests__/integration/cell-selection.ts +3 -0
  21. package/src/__tests__/integration/delete-columns.ts +2 -0
  22. package/src/__tests__/integration/delete-last-column-in-full-width.ts +2 -0
  23. package/src/__tests__/integration/delete-last-column-with-empty-action.ts +2 -0
  24. package/src/__tests__/integration/delete-last-row-with-empty-action.ts +2 -0
  25. package/src/__tests__/integration/delete-rows.ts +3 -0
  26. package/src/__tests__/integration/delete-table-when-selected.ts +3 -0
  27. package/src/__tests__/integration/deleting-empty-paragraph-under-table.ts +2 -0
  28. package/src/__tests__/integration/even-columns.ts +3 -0
  29. package/src/__tests__/integration/horizontal-scroll-shadows.ts +2 -0
  30. package/src/__tests__/integration/horizontal-scroll.ts +4 -1
  31. package/src/__tests__/integration/insert-cell-header-with-strong-mark.ts +2 -0
  32. package/src/__tests__/integration/insert-row-inside-layout.ts +3 -0
  33. package/src/__tests__/integration/layout.ts +3 -0
  34. package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +2 -0
  35. package/src/__tests__/integration/resize-handler.ts +3 -0
  36. package/src/__tests__/integration/resize.ts +4 -1
  37. package/src/__tests__/integration/scale.ts +3 -0
  38. package/src/__tests__/integration/sticky-header.ts +3 -1
  39. package/src/__tests__/unit/analytics.ts +4 -0
  40. package/src/__tests__/unit/collab.ts +3 -0
  41. package/src/__tests__/unit/commands/go-to-next-cell.ts +3 -0
  42. package/src/__tests__/unit/commands/insert.ts +3 -0
  43. package/src/__tests__/unit/commands/misc.ts +3 -0
  44. package/src/__tests__/unit/commands/sort.ts +3 -0
  45. package/src/__tests__/unit/commands.ts +3 -0
  46. package/src/__tests__/unit/copy-paste.ts +5 -0
  47. package/src/__tests__/unit/event-handlers/index.ts +3 -0
  48. package/src/__tests__/unit/event-handlers.ts +3 -0
  49. package/src/__tests__/unit/fix-tables.ts +3 -0
  50. package/src/__tests__/unit/get-toolbar-config.ts +3 -0
  51. package/src/__tests__/unit/handlers.ts +3 -0
  52. package/src/__tests__/unit/hover-selection.ts +4 -0
  53. package/src/__tests__/unit/index-with-fake-timers.ts +2 -0
  54. package/src/__tests__/unit/index.ts +4 -0
  55. package/src/__tests__/unit/layout.ts +3 -0
  56. package/src/__tests__/unit/nodeviews/OverflowShadowsObserver.ts +1 -0
  57. package/src/__tests__/unit/nodeviews/TableComponent.tsx +2 -0
  58. package/src/__tests__/unit/nodeviews/TableContainer.tsx +2 -0
  59. package/src/__tests__/unit/nodeviews/cell.ts +3 -0
  60. package/src/__tests__/unit/nodeviews/table.ts +4 -0
  61. package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +2 -0
  62. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +3 -0
  63. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +3 -0
  64. package/src/__tests__/unit/pm-plugins/main.ts +3 -0
  65. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +3 -0
  66. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +5 -1
  67. package/src/__tests__/unit/pm-plugins/table-local-id.ts +4 -0
  68. package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +2 -0
  69. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +3 -0
  70. package/src/__tests__/unit/pm-plugins/table-width.ts +3 -0
  71. package/src/__tests__/unit/sort-column.ts +3 -0
  72. package/src/__tests__/unit/toolbar.ts +3 -0
  73. package/src/__tests__/unit/transforms/delete-columns.ts +3 -0
  74. package/src/__tests__/unit/transforms/delete-rows.ts +3 -0
  75. package/src/__tests__/unit/transforms/merging.ts +3 -0
  76. package/src/__tests__/unit/ui/ContextualMenu.tsx +3 -0
  77. package/src/__tests__/unit/ui/CornerControls.tsx +3 -0
  78. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +3 -0
  79. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +3 -0
  80. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +3 -0
  81. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +3 -0
  82. package/src/__tests__/unit/ui/RowControls.tsx +4 -0
  83. package/src/__tests__/unit/ui/TableFloatingControls.tsx +3 -0
  84. package/src/__tests__/unit/undo-redo.ts +4 -0
  85. package/src/__tests__/unit/utils/collapse.ts +3 -0
  86. package/src/__tests__/unit/utils/nodes.ts +3 -0
  87. package/src/__tests__/unit/utils/row-controls.ts +3 -0
  88. package/src/__tests__/unit/utils/table.ts +2 -0
  89. package/src/__tests__/unit/utils.ts +3 -0
  90. package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-should-remove-the-table-column-on-click-1-snap.png +2 -2
  91. package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-visual-hints-should-be-added-to-the-table-column-on-hover-1-snap.png +2 -2
  92. package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-should-remove-the-table-row-on-click-1-snap.png +2 -2
  93. package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-visual-hints-should-be-added-to-the-table-row-on-hover-1-snap.png +2 -2
  94. package/src/__tests__/visual-regression/cell-options-menu.ts +3 -1
  95. package/src/__tests__/visual-regression/index.ts +4 -1
  96. package/src/__tests__/visual-regression/sticky-header.ts +4 -1
  97. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +26 -7
  98. package/src/plugins/table/pm-plugins/sticky-headers/util.ts +1 -1
  99. package/src/plugins/table/ui/consts.ts +13 -2
  100. package/src/plugins/table/ui/ui-styles.ts +2 -2
  101. package/src/__tests__/integration/__snapshots__/floating-toolbar.ts.snap +0 -613
  102. package/src/__tests__/integration/floating-toolbar.ts +0 -374
@@ -1,613 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`should show hover indicators on delete columns menu option 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
- },
13
- "content": Array [
14
- Object {
15
- "content": Array [
16
- Object {
17
- "attrs": Object {
18
- "background": null,
19
- "colspan": 1,
20
- "colwidth": null,
21
- "rowspan": 1,
22
- },
23
- "content": Array [
24
- Object {
25
- "type": "paragraph",
26
- },
27
- ],
28
- "type": "tableHeader",
29
- },
30
- Object {
31
- "attrs": Object {
32
- "background": null,
33
- "colspan": 1,
34
- "colwidth": null,
35
- "rowspan": 1,
36
- },
37
- "content": Array [
38
- Object {
39
- "type": "paragraph",
40
- },
41
- ],
42
- "type": "tableHeader",
43
- },
44
- Object {
45
- "attrs": Object {
46
- "background": null,
47
- "colspan": 1,
48
- "colwidth": null,
49
- "rowspan": 1,
50
- },
51
- "content": Array [
52
- Object {
53
- "type": "paragraph",
54
- },
55
- ],
56
- "type": "tableHeader",
57
- },
58
- ],
59
- "type": "tableRow",
60
- },
61
- Object {
62
- "content": Array [
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": "tableCell",
76
- },
77
- Object {
78
- "attrs": Object {
79
- "background": null,
80
- "colspan": 1,
81
- "colwidth": null,
82
- "rowspan": 1,
83
- },
84
- "content": Array [
85
- Object {
86
- "type": "paragraph",
87
- },
88
- ],
89
- "type": "tableCell",
90
- },
91
- Object {
92
- "attrs": Object {
93
- "background": null,
94
- "colspan": 1,
95
- "colwidth": null,
96
- "rowspan": 1,
97
- },
98
- "content": Array [
99
- Object {
100
- "type": "paragraph",
101
- },
102
- ],
103
- "type": "tableCell",
104
- },
105
- ],
106
- "type": "tableRow",
107
- },
108
- Object {
109
- "content": Array [
110
- Object {
111
- "attrs": Object {
112
- "background": null,
113
- "colspan": 1,
114
- "colwidth": null,
115
- "rowspan": 1,
116
- },
117
- "content": Array [
118
- Object {
119
- "type": "paragraph",
120
- },
121
- ],
122
- "type": "tableCell",
123
- },
124
- Object {
125
- "attrs": Object {
126
- "background": null,
127
- "colspan": 1,
128
- "colwidth": null,
129
- "rowspan": 1,
130
- },
131
- "content": Array [
132
- Object {
133
- "type": "paragraph",
134
- },
135
- ],
136
- "type": "tableCell",
137
- },
138
- Object {
139
- "attrs": Object {
140
- "background": null,
141
- "colspan": 1,
142
- "colwidth": null,
143
- "rowspan": 1,
144
- },
145
- "content": Array [
146
- Object {
147
- "type": "paragraph",
148
- },
149
- ],
150
- "type": "tableCell",
151
- },
152
- ],
153
- "type": "tableRow",
154
- },
155
- ],
156
- "type": "table",
157
- },
158
- ],
159
- "type": "doc",
160
- }
161
- `;
162
-
163
- exports[`should show hover indicators on delete rows menu option 1`] = `
164
- Object {
165
- "content": Array [
166
- Object {
167
- "attrs": Object {
168
- "__autoSize": false,
169
- "isNumberColumnEnabled": false,
170
- "layout": "default",
171
- "localId": "abc-123",
172
- },
173
- "content": Array [
174
- Object {
175
- "content": Array [
176
- Object {
177
- "attrs": Object {
178
- "background": null,
179
- "colspan": 1,
180
- "colwidth": null,
181
- "rowspan": 1,
182
- },
183
- "content": Array [
184
- Object {
185
- "type": "paragraph",
186
- },
187
- ],
188
- "type": "tableHeader",
189
- },
190
- Object {
191
- "attrs": Object {
192
- "background": null,
193
- "colspan": 1,
194
- "colwidth": null,
195
- "rowspan": 1,
196
- },
197
- "content": Array [
198
- Object {
199
- "type": "paragraph",
200
- },
201
- ],
202
- "type": "tableHeader",
203
- },
204
- Object {
205
- "attrs": Object {
206
- "background": null,
207
- "colspan": 1,
208
- "colwidth": null,
209
- "rowspan": 1,
210
- },
211
- "content": Array [
212
- Object {
213
- "type": "paragraph",
214
- },
215
- ],
216
- "type": "tableHeader",
217
- },
218
- ],
219
- "type": "tableRow",
220
- },
221
- Object {
222
- "content": Array [
223
- Object {
224
- "attrs": Object {
225
- "background": null,
226
- "colspan": 1,
227
- "colwidth": null,
228
- "rowspan": 1,
229
- },
230
- "content": Array [
231
- Object {
232
- "type": "paragraph",
233
- },
234
- ],
235
- "type": "tableCell",
236
- },
237
- Object {
238
- "attrs": Object {
239
- "background": null,
240
- "colspan": 1,
241
- "colwidth": null,
242
- "rowspan": 1,
243
- },
244
- "content": Array [
245
- Object {
246
- "type": "paragraph",
247
- },
248
- ],
249
- "type": "tableCell",
250
- },
251
- Object {
252
- "attrs": Object {
253
- "background": null,
254
- "colspan": 1,
255
- "colwidth": null,
256
- "rowspan": 1,
257
- },
258
- "content": Array [
259
- Object {
260
- "type": "paragraph",
261
- },
262
- ],
263
- "type": "tableCell",
264
- },
265
- ],
266
- "type": "tableRow",
267
- },
268
- Object {
269
- "content": Array [
270
- Object {
271
- "attrs": Object {
272
- "background": null,
273
- "colspan": 1,
274
- "colwidth": null,
275
- "rowspan": 1,
276
- },
277
- "content": Array [
278
- Object {
279
- "type": "paragraph",
280
- },
281
- ],
282
- "type": "tableCell",
283
- },
284
- Object {
285
- "attrs": Object {
286
- "background": null,
287
- "colspan": 1,
288
- "colwidth": null,
289
- "rowspan": 1,
290
- },
291
- "content": Array [
292
- Object {
293
- "type": "paragraph",
294
- },
295
- ],
296
- "type": "tableCell",
297
- },
298
- Object {
299
- "attrs": Object {
300
- "background": null,
301
- "colspan": 1,
302
- "colwidth": null,
303
- "rowspan": 1,
304
- },
305
- "content": Array [
306
- Object {
307
- "type": "paragraph",
308
- },
309
- ],
310
- "type": "tableCell",
311
- },
312
- ],
313
- "type": "tableRow",
314
- },
315
- ],
316
- "type": "table",
317
- },
318
- ],
319
- "type": "doc",
320
- }
321
- `;
322
-
323
- exports[`should show yellow highlight on the megred rows when hover disabled sort column ASC menu option 1`] = `
324
- Object {
325
- "content": Array [
326
- Object {
327
- "attrs": Object {
328
- "__autoSize": false,
329
- "isNumberColumnEnabled": false,
330
- "layout": "default",
331
- "localId": "abc-123",
332
- },
333
- "content": Array [
334
- Object {
335
- "content": Array [
336
- Object {
337
- "attrs": Object {
338
- "background": null,
339
- "colspan": 1,
340
- "colwidth": null,
341
- "rowspan": 1,
342
- },
343
- "content": Array [
344
- Object {
345
- "type": "paragraph",
346
- },
347
- ],
348
- "type": "tableHeader",
349
- },
350
- Object {
351
- "attrs": Object {
352
- "background": null,
353
- "colspan": 1,
354
- "colwidth": null,
355
- "rowspan": 1,
356
- },
357
- "content": Array [
358
- Object {
359
- "type": "paragraph",
360
- },
361
- ],
362
- "type": "tableHeader",
363
- },
364
- Object {
365
- "attrs": Object {
366
- "background": null,
367
- "colspan": 1,
368
- "colwidth": null,
369
- "rowspan": 1,
370
- },
371
- "content": Array [
372
- Object {
373
- "type": "paragraph",
374
- },
375
- ],
376
- "type": "tableHeader",
377
- },
378
- ],
379
- "type": "tableRow",
380
- },
381
- Object {
382
- "content": Array [
383
- Object {
384
- "attrs": Object {
385
- "background": null,
386
- "colspan": 1,
387
- "colwidth": null,
388
- "rowspan": 1,
389
- },
390
- "content": Array [
391
- Object {
392
- "type": "paragraph",
393
- },
394
- ],
395
- "type": "tableCell",
396
- },
397
- Object {
398
- "attrs": Object {
399
- "background": null,
400
- "colspan": 1,
401
- "colwidth": null,
402
- "rowspan": 1,
403
- },
404
- "content": Array [
405
- Object {
406
- "type": "paragraph",
407
- },
408
- ],
409
- "type": "tableCell",
410
- },
411
- Object {
412
- "attrs": Object {
413
- "background": null,
414
- "colspan": 1,
415
- "colwidth": null,
416
- "rowspan": 1,
417
- },
418
- "content": Array [
419
- Object {
420
- "type": "paragraph",
421
- },
422
- ],
423
- "type": "tableCell",
424
- },
425
- ],
426
- "type": "tableRow",
427
- },
428
- Object {
429
- "content": Array [
430
- Object {
431
- "attrs": Object {
432
- "background": null,
433
- "colspan": 1,
434
- "colwidth": null,
435
- "rowspan": 1,
436
- },
437
- "content": Array [
438
- Object {
439
- "type": "paragraph",
440
- },
441
- ],
442
- "type": "tableCell",
443
- },
444
- Object {
445
- "attrs": Object {
446
- "background": null,
447
- "colspan": 2,
448
- "colwidth": null,
449
- "rowspan": 1,
450
- },
451
- "content": Array [
452
- Object {
453
- "type": "paragraph",
454
- },
455
- ],
456
- "type": "tableCell",
457
- },
458
- ],
459
- "type": "tableRow",
460
- },
461
- ],
462
- "type": "table",
463
- },
464
- ],
465
- "type": "doc",
466
- }
467
- `;
468
-
469
- exports[`should show yellow highlight on the megred rows when hover disabled sort column DESC menu option 1`] = `
470
- Object {
471
- "content": Array [
472
- Object {
473
- "attrs": Object {
474
- "__autoSize": false,
475
- "isNumberColumnEnabled": false,
476
- "layout": "default",
477
- "localId": "abc-123",
478
- },
479
- "content": Array [
480
- Object {
481
- "content": Array [
482
- Object {
483
- "attrs": Object {
484
- "background": null,
485
- "colspan": 1,
486
- "colwidth": null,
487
- "rowspan": 1,
488
- },
489
- "content": Array [
490
- Object {
491
- "type": "paragraph",
492
- },
493
- ],
494
- "type": "tableHeader",
495
- },
496
- Object {
497
- "attrs": Object {
498
- "background": null,
499
- "colspan": 1,
500
- "colwidth": null,
501
- "rowspan": 1,
502
- },
503
- "content": Array [
504
- Object {
505
- "type": "paragraph",
506
- },
507
- ],
508
- "type": "tableHeader",
509
- },
510
- Object {
511
- "attrs": Object {
512
- "background": null,
513
- "colspan": 1,
514
- "colwidth": null,
515
- "rowspan": 1,
516
- },
517
- "content": Array [
518
- Object {
519
- "type": "paragraph",
520
- },
521
- ],
522
- "type": "tableHeader",
523
- },
524
- ],
525
- "type": "tableRow",
526
- },
527
- Object {
528
- "content": Array [
529
- Object {
530
- "attrs": Object {
531
- "background": null,
532
- "colspan": 1,
533
- "colwidth": null,
534
- "rowspan": 1,
535
- },
536
- "content": Array [
537
- Object {
538
- "type": "paragraph",
539
- },
540
- ],
541
- "type": "tableCell",
542
- },
543
- Object {
544
- "attrs": Object {
545
- "background": null,
546
- "colspan": 1,
547
- "colwidth": null,
548
- "rowspan": 1,
549
- },
550
- "content": Array [
551
- Object {
552
- "type": "paragraph",
553
- },
554
- ],
555
- "type": "tableCell",
556
- },
557
- Object {
558
- "attrs": Object {
559
- "background": null,
560
- "colspan": 1,
561
- "colwidth": null,
562
- "rowspan": 1,
563
- },
564
- "content": Array [
565
- Object {
566
- "type": "paragraph",
567
- },
568
- ],
569
- "type": "tableCell",
570
- },
571
- ],
572
- "type": "tableRow",
573
- },
574
- Object {
575
- "content": Array [
576
- Object {
577
- "attrs": Object {
578
- "background": null,
579
- "colspan": 1,
580
- "colwidth": null,
581
- "rowspan": 1,
582
- },
583
- "content": Array [
584
- Object {
585
- "type": "paragraph",
586
- },
587
- ],
588
- "type": "tableCell",
589
- },
590
- Object {
591
- "attrs": Object {
592
- "background": null,
593
- "colspan": 2,
594
- "colwidth": null,
595
- "rowspan": 1,
596
- },
597
- "content": Array [
598
- Object {
599
- "type": "paragraph",
600
- },
601
- ],
602
- "type": "tableCell",
603
- },
604
- ],
605
- "type": "tableRow",
606
- },
607
- ],
608
- "type": "table",
609
- },
610
- ],
611
- "type": "doc",
612
- }
613
- `;