@atlaskit/editor-plugin-table 0.0.1 → 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 (190) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/plugins/table/index.js +42 -15
  3. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/es2019/plugins/table/index.js +287 -255
  6. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  7. package/dist/es2019/version.json +1 -1
  8. package/dist/esm/plugins/table/index.js +41 -15
  9. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  10. package/dist/esm/version.json +1 -1
  11. package/dist/types/plugins/table/index.d.ts +1 -2
  12. package/dist/types-ts4.0/index.d.ts +1 -0
  13. package/dist/types-ts4.0/plugins/plugin-key.d.ts +4 -0
  14. package/dist/types-ts4.0/plugins/table/commands/clear.d.ts +3 -0
  15. package/dist/types-ts4.0/plugins/table/commands/collapse.d.ts +2 -0
  16. package/dist/types-ts4.0/plugins/table/commands/go-to-next-cell.d.ts +4 -0
  17. package/dist/types-ts4.0/plugins/table/commands/hover.d.ts +8 -0
  18. package/dist/types-ts4.0/plugins/table/commands/index.d.ts +7 -0
  19. package/dist/types-ts4.0/plugins/table/commands/insert.d.ts +10 -0
  20. package/dist/types-ts4.0/plugins/table/commands/misc.d.ts +27 -0
  21. package/dist/types-ts4.0/plugins/table/commands/selection.d.ts +8 -0
  22. package/dist/types-ts4.0/plugins/table/commands/sort.d.ts +3 -0
  23. package/dist/types-ts4.0/plugins/table/commands/split-cell.d.ts +6 -0
  24. package/dist/types-ts4.0/plugins/table/commands/toggle.d.ts +12 -0
  25. package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +26 -0
  26. package/dist/types-ts4.0/plugins/table/create-plugin-config.d.ts +2 -0
  27. package/dist/types-ts4.0/plugins/table/event-handlers.d.ts +16 -0
  28. package/dist/types-ts4.0/plugins/table/handlers.d.ts +3 -0
  29. package/dist/types-ts4.0/plugins/table/index.d.ts +17 -0
  30. package/dist/types-ts4.0/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +26 -0
  31. package/dist/types-ts4.0/plugins/table/nodeviews/TableComponent.d.ts +72 -0
  32. package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +9 -0
  33. package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +9 -0
  34. package/dist/types-ts4.0/plugins/table/nodeviews/table.d.ts +31 -0
  35. package/dist/types-ts4.0/plugins/table/nodeviews/tableCell.d.ts +19 -0
  36. package/dist/types-ts4.0/plugins/table/nodeviews/types.d.ts +23 -0
  37. package/dist/types-ts4.0/plugins/table/nodeviews/update-overflow-shadows.d.ts +8 -0
  38. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/plugin.d.ts +7 -0
  39. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +3 -0
  40. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +2 -0
  41. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +2 -0
  42. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/index.d.ts +3 -0
  43. package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/types.d.ts +6 -0
  44. package/dist/types-ts4.0/plugins/table/pm-plugins/default-table-selection.d.ts +5 -0
  45. package/dist/types-ts4.0/plugins/table/pm-plugins/keymap.d.ts +5 -0
  46. package/dist/types-ts4.0/plugins/table/pm-plugins/main.d.ts +8 -0
  47. package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-factory.d.ts +1 -0
  48. package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
  49. package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +4 -0
  50. package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  51. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/commands.d.ts +3 -0
  52. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/index.d.ts +6 -0
  53. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +6 -0
  54. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +65 -0
  55. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +3 -0
  56. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -0
  57. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +4 -0
  58. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/types.d.ts +16 -0
  59. package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/util.d.ts +2 -0
  60. package/dist/types-ts4.0/plugins/table/pm-plugins/table-local-id.d.ts +22 -0
  61. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/commands.d.ts +25 -0
  62. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +4 -0
  63. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +3 -0
  64. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +4 -0
  65. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +3 -0
  66. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin.d.ts +6 -0
  67. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/reducer.d.ts +3 -0
  68. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +8 -0
  69. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +14 -0
  70. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +4 -0
  71. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +13 -0
  72. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +12 -0
  73. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +22 -0
  74. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -0
  75. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  76. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +29 -0
  77. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +17 -0
  78. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +22 -0
  79. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +1 -0
  80. package/dist/types-ts4.0/plugins/table/pm-plugins/table-selection-keymap.d.ts +4 -0
  81. package/dist/types-ts4.0/plugins/table/reducer.d.ts +3 -0
  82. package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +1 -0
  83. package/dist/types-ts4.0/plugins/table/toolbar.d.ts +36 -0
  84. package/dist/types-ts4.0/plugins/table/transforms/column-width.d.ts +18 -0
  85. package/dist/types-ts4.0/plugins/table/transforms/delete-columns.d.ts +3 -0
  86. package/dist/types-ts4.0/plugins/table/transforms/delete-rows.d.ts +3 -0
  87. package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +10 -0
  88. package/dist/types-ts4.0/plugins/table/transforms/index.d.ts +7 -0
  89. package/dist/types-ts4.0/plugins/table/transforms/merge.d.ts +5 -0
  90. package/dist/types-ts4.0/plugins/table/transforms/metadata.d.ts +21 -0
  91. package/dist/types-ts4.0/plugins/table/transforms/replace-table.d.ts +5 -0
  92. package/dist/types-ts4.0/plugins/table/transforms/split.d.ts +9 -0
  93. package/dist/types-ts4.0/plugins/table/types.d.ts +328 -0
  94. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/index.d.ts +29 -0
  95. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -0
  96. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +87 -0
  97. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/index.d.ts +22 -0
  98. package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -0
  99. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +14 -0
  100. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +10 -0
  101. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/index.d.ts +54 -0
  102. package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -0
  103. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +12 -0
  104. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +3 -0
  105. package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/index.d.ts +35 -0
  106. package/dist/types-ts4.0/plugins/table/ui/LayoutButton/index.d.ts +21 -0
  107. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +19 -0
  108. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +21 -0
  109. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +17 -0
  110. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/index.d.ts +40 -0
  111. package/dist/types-ts4.0/plugins/table/ui/common-styles.d.ts +4 -0
  112. package/dist/types-ts4.0/plugins/table/ui/consts.d.ts +39 -0
  113. package/dist/types-ts4.0/plugins/table/ui/messages.d.ts +38 -0
  114. package/dist/types-ts4.0/plugins/table/ui/ui-styles.d.ts +15 -0
  115. package/dist/types-ts4.0/plugins/table/utils/analytics.d.ts +18 -0
  116. package/dist/types-ts4.0/plugins/table/utils/collapse.d.ts +29 -0
  117. package/dist/types-ts4.0/plugins/table/utils/column-controls.d.ts +10 -0
  118. package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +16 -0
  119. package/dist/types-ts4.0/plugins/table/utils/dom.d.ts +20 -0
  120. package/dist/types-ts4.0/plugins/table/utils/get-allow-add-column-custom-step.d.ts +2 -0
  121. package/dist/types-ts4.0/plugins/table/utils/index.d.ts +11 -0
  122. package/dist/types-ts4.0/plugins/table/utils/nodes.d.ts +12 -0
  123. package/dist/types-ts4.0/plugins/table/utils/paste.d.ts +14 -0
  124. package/dist/types-ts4.0/plugins/table/utils/referentiality.d.ts +2 -0
  125. package/dist/types-ts4.0/plugins/table/utils/row-controls.d.ts +16 -0
  126. package/dist/types-ts4.0/plugins/table/utils/selection.d.ts +6 -0
  127. package/dist/types-ts4.0/plugins/table/utils/table.d.ts +4 -0
  128. package/dist/types-ts4.0/plugins/table/utils/update-plugin-state-decorations.d.ts +4 -0
  129. package/dist/types-ts4.0/plugins/table-plugin.d.ts +2 -0
  130. package/dist/types-ts4.0/types.d.ts +3 -0
  131. package/examples/99-testing.tsx +227 -0
  132. package/package.json +16 -3
  133. package/report.api.md +61 -24
  134. package/src/plugins/table/__tests__/integration/__fixtures__/auto-size-documents.ts +439 -0
  135. package/src/plugins/table/__tests__/integration/__fixtures__/basic-table.ts +120 -0
  136. package/src/plugins/table/__tests__/integration/__fixtures__/empty-paragraph-underneath-table.ts +396 -0
  137. package/src/plugins/table/__tests__/integration/__fixtures__/even-columns.ts +493 -0
  138. package/src/plugins/table/__tests__/integration/__fixtures__/layout-documents.ts +607 -0
  139. package/src/plugins/table/__tests__/integration/__fixtures__/merged-rows-and-cols-document.ts +343 -0
  140. package/src/plugins/table/__tests__/integration/__fixtures__/nested-in-extension.ts +163 -0
  141. package/src/plugins/table/__tests__/integration/__fixtures__/paragraph-and-table-adf.json +130 -0
  142. package/src/plugins/table/__tests__/integration/__fixtures__/resize-documents.ts +1610 -0
  143. package/src/plugins/table/__tests__/integration/__fixtures__/scale.ts +825 -0
  144. package/src/plugins/table/__tests__/integration/__fixtures__/table-inside-layout.ts +145 -0
  145. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-min-width-columns-document.ts +175 -0
  146. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-multiline-date.adf.json +168 -0
  147. package/src/plugins/table/__tests__/integration/__fixtures__/table-with-text-and-empty-row.ts +216 -0
  148. package/src/plugins/table/__tests__/integration/__snapshots__/auto-size.ts.snap +609 -0
  149. package/src/plugins/table/__tests__/integration/__snapshots__/change-date-inside-table.ts.snap +173 -0
  150. package/src/plugins/table/__tests__/integration/__snapshots__/copy-button.ts.snap +421 -0
  151. package/src/plugins/table/__tests__/integration/__snapshots__/delete-columns.ts.snap +818 -0
  152. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +119 -0
  153. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +119 -0
  154. package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +227 -0
  155. package/src/plugins/table/__tests__/integration/__snapshots__/delete-rows.ts.snap +959 -0
  156. package/src/plugins/table/__tests__/integration/__snapshots__/delete-table-when-selected.ts.snap +101 -0
  157. package/src/plugins/table/__tests__/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +502 -0
  158. package/src/plugins/table/__tests__/integration/__snapshots__/even-columns.ts.snap +645 -0
  159. package/src/plugins/table/__tests__/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +172 -0
  160. package/src/plugins/table/__tests__/integration/__snapshots__/insert-row-inside-layout.ts.snap +238 -0
  161. package/src/plugins/table/__tests__/integration/__snapshots__/layout.ts.snap +1645 -0
  162. package/src/plugins/table/__tests__/integration/__snapshots__/resize.ts.snap +2674 -0
  163. package/src/plugins/table/__tests__/integration/__snapshots__/scale.ts.snap +1083 -0
  164. package/src/plugins/table/__tests__/integration/arrow-down-into-table.ts +38 -0
  165. package/src/plugins/table/__tests__/integration/auto-size.ts +87 -0
  166. package/src/plugins/table/__tests__/integration/block-node-selection.ts +162 -163
  167. package/src/plugins/table/__tests__/integration/cell-selection.ts +101 -0
  168. package/src/plugins/table/__tests__/integration/change-date-inside-table.ts +47 -0
  169. package/src/plugins/table/__tests__/integration/copy-button.ts +179 -0
  170. package/src/plugins/table/__tests__/integration/delete-columns.ts +95 -0
  171. package/src/plugins/table/__tests__/integration/delete-last-column-in-full-width.ts +70 -0
  172. package/src/plugins/table/__tests__/integration/delete-last-column-with-empty-action.ts +58 -0
  173. package/src/plugins/table/__tests__/integration/delete-last-row-with-empty-action.ts +97 -0
  174. package/src/plugins/table/__tests__/integration/delete-rows.ts +122 -0
  175. package/src/plugins/table/__tests__/integration/delete-table-when-selected.ts +110 -0
  176. package/src/plugins/table/__tests__/integration/deleting-empty-paragraph-under-table.ts +86 -0
  177. package/src/plugins/table/__tests__/integration/even-columns.ts +72 -0
  178. package/src/plugins/table/__tests__/integration/insert-cell-header-with-strong-mark.ts +40 -0
  179. package/src/plugins/table/__tests__/integration/insert-long-smart-link.ts +52 -0
  180. package/src/plugins/table/__tests__/integration/insert-row-inside-layout.ts +47 -0
  181. package/src/plugins/table/__tests__/integration/layout.ts +224 -0
  182. package/src/plugins/table/__tests__/integration/resize-handler.ts +101 -0
  183. package/src/plugins/table/__tests__/integration/resize.ts +342 -0
  184. package/src/plugins/table/__tests__/integration/scale.ts +67 -0
  185. package/src/plugins/table/__tests__/integration/table-controls-selection.ts +70 -0
  186. package/src/plugins/table/__tests__/unit/commands/insert.ts +0 -1
  187. package/src/plugins/table/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +2 -0
  188. package/src/plugins/table/index.tsx +322 -295
  189. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +2 -2
  190. package/types/package.json +8 -1
