@atlaskit/editor-plugin-table 2.10.7 → 2.11.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 (94) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/plugins/table/commands/misc.js +58 -5
  3. package/dist/cjs/plugins/table/event-handlers.js +3 -6
  4. package/dist/cjs/plugins/table/index.js +66 -63
  5. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +5 -5
  6. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +13 -19
  7. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-resizing.js +18 -5
  8. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/index.js +6 -0
  9. package/dist/cjs/plugins/table/pm-plugins/main.js +7 -3
  10. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +5 -0
  11. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -0
  12. package/dist/cjs/plugins/table/reducer.js +26 -2
  13. package/dist/cjs/plugins/table/types.js +1 -0
  14. package/dist/cjs/plugins/table/ui/ColumnResizeWidget/index.js +44 -0
  15. package/dist/cjs/plugins/table/ui/messages.js +5 -0
  16. package/dist/cjs/plugins/table/utils/decoration.js +17 -4
  17. package/dist/es2019/plugins/table/commands/misc.js +49 -5
  18. package/dist/es2019/plugins/table/event-handlers.js +3 -6
  19. package/dist/es2019/plugins/table/index.js +14 -10
  20. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +5 -5
  21. package/dist/es2019/plugins/table/nodeviews/TableResizer.js +14 -17
  22. package/dist/es2019/plugins/table/pm-plugins/decorations/utils/column-resizing.js +12 -2
  23. package/dist/es2019/plugins/table/pm-plugins/decorations/utils/index.js +1 -1
  24. package/dist/es2019/plugins/table/pm-plugins/main.js +6 -3
  25. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +5 -0
  26. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -0
  27. package/dist/es2019/plugins/table/reducer.js +29 -2
  28. package/dist/es2019/plugins/table/types.js +1 -0
  29. package/dist/es2019/plugins/table/ui/ColumnResizeWidget/index.js +35 -0
  30. package/dist/es2019/plugins/table/ui/messages.js +5 -0
  31. package/dist/es2019/plugins/table/utils/decoration.js +16 -5
  32. package/dist/esm/plugins/table/commands/misc.js +56 -5
  33. package/dist/esm/plugins/table/event-handlers.js +3 -6
  34. package/dist/esm/plugins/table/index.js +66 -63
  35. package/dist/esm/plugins/table/nodeviews/TableContainer.js +5 -5
  36. package/dist/esm/plugins/table/nodeviews/TableResizer.js +13 -19
  37. package/dist/esm/plugins/table/pm-plugins/decorations/utils/column-resizing.js +15 -3
  38. package/dist/esm/plugins/table/pm-plugins/decorations/utils/index.js +1 -1
  39. package/dist/esm/plugins/table/pm-plugins/main.js +8 -4
  40. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +5 -0
  41. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -0
  42. package/dist/esm/plugins/table/reducer.js +26 -2
  43. package/dist/esm/plugins/table/types.js +1 -0
  44. package/dist/esm/plugins/table/ui/ColumnResizeWidget/index.js +35 -0
  45. package/dist/esm/plugins/table/ui/messages.js +5 -0
  46. package/dist/esm/plugins/table/utils/decoration.js +17 -4
  47. package/dist/types/plugins/table/commands/misc.d.ts +8 -6
  48. package/dist/types/plugins/table/event-handlers.d.ts +3 -3
  49. package/dist/types/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +4 -2
  50. package/dist/types/plugins/table/pm-plugins/decorations/utils/index.d.ts +1 -1
  51. package/dist/types/plugins/table/pm-plugins/main.d.ts +2 -1
  52. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +2 -2
  53. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  54. package/dist/types/plugins/table/reducer.d.ts +1 -1
  55. package/dist/types/plugins/table/types.d.ts +18 -0
  56. package/dist/types/plugins/table/ui/ColumnResizeWidget/index.d.ts +9 -0
  57. package/dist/types/plugins/table/ui/messages.d.ts +5 -0
  58. package/dist/types/plugins/table/utils/decoration.d.ts +2 -1
  59. package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +8 -6
  60. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +3 -3
  61. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +4 -2
  62. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/index.d.ts +1 -1
  63. package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +2 -1
  64. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +2 -2
  65. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  66. package/dist/types-ts4.5/plugins/table/reducer.d.ts +1 -1
  67. package/dist/types-ts4.5/plugins/table/types.d.ts +18 -0
  68. package/dist/types-ts4.5/plugins/table/ui/ColumnResizeWidget/index.d.ts +9 -0
  69. package/dist/types-ts4.5/plugins/table/ui/messages.d.ts +5 -0
  70. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +2 -1
  71. package/package.json +4 -4
  72. package/src/__tests__/unit/event-handlers.ts +1 -1
  73. package/src/__tests__/unit/nodeviews/TableComponent.tsx +6 -8
  74. package/src/__tests__/unit/nodeviews/TableContainer.tsx +22 -15
  75. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +2 -0
  76. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +9 -10
  77. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +9 -9
  78. package/src/plugins/table/commands/misc.ts +84 -7
  79. package/src/plugins/table/event-handlers.ts +11 -16
  80. package/src/plugins/table/index.tsx +6 -4
  81. package/src/plugins/table/nodeviews/TableContainer.tsx +4 -4
  82. package/src/plugins/table/nodeviews/TableResizer.tsx +12 -20
  83. package/src/plugins/table/pm-plugins/decorations/utils/column-resizing.ts +34 -7
  84. package/src/plugins/table/pm-plugins/decorations/utils/index.ts +4 -1
  85. package/src/plugins/table/pm-plugins/main.ts +7 -1
  86. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +5 -0
  87. package/src/plugins/table/pm-plugins/table-resizing/plugin.ts +3 -5
  88. package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +5 -3
  89. package/src/plugins/table/reducer.ts +51 -3
  90. package/src/plugins/table/types.ts +19 -0
  91. package/src/plugins/table/ui/ColumnResizeWidget/index.tsx +53 -0
  92. package/src/plugins/table/ui/messages.ts +5 -0
  93. package/src/plugins/table/utils/decoration.ts +27 -5
  94. package/tmp/api-report-tmp.d.ts +111 -0
