@atlaskit/editor-plugin-table 0.0.10 → 0.1.0

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 (213) hide show
  1. package/.eslintrc.js +35 -0
  2. package/CHANGELOG.md +23 -0
  3. package/commands/package.json +14 -0
  4. package/dist/cjs/plugins/table/commands/hover.js +4 -4
  5. package/dist/cjs/plugins/table/commands-with-analytics.js +59 -58
  6. package/dist/cjs/plugins/table/event-handlers.js +0 -1
  7. package/dist/cjs/plugins/table/index.js +54 -37
  8. package/dist/cjs/plugins/table/pm-plugins/table-resizing/index.js +9 -1
  9. package/dist/cjs/plugins/table/toolbar.js +150 -22
  10. package/dist/cjs/plugins/table/transforms/fix-tables.js +7 -7
  11. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  12. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  13. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -5
  14. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  15. package/dist/cjs/plugins/table/utils/column-controls.js +0 -1
  16. package/dist/cjs/plugins/table/utils/decoration.js +53 -4
  17. package/dist/cjs/plugins/table/utils/dom.js +0 -2
  18. package/dist/cjs/plugins/table/utils/paste.js +0 -1
  19. package/dist/cjs/version.json +1 -1
  20. package/dist/es2019/plugins/table/commands/hover.js +4 -4
  21. package/dist/es2019/plugins/table/commands-with-analytics.js +6 -9
  22. package/dist/es2019/plugins/table/event-handlers.js +1 -2
  23. package/dist/es2019/plugins/table/handlers.js +1 -2
  24. package/dist/es2019/plugins/table/index.js +23 -5
  25. package/dist/es2019/plugins/table/pm-plugins/keymap.js +1 -1
  26. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -3
  27. package/dist/es2019/plugins/table/pm-plugins/table-resizing/index.js +2 -1
  28. package/dist/es2019/plugins/table/toolbar.js +133 -16
  29. package/dist/es2019/plugins/table/transforms/fix-tables.js +2 -4
  30. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  31. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  32. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
  33. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -2
  34. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -5
  35. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  36. package/dist/es2019/plugins/table/utils/column-controls.js +0 -1
  37. package/dist/es2019/plugins/table/utils/decoration.js +60 -25
  38. package/dist/es2019/plugins/table/utils/dom.js +0 -2
  39. package/dist/es2019/plugins/table/utils/paste.js +1 -2
  40. package/dist/es2019/plugins/table/utils/row-controls.js +1 -2
  41. package/dist/es2019/version.json +1 -1
  42. package/dist/esm/plugins/table/commands/hover.js +4 -4
  43. package/dist/esm/plugins/table/commands-with-analytics.js +56 -55
  44. package/dist/esm/plugins/table/event-handlers.js +1 -2
  45. package/dist/esm/plugins/table/handlers.js +1 -2
  46. package/dist/esm/plugins/table/index.js +55 -38
  47. package/dist/esm/plugins/table/pm-plugins/keymap.js +1 -1
  48. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -3
  49. package/dist/esm/plugins/table/pm-plugins/table-resizing/index.js +2 -1
  50. package/dist/esm/plugins/table/toolbar.js +139 -17
  51. package/dist/esm/plugins/table/transforms/fix-tables.js +2 -4
  52. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  53. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  54. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
  55. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -2
  56. package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -5
  57. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  58. package/dist/esm/plugins/table/utils/column-controls.js +0 -1
  59. package/dist/esm/plugins/table/utils/decoration.js +50 -4
  60. package/dist/esm/plugins/table/utils/dom.js +0 -2
  61. package/dist/esm/plugins/table/utils/paste.js +1 -2
  62. package/dist/esm/plugins/table/utils/row-controls.js +1 -2
  63. package/dist/esm/version.json +1 -1
  64. package/dist/types/plugins/table/commands-with-analytics.d.ts +5 -5
  65. package/dist/types/plugins/table/pm-plugins/table-resizing/index.d.ts +1 -0
  66. package/dist/types/plugins/table/toolbar.d.ts +2 -2
  67. package/dist/types/plugins/table/transforms/fix-tables.d.ts +1 -1
  68. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  69. package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +5 -5
  70. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +1 -0
  71. package/dist/types-ts4.0/plugins/table/toolbar.d.ts +2 -2
  72. package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +1 -1
  73. package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +1 -1
  74. package/examples/config.jsonc +14 -0
  75. package/package.json +15 -11
  76. package/plugin-key/package.json +14 -0
  77. package/report.api.md +1 -1
  78. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/auto-size-documents.ts +0 -0
  79. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/basic-table.ts +0 -0
  80. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/empty-paragraph-underneath-table.ts +0 -0
  81. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/even-columns.ts +0 -0
  82. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/layout-documents.ts +0 -0
  83. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/merged-rows-and-cols-document.ts +0 -0
  84. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/nested-in-extension.ts +0 -0
  85. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/paragraph-and-table-adf.json +0 -0
  86. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/resize-documents.ts +0 -0
  87. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/scale.ts +0 -0
  88. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-inside-layout.ts +0 -0
  89. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-min-width-columns-document.ts +0 -0
  90. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-multiline-date.adf.json +0 -0
  91. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-text-and-empty-row.ts +0 -0
  92. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/auto-size.ts.snap +0 -0
  93. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/change-date-inside-table.ts.snap +0 -0
  94. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/copy-button.ts.snap +0 -0
  95. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-columns.ts.snap +0 -0
  96. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +0 -0
  97. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +0 -0
  98. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +0 -0
  99. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-rows.ts.snap +0 -0
  100. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-table-when-selected.ts.snap +0 -0
  101. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +0 -0
  102. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/even-columns.ts.snap +0 -0
  103. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +0 -0
  104. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-row-inside-layout.ts.snap +0 -0
  105. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/layout.ts.snap +0 -0
  106. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/resize.ts.snap +0 -0
  107. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/scale.ts.snap +0 -0
  108. package/src/{plugins/table/__tests__ → __tests__}/integration/arrow-down-into-table.ts +0 -0
  109. package/src/{plugins/table/__tests__ → __tests__}/integration/auto-size.ts +0 -0
  110. package/src/{plugins/table/__tests__ → __tests__}/integration/block-node-selection.ts +1 -0
  111. package/src/{plugins/table/__tests__ → __tests__}/integration/cell-selection.ts +0 -0
  112. package/src/{plugins/table/__tests__ → __tests__}/integration/change-date-inside-table.ts +0 -0
  113. package/src/{plugins/table/__tests__ → __tests__}/integration/copy-button.ts +1 -1
  114. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-columns.ts +2 -2
  115. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-in-full-width.ts +1 -1
  116. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-with-empty-action.ts +1 -1
  117. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-row-with-empty-action.ts +1 -1
  118. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-rows.ts +2 -2
  119. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-table-when-selected.ts +0 -0
  120. package/src/{plugins/table/__tests__ → __tests__}/integration/deleting-empty-paragraph-under-table.ts +0 -0
  121. package/src/{plugins/table/__tests__ → __tests__}/integration/even-columns.ts +0 -0
  122. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-cell-header-with-strong-mark.ts +0 -0
  123. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-long-smart-link.ts +1 -0
  124. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-row-inside-layout.ts +0 -0
  125. package/src/{plugins/table/__tests__ → __tests__}/integration/layout.ts +0 -0
  126. package/src/{plugins/table/__tests__ → __tests__}/integration/resize-handler.ts +0 -0
  127. package/src/{plugins/table/__tests__ → __tests__}/integration/resize.ts +1 -1
  128. package/src/{plugins/table/__tests__ → __tests__}/integration/scale.ts +0 -0
  129. package/src/__tests__/integration/table-controls-selection.ts +71 -0
  130. package/src/__tests__/unit/analytics.ts +8 -9
  131. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/go-to-next-cell.ts +4 -4
  132. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/insert.ts +4 -4
  133. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/misc.ts +12 -6
  134. package/src/{plugins/table/__tests__ → __tests__}/unit/commands.ts +7 -7
  135. package/src/__tests__/unit/copy-button.ts +22 -0
  136. package/src/__tests__/unit/event-handlers.ts +120 -1
  137. package/src/{plugins/table/__tests__ → __tests__}/unit/get-toolbar-config.ts +8 -3
  138. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/OverflowShadowsObserver.ts +2 -2
  139. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/TableComponent.tsx +11 -11
  140. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/table.ts +5 -5
  141. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-controls.ts +2 -2
  142. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-resizing.ts +9 -6
  143. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/plugin.ts +5 -5
  144. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main-with-allow-collapse.ts +4 -4
  145. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main.ts +6 -6
  146. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -2
  147. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/sticky-headers/tableRow.tsx +16 -13
  148. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-local-id.ts +3 -6
  149. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/colgroup.ts +1 -1
  150. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/event-handlers.ts +3 -3
  151. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-selection-keymap.ts +3 -3
  152. package/src/{plugins/table/__tests__ → __tests__}/unit/toolbar.ts +5 -9
  153. package/src/{plugins/table/__tests__ → __tests__}/unit/utils/collapse.ts +2 -2
  154. package/src/{plugins/table/__tests__ → __tests__}/unit/utils/column-controls.ts +1 -1
  155. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__fixtures__/table-with-100-numbered-list-items.json +0 -0
  156. package/src/{plugins/table/__tests__ → __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 +0 -0
  157. package/src/{plugins/table/__tests__ → __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 +0 -0
  158. package/src/{plugins/table/__tests__ → __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 +0 -0
  159. package/src/{plugins/table/__tests__ → __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 +0 -0
  160. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/copy-button-ts-floating-toolbar-copy-button-table-target-node-displays-blue-border-when-copy-button-is-hovered-1-snap.png +0 -0
  161. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-1-snap.png +0 -0
  162. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-2-snap.png +0 -0
  163. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-3-snap.png +0 -0
  164. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/cell-options-menu.ts +2 -0
  165. package/src/__tests__/visual-regression/copy-button.ts +181 -0
  166. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/index.ts +3 -1
  167. package/src/plugins/table/commands/hover.ts +4 -1
  168. package/src/plugins/table/commands-with-analytics.ts +12 -8
  169. package/src/plugins/table/event-handlers.ts +0 -1
  170. package/src/plugins/table/handlers.ts +0 -1
  171. package/src/plugins/table/index.tsx +28 -2
  172. package/src/plugins/table/pm-plugins/keymap.ts +1 -1
  173. package/src/plugins/table/pm-plugins/table-local-id.ts +0 -2
  174. package/src/plugins/table/pm-plugins/table-resizing/index.ts +1 -0
  175. package/src/plugins/table/{toolbar.ts → toolbar.tsx} +186 -14
  176. package/src/plugins/table/transforms/fix-tables.ts +2 -3
  177. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +0 -1
  178. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +13 -10
  179. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/ContextualMenu.tsx +1 -0
  180. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/FloatingContextualMenu.tsx +1 -0
  181. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +0 -1
  182. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +0 -1
  183. package/src/plugins/table/ui/LayoutButton/index.tsx +2 -4
  184. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +1 -0
  185. package/src/plugins/table/utils/column-controls.ts +0 -1
  186. package/src/plugins/table/utils/decoration.ts +44 -5
  187. package/src/plugins/table/utils/dom.ts +0 -2
  188. package/src/plugins/table/utils/paste.ts +0 -1
  189. package/src/plugins/table/utils/row-controls.ts +0 -1
  190. package/types/package.json +5 -5
  191. package/ui/common-styles/package.json +14 -0
  192. package/ui/consts/package.json +14 -0
  193. package/dist/cjs/plugins/plugin-key.js +0 -17
  194. package/dist/cjs/plugins/table/todo-stubs.js +0 -10
  195. package/dist/cjs/types.js +0 -5
  196. package/dist/es2019/plugins/plugin-key.js +0 -3
  197. package/dist/es2019/plugins/table/todo-stubs.js +0 -1
  198. package/dist/es2019/types.js +0 -1
  199. package/dist/esm/plugins/plugin-key.js +0 -5
  200. package/dist/esm/plugins/table/todo-stubs.js +0 -1
  201. package/dist/esm/types.js +0 -1
  202. package/dist/types/plugins/plugin-key.d.ts +0 -4
  203. package/dist/types/plugins/table/todo-stubs.d.ts +0 -1
  204. package/dist/types/types.d.ts +0 -3
  205. package/dist/types-ts4.0/plugins/plugin-key.d.ts +0 -4
  206. package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +0 -1
  207. package/dist/types-ts4.0/types.d.ts +0 -3
  208. package/src/plugins/plugin-key.ts +0 -7
  209. package/src/plugins/table/__tests__/integration/table-controls-selection.ts +0 -70
  210. package/src/plugins/table/__tests__/unit/event-handlers.ts +0 -130
  211. package/src/plugins/table/todo-stubs.ts +0 -1
  212. package/src/types.ts +0 -3
  213. package/tmp/api-report-tmp.d.ts +0 -91
@@ -1,3 +1,5 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
1
3
  import { defineMessages } from 'react-intl-next';
2
4
 
3
5
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
@@ -8,6 +10,7 @@ import type {
8
10
  FloatingToolbarDropdown,
9
11
  FloatingToolbarHandler,
10
12
  FloatingToolbarItem,
13
+ GetEditorFeatureFlags,
11
14
  } from '@atlaskit/editor-common/types';
12
15
 
13
16
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
@@ -26,6 +29,9 @@ import {
26
29
  emptyMultipleCellsWithAnalytics,
27
30
  insertColumnWithAnalytics,
28
31
  wrapTableInExpandWithAnalytics,
32
+ sortColumnWithAnalytics,
33
+ setColorWithAnalytics,
34
+ distributeColumnsWidthsWithAnalytics,
29
35
  } from './commands-with-analytics';
30
36
  import { getPluginState } from './pm-plugins/plugin-factory';
31
37
  import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
@@ -37,6 +43,7 @@ import {
37
43
  PluginConfig,
38
44
  TableCssClassName,
39
45
  } from './types';
46
+ import { getMergedCellsPositions } from './utils';
40
47
  import { isReferencedSource } from './utils/referentiality';
41
48
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
42
49
  import {
@@ -56,6 +63,19 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
56
63
  import { findParentDomRefOfType } from 'prosemirror-utils';
57
64
  import { EditorView } from 'prosemirror-view';
58
65
  import { closestElement } from '@atlaskit/editor-common/utils';
66
+ import {
67
+ addColumnAfter,
68
+ addRowAfter,
69
+ tooltip,
70
+ backspace,
71
+ } from '@atlaskit/editor-common/keymaps';
72
+ import { getNewResizeStateFromSelectedColumns } from './pm-plugins/table-resizing/utils/resize-state';
73
+ import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
74
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
75
+ import {
76
+ cellBackgroundColorPalette,
77
+ DEFAULT_BORDER_COLOR,
78
+ } from '@atlaskit/editor-common/ui-color';
59
79
 
60
80
  export const messages = defineMessages({
61
81
  tableOptions: {
@@ -145,6 +165,7 @@ export const getToolbarCellOptionsConfig = (
145
165
  const { top, bottom, right, left } = initialSelectionRect;
146
166
  const numberOfColumns = right - left;
147
167
  const numberOfRows = bottom - top;
168
+ const pluginState = getPluginState(editorState);
148
169
 
149
170
  const options = [
150
171
  {
@@ -167,6 +188,7 @@ export const getToolbarCellOptionsConfig = (
167
188
  },
168
189
  selected: false,
169
190
  disabled: false,
191
+ elemAfter: <div css={shortcutStyle}>{tooltip(addColumnAfter)}</div>,
170
192
  },
171
193
  {
172
194
  id: 'editor.table.insertRow',
@@ -184,6 +206,7 @@ export const getToolbarCellOptionsConfig = (
184
206
  },
185
207
  selected: false,
186
208
  disabled: false,
209
+ elemAfter: <div css={shortcutStyle}>{tooltip(addRowAfter)}</div>,
187
210
  },
188
211
  {
189
212
  id: 'editor.table.removeColumns',
@@ -229,41 +252,114 @@ export const getToolbarCellOptionsConfig = (
229
252
  {
230
253
  id: 'editor.table.mergeCells',
231
254
  title: formatMessage(ContextualMenuMessages.mergeCells),
232
- onClick: mergeCellsWithAnalytics(editorAnalyticsAPI),
255
+ onClick: mergeCellsWithAnalytics(editorAnalyticsAPI)(
256
+ INPUT_METHOD.FLOATING_TB,
257
+ ),
233
258
  selected: false,
234
259
  disabled: !canMergeCells(editorState.tr),
235
260
  },
236
261
  {
237
262
  id: 'editor.table.splitCell',
238
263
  title: formatMessage(ContextualMenuMessages.splitCell),
239
- onClick: splitCellWithAnalytics(editorAnalyticsAPI),
264
+ onClick: splitCellWithAnalytics(editorAnalyticsAPI)(
265
+ INPUT_METHOD.FLOATING_TB,
266
+ ),
240
267
  selected: false,
241
268
  disabled: !splitCell(editorState),
242
269
  },
243
- {
244
- id: 'editor.table.clearCells',
245
- title: formatMessage(ContextualMenuMessages.clearCells, {
246
- 0: Math.max(numberOfColumns, numberOfRows),
247
- }),
270
+ ];
271
+
272
+ if (pluginState?.pluginConfig?.allowDistributeColumns) {
273
+ const distributeColumnWidths: Command = (state, dispatch, view) => {
274
+ const newResizeStateWithAnalytics = view
275
+ ? getNewResizeStateFromSelectedColumns(
276
+ initialSelectionRect,
277
+ editorState,
278
+ view.domAtPos.bind(view),
279
+ getEditorContainerWidth,
280
+ )
281
+ : undefined;
282
+
283
+ if (newResizeStateWithAnalytics) {
284
+ distributeColumnsWidthsWithAnalytics(editorAnalyticsAPI)(
285
+ INPUT_METHOD.FLOATING_TB,
286
+ newResizeStateWithAnalytics,
287
+ )(state, dispatch);
288
+ return true;
289
+ }
290
+ return false;
291
+ };
292
+
293
+ options.push({
294
+ id: 'editor.table.distributeColumns',
295
+ title: formatMessage(ContextualMenuMessages.distributeColumns),
296
+ onClick: distributeColumnWidths,
297
+ selected: false,
298
+ disabled: numberOfColumns <= 1,
299
+ });
300
+ }
301
+
302
+ if (pluginState?.pluginConfig?.allowColumnSorting) {
303
+ const hasMergedCellsInTable =
304
+ getMergedCellsPositions(editorState.tr).length > 0;
305
+
306
+ options.push({
307
+ id: 'editor.table.sortColumnAsc',
308
+ title: formatMessage(ContextualMenuMessages.sortColumnASC),
248
309
  onClick: (state: EditorState, dispatch?: CommandDispatch) => {
249
- const { targetCellPosition } = getPluginState(state);
250
- emptyMultipleCellsWithAnalytics(editorAnalyticsAPI)(
310
+ sortColumnWithAnalytics(editorAnalyticsAPI)(
251
311
  INPUT_METHOD.FLOATING_TB,
252
- targetCellPosition,
312
+ initialSelectionRect.left,
313
+ SortOrder.ASC,
253
314
  )(state, dispatch);
254
315
  return true;
255
316
  },
256
317
  selected: false,
257
- disabled: false,
318
+ disabled: hasMergedCellsInTable,
319
+ });
320
+
321
+ options.push({
322
+ id: 'editor.table.sortColumnDesc',
323
+ title: formatMessage(ContextualMenuMessages.sortColumnDESC),
324
+ onClick: (state: EditorState, dispatch?: CommandDispatch) => {
325
+ sortColumnWithAnalytics(editorAnalyticsAPI)(
326
+ INPUT_METHOD.FLOATING_TB,
327
+ initialSelectionRect.left,
328
+ SortOrder.DESC,
329
+ )(state, dispatch);
330
+ return true;
331
+ },
332
+ selected: false,
333
+ disabled: hasMergedCellsInTable,
334
+ });
335
+ }
336
+
337
+ options.push({
338
+ id: 'editor.table.clearCells',
339
+ title: formatMessage(ContextualMenuMessages.clearCells, {
340
+ 0: Math.max(numberOfColumns, numberOfRows),
341
+ }),
342
+ onClick: (state: EditorState, dispatch?: CommandDispatch) => {
343
+ const { targetCellPosition } = getPluginState(state);
344
+ emptyMultipleCellsWithAnalytics(editorAnalyticsAPI)(
345
+ INPUT_METHOD.FLOATING_TB,
346
+ targetCellPosition,
347
+ )(state, dispatch);
348
+ return true;
258
349
  },
259
- ];
350
+ selected: false,
351
+ disabled: false,
352
+ elemAfter: <div css={shortcutStyle}>{tooltip(backspace)}</div>,
353
+ });
260
354
 
261
355
  return {
262
356
  id: 'editor.table.cellOptions',
263
357
  type: 'dropdown',
264
358
  title: formatMessage(tableMessages.cellOptions),
265
- hidden: true,
266
359
  options,
360
+ // Increased dropdown item width to prevent labels from being truncated
361
+ dropdownWidth: 230,
362
+ showSelected: false,
267
363
  };
268
364
  };
269
365
 
@@ -277,6 +373,7 @@ const getClosestSelectionRect = (state: EditorState): Rect | undefined => {
277
373
  export const getToolbarConfig = (
278
374
  getEditorContainerWidth: GetEditorContainerWidth,
279
375
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
376
+ getEditorFeatureFlags: GetEditorFeatureFlags,
280
377
  ) => (config: PluginConfig): FloatingToolbarHandler => (state, intl) => {
281
378
  const tableObject = findTable(state.selection);
282
379
  const pluginState = getPluginState(state);
@@ -292,12 +389,22 @@ export const getToolbarConfig = (
292
389
  editorAnalyticsAPI,
293
390
  );
294
391
 
392
+ const { tableCellOptionsInFloatingToolbar } = getEditorFeatureFlags() || {};
295
393
  const cellItems = getCellItems(
296
394
  config,
297
395
  state,
298
396
  intl,
299
397
  getEditorContainerWidth,
300
398
  editorAnalyticsAPI,
399
+ tableCellOptionsInFloatingToolbar,
400
+ );
401
+ const colorPicker = getColorPicker(
402
+ state,
403
+ menu,
404
+ intl,
405
+ getEditorContainerWidth,
406
+ editorAnalyticsAPI,
407
+ tableCellOptionsInFloatingToolbar,
301
408
  );
302
409
 
303
410
  // Check if we need to show confirm dialog for delete button
@@ -347,10 +454,24 @@ export const getToolbarConfig = (
347
454
  menu,
348
455
  separator(menu.hidden),
349
456
  ...cellItems,
457
+ ...colorPicker,
350
458
  {
351
459
  type: 'extensions-placeholder',
352
460
  separator: 'end',
353
461
  },
462
+ {
463
+ type: 'copy-button',
464
+ items: [
465
+ {
466
+ state,
467
+ formatMessage: intl.formatMessage,
468
+ nodeType,
469
+ onMouseEnter: hoverTable(false, true),
470
+ onMouseLeave: clearHoverSelection(),
471
+ },
472
+ { type: 'separator' },
473
+ ],
474
+ },
354
475
  {
355
476
  id: 'editor.table.delete',
356
477
  type: 'button',
@@ -364,6 +485,7 @@ export const getToolbarConfig = (
364
485
  confirmDialog,
365
486
  },
366
487
  ],
488
+ scrollable: true,
367
489
  };
368
490
  }
369
491
  return;
@@ -382,8 +504,12 @@ const getCellItems = (
382
504
  { formatMessage }: ToolbarMenuContext,
383
505
  getEditorContainerWidth: GetEditorContainerWidth,
384
506
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
507
+ tableCellOptionsInFloatingToolbar?: boolean,
385
508
  ): Array<FloatingToolbarItem<Command>> => {
386
- if (pluginConfig.allowCellOptionsInFloatingToolbar) {
509
+ if (
510
+ pluginConfig.allowCellOptionsInFloatingToolbar ||
511
+ tableCellOptionsInFloatingToolbar
512
+ ) {
387
513
  const initialSelectionRect = getClosestSelectionRect(state);
388
514
  if (initialSelectionRect) {
389
515
  const cellOptions = getToolbarCellOptionsConfig(
@@ -398,3 +524,49 @@ const getCellItems = (
398
524
  }
399
525
  return [];
400
526
  };
527
+
528
+ const getColorPicker = (
529
+ state: EditorState,
530
+ menu: FloatingToolbarItem<Command>,
531
+ { formatMessage }: ToolbarMenuContext,
532
+ getEditorContainerWidth: GetEditorContainerWidth,
533
+ editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined,
534
+ tableCellOptionsInFloatingToolbar?: boolean,
535
+ ): Array<FloatingToolbarItem<Command>> => {
536
+ const { targetCellPosition, pluginConfig } = getPluginState(state);
537
+ if (
538
+ !pluginConfig.allowBackgroundColor ||
539
+ !tableCellOptionsInFloatingToolbar
540
+ ) {
541
+ return [];
542
+ }
543
+ const node = targetCellPosition
544
+ ? state.doc.nodeAt(targetCellPosition)
545
+ : undefined;
546
+ const currentBackground = node?.attrs?.background || '#ffffff';
547
+ const defaultPalette = cellBackgroundColorPalette.find(
548
+ (item) => item.value === currentBackground,
549
+ ) || {
550
+ label: 'Custom',
551
+ value: currentBackground,
552
+ border: DEFAULT_BORDER_COLOR,
553
+ };
554
+
555
+ return [
556
+ {
557
+ id: 'editor.panel.colorPicker',
558
+ title: formatMessage(ContextualMenuMessages.cellBackground),
559
+ type: 'select',
560
+ selectType: 'color',
561
+ defaultValue: defaultPalette,
562
+ options: cellBackgroundColorPalette,
563
+ onChange: (option: any) =>
564
+ setColorWithAnalytics(editorAnalyticsAPI)(
565
+ INPUT_METHOD.FLOATING_TB,
566
+ option.value,
567
+ targetCellPosition,
568
+ ),
569
+ },
570
+ separator(menu.hidden),
571
+ ];
572
+ };
@@ -9,9 +9,8 @@ import {
9
9
  akEditorWideLayoutWidth,
10
10
  } from '@atlaskit/editor-shared-styles';
11
11
 
12
- // import { sendLogs } from '../../../utils/sendLogs';
13
- // import { sendLogs } from '@atlaskit/editor-core/src/utils/sendLogs';
14
- import { sendLogs } from '../todo-stubs';
12
+ import { sendLogs } from '@atlaskit/editor-common/utils';
13
+
15
14
  import {
16
15
  calculateColumnWidth,
17
16
  contentWidth,
@@ -167,7 +167,6 @@ export class FloatingContextualButtonInner extends React.Component<
167
167
  this.props.stickyHeader !== nextProps.stickyHeader
168
168
  );
169
169
  }
170
- // TODO: restore
171
170
  private handleClick = () => {
172
171
  const { state, dispatch } = this.props.editorView;
173
172
  // Clicking outside the dropdown handles toggling the menu closed
@@ -29,9 +29,7 @@ import { closestElement } from '@atlaskit/editor-common/utils';
29
29
 
30
30
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
31
31
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
32
- // import { DropdownItem } from '../../../block-type/ui/ToolbarBlockType';
33
32
 
34
- // TODO ED-15449 - unstub type?
35
33
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
36
34
  type DropdownItem = MenuItem & {
37
35
  value: {
@@ -365,11 +363,17 @@ export class ContextualMenu extends Component<
365
363
  this.toggleOpen();
366
364
  break;
367
365
  case 'merge':
368
- mergeCellsWithAnalytics(editorAnalyticsAPI)(state, dispatch);
366
+ mergeCellsWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.CONTEXT_MENU)(
367
+ state,
368
+ dispatch,
369
+ );
369
370
  this.toggleOpen();
370
371
  break;
371
372
  case 'split':
372
- splitCellWithAnalytics(editorAnalyticsAPI)(state, dispatch);
373
+ splitCellWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.CONTEXT_MENU)(
374
+ state,
375
+ dispatch,
376
+ );
373
377
  this.toggleOpen();
374
378
  break;
375
379
  case 'distribute_columns':
@@ -511,12 +515,11 @@ export class ContextualMenu extends Component<
511
515
  // TargetCellPosition could be outdated: https://product-fabric.atlassian.net/browse/ED-8129
512
516
  const { targetCellPosition } = getPluginState(editorView.state);
513
517
  const { state, dispatch } = editorView;
514
- // setColorWithAnalytics(color, targetCellPosition)(state, dispatch);
515
- // TODO: restore
516
- setColorWithAnalytics(editorAnalyticsAPI)(color, targetCellPosition)(
517
- state,
518
- dispatch,
519
- );
518
+ setColorWithAnalytics(editorAnalyticsAPI)(
519
+ INPUT_METHOD.CONTEXT_MENU,
520
+ color,
521
+ targetCellPosition,
522
+ )(state, dispatch);
520
523
  this.toggleOpen();
521
524
  };
522
525
  }
@@ -1,3 +1,4 @@
1
+ export {};
1
2
  it.skip('TODO: restore unit', () => {});
2
3
 
3
4
  // import React from 'react';
@@ -1,3 +1,4 @@
1
+ export {};
1
2
  it.skip('TODO: restore unit', () => {});
2
3
 
3
4
  // import React from 'react';
@@ -12,7 +12,6 @@ import { createPortal } from 'react-dom';
12
12
  import { Popup } from '@atlaskit/editor-common/ui';
13
13
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
14
14
 
15
- // import { closestElement } from '../../../../utils/dom';
16
15
  import { closestElement } from '@atlaskit/editor-common/utils';
17
16
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
18
17
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../commands';
@@ -10,7 +10,6 @@ import { WrappedComponentProps, injectIntl } from 'react-intl-next';
10
10
 
11
11
  import { Popup } from '@atlaskit/editor-common/ui';
12
12
 
13
- // import { closestElement } from '../../../../utils/dom';
14
13
  import { closestElement } from '@atlaskit/editor-common/utils';
15
14
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
15
  import {
@@ -107,8 +107,7 @@ class LayoutButton extends React.Component<Props & WrappedComponentProps, any> {
107
107
  }
108
108
 
109
109
  renderSticky(button: JSX.Element, targetRef: Node, tableRef: Node) {
110
- // const title = this.getTitle();
111
- const title = 'TODO MISSING TITLE';
110
+ const title = this.getTitle();
112
111
 
113
112
  if (
114
113
  !(targetRef instanceof HTMLElement) ||
@@ -146,8 +145,7 @@ class LayoutButton extends React.Component<Props & WrappedComponentProps, any> {
146
145
  return null;
147
146
  }
148
147
 
149
- // const title = this.getTitle();
150
- const title = 'TODO MISSING TITLE';
148
+ const title = this.getTitle();
151
149
 
152
150
  return (
153
151
  <Popup
@@ -63,6 +63,7 @@ class CornerControlComponent extends Component<
63
63
  ? `${this.props.stickyTop}px`
64
64
  : undefined,
65
65
  }}
66
+ contentEditable={false}
66
67
  >
67
68
  <button
68
69
  aria-label={formatMessage(messages.cornerControl)}
@@ -12,7 +12,6 @@ import {
12
12
 
13
13
  import { EditorView } from 'prosemirror-view';
14
14
 
15
- // import { maphElem } from '@atlaskit/editor-core/src/utils/dom';
16
15
  import { maphElem } from '@atlaskit/editor-common/utils';
17
16
 
18
17
  import { TableCssClassName as ClassName } from '../types';
@@ -12,7 +12,6 @@ import { Decoration, DecorationSet } from 'prosemirror-view';
12
12
 
13
13
  import { CellAttributes } from '@atlaskit/adf-schema';
14
14
 
15
- // import { nonNullable } from '@atlaskit/editor-core/src/utils';
16
15
  import { nonNullable } from '@atlaskit/editor-common/utils';
17
16
  import {
18
17
  Cell,
@@ -61,10 +60,49 @@ export const createCellHoverDecoration = (
61
60
  export const createControlsHoverDecoration = (
62
61
  cells: Cell[],
63
62
  type: 'row' | 'column' | 'table',
63
+ tr: Transaction | ReadonlyTransaction,
64
64
  danger?: boolean,
65
65
  selected?: boolean,
66
- ): Decoration[] =>
67
- cells.map((cell) => {
66
+ ): Decoration[] => {
67
+ const table = findTable(tr.selection);
68
+ if (!table) {
69
+ return [];
70
+ }
71
+
72
+ const map = TableMap.get(table.node);
73
+ const [min, max] = cells.reduce<[number | null, number | null]>(
74
+ ([min, max], cell) => {
75
+ if (min === null || cell.pos < min) {
76
+ min = cell.pos;
77
+ }
78
+ if (max === null || cell.pos > max) {
79
+ max = cell.pos;
80
+ }
81
+
82
+ return [min, max];
83
+ },
84
+ [null, null],
85
+ );
86
+
87
+ if (min === null || max === null) {
88
+ return [];
89
+ }
90
+
91
+ let updatedCells: number[] = cells.map((x) => x.pos);
92
+
93
+ // ED-15246 fixed trello card table overflow issue
94
+ // If columns / rows have been merged the hovered selection is different to the actual selection
95
+ // So If the table cells are in danger we want to create a "rectangle" selection
96
+ // to match the "clicked" selection
97
+
98
+ if (danger) {
99
+ const rect = map.rectBetween(min - table.start, max - table.start);
100
+ updatedCells = map.cellsInRect(rect).map((x) => x + table.start);
101
+ }
102
+
103
+ return updatedCells.map((pos) => {
104
+ const cell = tr.doc.nodeAt(pos);
105
+
68
106
  const classes = [ClassName.HOVERED_CELL];
69
107
  if (danger) {
70
108
  classes.push(ClassName.HOVERED_CELL_IN_DANGER);
@@ -97,14 +135,15 @@ export const createControlsHoverDecoration = (
97
135
  }
98
136
 
99
137
  return Decoration.node(
100
- cell.pos,
101
- cell.pos + cell.node.nodeSize,
138
+ pos,
139
+ pos + cell!.nodeSize,
102
140
  {
103
141
  class: classes.join(' '),
104
142
  },
105
143
  { key },
106
144
  );
107
145
  });
146
+ };
108
147
 
109
148
  export const createColumnSelectedDecoration = (
110
149
  tr: Transaction | ReadonlyTransaction,
@@ -1,5 +1,3 @@
1
- // import { containsClassName } from '@atlaskit/editor-core/src/utils';
2
- // import { closestElement } from '@atlaskit/editor-core/src/utils/dom';
3
1
  import {
4
2
  closestElement,
5
3
  containsClassName,
@@ -2,7 +2,6 @@ import { Fragment, Node as PMNode, Schema, Slice } from 'prosemirror-model';
2
2
  import { EditorState } from 'prosemirror-state';
3
3
  import { flatten } from 'prosemirror-utils';
4
4
 
5
- // import { flatmap, mapSlice } from '@atlaskit/editor-core/src/utils/slice';
6
5
  import { flatmap, mapSlice } from '@atlaskit/editor-common/utils';
7
6
 
8
7
  import { getPluginState } from '../pm-plugins/plugin-factory';
@@ -10,7 +10,6 @@ import {
10
10
  isTableSelected,
11
11
  } from '@atlaskit/editor-tables/utils';
12
12
 
13
- // import { parsePx } from '@atlaskit/editor-core/src/utils/dom';
14
13
  import { parsePx } from '@atlaskit/editor-common/utils';
15
14
  import { TableCssClassName as ClassName } from '../types';
16
15
  import { tableDeleteButtonSize } from '../ui/consts';
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table/types",
3
- "main": "../dist/cjs/types.js",
4
- "module": "../dist/esm/types.js",
5
- "module:es2019": "../dist/es2019/types.js",
6
- "types": "../dist/types/types.d.ts",
3
+ "main": "../dist/cjs/plugins/table/types.js",
4
+ "module": "../dist/esm/plugins/table/types.js",
5
+ "module:es2019": "../dist/es2019/plugins/table/types.js",
6
+ "types": "../dist/types/plugins/table/types.d.ts",
7
7
  "typesVersions": {
8
8
  ">=4.0 <4.5": {
9
9
  "*": [
10
- "../dist/types-ts4.0/types.d.ts"
10
+ "../dist/types-ts4.0/plugins/table/types.d.ts"
11
11
  ]
12
12
  }
13
13
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table/ui/common-styles",
3
+ "main": "../../dist/cjs/plugins/table/ui/common-styles.js",
4
+ "module": "../../dist/esm/plugins/table/ui/common-styles.js",
5
+ "module:es2019": "../../dist/es2019/plugins/table/ui/common-styles.js",
6
+ "types": "../../dist/types/plugins/table/ui/common-styles.d.ts",
7
+ "typesVersions": {
8
+ ">=4.0 <4.5": {
9
+ "*": [
10
+ "../../dist/types-ts4.0/plugins/table/ui/common-styles.d.ts"
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table/ui/consts",
3
+ "main": "../../dist/cjs/plugins/table/ui/consts.js",
4
+ "module": "../../dist/esm/plugins/table/ui/consts.js",
5
+ "module:es2019": "../../dist/es2019/plugins/table/ui/consts.js",
6
+ "types": "../../dist/types/plugins/table/ui/consts.d.ts",
7
+ "typesVersions": {
8
+ ">=4.0 <4.5": {
9
+ "*": [
10
+ "../../dist/types-ts4.0/plugins/table/ui/consts.d.ts"
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pluginKey = exports.getPluginState = void 0;
7
-
8
- var _prosemirrorState = require("prosemirror-state");
9
-
10
- var pluginKey = new _prosemirrorState.PluginKey('nextTablePlugin');
11
- exports.pluginKey = pluginKey;
12
-
13
- var getPluginState = function getPluginState(state) {
14
- return state && pluginKey.getState(state);
15
- };
16
-
17
- exports.getPluginState = getPluginState;
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.sendLogs = void 0;
7
-
8
- var sendLogs = function sendLogs(_a) {};
9
-
10
- exports.sendLogs = sendLogs;
package/dist/cjs/types.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,3 +0,0 @@
1
- import { PluginKey } from 'prosemirror-state';
2
- export const pluginKey = new PluginKey('nextTablePlugin');
3
- export const getPluginState = state => state && pluginKey.getState(state);
@@ -1 +0,0 @@
1
- export const sendLogs = _a => {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { PluginKey } from 'prosemirror-state';
2
- export var pluginKey = new PluginKey('nextTablePlugin');
3
- export var getPluginState = function getPluginState(state) {
4
- return state && pluginKey.getState(state);
5
- };