@atlaskit/editor-plugin-table 0.0.2 → 0.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 (182) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  7. package/dist/esm/version.json +1 -1
  8. package/dist/types-ts4.0/index.d.ts +1 -0
  9. package/dist/types-ts4.0/plugins/plugin-key.d.ts +4 -0
  10. package/dist/types-ts4.0/plugins/table/commands/clear.d.ts +3 -0
  11. package/dist/types-ts4.0/plugins/table/commands/collapse.d.ts +2 -0
  12. package/dist/types-ts4.0/plugins/table/commands/go-to-next-cell.d.ts +4 -0
  13. package/dist/types-ts4.0/plugins/table/commands/hover.d.ts +8 -0
  14. package/dist/types-ts4.0/plugins/table/commands/index.d.ts +7 -0
  15. package/dist/types-ts4.0/plugins/table/commands/insert.d.ts +10 -0
  16. package/dist/types-ts4.0/plugins/table/commands/misc.d.ts +27 -0
  17. package/dist/types-ts4.0/plugins/table/commands/selection.d.ts +8 -0
  18. package/dist/types-ts4.0/plugins/table/commands/sort.d.ts +3 -0
  19. package/dist/types-ts4.0/plugins/table/commands/split-cell.d.ts +6 -0
  20. package/dist/types-ts4.0/plugins/table/commands/toggle.d.ts +12 -0
  21. package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +26 -0
  22. package/dist/types-ts4.0/plugins/table/create-plugin-config.d.ts +2 -0
  23. package/dist/types-ts4.0/plugins/table/event-handlers.d.ts +16 -0
  24. package/dist/types-ts4.0/plugins/table/handlers.d.ts +3 -0
  25. package/dist/types-ts4.0/plugins/table/index.d.ts +17 -0
  26. package/dist/types-ts4.0/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +26 -0
  27. package/dist/types-ts4.0/plugins/table/nodeviews/TableComponent.d.ts +72 -0
  28. package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +9 -0
  29. package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +9 -0
  30. package/dist/types-ts4.0/plugins/table/nodeviews/table.d.ts +31 -0
  31. package/dist/types-ts4.0/plugins/table/nodeviews/tableCell.d.ts +19 -0
  32. package/dist/types-ts4.0/plugins/table/nodeviews/types.d.ts +23 -0
  33. package/dist/types-ts4.0/plugins/table/nodeviews/update-overflow-shadows.d.ts +8 -0
  34. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/plugin.d.ts +7 -0
  35. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +3 -0
  36. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +2 -0
  37. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +2 -0
  38. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/index.d.ts +3 -0
  39. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/types.d.ts +6 -0
  40. package/dist/types-ts4.0/plugins/table/pm-plugins/default-table-selection.d.ts +5 -0
  41. package/dist/types-ts4.0/plugins/table/pm-plugins/keymap.d.ts +5 -0
  42. package/dist/types-ts4.0/plugins/table/pm-plugins/main.d.ts +8 -0
  43. package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-factory.d.ts +1 -0
  44. package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
  45. package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +4 -0
  46. package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  47. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/commands.d.ts +3 -0
  48. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/index.d.ts +6 -0
  49. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +6 -0
  50. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +65 -0
  51. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +3 -0
  52. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -0
  53. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +4 -0
  54. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/types.d.ts +16 -0
  55. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/util.d.ts +2 -0
  56. package/dist/types-ts4.0/plugins/table/pm-plugins/table-local-id.d.ts +22 -0
  57. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/commands.d.ts +25 -0
  58. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +4 -0
  59. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +3 -0
  60. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +4 -0
  61. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +3 -0
  62. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin.d.ts +6 -0
  63. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/reducer.d.ts +3 -0
  64. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +8 -0
  65. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +14 -0
  66. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +4 -0
  67. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +13 -0
  68. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +12 -0
  69. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +22 -0
  70. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -0
  71. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  72. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +29 -0
  73. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +17 -0
  74. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +22 -0
  75. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +1 -0
  76. package/dist/types-ts4.0/plugins/table/pm-plugins/table-selection-keymap.d.ts +4 -0
  77. package/dist/types-ts4.0/plugins/table/reducer.d.ts +3 -0
  78. package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +1 -0
  79. package/dist/types-ts4.0/plugins/table/toolbar.d.ts +36 -0
  80. package/dist/types-ts4.0/plugins/table/transforms/column-width.d.ts +18 -0
  81. package/dist/types-ts4.0/plugins/table/transforms/delete-columns.d.ts +3 -0
  82. package/dist/types-ts4.0/plugins/table/transforms/delete-rows.d.ts +3 -0
  83. package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +10 -0
  84. package/dist/types-ts4.0/plugins/table/transforms/index.d.ts +7 -0
  85. package/dist/types-ts4.0/plugins/table/transforms/merge.d.ts +5 -0
  86. package/dist/types-ts4.0/plugins/table/transforms/metadata.d.ts +21 -0
  87. package/dist/types-ts4.0/plugins/table/transforms/replace-table.d.ts +5 -0
  88. package/dist/types-ts4.0/plugins/table/transforms/split.d.ts +9 -0
  89. package/dist/types-ts4.0/plugins/table/types.d.ts +328 -0
  90. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/index.d.ts +29 -0
  91. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -0
  92. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +87 -0
  93. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/index.d.ts +22 -0
  94. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -0
  95. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +14 -0
  96. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +10 -0
  97. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/index.d.ts +54 -0
  98. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -0
  99. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +12 -0
  100. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +3 -0
  101. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/index.d.ts +35 -0
  102. package/dist/types-ts4.0/plugins/table/ui/LayoutButton/index.d.ts +21 -0
  103. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +19 -0
  104. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +21 -0
  105. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +17 -0
  106. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/index.d.ts +40 -0
  107. package/dist/types-ts4.0/plugins/table/ui/common-styles.d.ts +4 -0
  108. package/dist/types-ts4.0/plugins/table/ui/consts.d.ts +39 -0
  109. package/dist/types-ts4.0/plugins/table/ui/messages.d.ts +38 -0
  110. package/dist/types-ts4.0/plugins/table/ui/ui-styles.d.ts +15 -0
  111. package/dist/types-ts4.0/plugins/table/utils/analytics.d.ts +18 -0
  112. package/dist/types-ts4.0/plugins/table/utils/collapse.d.ts +29 -0
  113. package/dist/types-ts4.0/plugins/table/utils/column-controls.d.ts +10 -0
  114. package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +16 -0
  115. package/dist/types-ts4.0/plugins/table/utils/dom.d.ts +20 -0
  116. package/dist/types-ts4.0/plugins/table/utils/get-allow-add-column-custom-step.d.ts +2 -0
  117. package/dist/types-ts4.0/plugins/table/utils/index.d.ts +11 -0
  118. package/dist/types-ts4.0/plugins/table/utils/nodes.d.ts +12 -0
  119. package/dist/types-ts4.0/plugins/table/utils/paste.d.ts +14 -0
  120. package/dist/types-ts4.0/plugins/table/utils/referentiality.d.ts +2 -0
  121. package/dist/types-ts4.0/plugins/table/utils/row-controls.d.ts +16 -0
  122. package/dist/types-ts4.0/plugins/table/utils/selection.d.ts +6 -0
  123. package/dist/types-ts4.0/plugins/table/utils/table.d.ts +4 -0
  124. package/dist/types-ts4.0/plugins/table/utils/update-plugin-state-decorations.d.ts +4 -0
  125. package/dist/types-ts4.0/plugins/table-plugin.d.ts +2 -0
  126. package/dist/types-ts4.0/types.d.ts +3 -0
  127. package/examples/99-testing.tsx +227 -0
  128. package/package.json +16 -3
  129. package/src/plugins/table/__tests__/integration/__fixtures__/auto-size-documents.ts +439 -0
  130. package/src/plugins/table/__tests__/integration/__fixtures__/basic-table.ts +120 -0
  131. package/src/plugins/table/__tests__/integration/__fixtures__/empty-paragraph-underneath-table.ts +396 -0
  132. package/src/plugins/table/__tests__/integration/__fixtures__/even-columns.ts +493 -0
  133. package/src/plugins/table/__tests__/integration/__fixtures__/layout-documents.ts +607 -0
  134. package/src/plugins/table/__tests__/integration/__fixtures__/merged-rows-and-cols-document.ts +343 -0
  135. package/src/plugins/table/__tests__/integration/__fixtures__/nested-in-extension.ts +163 -0
  136. package/src/plugins/table/__tests__/integration/__fixtures__/paragraph-and-table-adf.json +130 -0
  137. package/src/plugins/table/__tests__/integration/__fixtures__/resize-documents.ts +1610 -0
  138. package/src/plugins/table/__tests__/integration/__fixtures__/scale.ts +825 -0
  139. package/src/plugins/table/__tests__/integration/__fixtures__/table-inside-layout.ts +145 -0
  140. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-min-width-columns-document.ts +175 -0
  141. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-multiline-date.adf.json +168 -0
  142. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-text-and-empty-row.ts +216 -0
  143. package/src/plugins/table/__tests__/integration/__snapshots__/auto-size.ts.snap +609 -0
  144. package/src/plugins/table/__tests__/integration/__snapshots__/change-date-inside-table.ts.snap +173 -0
  145. package/src/plugins/table/__tests__/integration/__snapshots__/copy-button.ts.snap +421 -0
  146. package/src/plugins/table/__tests__/integration/__snapshots__/delete-columns.ts.snap +818 -0
  147. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +119 -0
  148. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +119 -0
  149. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +227 -0
  150. package/src/plugins/table/__tests__/integration/__snapshots__/delete-rows.ts.snap +959 -0
  151. package/src/plugins/table/__tests__/integration/__snapshots__/delete-table-when-selected.ts.snap +101 -0
  152. package/src/plugins/table/__tests__/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +502 -0
  153. package/src/plugins/table/__tests__/integration/__snapshots__/even-columns.ts.snap +645 -0
  154. package/src/plugins/table/__tests__/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +172 -0
  155. package/src/plugins/table/__tests__/integration/__snapshots__/insert-row-inside-layout.ts.snap +238 -0
  156. package/src/plugins/table/__tests__/integration/__snapshots__/layout.ts.snap +1645 -0
  157. package/src/plugins/table/__tests__/integration/__snapshots__/resize.ts.snap +2674 -0
  158. package/src/plugins/table/__tests__/integration/__snapshots__/scale.ts.snap +1083 -0
  159. package/src/plugins/table/__tests__/integration/arrow-down-into-table.ts +38 -0
  160. package/src/plugins/table/__tests__/integration/auto-size.ts +87 -0
  161. package/src/plugins/table/__tests__/integration/block-node-selection.ts +162 -163
  162. package/src/plugins/table/__tests__/integration/cell-selection.ts +101 -0
  163. package/src/plugins/table/__tests__/integration/change-date-inside-table.ts +47 -0
  164. package/src/plugins/table/__tests__/integration/copy-button.ts +179 -0
  165. package/src/plugins/table/__tests__/integration/delete-columns.ts +95 -0
  166. package/src/plugins/table/__tests__/integration/delete-last-column-in-full-width.ts +70 -0
  167. package/src/plugins/table/__tests__/integration/delete-last-column-with-empty-action.ts +58 -0
  168. package/src/plugins/table/__tests__/integration/delete-last-row-with-empty-action.ts +97 -0
  169. package/src/plugins/table/__tests__/integration/delete-rows.ts +122 -0
  170. package/src/plugins/table/__tests__/integration/delete-table-when-selected.ts +110 -0
  171. package/src/plugins/table/__tests__/integration/deleting-empty-paragraph-under-table.ts +86 -0
  172. package/src/plugins/table/__tests__/integration/even-columns.ts +72 -0
  173. package/src/plugins/table/__tests__/integration/insert-cell-header-with-strong-mark.ts +40 -0
  174. package/src/plugins/table/__tests__/integration/insert-long-smart-link.ts +52 -0
  175. package/src/plugins/table/__tests__/integration/insert-row-inside-layout.ts +47 -0
  176. package/src/plugins/table/__tests__/integration/layout.ts +224 -0
  177. package/src/plugins/table/__tests__/integration/resize-handler.ts +101 -0
  178. package/src/plugins/table/__tests__/integration/resize.ts +342 -0
  179. package/src/plugins/table/__tests__/integration/scale.ts +67 -0
  180. package/src/plugins/table/__tests__/integration/table-controls-selection.ts +70 -0
  181. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +2 -2
  182. package/types/package.json +8 -1
