@atlaskit/editor-plugin-table 7.31.0 → 7.31.1

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 (66) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/commands/column-resize.js +10 -8
  3. package/dist/cjs/commands/misc.js +4 -4
  4. package/dist/cjs/event-handlers.js +69 -65
  5. package/dist/cjs/plugin.js +52 -48
  6. package/dist/cjs/pm-plugins/decorations/utils/column-resizing.js +2 -2
  7. package/dist/cjs/pm-plugins/keymap.js +18 -15
  8. package/dist/cjs/pm-plugins/main.js +2 -2
  9. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +2 -2
  10. package/dist/cjs/pm-plugins/table-resizing/plugin.js +2 -2
  11. package/dist/cjs/pm-plugins/view-mode-sort/index.js +35 -10
  12. package/dist/cjs/utils/decoration.js +28 -8
  13. package/dist/es2019/commands/column-resize.js +10 -8
  14. package/dist/es2019/commands/misc.js +4 -4
  15. package/dist/es2019/event-handlers.js +4 -4
  16. package/dist/es2019/plugin.js +12 -7
  17. package/dist/es2019/pm-plugins/decorations/utils/column-resizing.js +2 -2
  18. package/dist/es2019/pm-plugins/keymap.js +7 -4
  19. package/dist/es2019/pm-plugins/main.js +2 -2
  20. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +2 -2
  21. package/dist/es2019/pm-plugins/table-resizing/plugin.js +2 -2
  22. package/dist/es2019/pm-plugins/view-mode-sort/index.js +33 -10
  23. package/dist/es2019/utils/decoration.js +26 -9
  24. package/dist/esm/commands/column-resize.js +10 -8
  25. package/dist/esm/commands/misc.js +4 -4
  26. package/dist/esm/event-handlers.js +69 -65
  27. package/dist/esm/plugin.js +52 -48
  28. package/dist/esm/pm-plugins/decorations/utils/column-resizing.js +2 -2
  29. package/dist/esm/pm-plugins/keymap.js +18 -15
  30. package/dist/esm/pm-plugins/main.js +2 -2
  31. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +2 -2
  32. package/dist/esm/pm-plugins/table-resizing/plugin.js +2 -2
  33. package/dist/esm/pm-plugins/view-mode-sort/index.js +35 -10
  34. package/dist/esm/utils/decoration.js +28 -8
  35. package/dist/types/commands/column-resize.d.ts +5 -2
  36. package/dist/types/commands/misc.d.ts +3 -2
  37. package/dist/types/event-handlers.d.ts +2 -1
  38. package/dist/types/pm-plugins/decorations/utils/column-resizing.d.ts +2 -1
  39. package/dist/types/pm-plugins/keymap.d.ts +2 -1
  40. package/dist/types/pm-plugins/main.d.ts +1 -1
  41. package/dist/types/pm-plugins/table-resizing/event-handlers.d.ts +2 -1
  42. package/dist/types/pm-plugins/table-resizing/plugin.d.ts +2 -1
  43. package/dist/types/pm-plugins/view-mode-sort/index.d.ts +2 -1
  44. package/dist/types/utils/decoration.d.ts +2 -1
  45. package/dist/types-ts4.5/commands/column-resize.d.ts +5 -2
  46. package/dist/types-ts4.5/commands/misc.d.ts +3 -2
  47. package/dist/types-ts4.5/event-handlers.d.ts +2 -1
  48. package/dist/types-ts4.5/pm-plugins/decorations/utils/column-resizing.d.ts +2 -1
  49. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +2 -1
  50. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  51. package/dist/types-ts4.5/pm-plugins/table-resizing/event-handlers.d.ts +2 -1
  52. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin.d.ts +2 -1
  53. package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +2 -1
  54. package/dist/types-ts4.5/utils/decoration.d.ts +2 -1
  55. package/package.json +9 -5
  56. package/src/commands/column-resize.ts +18 -1
  57. package/src/commands/misc.ts +5 -0
  58. package/src/event-handlers.ts +22 -20
  59. package/src/plugin.tsx +10 -4
  60. package/src/pm-plugins/decorations/utils/column-resizing.ts +3 -0
  61. package/src/pm-plugins/keymap.ts +5 -0
  62. package/src/pm-plugins/main.ts +2 -1
  63. package/src/pm-plugins/table-resizing/event-handlers.ts +8 -1
  64. package/src/pm-plugins/table-resizing/plugin.ts +3 -0
  65. package/src/pm-plugins/view-mode-sort/index.ts +73 -34
  66. package/src/utils/decoration.ts +39 -13
@@ -19,7 +19,7 @@ var getTablePluginCommand = function getTablePluginCommand(actionPayload, origin
19
19
  return (originalTr || tr).setMeta('addToHistory', false);
20
20
  });
21
21
  };
