@atlaskit/editor-plugin-table 8.4.14 → 9.0.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 (97) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +9 -84
  3. package/dist/cjs/pm-plugins/table-resizing/plugin.js +2 -2
  4. package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +3 -144
  5. package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +1 -2
  6. package/dist/cjs/pm-plugins/view-mode-sort/utils.js +3 -0
  7. package/dist/cjs/tablePlugin.js +3 -5
  8. package/dist/cjs/ui/DragPreview/index.js +1 -0
  9. package/dist/cjs/ui/FloatingContextualButton/index.js +1 -2
  10. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
  11. package/dist/cjs/ui/toolbar.js +1 -4
  12. package/dist/es2019/nodeviews/TableContainer.js +1 -1
  13. package/dist/es2019/pm-plugins/commands/column-resize.js +1 -1
  14. package/dist/es2019/pm-plugins/commands/insert.js +3 -3
  15. package/dist/es2019/pm-plugins/commands/misc.js +1 -1
  16. package/dist/es2019/pm-plugins/drag-and-drop/commands.js +1 -1
  17. package/dist/es2019/pm-plugins/table-analytics.js +1 -1
  18. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +12 -84
  19. package/dist/es2019/pm-plugins/table-resizing/plugin.js +2 -2
  20. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +2 -2
  21. package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +2 -139
  22. package/dist/es2019/pm-plugins/table-resizing/utils/resize-logic.js +1 -1
  23. package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +1 -2
  24. package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +1 -1
  25. package/dist/es2019/pm-plugins/transforms/delete-columns.js +1 -1
  26. package/dist/es2019/pm-plugins/transforms/fix-tables.js +1 -1
  27. package/dist/es2019/pm-plugins/transforms/replace-table.js +1 -1
  28. package/dist/es2019/pm-plugins/transforms/split.js +2 -2
  29. package/dist/es2019/pm-plugins/utils/analytics.js +4 -4
  30. package/dist/es2019/pm-plugins/utils/column-controls.js +1 -1
  31. package/dist/es2019/pm-plugins/utils/drag-menu.js +1 -1
  32. package/dist/es2019/pm-plugins/utils/merged-cells.js +4 -4
  33. package/dist/es2019/pm-plugins/utils/nodes.js +3 -3
  34. package/dist/es2019/pm-plugins/utils/row-controls.js +2 -2
  35. package/dist/es2019/pm-plugins/view-mode-sort/index.js +2 -2
  36. package/dist/es2019/pm-plugins/view-mode-sort/utils.js +4 -1
  37. package/dist/es2019/tablePlugin.js +3 -5
  38. package/dist/es2019/ui/DragPreview/index.js +4 -3
  39. package/dist/es2019/ui/FloatingContextualButton/index.js +1 -2
  40. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  41. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +4 -4
  42. package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +2 -2
  43. package/dist/es2019/ui/toolbar.js +1 -4
  44. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +11 -85
  45. package/dist/esm/pm-plugins/table-resizing/plugin.js +2 -2
  46. package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +2 -143
  47. package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +1 -2
  48. package/dist/esm/pm-plugins/view-mode-sort/utils.js +3 -0
  49. package/dist/esm/tablePlugin.js +3 -5
  50. package/dist/esm/ui/DragPreview/index.js +1 -0
  51. package/dist/esm/ui/FloatingContextualButton/index.js +1 -2
  52. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
  53. package/dist/esm/ui/toolbar.js +1 -4
  54. package/dist/types/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  55. package/dist/types/pm-plugins/table-resizing/plugin.d.ts +1 -1
  56. package/dist/types/pm-plugins/table-resizing/utils/resize-column.d.ts +0 -24
  57. package/dist/types/tablePluginType.d.ts +0 -1
  58. package/dist/types-ts4.5/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  59. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin.d.ts +1 -1
  60. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-column.d.ts +0 -24
  61. package/dist/types-ts4.5/tablePluginType.d.ts +0 -1
  62. package/package.json +4 -4
  63. package/src/nodeviews/TableContainer.tsx +1 -1
  64. package/src/pm-plugins/commands/column-resize.ts +1 -1
  65. package/src/pm-plugins/commands/insert.ts +3 -3
  66. package/src/pm-plugins/commands/misc.ts +1 -1
  67. package/src/pm-plugins/drag-and-drop/commands.ts +1 -1
  68. package/src/pm-plugins/table-analytics.ts +1 -1
  69. package/src/pm-plugins/table-resizing/event-handlers.ts +35 -121
  70. package/src/pm-plugins/table-resizing/plugin.ts +0 -4
  71. package/src/pm-plugins/table-resizing/utils/misc.ts +2 -2
  72. package/src/pm-plugins/table-resizing/utils/resize-column.ts +1 -219
  73. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +1 -1
  74. package/src/pm-plugins/table-resizing/utils/resize-state.ts +1 -3
  75. package/src/pm-plugins/table-resizing/utils/scale-table.ts +1 -1
  76. package/src/pm-plugins/transforms/delete-columns.ts +1 -1
  77. package/src/pm-plugins/transforms/fix-tables.ts +1 -1
  78. package/src/pm-plugins/transforms/replace-table.ts +1 -1
  79. package/src/pm-plugins/transforms/split.ts +2 -2
  80. package/src/pm-plugins/utils/analytics.ts +4 -4
  81. package/src/pm-plugins/utils/column-controls.ts +1 -1
  82. package/src/pm-plugins/utils/drag-menu.ts +1 -1
  83. package/src/pm-plugins/utils/merged-cells.ts +4 -4
  84. package/src/pm-plugins/utils/nodes.ts +3 -3
  85. package/src/pm-plugins/utils/row-controls.ts +2 -2
  86. package/src/pm-plugins/view-mode-sort/index.ts +2 -2
  87. package/src/pm-plugins/view-mode-sort/utils.ts +3 -1
  88. package/src/tablePlugin.tsx +3 -10
  89. package/src/tablePluginType.ts +0 -1
  90. package/src/ui/DragPreview/index.tsx +4 -3
  91. package/src/ui/FloatingContextualButton/index.tsx +1 -2
  92. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +4 -6
  93. package/src/ui/FloatingDragMenu/DragMenu.tsx +4 -4
  94. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +2 -2
  95. package/src/ui/toolbar.tsx +1 -11
  96. package/tsconfig.app.json +0 -1
  97. package/tsconfig.dev.json +0 -1