@@ -0,0 +1,101 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`replaces table with content when user pastes plain text with a full-table cell selection 1`] = `
4
+ Object {
5
+ "content": Array [
6
+ Object {
7
+ "content": Array [
8
+ Object {
9
+ "text": "Some text to copy",
10
+ "type": "text",
11
+ },
12
+ ],
13
+ "type": "paragraph",
14
+ },
15
+ ],
16
+ "type": "doc",
17
+ }
18
+ `;
19
+
20
+ exports[`replaces table with content when user pastes rich text with a full-table cell selection 1`] = `
21
+ Object {
22
+ "content": Array [
23
+ Object {
24
+ "content": Array [
25
+ Object {
26
+ "text": "this is a link ",
27
+ "type": "text",
28
+ },
29
+ Object {
30
+ "marks": Array [
31
+ Object {
32
+ "attrs": Object {
33
+ "__confluenceMetadata": null,
34
+ "href": "http://www.google.com",
35
+ },
36
+ "type": "link",
37
+ },
38
+ ],
39
+ "text": "www.google.com",
40
+ "type": "text",
41
+ },
42
+ ],
43
+ "type": "paragraph",
44
+ },
45
+ Object {
46
+ "content": Array [
47
+ Object {
48
+ "text": "more elements with some ",
49
+ "type": "text",
50
+ },
51
+ Object {
52
+ "marks": Array [
53
+ Object {
54
+ "type": "strong",
55
+ },
56
+ ],
57
+ "text": "format",
58
+ "type": "text",
59
+ },
60
+ ],
61
+ "type": "paragraph",
62
+ },
63
+ Object {
64
+ "content": Array [
65
+ Object {
66
+ "text": "some addition",
67
+ "type": "text",
68
+ },
69
+ Object {
70
+ "marks": Array [
71
+ Object {
72
+ "type": "em",
73
+ },
74
+ ],
75
+ "text": " formatting",
76
+ "type": "text",
77
+ },
78
+ ],
79
+ "type": "paragraph",
80
+ },
81
+ ],
82
+ "type": "doc",
83
+ }
84
+ `;
85
+
86
+ exports[`replaces table with text when user types with a full-table cell selection 1`] = `
87
+ Object {
88
+ "content": Array [
89
+ Object {
90
+ "content": Array [
91
+ Object {
92
+ "text": "A",
93
+ "type": "text",
94
+ },
95
+ ],
96
+ "type": "paragraph",
97
+ },
98
+ ],
99
+ "type": "doc",
100
+ }
101
+ `;
@@ -0,0 +1,502 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`backspace for an empty paragraph at the end of the document should only
4
+ place cursor inside last cell of table 1`] = `
5
+ Object {
6
+ "content": Array [
7
+ Object {
8
+ "attrs": Object {
9
+ "__autoSize": false,
10
+ "isNumberColumnEnabled": false,
11
+ "layout": "default",
12
+ "localId": "abc-123",
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
+ Object {
110
+ "content": Array [
111
+ Object {
112
+ "attrs": Object {
113
+ "background": null,
114
+ "colspan": 1,
115
+ "colwidth": null,
116
+ "rowspan": 1,
117
+ },
118
+ "content": Array [
119
+ Object {
120
+ "type": "paragraph",
121
+ },
122
+ ],
123
+ "type": "tableCell",
124
+ },
125
+ Object {
126
+ "attrs": Object {
127
+ "background": null,
128
+ "colspan": 1,
129
+ "colwidth": null,
130
+ "rowspan": 1,
131
+ },
132
+ "content": Array [
133
+ Object {
134
+ "type": "paragraph",
135
+ },
136
+ ],
137
+ "type": "tableCell",
138
+ },
139
+ Object {
140
+ "attrs": Object {
141
+ "background": null,
142
+ "colspan": 1,
143
+ "colwidth": null,
144
+ "rowspan": 1,
145
+ },
146
+ "content": Array [
147
+ Object {
148
+ "type": "paragraph",
149
+ },
150
+ ],
151
+ "type": "tableCell",
152
+ },
153
+ ],
154
+ "type": "tableRow",
155
+ },
156
+ ],
157
+ "type": "table",
158
+ },
159
+ Object {
160
+ "type": "paragraph",
161
+ },
162
+ ],
163
+ "type": "doc",
164
+ }
165
+ `;
166
+
167
+ exports[`backspace for an empty paragraph not at the end of the document should delete that paragraph and
168
+ place cursor inside last cell of table 1`] = `
169
+ Object {
170
+ "content": Array [
171
+ Object {
172
+ "attrs": Object {
173
+ "__autoSize": false,
174
+ "isNumberColumnEnabled": false,
175
+ "layout": "default",
176
+ "localId": "abc-123",
177
+ },
178
+ "content": Array [
179
+ Object {
180
+ "content": Array [
181
+ Object {
182
+ "attrs": Object {
183
+ "background": null,
184
+ "colspan": 1,
185
+ "colwidth": null,
186
+ "rowspan": 1,
187
+ },
188
+ "content": Array [
189
+ Object {
190
+ "type": "paragraph",
191
+ },
192
+ ],
193
+ "type": "tableHeader",
194
+ },
195
+ Object {
196
+ "attrs": Object {
197
+ "background": null,
198
+ "colspan": 1,
199
+ "colwidth": null,
200
+ "rowspan": 1,
201
+ },
202
+ "content": Array [
203
+ Object {
204
+ "type": "paragraph",
205
+ },
206
+ ],
207
+ "type": "tableHeader",
208
+ },
209
+ Object {
210
+ "attrs": Object {
211
+ "background": null,
212
+ "colspan": 1,
213
+ "colwidth": null,
214
+ "rowspan": 1,
215
+ },
216
+ "content": Array [
217
+ Object {
218
+ "type": "paragraph",
219
+ },
220
+ ],
221
+ "type": "tableHeader",
222
+ },
223
+ ],
224
+ "type": "tableRow",
225
+ },
226
+ Object {
227
+ "content": Array [
228
+ Object {
229
+ "attrs": Object {
230
+ "background": null,
231
+ "colspan": 1,
232
+ "colwidth": null,
233
+ "rowspan": 1,
234
+ },
235
+ "content": Array [
236
+ Object {
237
+ "type": "paragraph",
238
+ },
239
+ ],
240
+ "type": "tableCell",
241
+ },
242
+ Object {
243
+ "attrs": Object {
244
+ "background": null,
245
+ "colspan": 1,
246
+ "colwidth": null,
247
+ "rowspan": 1,
248
+ },
249
+ "content": Array [
250
+ Object {
251
+ "type": "paragraph",
252
+ },
253
+ ],
254
+ "type": "tableCell",
255
+ },
256
+ Object {
257
+ "attrs": Object {
258
+ "background": null,
259
+ "colspan": 1,
260
+ "colwidth": null,
261
+ "rowspan": 1,
262
+ },
263
+ "content": Array [
264
+ Object {
265
+ "type": "paragraph",
266
+ },
267
+ ],
268
+ "type": "tableCell",
269
+ },
270
+ ],
271
+ "type": "tableRow",
272
+ },
273
+ Object {
274
+ "content": Array [
275
+ Object {
276
+ "attrs": Object {
277
+ "background": null,
278
+ "colspan": 1,
279
+ "colwidth": null,
280
+ "rowspan": 1,
281
+ },
282
+ "content": Array [
283
+ Object {
284
+ "type": "paragraph",
285
+ },
286
+ ],
287
+ "type": "tableCell",
288
+ },
289
+ Object {
290
+ "attrs": Object {
291
+ "background": null,
292
+ "colspan": 1,
293
+ "colwidth": null,
294
+ "rowspan": 1,
295
+ },
296
+ "content": Array [
297
+ Object {
298
+ "type": "paragraph",
299
+ },
300
+ ],
301
+ "type": "tableCell",
302
+ },
303
+ Object {
304
+ "attrs": Object {
305
+ "background": null,
306
+ "colspan": 1,
307
+ "colwidth": null,
308
+ "rowspan": 1,
309
+ },
310
+ "content": Array [
311
+ Object {
312
+ "type": "paragraph",
313
+ },
314
+ ],
315
+ "type": "tableCell",
316
+ },
317
+ ],
318
+ "type": "tableRow",
319
+ },
320
+ ],
321
+ "type": "table",
322
+ },
323
+ Object {
324
+ "type": "paragraph",
325
+ },
326
+ ],
327
+ "type": "doc",
328
+ }
329
+ `;
330
+
331
+ exports[`backspace for an filled paragraph not at the end of the document should
332
+ place cursor inside last cell of table 1`] = `
333
+ Object {
334
+ "content": Array [
335
+ Object {
336
+ "attrs": Object {
337
+ "__autoSize": false,
338
+ "isNumberColumnEnabled": false,
339
+ "layout": "default",
340
+ "localId": "abc-123",
341
+ },
342
+ "content": Array [
343
+ Object {
344
+ "content": Array [
345
+ Object {
346
+ "attrs": Object {
347
+ "background": null,
348
+ "colspan": 1,
349
+ "colwidth": null,
350
+ "rowspan": 1,
351
+ },
352
+ "content": Array [
353
+ Object {
354
+ "type": "paragraph",
355
+ },
356
+ ],
357
+ "type": "tableHeader",
358
+ },
359
+ Object {
360
+ "attrs": Object {
361
+ "background": null,
362
+ "colspan": 1,
363
+ "colwidth": null,
364
+ "rowspan": 1,
365
+ },
366
+ "content": Array [
367
+ Object {
368
+ "type": "paragraph",
369
+ },
370
+ ],
371
+ "type": "tableHeader",
372
+ },
373
+ Object {
374
+ "attrs": Object {
375
+ "background": null,
376
+ "colspan": 1,
377
+ "colwidth": null,
378
+ "rowspan": 1,
379
+ },
380
+ "content": Array [
381
+ Object {
382
+ "type": "paragraph",
383
+ },
384
+ ],
385
+ "type": "tableHeader",
386
+ },
387
+ ],
388
+ "type": "tableRow",
389
+ },
390
+ Object {
391
+ "content": Array [
392
+ Object {
393
+ "attrs": Object {
394
+ "background": null,
395
+ "colspan": 1,
396
+ "colwidth": null,
397
+ "rowspan": 1,
398
+ },
399
+ "content": Array [
400
+ Object {
401
+ "type": "paragraph",
402
+ },
403
+ ],
404
+ "type": "tableCell",
405
+ },
406
+ Object {
407
+ "attrs": Object {
408
+ "background": null,
409
+ "colspan": 1,
410
+ "colwidth": null,
411
+ "rowspan": 1,
412
+ },
413
+ "content": Array [
414
+ Object {
415
+ "type": "paragraph",
416
+ },
417
+ ],
418
+ "type": "tableCell",
419
+ },
420
+ Object {
421
+ "attrs": Object {
422
+ "background": null,
423
+ "colspan": 1,
424
+ "colwidth": null,
425
+ "rowspan": 1,
426
+ },
427
+ "content": Array [
428
+ Object {
429
+ "type": "paragraph",
430
+ },
431
+ ],
432
+ "type": "tableCell",
433
+ },
434
+ ],
435
+ "type": "tableRow",
436
+ },
437
+ Object {
438
+ "content": Array [
439
+ Object {
440
+ "attrs": Object {
441
+ "background": null,
442
+ "colspan": 1,
443
+ "colwidth": null,
444
+ "rowspan": 1,
445
+ },
446
+ "content": Array [
447
+ Object {
448
+ "type": "paragraph",
449
+ },
450
+ ],
451
+ "type": "tableCell",
452
+ },
453
+ Object {
454
+ "attrs": Object {
455
+ "background": null,
456
+ "colspan": 1,
457
+ "colwidth": null,
458
+ "rowspan": 1,
459
+ },
460
+ "content": Array [
461
+ Object {
462
+ "type": "paragraph",
463
+ },
464
+ ],
465
+ "type": "tableCell",
466
+ },
467
+ Object {
468
+ "attrs": Object {
469
+ "background": null,
470
+ "colspan": 1,
471
+ "colwidth": null,
472
+ "rowspan": 1,
473
+ },
474
+ "content": Array [
475
+ Object {
476
+ "type": "paragraph",
477
+ },
478
+ ],
479
+ "type": "tableCell",
480
+ },
481
+ ],
482
+ "type": "tableRow",
483
+ },
484
+ ],
485
+ "type": "table",
486
+ },
487
+ Object {
488
+ "content": Array [
489
+ Object {
490
+ "text": "hello there",
491
+ "type": "text",
492
+ },
493
+ ],
494
+ "type": "paragraph",
495
+ },
496
+ Object {
497
+ "type": "paragraph",
498
+ },
499
+ ],
500
+ "type": "doc",
501
+ }
502
+ `;