@@ -17,6 +17,7 @@ import { TableMap } from '@atlaskit/editor-tables/table-map';
17
17
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
18
18
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
19
19
 
20
+ import { updateResizeHandleDecorations } from '../../commands/misc';
20
21
  import { updateColumnWidths } from '../../transforms';
21
22
  import { getSelectedColumnIndexes, updateResizeHandles } from '../../utils';
22
23
 
@@ -115,6 +116,10 @@ export const handleMouseDown = (
115
116
 
116
117
  setDragging({ startX: event.clientX, startWidth: width })(state, dispatch);
117
118
 
119
+ // When we start resizing a column we need to ensure the underlying tooltip is removed from the decoration to avoid
120
+ // unnecessary tooltips being displayed during drag.
121
+ updateResizeHandleDecorations(undefined, undefined, false)(state, dispatch);
122
+
118
123
  function finish(event: MouseEvent) {
119
124
  window.removeEventListener('mouseup', finish);
120
125
  window.removeEventListener('mousemove', move);
@@ -1,17 +1,15 @@
1
1
  import classnames from 'classnames';
2
2
 
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
- import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
4
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import type {
7
7
  GetEditorContainerWidth,
8
8
  GetEditorFeatureFlags,
9
9
  } from '@atlaskit/editor-common/types';
10
10
 
11
- import {
12
- TableCssClassName as ClassName,
13
- ColumnResizingPluginState,
14
- } from '../../types';
11
+ import { TableCssClassName as ClassName } from '../../types';
12
+ import type { ColumnResizingPluginState } from '../../types';
15
13
 
16
14
  import { setResizeHandlePos } from './commands';
17
15
  import { handleMouseDown } from './event-handlers';
@@ -1,7 +1,7 @@
1
1
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
2
2
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import { Transaction } from '@atlaskit/editor-prosemirror/state';
3
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
7
7
 
@@ -15,9 +15,10 @@ import {
15
15
  getTotalWidth,
16
16
  updateColgroup,
17
17
  } from '../utils/resize-state';
18
- import { ResizeState } from '../utils/types';
18
+ import type { ResizeState } from '../utils/types';
19
19
 
20
20
  import { hasTableBeenResized, insertColgroupFromNode } from './colgroup';
21
+ import { syncStickyRowToTable } from './dom';
21
22
 
22
23
  export interface ScaleOptions {
23
24
  node: PMNode;
@@ -169,6 +170,7 @@ export const previewScaleTable = (
169
170
  }
170
171
 
171
172
  if (!hasTableBeenResized(node)) {
173
+ syncStickyRowToTable(tableRef);
172
174
  return;
173
175
  }
174
176
 
@@ -1,5 +1,5 @@
1
1
  import { defaultTableSelection } from './pm-plugins/default-table-selection';
2
- import { TablePluginAction, TablePluginState } from './types';
2
+ import type { TablePluginAction, TablePluginState } from './types';
3
3
 
4
4
  export default (
5
5
  pluginState: TablePluginState,
@@ -87,11 +87,59 @@ export default (
87
87
  if (
88
88
  action.data.resizeHandleColumnIndex ===
89
89
  pluginState.resizeHandleColumnIndex &&
90
- action.data.resizeHandleRowIndex === pluginState.resizeHandleRowIndex
90
+ action.data.resizeHandleRowIndex === pluginState.resizeHandleRowIndex &&
91
+ action.data.resizeHandleIncludeTooltip ===
92
+ pluginState.resizeHandleIncludeTooltip
91
93
  ) {
92
94
  return pluginState;
93
95
  }
94
- return { ...pluginState, ...action.data };
96
+ return {
97
+ ...pluginState,
98
+ ...action.data,
99
+ isResizeHandleWidgetAdded: true,
100
+ };
101
+
102
+ case 'UPDATE_RESIZE_HANDLE_DECORATIONS':
103
+ const {
104
+ resizeHandleColumnIndex,
105
+ resizeHandleRowIndex,
106
+ resizeHandleIncludeTooltip,
107
+ } = action.data;
108
+
109
+ if (
110
+ (resizeHandleColumnIndex === pluginState.resizeHandleColumnIndex ||
111
+ !Number.isFinite(resizeHandleColumnIndex)) &&
112
+ (resizeHandleRowIndex === pluginState.resizeHandleRowIndex ||
113
+ !Number.isFinite(resizeHandleRowIndex)) &&
114
+ (resizeHandleIncludeTooltip ===
115
+ pluginState.resizeHandleIncludeTooltip ||
116
+ resizeHandleIncludeTooltip === undefined)
117
+ ) {
118
+ return pluginState;
119
+ }
120
+
121
+ return {
122
+ ...pluginState,
123
+ resizeHandleColumnIndex:
124
+ resizeHandleColumnIndex ?? pluginState.resizeHandleColumnIndex,
125
+ resizeHandleRowIndex:
126
+ resizeHandleRowIndex ?? pluginState.resizeHandleRowIndex,
127
+ resizeHandleIncludeTooltip:
128
+ resizeHandleIncludeTooltip ?? pluginState.resizeHandleIncludeTooltip,
129
+ };
130
+
131
+ case 'REMOVE_RESIZE_HANDLE_DECORATIONS':
132
+ if (!pluginState.isResizeHandleWidgetAdded) {
133
+ return pluginState;
134
+ }
135
+
136
+ return {
137
+ ...pluginState,
138
+ ...action.data,
139
+ resizeHandleColumnIndex: undefined,
140
+ resizeHandleRowIndex: undefined,
141
+ isResizeHandleWidgetAdded: false,
142
+ };
95
143
 
96
144
  case 'SET_TABLE_REF':
97
145
  case 'HOVER_ROWS':
@@ -115,11 +115,15 @@ export interface TablePluginState {
115
115
  isFullWidthModeEnabled?: boolean;
116
116
  layout?: TableLayout;
117
117
  ordering?: TableColumnOrdering;
118
+ isResizeHandleWidgetAdded?: boolean;
118
119
  resizeHandleRowIndex?: number;
119
120
  resizeHandleColumnIndex?: number;
121
+ resizeHandleIncludeTooltip?: boolean;
120
122
  // for table wrap/collapse
121
123
  isTableCollapsed?: boolean; // is the current table already in an expand?
122
124
  canCollapseTable?: boolean; // enabled/disabled state of collapse option
125
+
126
+ getIntl: () => IntlShape;
123
127
  }
124
128
 
125
129
  export type TablePluginAction =
@@ -175,8 +179,22 @@ export type TablePluginAction =
175
179
  decorationSet: DecorationSet;
176
180
  resizeHandleRowIndex: number;
177
181
  resizeHandleColumnIndex: number;
182
+ resizeHandleIncludeTooltip: boolean;
183
+ };
184
+ }
185
+ | {
186
+ type: 'UPDATE_RESIZE_HANDLE_DECORATIONS';
187
+ data: {
188
+ decorationSet: DecorationSet;
189
+ resizeHandleRowIndex: number | undefined;
190
+ resizeHandleColumnIndex: number | undefined;
191
+ resizeHandleIncludeTooltip: boolean | undefined;
178
192
  };
179
193
  }
194
+ | {
195
+ type: 'REMOVE_RESIZE_HANDLE_DECORATIONS';
196
+ data: { decorationSet: DecorationSet };
197
+ }
180
198
  | { type: 'CLEAR_HOVER_SELECTION'; data: { decorationSet: DecorationSet } }
181
199
  | { type: 'SHOW_RESIZE_HANDLE_LINE'; data: { decorationSet: DecorationSet } }
182
200
  | { type: 'HIDE_RESIZE_HANDLE_LINE'; data: { decorationSet: DecorationSet } }
@@ -224,6 +242,7 @@ export enum TableDecorations {
224
242
  COLUMN_CONTROLS_DECORATIONS = 'COLUMN_CONTROLS_DECORATIONS',
225
243
  COLUMN_SELECTED = 'COLUMN_SELECTED',
226
244
  COLUMN_RESIZING_HANDLE = 'COLUMN_RESIZING_HANDLE',
245
+ COLUMN_RESIZING_HANDLE_WIDGET = 'COLUMN_RESIZING_HANDLE_WIDGET',
227
246
  COLUMN_RESIZING_HANDLE_LINE = 'COLUMN_RESIZING_HANDLE_LINE',
228
247
 
229
248
  LAST_CELL_ELEMENT = 'LAST_CELL_ELEMENT',
@@ -0,0 +1,53 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+
4
+ import { jsx } from '@emotion/react';
5
+ import { useIntl } from 'react-intl-next';
6
+
7
+ import Tooltip from '@atlaskit/tooltip';
8
+
9
+ import { TableCssClassName } from '../../types';
10
+ import messages from '../messages';
11
+
12
+ type Props = {
13
+ startIndex: number;
14
+ endIndex: number;
15
+ includeTooltip?: boolean;
16
+ };
17
+
18
+ export const ColumnResizeWidget: React.FC<Props> = ({
19
+ startIndex,
20
+ endIndex,
21
+ includeTooltip,
22
+ }) => {
23
+ const { formatMessage } = useIntl();
24
+
25
+ if (!includeTooltip) {
26
+ return (
27
+ <div
28
+ className={TableCssClassName.RESIZE_HANDLE_DECORATION}
29
+ data-start-index={startIndex}
30
+ data-end-index={endIndex}
31
+ />
32
+ );
33
+ }
34
+
35
+ return (
36
+ <Tooltip
37
+ content={formatMessage(messages.adjustColumns)}
38
+ hideTooltipOnClick
39
+ hideTooltipOnMouseDown
40
+ position="mouse"
41
+ mousePosition="auto-start"
42
+ >
43
+ {(tooltipProps) => (
44
+ <div
45
+ className={TableCssClassName.RESIZE_HANDLE_DECORATION}
46
+ data-start-index={startIndex}
47
+ data-end-index={endIndex}
48
+ {...tooltipProps}
49
+ />
50
+ )}
51
+ </Tooltip>
52
+ );
53
+ };
@@ -60,4 +60,9 @@ export default defineMessages({
60
60
  defaultMessage: 'this element',
61
61
  description: 'The current element without preset name been selected',
62
62
  },
63
+ adjustColumns: {
64
+ id: 'fabric.editor.tables.adjustColumn',
65
+ defaultMessage: 'Adjust column',
66
+ description: 'Tooltip displayed on table column resize handle',
67
+ },
63
68
  });
@@ -1,3 +1,9 @@
1
+ import { createElement } from 'react';
2
+
3
+ import ReactDOM from 'react-dom';
4
+ import { RawIntlProvider } from 'react-intl-next';
5
+ import type { IntlShape } from 'react-intl-next';
6
+
1
7
  import type { CellAttributes } from '@atlaskit/adf-schema';
2
8
  import { nonNullable } from '@atlaskit/editor-common/utils';
3
9
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -19,6 +25,7 @@ import {
19
25
 
20
26
  import type { Cell, CellColumnPositioning } from '../types';
21
27
  import { TableCssClassName as ClassName, TableDecorations } from '../types';
28
+ import { ColumnResizeWidget } from '../ui/ColumnResizeWidget';
22
29
 
23
30
  const filterDecorationByKey = (
24
31
  key: TableDecorations,
@@ -238,7 +245,6 @@ export const updateDecorations = (
238
245
  ): DecorationSet => {
239
246
  const filteredDecorations = filterDecorationByKey(key, decorationSet);
240
247
  const decorationSetFiltered = decorationSet.remove(filteredDecorations);
241
-
242
248
  return decorationSetFiltered.add(node, decorations);
243
249
  };
244
250
 
@@ -327,6 +333,8 @@ export const createResizeHandleDecoration = (
327
333
  tr: Transaction | ReadonlyTransaction,
328
334
  rowIndexTarget: number,
329
335
  columnEndIndexTarget: Omit<CellColumnPositioning, 'left'>,
336
+ includeTooltip: boolean = false,
337
+ getIntl: () => IntlShape,
330
338
  ): [Decoration[], Decoration[]] => {
331
339
  const emptyResult: [Decoration[], Decoration[]] = [[], []];
332
340
  const table = findTable(tr.selection);
@@ -351,13 +359,27 @@ export const createResizeHandleDecoration = (
351
359
  position,
352
360
  () => {
353
361
  const element = document.createElement('div');
354
- element.classList.add(ClassName.RESIZE_HANDLE_DECORATION);
355
- element.dataset.startIndex = `${cellColumnPositioning.left}`;
356
- element.dataset.endIndex = `${cellColumnPositioning.right}`;
362
+ ReactDOM.render(
363
+ createElement(
364
+ RawIntlProvider,
365
+ { value: getIntl() },
366
+ createElement(ColumnResizeWidget, {
367
+ startIndex: cellColumnPositioning.left,
368
+ endIndex: cellColumnPositioning.right,
369
+ includeTooltip,
370
+ }),
371
+ ),
372
+ element,
373
+ );
357
374
  return element;
358
375
  },
359
376
  {
360
- key: `${TableDecorations.COLUMN_RESIZING_HANDLE}_${rowIndex}_${columnIndex}`,
377
+ key: `${
378
+ TableDecorations.COLUMN_RESIZING_HANDLE_WIDGET
379
+ }_${rowIndex}_${columnIndex}_${includeTooltip ? 'with' : 'no'}-tooltip`,
380
+ destroy: (node) => {
381
+ ReactDOM.unmountComponentAtNode(node as HTMLDivElement);
382
+ },
361
383
  },
362
384
  );
363
385
  };
@@ -0,0 +1,111 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-table"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
8
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
+ import type { Command } from '@atlaskit/editor-common/types';
10
+ import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
11
+ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
12
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
13
+ import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
14
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
15
+ import type { TableLayout } from '@atlaskit/adf-schema';
16
+ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
17
+
18
+ // @public (undocumented)
19
+ type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
20
+
21
+ // @public (undocumented)
22
+ type PermittedLayoutsDescriptor = 'all' | TableLayout[];
23
+
24
+ // @public (undocumented)
25
+ interface PluginConfig {
26
+ // (undocumented)
27
+ advanced?: boolean;
28
+ // (undocumented)
29
+ allowAddColumnWithCustomStep?: boolean;
30
+ // (undocumented)
31
+ allowBackgroundColor?: boolean;
32
+ // (undocumented)
33
+ allowCellOptionsInFloatingToolbar?: boolean;
34
+ // (undocumented)
35
+ allowCollapse?: boolean;
36
+ // (undocumented)
37
+ allowColumnResizing?: boolean;
38
+ // (undocumented)
39
+ allowColumnSorting?: boolean;
40
+ // (undocumented)
41
+ allowControls?: boolean;
42
+ // (undocumented)
43
+ allowDistributeColumns?: boolean;
44
+ // (undocumented)
45
+ allowHeaderColumn?: boolean;
46
+ // (undocumented)
47
+ allowHeaderRow?: boolean;
48
+ // (undocumented)
49
+ allowMergeCells?: boolean;
50
+ // (undocumented)
51
+ allowNumberColumn?: boolean;
52
+ // (undocumented)
53
+ initialRenderOptimization?: boolean;
54
+ // (undocumented)
55
+ isHeaderRowRequired?: boolean;
56
+ // (undocumented)
57
+ mouseMoveOptimization?: boolean;
58
+ // (undocumented)
59
+ permittedLayouts?: PermittedLayoutsDescriptor;
60
+ // (undocumented)
61
+ stickyHeaders?: boolean;
62
+ // (undocumented)
63
+ stickyHeadersOptimization?: boolean;
64
+ // (undocumented)
65
+ tableCellOptimization?: boolean;
66
+ // (undocumented)
67
+ tableOverflowShadowsOptimization?: boolean;
68
+ // (undocumented)
69
+ tableRenderOptimization?: boolean;
70
+ }
71
+
72
+ // @public (undocumented)
73
+ export type TablePlugin = NextEditorPlugin<'table', {
74
+ pluginConfiguration: TablePluginOptions | undefined;
75
+ actions: {
76
+ insertTable: InsertTableAction;
77
+ };
78
+ dependencies: [
79
+ AnalyticsPlugin,
80
+ ContentInsertionPlugin,
81
+ WidthPlugin,
82
+ GuidelinePlugin
83
+ ];
84
+ }>;
85
+
86
+ // @public (undocumented)
87
+ interface TablePluginOptions {
88
+ // (undocumented)
89
+ allowContextualMenu?: boolean;
90
+ // (undocumented)
91
+ breakoutEnabled?: boolean;
92
+ // (undocumented)
93
+ editorSelectionAPI?: EditorSelectionAPI;
94
+ // (undocumented)
95
+ fullWidthEnabled?: boolean;
96
+ // (undocumented)
97
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
98
+ // (undocumented)
99
+ tableOptions: PluginConfig;
100
+ // (undocumented)
101
+ tableResizingEnabled?: boolean;
102
+ // (undocumented)
103
+ wasFullWidthEnabled?: boolean;
104
+ }
105
+
106
+ // @public (undocumented)
107
+ export const tablesPlugin: TablePlugin;
108
+
109
+ // (No @packageDocumentation comment for this package)
110
+
111
+ ```