@@ -0,0 +1,959 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Should delete a row when table is nested inside bodied extension 1`] = `
4
+ Object {
5
+ "content": Array [
6
+ Object {
7
+ "attrs": Object {
8
+ "extensionKey": "bodied-eh",
9
+ "extensionType": "com.atlassian.confluence.macro.core",
10
+ "layout": "default",
11
+ "localId": "testId",
12
+ "parameters": Object {
13
+ "macroMetadata": Object {
14
+ "placeholder": Array [
15
+ Object {
16
+ "data": Object {
17
+ "url": "",
18
+ },
19
+ "type": "icon",
20
+ },
21
+ ],
22
+ },
23
+ "macroParams": Object {},
24
+ },
25
+ "text": null,
26
+ },
27
+ "content": Array [
28
+ Object {
29
+ "attrs": Object {
30
+ "__autoSize": false,
31
+ "isNumberColumnEnabled": false,
32
+ "layout": "default",
33
+ "localId": "abc-123",
34
+ },
35
+ "content": Array [
36
+ Object {
37
+ "content": Array [
38
+ Object {
39
+ "attrs": Object {
40
+ "background": null,
41
+ "colspan": 1,
42
+ "colwidth": Array [
43
+ 242,
44
+ ],
45
+ "rowspan": 1,
46
+ },
47
+ "content": Array [
48
+ Object {
49
+ "type": "paragraph",
50
+ },
51
+ ],
52
+ "type": "tableCell",
53
+ },
54
+ Object {
55
+ "attrs": Object {
56
+ "background": null,
57
+ "colspan": 1,
58
+ "colwidth": Array [
59
+ 308,
60
+ ],
61
+ "rowspan": 1,
62
+ },
63
+ "content": Array [
64
+ Object {
65
+ "type": "paragraph",
66
+ },
67
+ ],
68
+ "type": "tableCell",
69
+ },
70
+ Object {
71
+ "attrs": Object {
72
+ "background": null,
73
+ "colspan": 1,
74
+ "colwidth": Array [
75
+ 176,
76
+ ],
77
+ "rowspan": 1,
78
+ },
79
+ "content": Array [
80
+ Object {
81
+ "type": "paragraph",
82
+ },
83
+ ],
84
+ "type": "tableCell",
85
+ },
86
+ ],
87
+ "type": "tableRow",
88
+ },
89
+ Object {
90
+ "content": Array [
91
+ Object {
92
+ "attrs": Object {
93
+ "background": null,
94
+ "colspan": 1,
95
+ "colwidth": Array [
96
+ 242,
97
+ ],
98
+ "rowspan": 1,
99
+ },
100
+ "content": Array [
101
+ Object {
102
+ "type": "paragraph",
103
+ },
104
+ ],
105
+ "type": "tableCell",
106
+ },
107
+ Object {
108
+ "attrs": Object {
109
+ "background": null,
110
+ "colspan": 1,
111
+ "colwidth": Array [
112
+ 308,
113
+ ],
114
+ "rowspan": 1,
115
+ },
116
+ "content": Array [
117
+ Object {
118
+ "type": "paragraph",
119
+ },
120
+ ],
121
+ "type": "tableCell",
122
+ },
123
+ Object {
124
+ "attrs": Object {
125
+ "background": null,
126
+ "colspan": 1,
127
+ "colwidth": Array [
128
+ 176,
129
+ ],
130
+ "rowspan": 1,
131
+ },
132
+ "content": Array [
133
+ Object {
134
+ "type": "paragraph",
135
+ },
136
+ ],
137
+ "type": "tableCell",
138
+ },
139
+ ],
140
+ "type": "tableRow",
141
+ },
142
+ ],
143
+ "type": "table",
144
+ },
145
+ ],
146
+ "type": "bodiedExtension",
147
+ },
148
+ ],
149
+ "type": "doc",
150
+ }
151
+ `;
152
+
153
+ exports[`Should delete merged rows from contextual menu and append missing cells to the table 1`] = `
154
+ Object {
155
+ "content": Array [
156
+ Object {
157
+ "attrs": Object {
158
+ "__autoSize": false,
159
+ "isNumberColumnEnabled": false,
160
+ "layout": "default",
161
+ "localId": "abc-123",
162
+ },
163
+ "content": Array [
164
+ Object {
165
+ "content": Array [
166
+ Object {
167
+ "attrs": Object {
168
+ "background": "#ffffff",
169
+ "colspan": 1,
170
+ "colwidth": Array [
171
+ 151,
172
+ ],
173
+ "rowspan": 1,
174
+ },
175
+ "content": Array [
176
+ Object {
177
+ "content": Array [
178
+ Object {
179
+ "text": "1",
180
+ "type": "text",
181
+ },
182
+ ],
183
+ "type": "paragraph",
184
+ },
185
+ ],
186
+ "type": "tableHeader",
187
+ },
188
+ Object {
189
+ "attrs": Object {
190
+ "background": "#deebff",
191
+ "colspan": 1,
192
+ "colwidth": Array [
193
+ 98,
194
+ ],
195
+ "rowspan": 1,
196
+ },
197
+ "content": Array [
198
+ Object {
199
+ "content": Array [
200
+ Object {
201
+ "text": "2",
202
+ "type": "text",
203
+ },
204
+ ],
205
+ "type": "paragraph",
206
+ },
207
+ ],
208
+ "type": "tableHeader",
209
+ },
210
+ Object {
211
+ "attrs": Object {
212
+ "background": "#e6fcff",
213
+ "colspan": 1,
214
+ "colwidth": Array [
215
+ 275,
216
+ ],
217
+ "rowspan": 1,
218
+ },
219
+ "content": Array [
220
+ Object {
221
+ "content": Array [
222
+ Object {
223
+ "text": "3",
224
+ "type": "text",
225
+ },
226
+ ],
227
+ "type": "paragraph",
228
+ },
229
+ ],
230
+ "type": "tableHeader",
231
+ },
232
+ Object {
233
+ "attrs": Object {
234
+ "background": "#eae6ff",
235
+ "colspan": 1,
236
+ "colwidth": Array [
237
+ 83,
238
+ ],
239
+ "rowspan": 1,
240
+ },
241
+ "content": Array [
242
+ Object {
243
+ "content": Array [
244
+ Object {
245
+ "text": "4",
246
+ "type": "text",
247
+ },
248
+ ],
249
+ "type": "paragraph",
250
+ },
251
+ ],
252
+ "type": "tableHeader",
253
+ },
254
+ Object {
255
+ "attrs": Object {
256
+ "background": "#ffffff",
257
+ "colspan": 1,
258
+ "colwidth": Array [
259
+ 152,
260
+ ],
261
+ "rowspan": 1,
262
+ },
263
+ "content": Array [
264
+ Object {
265
+ "content": Array [
266
+ Object {
267
+ "text": "5",
268
+ "type": "text",
269
+ },
270
+ ],
271
+ "type": "paragraph",
272
+ },
273
+ ],
274
+ "type": "tableHeader",
275
+ },
276
+ ],
277
+ "type": "tableRow",
278
+ },
279
+ Object {
280
+ "content": Array [
281
+ Object {
282
+ "attrs": Object {
283
+ "background": "#ffebe6",
284
+ "colspan": 1,
285
+ "colwidth": Array [
286
+ 151,
287
+ ],
288
+ "rowspan": 1,
289
+ },
290
+ "content": Array [
291
+ Object {
292
+ "content": Array [
293
+ Object {
294
+ "text": "3",
295
+ "type": "text",
296
+ },
297
+ ],
298
+ "type": "paragraph",
299
+ },
300
+ ],
301
+ "type": "tableCell",
302
+ },
303
+ Object {
304
+ "attrs": Object {
305
+ "background": "#fffae6",
306
+ "colspan": 1,
307
+ "colwidth": Array [
308
+ 98,
309
+ ],
310
+ "rowspan": 1,
311
+ },
312
+ "content": Array [
313
+ Object {
314
+ "type": "paragraph",
315
+ },
316
+ ],
317
+ "type": "tableCell",
318
+ },
319
+ Object {
320
+ "attrs": Object {
321
+ "background": "#fffae6",
322
+ "colspan": 1,
323
+ "colwidth": Array [
324
+ 275,
325
+ ],
326
+ "rowspan": 1,
327
+ },
328
+ "content": Array [
329
+ Object {
330
+ "type": "paragraph",
331
+ },
332
+ ],
333
+ "type": "tableCell",
334
+ },
335
+ Object {
336
+ "attrs": Object {
337
+ "background": "#fffae6",
338
+ "colspan": 1,
339
+ "colwidth": Array [
340
+ 83,
341
+ ],
342
+ "rowspan": 1,
343
+ },
344
+ "content": Array [
345
+ Object {
346
+ "type": "paragraph",
347
+ },
348
+ ],
349
+ "type": "tableCell",
350
+ },
351
+ Object {
352
+ "attrs": Object {
353
+ "background": "#ffebe6",
354
+ "colspan": 1,
355
+ "colwidth": Array [
356
+ 152,
357
+ ],
358
+ "rowspan": 1,
359
+ },
360
+ "content": Array [
361
+ Object {
362
+ "content": Array [
363
+ Object {
364
+ "text": "3",
365
+ "type": "text",
366
+ },
367
+ ],
368
+ "type": "paragraph",
369
+ },
370
+ ],
371
+ "type": "tableCell",
372
+ },
373
+ ],
374
+ "type": "tableRow",
375
+ },
376
+ Object {
377
+ "content": Array [
378
+ Object {
379
+ "attrs": Object {
380
+ "background": "#e3fcef",
381
+ "colspan": 1,
382
+ "colwidth": Array [
383
+ 151,
384
+ ],
385
+ "rowspan": 1,
386
+ },
387
+ "content": Array [
388
+ Object {
389
+ "content": Array [
390
+ Object {
391
+ "text": "4",
392
+ "type": "text",
393
+ },
394
+ ],
395
+ "type": "paragraph",
396
+ },
397
+ ],
398
+ "type": "tableCell",
399
+ },
400
+ Object {
401
+ "attrs": Object {
402
+ "background": "#fffae6",
403
+ "colspan": 1,
404
+ "colwidth": Array [
405
+ 98,
406
+ ],
407
+ "rowspan": 1,
408
+ },
409
+ "content": Array [
410
+ Object {
411
+ "type": "paragraph",
412
+ },
413
+ ],
414
+ "type": "tableCell",
415
+ },
416
+ Object {
417
+ "attrs": Object {
418
+ "background": "#fffae6",
419
+ "colspan": 1,
420
+ "colwidth": Array [
421
+ 275,
422
+ ],
423
+ "rowspan": 1,
424
+ },
425
+ "content": Array [
426
+ Object {
427
+ "type": "paragraph",
428
+ },
429
+ ],
430
+ "type": "tableCell",
431
+ },
432
+ Object {
433
+ "attrs": Object {
434
+ "background": "#fffae6",
435
+ "colspan": 1,
436
+ "colwidth": Array [
437
+ 83,
438
+ ],
439
+ "rowspan": 1,
440
+ },
441
+ "content": Array [
442
+ Object {
443
+ "type": "paragraph",
444
+ },
445
+ ],
446
+ "type": "tableCell",
447
+ },
448
+ Object {
449
+ "attrs": Object {
450
+ "background": "#e3fcef",
451
+ "colspan": 1,
452
+ "colwidth": Array [
453
+ 152,
454
+ ],
455
+ "rowspan": 1,
456
+ },
457
+ "content": Array [
458
+ Object {
459
+ "content": Array [
460
+ Object {
461
+ "text": "4",
462
+ "type": "text",
463
+ },
464
+ ],
465
+ "type": "paragraph",
466
+ },
467
+ ],
468
+ "type": "tableCell",
469
+ },
470
+ ],
471
+ "type": "tableRow",
472
+ },
473
+ Object {
474
+ "content": Array [
475
+ Object {
476
+ "attrs": Object {
477
+ "background": "#ffffff",
478
+ "colspan": 1,
479
+ "colwidth": Array [
480
+ 151,
481
+ ],
482
+ "rowspan": 1,
483
+ },
484
+ "content": Array [
485
+ Object {
486
+ "content": Array [
487
+ Object {
488
+ "text": "5",
489
+ "type": "text",
490
+ },
491
+ ],
492
+ "type": "paragraph",
493
+ },
494
+ ],
495
+ "type": "tableCell",
496
+ },
497
+ Object {
498
+ "attrs": Object {
499
+ "background": "#deebff",
500
+ "colspan": 1,
501
+ "colwidth": Array [
502
+ 98,
503
+ ],
504
+ "rowspan": 1,
505
+ },
506
+ "content": Array [
507
+ Object {
508
+ "content": Array [
509
+ Object {
510
+ "text": "2",
511
+ "type": "text",
512
+ },
513
+ ],
514
+ "type": "paragraph",
515
+ },
516
+ ],
517
+ "type": "tableCell",
518
+ },
519
+ Object {
520
+ "attrs": Object {
521
+ "background": "#e6fcff",
522
+ "colspan": 1,
523
+ "colwidth": Array [
524
+ 275,
525
+ ],
526
+ "rowspan": 1,
527
+ },
528
+ "content": Array [
529
+ Object {
530
+ "content": Array [
531
+ Object {
532
+ "text": "3",
533
+ "type": "text",
534
+ },
535
+ ],
536
+ "type": "paragraph",
537
+ },
538
+ ],
539
+ "type": "tableCell",
540
+ },
541
+ Object {
542
+ "attrs": Object {
543
+ "background": "#eae6ff",
544
+ "colspan": 1,
545
+ "colwidth": Array [
546
+ 83,
547
+ ],
548
+ "rowspan": 1,
549
+ },
550
+ "content": Array [
551
+ Object {
552
+ "content": Array [
553
+ Object {
554
+ "text": "4",
555
+ "type": "text",
556
+ },
557
+ ],
558
+ "type": "paragraph",
559
+ },
560
+ ],
561
+ "type": "tableCell",
562
+ },
563
+ Object {
564
+ "attrs": Object {
565
+ "background": "#ffffff",
566
+ "colspan": 1,
567
+ "colwidth": Array [
568
+ 152,
569
+ ],
570
+ "rowspan": 1,
571
+ },
572
+ "content": Array [
573
+ Object {
574
+ "content": Array [
575
+ Object {
576
+ "text": "5",
577
+ "type": "text",
578
+ },
579
+ ],
580
+ "type": "paragraph",
581
+ },
582
+ ],
583
+ "type": "tableCell",
584
+ },
585
+ ],
586
+ "type": "tableRow",
587
+ },
588
+ ],
589
+ "type": "table",
590
+ },
591
+ ],
592
+ "type": "doc",
593
+ }
594
+ `;
595
+
596
+ exports[`Should delete merged rows from contextual menu and decrement rowspan of the spanning cell 1`] = `
597
+ Object {
598
+ "content": Array [
599
+ Object {
600
+ "attrs": Object {
601
+ "__autoSize": false,
602
+ "isNumberColumnEnabled": false,
603
+ "layout": "default",
604
+ "localId": "abc-123",
605
+ },
606
+ "content": Array [
607
+ Object {
608
+ "content": Array [
609
+ Object {
610
+ "attrs": Object {
611
+ "background": "#ffffff",
612
+ "colspan": 1,
613
+ "colwidth": Array [
614
+ 151,
615
+ ],
616
+ "rowspan": 1,
617
+ },
618
+ "content": Array [
619
+ Object {
620
+ "content": Array [
621
+ Object {
622
+ "text": "1",
623
+ "type": "text",
624
+ },
625
+ ],
626
+ "type": "paragraph",
627
+ },
628
+ ],
629
+ "type": "tableHeader",
630
+ },
631
+ Object {
632
+ "attrs": Object {
633
+ "background": "#deebff",
634
+ "colspan": 1,
635
+ "colwidth": Array [
636
+ 98,
637
+ ],
638
+ "rowspan": 1,
639
+ },
640
+ "content": Array [
641
+ Object {
642
+ "content": Array [
643
+ Object {
644
+ "text": "2",
645
+ "type": "text",
646
+ },
647
+ ],
648
+ "type": "paragraph",
649
+ },
650
+ ],
651
+ "type": "tableHeader",
652
+ },
653
+ Object {
654
+ "attrs": Object {
655
+ "background": "#e6fcff",
656
+ "colspan": 1,
657
+ "colwidth": Array [
658
+ 275,
659
+ ],
660
+ "rowspan": 1,
661
+ },
662
+ "content": Array [
663
+ Object {
664
+ "content": Array [
665
+ Object {
666
+ "text": "3",
667
+ "type": "text",
668
+ },
669
+ ],
670
+ "type": "paragraph",
671
+ },
672
+ ],
673
+ "type": "tableHeader",
674
+ },
675
+ Object {
676
+ "attrs": Object {
677
+ "background": "#eae6ff",
678
+ "colspan": 1,
679
+ "colwidth": Array [
680
+ 83,
681
+ ],
682
+ "rowspan": 1,
683
+ },
684
+ "content": Array [
685
+ Object {
686
+ "content": Array [
687
+ Object {
688
+ "text": "4",
689
+ "type": "text",
690
+ },
691
+ ],
692
+ "type": "paragraph",
693
+ },
694
+ ],
695
+ "type": "tableHeader",
696
+ },
697
+ Object {
698
+ "attrs": Object {
699
+ "background": "#ffffff",
700
+ "colspan": 1,
701
+ "colwidth": Array [
702
+ 152,
703
+ ],
704
+ "rowspan": 1,
705
+ },
706
+ "content": Array [
707
+ Object {
708
+ "content": Array [
709
+ Object {
710
+ "text": "5",
711
+ "type": "text",
712
+ },
713
+ ],
714
+ "type": "paragraph",
715
+ },
716
+ ],
717
+ "type": "tableHeader",
718
+ },
719
+ ],
720
+ "type": "tableRow",
721
+ },
722
+ Object {
723
+ "content": Array [
724
+ Object {
725
+ "attrs": Object {
726
+ "background": "#e6fcff",
727
+ "colspan": 1,
728
+ "colwidth": Array [
729
+ 151,
730
+ ],
731
+ "rowspan": 1,
732
+ },
733
+ "content": Array [
734
+ Object {
735
+ "content": Array [
736
+ Object {
737
+ "text": "2",
738
+ "type": "text",
739
+ },
740
+ ],
741
+ "type": "paragraph",
742
+ },
743
+ ],
744
+ "type": "tableCell",
745
+ },
746
+ Object {
747
+ "attrs": Object {
748
+ "background": "#fffae6",
749
+ "colspan": 3,
750
+ "colwidth": Array [
751
+ 98,
752
+ 275,
753
+ 83,
754
+ ],
755
+ "rowspan": 2,
756
+ },
757
+ "content": Array [
758
+ Object {
759
+ "type": "paragraph",
760
+ },
761
+ ],
762
+ "type": "tableCell",
763
+ },
764
+ Object {
765
+ "attrs": Object {
766
+ "background": "#e6fcff",
767
+ "colspan": 1,
768
+ "colwidth": Array [
769
+ 152,
770
+ ],
771
+ "rowspan": 1,
772
+ },
773
+ "content": Array [
774
+ Object {
775
+ "content": Array [
776
+ Object {
777
+ "text": "2",
778
+ "type": "text",
779
+ },
780
+ ],
781
+ "type": "paragraph",
782
+ },
783
+ ],
784
+ "type": "tableCell",
785
+ },
786
+ ],
787
+ "type": "tableRow",
788
+ },
789
+ Object {
790
+ "content": Array [
791
+ Object {
792
+ "attrs": Object {
793
+ "background": "#e3fcef",
794
+ "colspan": 1,
795
+ "colwidth": Array [
796
+ 151,
797
+ ],
798
+ "rowspan": 1,
799
+ },
800
+ "content": Array [
801
+ Object {
802
+ "content": Array [
803
+ Object {
804
+ "text": "4",
805
+ "type": "text",
806
+ },
807
+ ],
808
+ "type": "paragraph",
809
+ },
810
+ ],
811
+ "type": "tableCell",
812
+ },
813
+ Object {
814
+ "attrs": Object {
815
+ "background": "#e3fcef",
816
+ "colspan": 1,
817
+ "colwidth": Array [
818
+ 152,
819
+ ],
820
+ "rowspan": 1,
821
+ },
822
+ "content": Array [
823
+ Object {
824
+ "content": Array [
825
+ Object {
826
+ "text": "4",
827
+ "type": "text",
828
+ },
829
+ ],
830
+ "type": "paragraph",
831
+ },
832
+ ],
833
+ "type": "tableCell",
834
+ },
835
+ ],
836
+ "type": "tableRow",
837
+ },
838
+ Object {
839
+ "content": Array [
840
+ Object {
841
+ "attrs": Object {
842
+ "background": "#ffffff",
843
+ "colspan": 1,
844
+ "colwidth": Array [
845
+ 151,
846
+ ],
847
+ "rowspan": 1,
848
+ },
849
+ "content": Array [
850
+ Object {
851
+ "content": Array [
852
+ Object {
853
+ "text": "5",
854
+ "type": "text",
855
+ },
856
+ ],
857
+ "type": "paragraph",
858
+ },
859
+ ],
860
+ "type": "tableCell",
861
+ },
862
+ Object {
863
+ "attrs": Object {
864
+ "background": "#deebff",
865
+ "colspan": 1,
866
+ "colwidth": Array [
867
+ 98,
868
+ ],
869
+ "rowspan": 1,
870
+ },
871
+ "content": Array [
872
+ Object {
873
+ "content": Array [
874
+ Object {
875
+ "text": "2",
876
+ "type": "text",
877
+ },
878
+ ],
879
+ "type": "paragraph",
880
+ },
881
+ ],
882
+ "type": "tableCell",
883
+ },
884
+ Object {
885
+ "attrs": Object {
886
+ "background": "#e6fcff",
887
+ "colspan": 1,
888
+ "colwidth": Array [
889
+ 275,
890
+ ],
891
+ "rowspan": 1,
892
+ },
893
+ "content": Array [
894
+ Object {
895
+ "content": Array [
896
+ Object {
897
+ "text": "3",
898
+ "type": "text",
899
+ },
900
+ ],
901
+ "type": "paragraph",
902
+ },
903
+ ],
904
+ "type": "tableCell",
905
+ },
906
+ Object {
907
+ "attrs": Object {
908
+ "background": "#eae6ff",
909
+ "colspan": 1,
910
+ "colwidth": Array [
911
+ 83,
912
+ ],
913
+ "rowspan": 1,
914
+ },
915
+ "content": Array [
916
+ Object {
917
+ "content": Array [
918
+ Object {
919
+ "text": "4",
920
+ "type": "text",
921
+ },
922
+ ],
923
+ "type": "paragraph",
924
+ },
925
+ ],
926
+ "type": "tableCell",
927
+ },
928
+ Object {
929
+ "attrs": Object {
930
+ "background": "#ffffff",
931
+ "colspan": 1,
932
+ "colwidth": Array [
933
+ 152,
934
+ ],
935
+ "rowspan": 1,
936
+ },
937
+ "content": Array [
938
+ Object {
939
+ "content": Array [
940
+ Object {
941
+ "text": "5",
942
+ "type": "text",
943
+ },
944
+ ],
945
+ "type": "paragraph",
946
+ },
947
+ ],
948
+ "type": "tableCell",
949
+ },
950
+ ],
951
+ "type": "tableRow",
952
+ },
953
+ ],
954
+ "type": "table",
955
+ },
956
+ ],
957
+ "type": "doc",
958
+ }
959
+ `;