@@ -148,7 +148,7 @@ export function scaleTableTo(state: ResizeState, maxSize: number): ResizeState {
148
148
  }),
149
149
  };
150
150
 
151
- let newTotalWidth = getTotalWidth(newState);
151
+ const newTotalWidth = getTotalWidth(newState);
152
152
  if (newTotalWidth > maxSize) {
153
153
  newState = reduceSpace(newState, newTotalWidth - maxSize);
154
154
  }
@@ -29,7 +29,7 @@ const deleteColumnsCustomStep =
29
29
  splitCellsInColumns(tr, table.pos, rect.left, rect.right);
30
30
 
31
31
  // Delete the columns
32
- let mapStart = tr.mapping.maps.length;
32
+ const mapStart = tr.mapping.maps.length;
33
33
  const originalDoc = tr.doc;
34
34
  const deletedColumns: number[] = [];
35
35
  for (let i = rect.left; i < rect.right; i++) {
@@ -193,7 +193,7 @@ function parseDOMColumnWidths(
193
193
  return [];
194
194
  }
195
195
 
196
- let cols: Array<number> = [];
196
+ const cols: Array<number> = [];
197
197
 
198
198
  for (let col = 0; col < row.childElementCount; col++) {
199
199
  const currentCol = row.children[col];
@@ -22,7 +22,7 @@ export const replaceSelectedTable = (
22
22
  typeof content === 'string'
23
23
  ? new Slice(Fragment.from(state.schema.text(content)), 0, 0)
24
24
  : content;
25
- let tr = state.tr.replace(table.pos, table.pos + table.node.nodeSize, slice);
25
+ const tr = state.tr.replace(table.pos, table.pos + table.node.nodeSize, slice);
26
26
  tr.setSelection(TextSelection.create(tr.doc, table.pos + slice.size + 1));
27
27
 
28
28
  const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
@@ -18,7 +18,7 @@ export function splitCellsInColumns(
18
18
  columnStart: number,
19
19
  columnEnd: number,
20
20
  ): Transaction {
21
- let mapStart = tr.mapping.maps.length;
21
+ const mapStart = tr.mapping.maps.length;
22
22
  const table = tr.doc.nodeAt(tablePos);
23
23
  if (!table) {
24
24
  return tr;
@@ -59,7 +59,7 @@ export function splitCellsInColumns(
59
59
  // Add the new cells
60
60
  for (let cellRowIndex = rowIndex; cellRowIndex < rowIndex + rowspan; cellRowIndex++) {
61
61
  for (let i = 0; i < colspan; i++) {
62
- let mapping = tr.mapping.slice(mapStart);
62
+ const mapping = tr.mapping.slice(mapStart);
63
63
  const cellPos = map.positionAt(cellRowIndex, column + i, table);
64
64
  tr.insert(
65
65
  mapping.map(cellPos + tableStart),
@@ -167,10 +167,10 @@ export const useMeasureFramerate = (config: UseMeasureFramerateConfig = {}) => {
167
167
  timeoutMs = 200,
168
168
  } = config;
169
169
 
170
- let frameCount = useRef(0);
171
- let lastTime = useRef(0);
172
- let timeoutId = useRef<NodeJS.Timeout | undefined>();
173
- let frameRateSamples = useRef<number[]>([]);
170
+ const frameCount = useRef(0);
171
+ const lastTime = useRef(0);
172
+ const timeoutId = useRef<NodeJS.Timeout | undefined>();
173
+ const frameRateSamples = useRef<number[]>([]);
174
174
 
175
175
  useEffect(() => {
176
176
  return () => {
@@ -148,7 +148,7 @@ export const colWidthsForRow = (tr: HTMLTableRowElement) => {
148
148
  }));
149
149
 
150
150
  // reverse engineer cell widths from table widths
151
- let domBasedCellWidths: number[] = [];
151
+ const domBasedCellWidths: number[] = [];
152
152
  cellInfos.map((cell) => {
153
153
  domBasedCellWidths.push(...getRelativeDomCellWidths(cell));
154
154
  });
@@ -421,7 +421,7 @@ export const getDragMenuConfig = (
421
421
  ),
422
422
  ];
423
423
 
424
- let allConfigs = [...restConfigs];
424
+ const allConfigs = [...restConfigs];
425
425
  allConfigs.unshift(...sortConfigs);
426
426
 
427
427
  return allConfigs.filter(Boolean) as DragMenuConfig[];
@@ -188,8 +188,8 @@ export const checkEdgeHasMergedCells = (
188
188
  const { mapByRow, mapByColumn } = tableMap;
189
189
  const map = 'row' === direction ? mapByRow : mapByColumn;
190
190
  const lengthLimiter = direction === 'row' ? tableMap.width : tableMap.height;
191
- let minIndex = Math.min(...indexes);
192
- let maxIndex = Math.max(...indexes);
191
+ const minIndex = Math.min(...indexes);
192
+ const maxIndex = Math.max(...indexes);
193
193
  let isTopSideHaveMergedCells = false;
194
194
  let isBottomSideHaveMergedCells = false;
195
195
 
@@ -197,8 +197,8 @@ export const checkEdgeHasMergedCells = (
197
197
  * this is to check if the cell position from last focused table is overflow. since if you selection from a cell in 6th row and 7th column cell in a 7x8 table to 3x3 table, the cell position will be overflow because new table dont have this cell at all.
198
198
  TODO: ED-22335 this should better called only when hover over the drag handle.
199
199
  */
200
- let isOldMinIndex = !map[minIndex - 1] || !map[minIndex];
201
- let isOldMaxIndex = !map[maxIndex + 1] || !map[maxIndex];
200
+ const isOldMinIndex = !map[minIndex - 1] || !map[minIndex];
201
+ const isOldMaxIndex = !map[maxIndex + 1] || !map[maxIndex];
202
202
 
203
203
  if (minIndex > 0 && !isOldMinIndex) {
204
204
  const prevSelectionSet = map[minIndex - 1];
@@ -60,8 +60,8 @@ export const tablesHaveDifferentColumnWidths = (
60
60
  currentTable: PmNode,
61
61
  previousTable: PmNode,
62
62
  ): boolean => {
63
- let currentTableWidths = getTableWidths(currentTable);
64
- let previousTableWidths = getTableWidths(previousTable);
63
+ const currentTableWidths = getTableWidths(currentTable);
64
+ const previousTableWidths = getTableWidths(previousTable);
65
65
 
66
66
  if (currentTableWidths.length !== previousTableWidths.length) {
67
67
  return true;
@@ -115,7 +115,7 @@ function getTableWidths(node: PmNode): number[] {
115
115
  return [];
116
116
  }
117
117
 
118
- let tableWidths: Array<number> = [];
118
+ const tableWidths: Array<number> = [];
119
119
  node.content.firstChild.content.forEach((cell) => {
120
120
  if (Array.isArray(cell.attrs.colwidth)) {
121
121
  const colspan = cell.attrs.colspan || 1;
@@ -148,8 +148,8 @@ export const copyPreviousRow =
148
148
  offsetNextLineIndexPosition + map.width,
149
149
  );
150
150
 
151
- let cells = [] as PMNode[];
152
- let fixRowspans: { pos: number; node: PMNode }[] = [];
151
+ const cells = [] as PMNode[];
152
+ const fixRowspans: { pos: number; node: PMNode }[] = [];
153
153
  for (let i = 0; i < cellsPositionsInOriginalRow.length; ) {
154
154
  const pos = cellsPositionsInOriginalRow[i];
155
155
  const documentCellPos = pos + table.start;
@@ -53,8 +53,8 @@ export const createPlugin = (
53
53
 
54
54
  const sortMeta = tr.getMeta('tableSortMeta');
55
55
 
56
- let hoverTableMeta = tr.getMeta('mouseEnterTable');
57
- let removeTableMeta = tr.getMeta('removeTable');
56
+ const hoverTableMeta = tr.getMeta('mouseEnterTable');
57
+ const removeTableMeta = tr.getMeta('removeTable');
58
58
  let tableId = '';
59
59
 
60
60
  // Remove the table from the state
@@ -66,7 +66,7 @@ export const toggleSort = (view: EditorView, event: Event, pluginState: TableSor
66
66
  if (widget?.classList.contains(IS_DISABLED_CLASS_NAME) || !widget) {
67
67
  return;
68
68
  }
69
- let dataSortIndex = target
69
+ const dataSortIndex = target
70
70
  ?.closest('.ProseMirror-widget')
71
71
  ?.getAttribute(SORT_INDEX_DATA_ATTRIBUTE);
72
72
  const tr = view.state.tr;
@@ -82,6 +82,8 @@ export const toggleSort = (view: EditorView, event: Event, pluginState: TableSor
82
82
  return;
83
83
  }
84
84
 
85
+ // Ignored via go/ees005
86
+ // eslint-disable-next-line prefer-const
85
87
  let { index, direction, order: oldOrder } = pluginState?.[tableId] || {};
86
88
 
87
89
  // Unsort if there was already a sort
@@ -315,14 +315,9 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
315
315
  {
316
316
  name: 'tablePMColResizing',
317
317
  plugin: ({ dispatch, nodeViewPortalProviderAPI }) => {
318
- const {
319
- fullWidthEnabled,
320
- tableOptions,
321
- getEditorFeatureFlags,
322
- isTableScalingEnabled,
323
- isNewColumnResizingEnabled,
324
- } = options || ({} as TablePluginOptions);
325
- const { allowColumnResizing, allowTableAlignment } = pluginConfig(tableOptions);
318
+ const { fullWidthEnabled, tableOptions, getEditorFeatureFlags, isTableScalingEnabled } =
319
+ options || ({} as TablePluginOptions);
320
+ const { allowColumnResizing } = pluginConfig(tableOptions);
326
321
  return allowColumnResizing
327
322
  ? createFlexiResizingPlugin(
328
323
  dispatch,
@@ -335,8 +330,6 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
335
330
  nodeViewPortalProviderAPI,
336
331
  editorAnalyticsAPI,
337
332
  isTableScalingEnabled || false,
338
- isNewColumnResizingEnabled,
339
- allowTableAlignment,
340
333
  !!options?.isCommentEditor,
341
334
  )
342
335
  : undefined;
@@ -29,7 +29,6 @@ export interface TablePluginOptions {
29
29
  fullWidthEnabled?: boolean;
30
30
  wasFullWidthEnabled?: boolean;
31
31
  getEditorFeatureFlags?: GetEditorFeatureFlags;
32
- isNewColumnResizingEnabled?: boolean;
33
32
  isCommentEditor?: boolean;
34
33
  isChromelessEditor?: boolean;
35
34
  }
@@ -22,9 +22,9 @@ export const DragPreview = ({
22
22
  width: number;
23
23
  height: number;
24
24
  }) => {
25
- let marginLeft = direction === 'row' ? -14 : width / 2 - 14;
26
- let marginTop = direction === 'row' ? height / 2 - 14 : -10;
27
- let transform = direction === 'row' ? 'rotate(90deg)' : 'none';
25
+ const marginLeft = direction === 'row' ? -14 : width / 2 - 14;
26
+ const marginTop = direction === 'row' ? height / 2 - 14 : -10;
27
+ const transform = direction === 'row' ? 'rotate(90deg)' : 'none';
28
28
  return (
29
29
  <Box
30
30
  xcss={boxStyles}
@@ -41,6 +41,7 @@ export const DragPreview = ({
41
41
  marginLeft: `${marginLeft}px`,
42
42
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
43
43
  marginTop: `${marginTop}px`,
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
44
45
  transform: transform,
45
46
  }}
46
47
  />
@@ -74,8 +74,7 @@ const FloatingContextualButtonInner = React.memo((props: Props & WrappedComponen
74
74
  };
75
75
 
76
76
  const domAtPos = editorView.domAtPos.bind(editorView);
77
- let targetCellRef: Node | undefined;
78
- targetCellRef = findDomRefAtPos(targetCellPosition, domAtPos);
77
+ const targetCellRef: Node | undefined = findDomRefAtPos(targetCellPosition, domAtPos);
79
78
 
80
79
  useEffect(() => {
81
80
  if (isCellMenuOpenByKeyboard && !isContextualMenuOpen) {
@@ -230,8 +230,6 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
230
230
  if (allowBackgroundColor) {
231
231
  const node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
232
232
  const background = hexToEditorBackgroundPaletteColor(node?.attrs?.background || '#ffffff');
233
- let selectedRowIndex;
234
- let selectedColumnIndex;
235
233
 
236
234
  const selectedRowAndColumnFromPalette = getSelectedRowAndColumnFromPalette(
237
235
  cellBackgroundColorPalette,
@@ -240,8 +238,8 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
240
238
  background!,
241
239
  colorPalletteColumns,
242
240
  );
243
- selectedRowIndex = selectedRowAndColumnFromPalette.selectedRowIndex;
244
- selectedColumnIndex = selectedRowAndColumnFromPalette.selectedColumnIndex;
241
+ const selectedRowIndex = selectedRowAndColumnFromPalette.selectedRowIndex;
242
+ const selectedColumnIndex = selectedRowAndColumnFromPalette.selectedColumnIndex;
245
243
  return {
246
244
  content: isDragAndDropEnabled
247
245
  ? formatMessage(messages.backgroundColor)
@@ -590,7 +588,7 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
590
588
  };
591
589
 
592
590
  private createOriginalContextMenuItems = () => {
593
- let items: MenuItem[] = [];
591
+ const items: MenuItem[] = [];
594
592
  const sortColumnItems = this.createSortColumnItems();
595
593
  const backgroundColorItem = this.createBackgroundColorItem();
596
594
  const distributeColumnsItem = this.createDistributeColumnsItem();
@@ -626,7 +624,7 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
626
624
  const deleteRowItem = this.createDeleteRowItem();
627
625
 
628
626
  // Group items so when table.menu.group-items FF is enabled, a divider shows under split cell, above add column
629
- let items: { items: MenuItem[] }[] = [
627
+ const items: { items: MenuItem[] }[] = [
630
628
  {
631
629
  items: [],
632
630
  },
@@ -165,7 +165,7 @@ const MapDragMenuOptionIdToMessage: Record<DragMenuOptionIdType, MessageType> =
165
165
  };
166
166
 
167
167
  const getGroupedDragMenuConfig = () => {
168
- let groupedDragMenuConfig: DragMenuOptionIdType[][] = [
168
+ const groupedDragMenuConfig: DragMenuOptionIdType[][] = [
169
169
  [
170
170
  'add_row_above',
171
171
  'add_row_below',
@@ -195,8 +195,8 @@ const convertToDropdownItems = (
195
195
  selectionRect?: Rect,
196
196
  ) => {
197
197
  const groupedDragMenuConfig = getGroupedDragMenuConfig();
198
- let menuItemsArr: MenuItem[][] = [...Array(groupedDragMenuConfig.length)].map(() => []);
199
- let menuCallback: { [key: string]: Command } = {};
198
+ const menuItemsArr: MenuItem[][] = [...Array(groupedDragMenuConfig.length)].map(() => []);
199
+ const menuCallback: { [key: string]: Command } = {};
200
200
  dragMenuConfig.forEach((item) => {
201
201
  const menuGroupIndex = groupedDragMenuConfig.findIndex((group) => group.includes(item.id));
202
202
 
@@ -497,7 +497,7 @@ const DragMenu = React.memo(
497
497
  * @returns true when the menu should be closed, false otherwise
498
498
  */
499
499
  const shouldCloseMenu = (state: EditorState) => {
500
- let {
500
+ const {
501
501
  isDragMenuOpen: previousOpenState,
502
502
  dragMenuDirection: previousDragMenuDirection,
503
503
  dragMenuIndex: previousDragMenuIndex,
@@ -72,8 +72,8 @@ export const DropdownMenu = ({
72
72
  };
73
73
 
74
74
  // more offsets calculation as offsets depend on the direction and updated placement here
75
- let offsetY = direction === 'row' ? (popupPlacement[0] === 'bottom' ? -8 : -34) : 0;
76
- let offsetX = direction === 'column' ? (popupPlacement[1] === 'left' ? 0 : -7) : 0;
75
+ const offsetY = direction === 'row' ? (popupPlacement[0] === 'bottom' ? -8 : -34) : 0;
76
+ const offsetX = direction === 'column' ? (popupPlacement[1] === 'left' ? 0 : -7) : 0;
77
77
 
78
78
  const innerMenu = () => {
79
79
  return (
@@ -501,17 +501,7 @@ export const getToolbarConfig =
501
501
  // We don't want to show floating toolbar while resizing the table
502
502
  const isWidthResizing = tableWidthState?.resizing;
503
503
 
504
- // Hide floating toolbar when resizing column and internal column width is on
505
- const shouldHideToolbarForInternalColumnWidth = Boolean(
506
- options?.isNewColumnResizingEnabled && resizeState && resizeState.dragging,
507
- );
508
-
509
- if (
510
- tableObject &&
511
- pluginState.editorHasFocus &&
512
- !isWidthResizing &&
513
- !shouldHideToolbarForInternalColumnWidth
514
- ) {
504
+ if (tableObject && pluginState.editorHasFocus && !isWidthResizing) {
515
505
  const nodeType = state.schema.nodes.table;
516
506
  const isNested = pluginState.tablePos && isTableNested(state, pluginState.tablePos);
517
507
  const isTableScalingWithFixedColumnWidthsOptionShown =
package/tsconfig.app.json CHANGED
@@ -28,7 +28,6 @@
28
28
  "./src/nodeviews/__mocks__/**/*"
29
29
  ],
30
30
  "compilerOptions": {
31
- "baseUrl": "./",
32
31
  "composite": true,
33
32
  "outDir": "../../../tsDist/@atlaskit__editor-plugin-table/app"
34
33
  },
package/tsconfig.dev.json CHANGED
@@ -28,7 +28,6 @@
28
28
  ],
29
29
  "exclude": ["./dist/**/*", "./build/**/*", "./node_modules/**/*"],
30
30
  "compilerOptions": {
31
- "baseUrl": "./",
32
31
  "composite": true,
33
32
  "outDir": "../../../tsDist/@atlaskit__editor-plugin-table/dev"
34
33
  },