22
- var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosition(rowIndex, columnIndex, nextResizeHandlePos) {
22
+ var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosition(rowIndex, columnIndex, nextResizeHandlePos, nodeViewPortalProviderAPI) {
23
23
  return function (state, dispatch) {
24
24
  var customTr = state.tr;
25
25
  var _getPluginState = getPluginState(state),
@@ -31,7 +31,7 @@ var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosi
31
31
  if (!allowColumnResizing) {
32
32
  return false;
33
33
  }
34
- var decorationsWithWidget = buildColumnResizingDecorations(rowIndex, columnIndex, true, getIntl)({
34
+ var decorationsWithWidget = buildColumnResizingDecorations(rowIndex, columnIndex, true, getIntl, nodeViewPortalProviderAPI)({
35
35
  tr: customTr,
36
36
  decorationSet: getDecorations(state)
37
37
  });
@@ -63,7 +63,8 @@ var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosi
63
63
  };
64
64
  export var initiateKeyboardColumnResizing = function initiateKeyboardColumnResizing(_ref) {
65
65
  var ariaNotify = _ref.ariaNotify,
66
- getIntl = _ref.getIntl;
66
+ getIntl = _ref.getIntl,
67
+ nodeViewPortalProviderAPI = _ref.nodeViewPortalProviderAPI;
67
68
  return function (state, dispatch, view) {
68
69
  var selection = state.selection;
69
70
  var selectionRect = isSelectionType(selection, 'cell') ? getSelectionRect(selection) : findCellRectClosestToPos(selection.$from);
@@ -74,7 +75,7 @@ export var initiateKeyboardColumnResizing = function initiateKeyboardColumnResiz
74
75
  });
75
76
  }
76
77
  if (selectionRect && cell && view) {
77
- return updateResizeHandleAndStatePosition(selectionRect.top, selectionRect.right, cell.pos)(state, dispatch);
78
+ return updateResizeHandleAndStatePosition(selectionRect.top, selectionRect.right, cell.pos, nodeViewPortalProviderAPI)(state, dispatch);
78
79
  }
79
80
  return false;
80
81
  };
@@ -82,7 +83,8 @@ export var initiateKeyboardColumnResizing = function initiateKeyboardColumnResiz
82
83
  export var activateNextResizeArea = function activateNextResizeArea(_ref2) {
83
84
  var direction = _ref2.direction,
84
85
  ariaNotify = _ref2.ariaNotify,
85
- getIntl = _ref2.getIntl;
86
+ getIntl = _ref2.getIntl,
87
+ nodeViewPortalProviderAPI = _ref2.nodeViewPortalProviderAPI;
86
88
  return function (state, dispatch, view) {
87
89
  var _ref3 = getTableResizingPluginState(state) || {},
88
90
  resizeHandlePos = _ref3.resizeHandlePos;
@@ -128,17 +130,17 @@ export var activateNextResizeArea = function activateNextResizeArea(_ref2) {
128
130
  // we are somewhere in between the side columns of the table
129
131
  var offset = $nextCell.pos - $nextCell.start(-1);
130
132
  var rectForNextCell = tableMap.findCell(offset);
131
- return updateResizeHandleAndStatePosition(rectForNextCell.top, rectForNextCell.right, $nextCell.pos)(state, dispatch, view);
133
+ return updateResizeHandleAndStatePosition(rectForNextCell.top, rectForNextCell.right, $nextCell.pos, nodeViewPortalProviderAPI)(state, dispatch, view);
132
134
  } else {
133
135
  // current position is in the one of the side columns of the table(left or right)
134
136
  if (currentCellRect.left === 0) {
135
137
  var lastCellInCurrentRow = tableMap.positionAt(currentCellRect.top, tableMap.width - 1, tableNode) + closestTable.start;
136
138
  var $lastCell = state.doc.resolve(lastCellInCurrentRow);
137
- return updateResizeHandleAndStatePosition(currentCellRect.top, tableMap.width, $lastCell.pos)(state, dispatch, view);
139
+ return updateResizeHandleAndStatePosition(currentCellRect.top, tableMap.width, $lastCell.pos, nodeViewPortalProviderAPI)(state, dispatch, view);
138
140
  } else if (tableMap.width === currentCellRect.right) {
139
141
  var firsCellInCurrentRow = tableMap.positionAt(currentCellRect.top, 0, tableNode) + closestTable.start;
140
142
  var _$nextCell = state.doc.resolve(firsCellInCurrentRow);
141
- return updateResizeHandleAndStatePosition(currentCellRect.top, 1, _$nextCell.pos)(state, dispatch);
143
+ return updateResizeHandleAndStatePosition(currentCellRect.top, 1, _$nextCell.pos, nodeViewPortalProviderAPI)(state, dispatch);
142
144
  }
143
145
  }
144
146
  return false;
@@ -462,7 +462,7 @@ export var hideInsertColumnOrRowButton = function hideInsertColumnOrRowButton()
462
462
  return tr.setMeta('addToHistory', false);
463
463
  });
464
464
  };
465
- export var addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, columnIndex, includeTooltip, isKeyboardResize) {
465
+ export var addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, columnIndex, includeTooltip, nodeViewPortalProviderAPI, isKeyboardResize) {
466
466
  return createCommand(function (state) {
467
467
  var tableNode = findTable(state.selection);
468
468
  var _getPluginState3 = getPluginState(state),
@@ -474,7 +474,7 @@ export var addResizeHandleDecorations = function addResizeHandleDecorations(rowI
474
474
  return {
475
475
  type: 'ADD_RESIZE_HANDLE_DECORATIONS',
476
476
  data: {
477
- decorationSet: buildColumnResizingDecorations(rowIndex, columnIndex, includeTooltip, getIntl)({
477
+ decorationSet: buildColumnResizingDecorations(rowIndex, columnIndex, includeTooltip, getIntl, nodeViewPortalProviderAPI)({
478
478
  tr: state.tr,
479
479
  decorationSet: getDecorations(state)
480
480
  }),
@@ -488,7 +488,7 @@ export var addResizeHandleDecorations = function addResizeHandleDecorations(rowI
488
488
  return tr.setMeta('addToHistory', false);
489
489
  });
490
490
  };
491
- export var updateResizeHandleDecorations = function updateResizeHandleDecorations(rowIndex, columnIndex, includeTooltip) {
491
+ export var updateResizeHandleDecorations = function updateResizeHandleDecorations(nodeViewPortalProviderAPI, rowIndex, columnIndex, includeTooltip) {
492
492
  return createCommand(function (state) {
493
493
  var tableNode = findTable(state.selection);
494
494
  var _getPluginState4 = getPluginState(state),
@@ -509,7 +509,7 @@ export var updateResizeHandleDecorations = function updateResizeHandleDecoration
509
509
  return {
510
510
  type: 'UPDATE_RESIZE_HANDLE_DECORATIONS',
511
511
  data: {
512
- decorationSet: buildColumnResizingDecorations(resolvedRowIndex, resolvedColumnIndex, resolvedIncludeTooltip, getIntl)({
512
+ decorationSet: buildColumnResizingDecorations(resolvedRowIndex, resolvedColumnIndex, resolvedIncludeTooltip, getIntl, nodeViewPortalProviderAPI)({
513
513
  tr: state.tr,
514
514
  decorationSet: getDecorations(state)
515
515
  }),
@@ -245,78 +245,82 @@ export var handleMouseLeave = function handleMouseLeave(view, event) {
245
245
 
246
246
  // IMPORTANT: The mouse move handler has been setup with RAF schedule to avoid Reflows which will occur as some methods
247
247
  // need to access the mouse event offset position and also the target clientWidth vallue.
248
- var handleMouseMoveDebounce = rafSchedule(function (view, event, offsetX) {
249
- if (!(event.target instanceof HTMLElement)) {
250
- return false;
251
- }
252
- var element = event.target;
253
- if (isColumnControlsDecorations(element) || isDragColumnFloatingInsertDot(element)) {
254
- var state = view.state,
255
- dispatch = view.dispatch;
256
- var _getPluginState6 = getPluginState(state),
257
- insertColumnButtonIndex = _getPluginState6.insertColumnButtonIndex;
258
- var _getColumnOrRowIndex9 = getColumnOrRowIndex(element),
259
- _getColumnOrRowIndex10 = _slicedToArray(_getColumnOrRowIndex9, 2),
260
- startIndex = _getColumnOrRowIndex10[0],
261
- endIndex = _getColumnOrRowIndex10[1];
262
- var positionColumn = getMousePositionHorizontalRelativeByElement(event, offsetX, undefined) === 'right' ? endIndex : startIndex;
263
- if (positionColumn !== insertColumnButtonIndex) {
264
- return showInsertColumnButton(positionColumn)(state, dispatch);
248
+ var handleMouseMoveDebounce = function handleMouseMoveDebounce(nodeViewPortalProviderAPI) {
249
+ return rafSchedule(function (view, event, offsetX) {
250
+ if (!(event.target instanceof HTMLElement)) {
251
+ return false;
265
252
  }
266
- }
267
- if (isRowControlsButton(element) || isDragRowFloatingInsertDot(element)) {
268
- var _state3 = view.state,
269
- _dispatch4 = view.dispatch;
270
- var _getPluginState7 = getPluginState(_state3),
271
- insertRowButtonIndex = _getPluginState7.insertRowButtonIndex;
272
- var _getColumnOrRowIndex11 = getColumnOrRowIndex(element),
273
- _getColumnOrRowIndex12 = _slicedToArray(_getColumnOrRowIndex11, 2),
274
- _startIndex3 = _getColumnOrRowIndex12[0],
275
- _endIndex2 = _getColumnOrRowIndex12[1];
276
- var positionRow = getMousePositionVerticalRelativeByElement(event) === 'bottom' ? _endIndex2 : _startIndex3;
277
- if (positionRow !== insertRowButtonIndex) {
278
- return showInsertRowButton(positionRow)(_state3, _dispatch4);
253
+ var element = event.target;
254
+ if (isColumnControlsDecorations(element) || isDragColumnFloatingInsertDot(element)) {
255
+ var state = view.state,
256
+ dispatch = view.dispatch;
257
+ var _getPluginState6 = getPluginState(state),
258
+ insertColumnButtonIndex = _getPluginState6.insertColumnButtonIndex;
259
+ var _getColumnOrRowIndex9 = getColumnOrRowIndex(element),
260
+ _getColumnOrRowIndex10 = _slicedToArray(_getColumnOrRowIndex9, 2),
261
+ startIndex = _getColumnOrRowIndex10[0],
262
+ endIndex = _getColumnOrRowIndex10[1];
263
+ var positionColumn = getMousePositionHorizontalRelativeByElement(event, offsetX, undefined) === 'right' ? endIndex : startIndex;
264
+ if (positionColumn !== insertColumnButtonIndex) {
265
+ return showInsertColumnButton(positionColumn)(state, dispatch);
266
+ }
279
267
  }
280
- }
281
- if (!isResizeHandleDecoration(element) && isCell(element)) {
282
- var _positionColumn = getMousePositionHorizontalRelativeByElement(event, offsetX, RESIZE_HANDLE_AREA_DECORATION_GAP);
283
- if (_positionColumn !== null) {
284
- var _state4 = view.state,
285
- _dispatch5 = view.dispatch;
286
- var _getPluginState8 = getPluginState(_state4),
287
- resizeHandleColumnIndex = _getPluginState8.resizeHandleColumnIndex,
288
- resizeHandleRowIndex = _getPluginState8.resizeHandleRowIndex;
289
- var isKeyboardResize = getPluginState(_state4).isKeyboardResize;
290
- var tableCell = closestElement(element, 'td, th');
291
- var cellStartPosition = view.posAtDOM(tableCell, 0);
292
- var rect = findCellRectClosestToPos(_state4.doc.resolve(cellStartPosition));
293
- if (rect) {
294
- var columnEndIndexTarget = _positionColumn === 'left' ? rect.left : rect.right;
295
- var rowIndexTarget = rect.top;
296
- if ((columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !hasResizeHandler({
297
- target: element,
298
- columnEndIndexTarget: columnEndIndexTarget
299
- })) && !isKeyboardResize // if initiated by keyboard don't need to react on hover for other resize sliders
300
- ) {
301
- return addResizeHandleDecorations(rowIndexTarget, columnEndIndexTarget, true)(_state4, _dispatch5);
268
+ if (isRowControlsButton(element) || isDragRowFloatingInsertDot(element)) {
269
+ var _state3 = view.state,
270
+ _dispatch4 = view.dispatch;
271
+ var _getPluginState7 = getPluginState(_state3),
272
+ insertRowButtonIndex = _getPluginState7.insertRowButtonIndex;
273
+ var _getColumnOrRowIndex11 = getColumnOrRowIndex(element),
274
+ _getColumnOrRowIndex12 = _slicedToArray(_getColumnOrRowIndex11, 2),
275
+ _startIndex3 = _getColumnOrRowIndex12[0],
276
+ _endIndex2 = _getColumnOrRowIndex12[1];
277
+ var positionRow = getMousePositionVerticalRelativeByElement(event) === 'bottom' ? _endIndex2 : _startIndex3;
278
+ if (positionRow !== insertRowButtonIndex) {
279
+ return showInsertRowButton(positionRow)(_state3, _dispatch4);
280
+ }
281
+ }
282
+ if (!isResizeHandleDecoration(element) && isCell(element)) {
283
+ var _positionColumn = getMousePositionHorizontalRelativeByElement(event, offsetX, RESIZE_HANDLE_AREA_DECORATION_GAP);
284
+ if (_positionColumn !== null) {
285
+ var _state4 = view.state,
286
+ _dispatch5 = view.dispatch;
287
+ var _getPluginState8 = getPluginState(_state4),
288
+ resizeHandleColumnIndex = _getPluginState8.resizeHandleColumnIndex,
289
+ resizeHandleRowIndex = _getPluginState8.resizeHandleRowIndex;
290
+ var isKeyboardResize = getPluginState(_state4).isKeyboardResize;
291
+ var tableCell = closestElement(element, 'td, th');
292
+ var cellStartPosition = view.posAtDOM(tableCell, 0);
293
+ var rect = findCellRectClosestToPos(_state4.doc.resolve(cellStartPosition));
294
+ if (rect) {
295
+ var columnEndIndexTarget = _positionColumn === 'left' ? rect.left : rect.right;
296
+ var rowIndexTarget = rect.top;
297
+ if ((columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !hasResizeHandler({
298
+ target: element,
299
+ columnEndIndexTarget: columnEndIndexTarget
300
+ })) && !isKeyboardResize // if initiated by keyboard don't need to react on hover for other resize sliders
301
+ ) {
302
+ return addResizeHandleDecorations(rowIndexTarget, columnEndIndexTarget, true, nodeViewPortalProviderAPI)(_state4, _dispatch5);
303
+ }
302
304
  }
303
305
  }
304
306
  }
305
- }
306
- return false;
307
- });
308
- export var handleMouseMove = function handleMouseMove(view, event) {
309
- if (!(event.target instanceof HTMLElement)) {
310
307
  return false;
311
- }
308
+ });
309
+ };
310
+ export var handleMouseMove = function handleMouseMove(nodeViewPortalProviderAPI) {
311
+ return function (view, event) {
312
+ if (!(event.target instanceof HTMLElement)) {
313
+ return false;
314
+ }
312
315
 
313
- // NOTE: When accessing offsetX in gecko from a deferred callback, it will return 0. However it will be non-zero if accessed
314
- // within the scope of it's initial mouse move handler. Also Chrome does return the correct value, however it could trigger
315
- // a reflow. So for now this will just grab the offsetX value immediately for gecko and chrome will calculate later
316
- // in the deferred callback handler.
317
- // Bug Tracking: https://bugzilla.mozilla.org/show_bug.cgi?id=1882903
318
- handleMouseMoveDebounce(view, event, browser.gecko ? event.offsetX : NaN);
319
- return false;
316
+ // NOTE: When accessing offsetX in gecko from a deferred callback, it will return 0. However it will be non-zero if accessed
317
+ // within the scope of it's initial mouse move handler. Also Chrome does return the correct value, however it could trigger
318
+ // a reflow. So for now this will just grab the offsetX value immediately for gecko and chrome will calculate later
319
+ // in the deferred callback handler.
320
+ // Bug Tracking: https://bugzilla.mozilla.org/show_bug.cgi?id=1882903
321
+ handleMouseMoveDebounce(nodeViewPortalProviderAPI)(view, event, browser.gecko ? event.offsetX : NaN);
322
+ return false;
323
+ };
320
324
  };
321
325
  export function handleTripleClick(view, pos) {
322
326
  var state = view.state,
@@ -201,6 +201,7 @@ var tablesPlugin = function tablesPlugin(_ref) {
201
201
  var dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
202
202
  dispatch = _ref2.dispatch,
203
203
  portalProviderAPI = _ref2.portalProviderAPI,
204
+ nodeViewPortalProviderAPI = _ref2.nodeViewPortalProviderAPI,
204
205
  eventDispatcher = _ref2.eventDispatcher,
205
206
  getIntl = _ref2.getIntl;
206
207
  var _ref3 = options || {},
@@ -214,12 +215,13 @@ var tablesPlugin = function tablesPlugin(_ref) {
214
215
  isTableAlignmentEnabled = _ref3.isTableAlignmentEnabled,
215
216
  isCommentEditor = _ref3.isCommentEditor,
216
217
  isChromelessEditor = _ref3.isChromelessEditor;
217
- return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, getIntl, tableResizingEnabled, fullWidthEnabled, wasFullWidthEnabled, dragAndDropEnabled, editorAnalyticsAPI, api, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor);
218
+ return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, getIntl, tableResizingEnabled, fullWidthEnabled, wasFullWidthEnabled, dragAndDropEnabled, editorAnalyticsAPI, api, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor);
218
219
  }
219
220
  }, {
220
221
  name: 'tablePMColResizing',
221
222
  plugin: function plugin(_ref4) {
222
- var dispatch = _ref4.dispatch;
223
+ var dispatch = _ref4.dispatch,
224
+ nodeViewPortalProviderAPI = _ref4.nodeViewPortalProviderAPI;
223
225
  var _ref5 = options || {},
224
226
  fullWidthEnabled = _ref5.fullWidthEnabled,
225
227
  tableOptions = _ref5.tableOptions,
@@ -231,7 +233,7 @@ var tablesPlugin = function tablesPlugin(_ref) {
231
233
  allowColumnResizing = _pluginConfig2.allowColumnResizing;
232
234
  return allowColumnResizing ? createFlexiResizingPlugin(dispatch, {
233
235
  lastColumnResizable: !fullWidthEnabled
234
- }, defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, api, editorAnalyticsAPI, isTableScalingEnabled || false, isNewColumnResizingEnabled, isTableAlignmentEnabled, !!(options !== null && options !== void 0 && options.isCommentEditor)) : undefined;
236
+ }, defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isTableScalingEnabled || false, isNewColumnResizingEnabled, isTableAlignmentEnabled, !!(options !== null && options !== void 0 && options.isCommentEditor)) : undefined;
235
237
  }
236
238
  }, {
237
239
  name: 'tableEditing',
@@ -244,7 +246,8 @@ var tablesPlugin = function tablesPlugin(_ref) {
244
246
  {
245
247
  name: 'tableKeymap',
246
248
  plugin: function plugin(_ref6) {
247
- var getIntl = _ref6.getIntl;
249
+ var getIntl = _ref6.getIntl,
250
+ nodeViewPortalProviderAPI = _ref6.nodeViewPortalProviderAPI;
248
251
  var _ref7 = options || {},
249
252
  dragAndDropEnabled = _ref7.dragAndDropEnabled,
250
253
  _ref7$isTableScalingE = _ref7.isTableScalingEnabled,
@@ -259,7 +262,7 @@ var tablesPlugin = function tablesPlugin(_ref) {
259
262
  isChromelessEditor = _ref7$isChromelessEdi === void 0 ? false : _ref7$isChromelessEdi,
260
263
  _ref7$tableResizingEn = _ref7.tableResizingEnabled,
261
264
  tableResizingEnabled = _ref7$tableResizingEn === void 0 ? false : _ref7$tableResizingEn;
262
- return keymapPlugin(defaultGetEditorContainerWidth, api, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, isTableAlignmentEnabled, fullWidthEnabled, api, getIntl, isCellBackgroundDuplicated, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, tableResizingEnabled);
265
+ return keymapPlugin(defaultGetEditorContainerWidth, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, isTableAlignmentEnabled, fullWidthEnabled, api, getIntl, isCellBackgroundDuplicated, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, tableResizingEnabled);
263
266
  }
264
267
  }, {
265
268
  name: 'tableSelectionKeymap',
@@ -306,45 +309,46 @@ var tablesPlugin = function tablesPlugin(_ref) {
306
309
  }
307
310
  }, {
308
311
  name: 'tableViewModeSort',
309
- plugin: function plugin() {
310
- return api !== null && api !== void 0 && api.editorViewMode ? createViewModeSortPlugin(api) : undefined;
312
+ plugin: function plugin(_ref13) {
313
+ var nodeViewPortalProviderAPI = _ref13.nodeViewPortalProviderAPI;
314
+ return api !== null && api !== void 0 && api.editorViewMode ? createViewModeSortPlugin(api, nodeViewPortalProviderAPI) : undefined;
311
315
  }
312
316
  }, {
313
317
  name: 'tableLocalId',
314
- plugin: function plugin(_ref13) {
315
- var dispatch = _ref13.dispatch;
318
+ plugin: function plugin(_ref14) {
319
+ var dispatch = _ref14.dispatch;
316
320
  return createTableLocalIdPlugin(dispatch);
317
321
  }
318
322
  }, {
319
323
  name: 'tableWidth',
320
- plugin: function plugin(_ref14) {
324
+ plugin: function plugin(_ref15) {
321
325
  var _options$fullWidthEna, _options$isTableScali, _options$isTableAlign, _options$isCommentEdi;
322
- var dispatchAnalyticsEvent = _ref14.dispatchAnalyticsEvent,
323
- dispatch = _ref14.dispatch;
326
+ var dispatchAnalyticsEvent = _ref15.dispatchAnalyticsEvent,
327
+ dispatch = _ref15.dispatch;
324
328
  return options !== null && options !== void 0 && options.tableResizingEnabled ? createTableWidthPlugin(dispatch, dispatchAnalyticsEvent, (_options$fullWidthEna = options === null || options === void 0 ? void 0 : options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false, (_options$isTableScali = options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) !== null && _options$isTableScali !== void 0 ? _options$isTableScali : false, (_options$isTableAlign = options === null || options === void 0 ? void 0 : options.isTableAlignmentEnabled) !== null && _options$isTableAlign !== void 0 ? _options$isTableAlign : false, (_options$isCommentEdi = options === null || options === void 0 ? void 0 : options.isCommentEditor) !== null && _options$isCommentEdi !== void 0 ? _options$isCommentEdi : false) : undefined;
325
329
  }
326
330
  }, {
327
331
  name: 'tableWidthInCommentFix',
328
- plugin: function plugin(_ref15) {
332
+ plugin: function plugin(_ref16) {
329
333
  var _options$isTableAlign2;
330
- var dispatch = _ref15.dispatch;
334
+ var dispatch = _ref16.dispatch;
331
335
  return options !== null && options !== void 0 && options.tableResizingEnabled && options !== null && options !== void 0 && options.isCommentEditor ? createTableWidthInCommentFixPlugin(dispatch, (_options$isTableAlign2 = options === null || options === void 0 ? void 0 : options.isTableAlignmentEnabled) !== null && _options$isTableAlign2 !== void 0 ? _options$isTableAlign2 : false) : undefined;
332
336
  }
333
337
  },
334
338
  // TODO: should be deprecated and eventually replaced with 'tableAnalyticsPlugin'
335
339
  {
336
340
  name: 'tableOverflowAnalyticsPlugin',
337
- plugin: function plugin(_ref16) {
341
+ plugin: function plugin(_ref17) {
338
342
  var _options$tableResizin;
339
- var dispatch = _ref16.dispatch,
340
- dispatchAnalyticsEvent = _ref16.dispatchAnalyticsEvent;
343
+ var dispatch = _ref17.dispatch,
344
+ dispatchAnalyticsEvent = _ref17.dispatchAnalyticsEvent;
341
345
  return createTableOverflowAnalyticsPlugin(dispatch, dispatchAnalyticsEvent, (_options$tableResizin = options === null || options === void 0 ? void 0 : options.tableResizingEnabled) !== null && _options$tableResizin !== void 0 ? _options$tableResizin : false);
342
346
  }
343
347
  }, {
344
348
  name: 'tableAnalyticsPlugin',
345
- plugin: function plugin(_ref17) {
346
- var dispatch = _ref17.dispatch,
347
- dispatchAnalyticsEvent = _ref17.dispatchAnalyticsEvent;
349
+ plugin: function plugin(_ref18) {
350
+ var dispatch = _ref18.dispatch,
351
+ dispatchAnalyticsEvent = _ref18.dispatchAnalyticsEvent;
348
352
  return createTableAnalyticsPlugin(dispatch, dispatchAnalyticsEvent);
349
353
  }
350
354
  }, {
@@ -375,13 +379,13 @@ var tablesPlugin = function tablesPlugin(_ref) {
375
379
  }
376
380
  return plugins;
377
381
  },
378
- contentComponent: function contentComponent(_ref18) {
382
+ contentComponent: function contentComponent(_ref19) {
379
383
  var _api$featureFlags;
380
- var editorView = _ref18.editorView,
381
- popupsMountPoint = _ref18.popupsMountPoint,
382
- popupsBoundariesElement = _ref18.popupsBoundariesElement,
383
- popupsScrollableElement = _ref18.popupsScrollableElement,
384
- dispatchAnalyticsEvent = _ref18.dispatchAnalyticsEvent;
384
+ var editorView = _ref19.editorView,
385
+ popupsMountPoint = _ref19.popupsMountPoint,
386
+ popupsBoundariesElement = _ref19.popupsBoundariesElement,
387
+ popupsScrollableElement = _ref19.popupsScrollableElement,
388
+ dispatchAnalyticsEvent = _ref19.dispatchAnalyticsEvent;
385
389
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
386
390
  component: ACTION_SUBJECT.TABLES_PLUGIN,
387
391
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
@@ -397,32 +401,32 @@ var tablesPlugin = function tablesPlugin(_ref) {
397
401
  stickyHeadersState: stickyHeadersPluginKey,
398
402
  dragAndDropState: dragAndDropPluginKey
399
403
  },
400
- render: function render(_ref19) {
401
- var resizingPluginState = _ref19.tableResizingPluginState,
402
- stickyHeadersState = _ref19.stickyHeadersState,
403
- tablePluginState = _ref19.tablePluginState,
404
- tableWidthPluginState = _ref19.tableWidthPluginState,
405
- dragAndDropState = _ref19.dragAndDropState;
404
+ render: function render(_ref20) {
405
+ var resizingPluginState = _ref20.tableResizingPluginState,
406
+ stickyHeadersState = _ref20.stickyHeadersState,
407
+ tablePluginState = _ref20.tablePluginState,
408
+ tableWidthPluginState = _ref20.tableWidthPluginState,
409
+ dragAndDropState = _ref20.dragAndDropState;
406
410
  var isColumnResizing = resizingPluginState === null || resizingPluginState === void 0 ? void 0 : resizingPluginState.dragging;
407
411
  var isTableResizing = tableWidthPluginState === null || tableWidthPluginState === void 0 ? void 0 : tableWidthPluginState.resizing;
408
412
  var resizingTableLocalId = tableWidthPluginState === null || tableWidthPluginState === void 0 ? void 0 : tableWidthPluginState.tableLocalId;
409
413
  var resizingTableRef = tableWidthPluginState === null || tableWidthPluginState === void 0 ? void 0 : tableWidthPluginState.tableRef;
410
414
  var isResizing = isColumnResizing || isTableResizing;
411
415
  var widthToWidest = tablePluginState === null || tablePluginState === void 0 ? void 0 : tablePluginState.widthToWidest;
412
- var _ref20 = tablePluginState,
413
- tableNode = _ref20.tableNode,
414
- tablePos = _ref20.tablePos,
415
- targetCellPosition = _ref20.targetCellPosition,
416
- isContextualMenuOpen = _ref20.isContextualMenuOpen,
417
- tableRef = _ref20.tableRef,
418
- pluginConfig = _ref20.pluginConfig,
419
- insertColumnButtonIndex = _ref20.insertColumnButtonIndex,
420
- insertRowButtonIndex = _ref20.insertRowButtonIndex,
421
- isHeaderColumnEnabled = _ref20.isHeaderColumnEnabled,
422
- isHeaderRowEnabled = _ref20.isHeaderRowEnabled,
423
- isDragAndDropEnabled = _ref20.isDragAndDropEnabled,
424
- tableWrapperTarget = _ref20.tableWrapperTarget,
425
- isCellMenuOpenByKeyboard = _ref20.isCellMenuOpenByKeyboard;
416
+ var _ref21 = tablePluginState,
417
+ tableNode = _ref21.tableNode,
418
+ tablePos = _ref21.tablePos,
419
+ targetCellPosition = _ref21.targetCellPosition,
420
+ isContextualMenuOpen = _ref21.isContextualMenuOpen,
421
+ tableRef = _ref21.tableRef,
422
+ pluginConfig = _ref21.pluginConfig,
423
+ insertColumnButtonIndex = _ref21.insertColumnButtonIndex,
424
+ insertRowButtonIndex = _ref21.insertRowButtonIndex,
425
+ isHeaderColumnEnabled = _ref21.isHeaderColumnEnabled,
426
+ isHeaderRowEnabled = _ref21.isHeaderRowEnabled,
427
+ isDragAndDropEnabled = _ref21.isDragAndDropEnabled,
428
+ tableWrapperTarget = _ref21.tableWrapperTarget,
429
+ isCellMenuOpenByKeyboard = _ref21.isCellMenuOpenByKeyboard;
426
430
  var allowControls = pluginConfig.allowControls;
427
431
  var stickyHeader = stickyHeadersState ? findStickyHeaderForTable(stickyHeadersState, tablePos) : undefined;
428
432
  return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
@@ -515,8 +519,8 @@ var tablesPlugin = function tablesPlugin(_ref) {
515
519
  }));
516
520
  },
517
521
  pluginsOptions: {
518
- quickInsert: function quickInsert(_ref21) {
519
- var formatMessage = _ref21.formatMessage;
522
+ quickInsert: function quickInsert(_ref22) {
523
+ var formatMessage = _ref22.formatMessage;
520
524
  return [{
521
525
  id: 'table',
522
526
  title: formatMessage(messages.table),
@@ -17,13 +17,13 @@ var updateLastCellElement = function updateLastCellElement(lastCellElementsDecor
17
17
  return updateDecorations(tr.doc, decorationSet, lastCellElementsDecorations, TableDecorations.LAST_CELL_ELEMENT);
18
18
  };
19
19
  };
20
- export var buildColumnResizingDecorations = function buildColumnResizingDecorations(rowEndIndex, columnEndIndex, includeTooltip, getIntl) {
20
+ export var buildColumnResizingDecorations = function buildColumnResizingDecorations(rowEndIndex, columnEndIndex, includeTooltip, getIntl, nodeViewPortalProviderAPI) {
21
21
  return function (_ref3) {
22
22
  var tr = _ref3.tr,
23
23
  decorationSet = _ref3.decorationSet;
24
24
  var _ref4 = columnEndIndex < 0 ? emptyDecorations : createResizeHandleDecoration(tr, rowEndIndex, {
25
25
  right: columnEndIndex
26
- }, includeTooltip, getIntl),
26
+ }, includeTooltip, getIntl, nodeViewPortalProviderAPI),
27
27
  _ref5 = _slicedToArray(_ref4, 2),
28
28
  columnResizesDecorations = _ref5[0],
29
29
  lastCellElementsDecorations = _ref5[1];
@@ -7,19 +7,19 @@ import { addRowAroundSelection, changeColumnWidthByStepWithAnalytics, deleteSele
7
7
  import { activateNextResizeArea, initiateKeyboardColumnResizing, stopKeyboardColumnResizing } from '../commands/column-resize';
8
8
  import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand, createTable } from '../commands/insert';
9
9
  import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/commands-with-analytics';
10
- export function keymapPlugin(getEditorContainerWidth, api, editorAnalyticsAPI, dragAndDropEnabled) {
10
+ export function keymapPlugin(getEditorContainerWidth, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, dragAndDropEnabled) {
11
11
  var _pluginInjectionApi$a;
12
- var isTableScalingEnabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
13
- var isTableAlignmentEnabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
14
- var isFullWidthEnabled = arguments.length > 6 ? arguments[6] : undefined;
15
- var pluginInjectionApi = arguments.length > 7 ? arguments[7] : undefined;
16
- var getIntl = arguments.length > 8 ? arguments[8] : undefined;
17
- var isCellBackgroundDuplicated = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
18
- var isTableFixedColumnWidthsOptionEnabled = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;
19
- var shouldUseIncreasedScalingPercent = arguments.length > 11 ? arguments[11] : undefined;
20
- var isCommentEditor = arguments.length > 12 ? arguments[12] : undefined;
21
- var isChromelessEditor = arguments.length > 13 ? arguments[13] : undefined;
22
- var isTableResizingEnabled = arguments.length > 14 ? arguments[14] : undefined;
12
+ var isTableScalingEnabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
13
+ var isTableAlignmentEnabled = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
14
+ var isFullWidthEnabled = arguments.length > 7 ? arguments[7] : undefined;
15
+ var pluginInjectionApi = arguments.length > 8 ? arguments[8] : undefined;
16
+ var getIntl = arguments.length > 9 ? arguments[9] : undefined;
17
+ var isCellBackgroundDuplicated = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;
18
+ var isTableFixedColumnWidthsOptionEnabled = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : false;
19
+ var shouldUseIncreasedScalingPercent = arguments.length > 12 ? arguments[12] : undefined;
20
+ var isCommentEditor = arguments.length > 13 ? arguments[13] : undefined;
21
+ var isChromelessEditor = arguments.length > 14 ? arguments[14] : undefined;
22
+ var isTableResizingEnabled = arguments.length > 15 ? arguments[15] : undefined;
23
23
  var list = {};
24
24
  var ariaNotifyPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.accessibilityUtils) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions.ariaNotify;
25
25
  bindKeymapWithCommand(nextCell.common, goToNextCell(editorAnalyticsAPI, ariaNotifyPlugin, getIntl)(1), list);
@@ -57,17 +57,20 @@ export function keymapPlugin(getEditorContainerWidth, api, editorAnalyticsAPI, d
57
57
  }
58
58
  bindKeymapWithCommand(startColumnResizing.common, initiateKeyboardColumnResizing({
59
59
  ariaNotify: ariaNotifyPlugin,
60
- getIntl: getIntl
60
+ getIntl: getIntl,
61
+ nodeViewPortalProviderAPI: nodeViewPortalProviderAPI
61
62
  }), list);
62
63
  bindKeymapWithCommand(moveRight.common, activateNextResizeArea({
63
64
  direction: 1,
64
65
  ariaNotify: ariaNotifyPlugin,
65
- getIntl: getIntl
66
+ getIntl: getIntl,
67
+ nodeViewPortalProviderAPI: nodeViewPortalProviderAPI
66
68
  }), list);
67
69
  bindKeymapWithCommand(moveLeft.common, activateNextResizeArea({
68
70
  direction: -1,
69
71
  ariaNotify: ariaNotifyPlugin,
70
- getIntl: getIntl
72
+ getIntl: getIntl,
73
+ nodeViewPortalProviderAPI: nodeViewPortalProviderAPI
71
74
  }), list);
72
75
  bindKeymapWithCommand(decreaseMediaSize.common, changeColumnWidthByStepWithAnalytics(editorAnalyticsAPI, api)(-10, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, !!isCommentEditor, INPUT_METHOD.SHORTCUT, ariaNotifyPlugin, getIntl), list);
73
76
  bindKeymapWithCommand(increaseMediaSize.common, changeColumnWidthByStepWithAnalytics(editorAnalyticsAPI, api)(10, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, !!isCommentEditor, INPUT_METHOD.SHORTCUT, ariaNotifyPlugin, getIntl), list);
@@ -22,7 +22,7 @@ import { isHeaderRowRequired, transformSliceTableLayoutDefaultToCenter } from '.
22
22
  import { defaultHoveredCell, defaultTableSelection } from './default-table-selection';
23
23
  import { createPluginState, getPluginState } from './plugin-factory';
24
24
  import { pluginKey } from './plugin-key';
25
- export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, getIntl, tableResizingEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled, dragAndDropEnabled, editorAnalyticsAPI, pluginInjectionApi, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor) {
25
+ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, getIntl, tableResizingEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled, dragAndDropEnabled, editorAnalyticsAPI, pluginInjectionApi, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor) {
26
26
  var _accessibilityUtils;
27
27
  var state = createPluginState(dispatch, _objectSpread(_objectSpread(_objectSpread({
28
28
  pluginConfig: pluginConfig,
@@ -278,7 +278,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
278
278
  blur: handleBlur,
279
279
  mousedown: withCellTracking(handleMouseDown),
280
280
  mouseleave: handleMouseLeave,
281
- mousemove: whenTableInFocus(handleMouseMove),
281
+ mousemove: whenTableInFocus(handleMouseMove(nodeViewPortalProviderAPI)),
282
282
  mouseenter: handleMouseEnter,
283
283
  mouseup: whenTableInFocus(handleMouseUp),
284
284
  click: withCellTracking(whenTableInFocus(handleClick))
@@ -18,7 +18,7 @@ import { currentColWidth, getResizeState, getTableMaxWidth, pointsAtCell, resize
18
18
  import { TABLE_OFFSET_IN_COMMENT_EDITOR } from './utils/consts';
19
19
  import { getScalingPercentForTableWithoutWidth, getTableScalingPercent } from './utils/misc';
20
20
  import { scaleResizeState } from './utils/resize-column';
21
- export var handleMouseDown = function handleMouseDown(view, event, localResizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, isTableScalingEnabled, api, editorAnalyticsAPI, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor) {
21
+ export var handleMouseDown = function handleMouseDown(view, event, localResizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, isTableScalingEnabled, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor) {
22
22
  var _originalTable$attrs;
23
23
  var state = view.state,
24
24
  dispatch = view.dispatch;
@@ -103,7 +103,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
103
103
 
104
104
  // When we start resizing a column we need to ensure the underlying tooltip is removed from the decoration to avoid
105
105
  // unnecessary tooltips being displayed during drag.
106
- updateResizeHandleDecorations(undefined, undefined, false)(state, dispatch);
106
+ updateResizeHandleDecorations(nodeViewPortalProviderAPI, undefined, undefined, false)(state, dispatch);
107
107
 
108
108
  // for new column resizing, take the current scaled version of table widths and use those as the basis for resizing
109
109
  // implication: the scaled version of the table becomes the source of truth
@@ -8,7 +8,7 @@ import { handleMouseDown } from './event-handlers';
8
8
  import { createPluginState, getPluginState } from './plugin-factory';
9
9
  import { pluginKey } from './plugin-key';
10
10
  import { getResizeCellPos } from './utils';
11
- export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorFeatureFlags, api, editorAnalyticsAPI, isTableScalingEnabled, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor) {
11
+ export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorFeatureFlags, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isTableScalingEnabled, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor) {
12
12
  var _ref$lastColumnResiza = _ref.lastColumnResizable,
13
13
  lastColumnResizable = _ref$lastColumnResiza === void 0 ? true : _ref$lastColumnResiza;
14
14
  return new SafePlugin({
@@ -46,7 +46,7 @@ export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorF
46
46
  isColumnKeyboardResizeStarted = isKeyboardResize;
47
47
  }
48
48
  if (resizeHandlePos !== null && (!dragging || isColumnKeyboardResizeStarted)) {
49
- if (handleMouseDown(view, event, resizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, isTableScalingEnabled || false, api, editorAnalyticsAPI, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor)) {
49
+ if (handleMouseDown(view, event, resizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, isTableScalingEnabled || false, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isNewColumnResizingEnabled, isTableAlignmentEnabled, isCommentEditor)) {
50
50
  var _state = view.state,
51
51
  _dispatch = view.dispatch;
52
52
  return setResizeHandlePos(resizeHandlePos)(_state, _dispatch);