@atlaskit/editor-plugin-table 7.6.14 → 7.7.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 (122) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/commands/misc.js +0 -2
  3. package/dist/cjs/nodeviews/OverflowShadowsObserver.js +1 -3
  4. package/dist/cjs/nodeviews/TableComponent.js +3 -18
  5. package/dist/cjs/nodeviews/TableContainer.js +6 -25
  6. package/dist/cjs/nodeviews/TableResizer.js +2 -2
  7. package/dist/cjs/nodeviews/table.js +0 -2
  8. package/dist/cjs/plugin.js +3 -20
  9. package/dist/cjs/pm-plugins/main.js +1 -2
  10. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +12 -21
  11. package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +32 -57
  12. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +1 -2
  13. package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +29 -4
  14. package/dist/cjs/pm-plugins/table-resizing/utils/resize-logic.js +19 -0
  15. package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +16 -28
  16. package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +2 -12
  17. package/dist/cjs/reducer.js +0 -2
  18. package/dist/cjs/transforms/column-width.js +3 -5
  19. package/dist/cjs/types.js +0 -1
  20. package/dist/cjs/ui/ColumnResizeWidget/index.js +5 -1
  21. package/dist/cjs/ui/common-styles.js +5 -12
  22. package/dist/cjs/ui/ui-styles.js +7 -12
  23. package/dist/cjs/utils/index.js +0 -6
  24. package/dist/cjs/utils/nodes.js +5 -18
  25. package/dist/es2019/commands/misc.js +0 -2
  26. package/dist/es2019/nodeviews/OverflowShadowsObserver.js +1 -3
  27. package/dist/es2019/nodeviews/TableComponent.js +3 -18
  28. package/dist/es2019/nodeviews/TableContainer.js +6 -24
  29. package/dist/es2019/nodeviews/TableResizer.js +2 -2
  30. package/dist/es2019/nodeviews/table.js +0 -2
  31. package/dist/es2019/plugin.js +5 -24
  32. package/dist/es2019/pm-plugins/main.js +1 -2
  33. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +13 -22
  34. package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +30 -53
  35. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +1 -2
  36. package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +28 -4
  37. package/dist/es2019/pm-plugins/table-resizing/utils/resize-logic.js +20 -0
  38. package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +14 -24
  39. package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +2 -12
  40. package/dist/es2019/reducer.js +0 -5
  41. package/dist/es2019/transforms/column-width.js +3 -5
  42. package/dist/es2019/types.js +0 -1
  43. package/dist/es2019/ui/ColumnResizeWidget/index.js +5 -1
  44. package/dist/es2019/ui/common-styles.js +15 -46
  45. package/dist/es2019/ui/ui-styles.js +34 -41
  46. package/dist/es2019/utils/index.js +1 -1
  47. package/dist/es2019/utils/nodes.js +0 -15
  48. package/dist/esm/commands/misc.js +0 -2
  49. package/dist/esm/nodeviews/OverflowShadowsObserver.js +1 -3
  50. package/dist/esm/nodeviews/TableComponent.js +3 -18
  51. package/dist/esm/nodeviews/TableContainer.js +6 -25
  52. package/dist/esm/nodeviews/TableResizer.js +2 -2
  53. package/dist/esm/nodeviews/table.js +0 -2
  54. package/dist/esm/plugin.js +5 -22
  55. package/dist/esm/pm-plugins/main.js +1 -2
  56. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +13 -22
  57. package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +32 -57
  58. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +1 -2
  59. package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +30 -4
  60. package/dist/esm/pm-plugins/table-resizing/utils/resize-logic.js +18 -0
  61. package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +16 -28
  62. package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +2 -12
  63. package/dist/esm/reducer.js +0 -2
  64. package/dist/esm/transforms/column-width.js +3 -5
  65. package/dist/esm/types.js +0 -1
  66. package/dist/esm/ui/ColumnResizeWidget/index.js +5 -1
  67. package/dist/esm/ui/common-styles.js +6 -13
  68. package/dist/esm/ui/ui-styles.js +7 -12
  69. package/dist/esm/utils/index.js +1 -1
  70. package/dist/esm/utils/nodes.js +0 -13
  71. package/dist/types/nodeviews/TableContainer.d.ts +1 -2
  72. package/dist/types/nodeviews/types.d.ts +0 -1
  73. package/dist/types/plugin.d.ts +0 -1
  74. package/dist/types/pm-plugins/main.d.ts +1 -1
  75. package/dist/types/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  76. package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
  77. package/dist/types/types.d.ts +0 -9
  78. package/dist/types/ui/FloatingContextualButton/index.d.ts +0 -2
  79. package/dist/types/utils/index.d.ts +1 -1
  80. package/dist/types/utils/nodes.d.ts +0 -1
  81. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +1 -2
  82. package/dist/types-ts4.5/nodeviews/types.d.ts +0 -1
  83. package/dist/types-ts4.5/plugin.d.ts +0 -1
  84. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  85. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  86. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
  87. package/dist/types-ts4.5/types.d.ts +0 -9
  88. package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +0 -2
  89. package/dist/types-ts4.5/utils/index.d.ts +1 -1
  90. package/dist/types-ts4.5/utils/nodes.d.ts +0 -1
  91. package/package.json +7 -10
  92. package/src/commands/misc.ts +0 -2
  93. package/src/nodeviews/OverflowShadowsObserver.ts +1 -6
  94. package/src/nodeviews/TableComponent.tsx +2 -25
  95. package/src/nodeviews/TableContainer.tsx +7 -34
  96. package/src/nodeviews/TableResizer.tsx +2 -8
  97. package/src/nodeviews/table.tsx +0 -2
  98. package/src/nodeviews/types.ts +0 -1
  99. package/src/plugin.tsx +4 -43
  100. package/src/pm-plugins/main.ts +0 -2
  101. package/src/pm-plugins/table-resizing/event-handlers.ts +13 -37
  102. package/src/pm-plugins/table-resizing/utils/colgroup.ts +40 -61
  103. package/src/pm-plugins/table-resizing/utils/misc.ts +4 -6
  104. package/src/pm-plugins/table-resizing/utils/resize-column.ts +52 -9
  105. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +25 -0
  106. package/src/pm-plugins/table-resizing/utils/resize-state.ts +18 -29
  107. package/src/pm-plugins/table-resizing/utils/scale-table.ts +2 -13
  108. package/src/reducer.ts +0 -3
  109. package/src/transforms/column-width.ts +2 -10
  110. package/src/types.ts +0 -8
  111. package/src/ui/ColumnResizeWidget/index.tsx +10 -1
  112. package/src/ui/FloatingContextualButton/index.tsx +0 -2
  113. package/src/ui/common-styles.ts +15 -53
  114. package/src/ui/ui-styles.ts +34 -47
  115. package/src/utils/index.ts +0 -1
  116. package/src/utils/nodes.ts +0 -23
  117. package/dist/cjs/ui/LayoutButton/index.js +0 -206
  118. package/dist/es2019/ui/LayoutButton/index.js +0 -168
  119. package/dist/esm/ui/LayoutButton/index.js +0 -196
  120. package/dist/types/ui/LayoutButton/index.d.ts +0 -21
  121. package/dist/types-ts4.5/ui/LayoutButton/index.d.ts +0 -21
  122. package/src/ui/LayoutButton/index.tsx +0 -217
@@ -9,7 +9,6 @@ import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
9
9
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
10
10
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
11
11
  import type { Rect } from '@atlaskit/editor-tables/table-map';
12
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
12
 
14
13
  import { getSelectedTableInfo } from '../../../utils';
15
14
 
@@ -115,39 +114,29 @@ export const updateColgroup = (
115
114
  ): void => {
116
115
  const cols = tableRef.querySelectorAll('col');
117
116
 
118
- if (getBooleanFF('platform.editor.custom-table-width')) {
119
- const columnsCount = cols.length;
120
- if (isTableScalingEnabled && tableNode) {
121
- const scalePercent = getTableScalingPercent(tableNode, tableRef);
122
- state.cols
123
- .filter((column) => column && !!column.width) // if width is 0, we dont want to apply that.
124
- .forEach((column, i) => {
125
- const fixedColWidth = getColWidthFix(column.width, columnsCount);
126
- const scaledWidth = fixedColWidth * scalePercent;
127
- const finalWidth = Math.max(scaledWidth, tableCellMinWidth);
128
- // we aren't handling the remaining pixels here when the 48px min width is reached
129
- if (cols[i]) {
130
- cols[i].style.width = `${finalWidth}px`;
131
- }
132
- });
133
- } else {
134
- state.cols
135
- .filter((column) => column && !!column.width) // if width is 0, we dont want to apply that.
136
- .forEach((column, i) => {
137
- if (cols[i]) {
138
- cols[i].style.width = `${getColWidthFix(
139
- column.width,
140
- columnsCount,
141
- )}px`;
142
- }
143
- });
144
- }
117
+ const columnsCount = cols.length;
118
+ if (isTableScalingEnabled && tableNode) {
119
+ const scalePercent = getTableScalingPercent(tableNode, tableRef);
120
+ state.cols
121
+ .filter((column) => column && !!column.width) // if width is 0, we dont want to apply that.
122
+ .forEach((column, i) => {
123
+ const fixedColWidth = getColWidthFix(column.width, columnsCount);
124
+ const scaledWidth = fixedColWidth * scalePercent;
125
+ const finalWidth = Math.max(scaledWidth, tableCellMinWidth);
126
+ // we aren't handling the remaining pixels here when the 48px min width is reached
127
+ if (cols[i]) {
128
+ cols[i].style.width = `${finalWidth}px`;
129
+ }
130
+ });
145
131
  } else {
146
132
  state.cols
147
133
  .filter((column) => column && !!column.width) // if width is 0, we dont want to apply that.
148
134
  .forEach((column, i) => {
149
135
  if (cols[i]) {
150
- cols[i].style.width = `${column.width}px`;
136
+ cols[i].style.width = `${getColWidthFix(
137
+ column.width,
138
+ columnsCount,
139
+ )}px`;
151
140
  }
152
141
  });
153
142
  }
@@ -28,7 +28,6 @@ export interface ScaleOptions {
28
28
  previousContainerWidth?: number;
29
29
  parentWidth?: number;
30
30
  layoutChanged?: boolean;
31
- isBreakoutEnabled?: boolean;
32
31
  isFullWidthModeEnabled?: boolean;
33
32
  isTableResizingEnabled?: boolean;
34
33
  }
@@ -41,34 +40,24 @@ export const scale = (
41
40
  domAtPos: DomAtPos,
42
41
  isTableScalingEnabled = false,
43
42
  ): ResizeState | undefined => {
44
- /**
45
- * isBreakoutEnabled === true -> default center aligned
46
- * isBreakoutEnabled === false -> full width mode
47
- */
48
-
49
43
  const {
50
44
  node,
51
45
  containerWidth,
52
46
  previousContainerWidth,
53
47
  prevNode,
54
48
  start,
55
- isBreakoutEnabled,
56
49
  layoutChanged,
57
50
  isTableResizingEnabled,
58
51
  } = options;
59
52
 
60
53
  const maxSize = isTableResizingEnabled
61
54
  ? getTableContainerWidth(node)
62
- : getLayoutSize(node.attrs.layout, containerWidth, {
63
- isBreakoutEnabled,
64
- });
55
+ : getLayoutSize(node.attrs.layout, containerWidth, {});
65
56
 
66
57
  const prevTableWidth = getTableWidth(prevNode);
67
58
  const previousMaxSize = isTableResizingEnabled
68
59
  ? getTableContainerWidth(node)
69
- : getLayoutSize(prevNode.attrs.layout, previousContainerWidth, {
70
- isBreakoutEnabled,
71
- });
60
+ : getLayoutSize(prevNode.attrs.layout, previousContainerWidth, {});
72
61
 
73
62
  let newWidth = maxSize;
74
63
 
package/src/reducer.ts CHANGED
@@ -27,9 +27,6 @@ export default (
27
27
  case 'SET_TARGET_CELL_POSITION':
28
28
  return { ...pluginState, ...action.data, isContextualMenuOpen: false };
29
29
 
30
- case 'SET_TABLE_LAYOUT':
31
- return { ...pluginState, ...action.data };
32
-
33
30
  case 'TOGGLE_CONTEXTUAL_MENU':
34
31
  return {
35
32
  ...pluginState,
@@ -6,7 +6,6 @@ import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
6
6
  import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import { TableMap } from '@atlaskit/editor-tables/table-map';
9
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
9
 
11
10
  import type { ResizeState } from '../pm-plugins/table-resizing/utils';
12
11
  import {
@@ -17,7 +16,6 @@ import {
17
16
  import { isMinCellWidthTable } from '../pm-plugins/table-resizing/utils/colgroup';
18
17
  import { getResizeState } from '../pm-plugins/table-resizing/utils/resize-state';
19
18
  import { scaleTableTo } from '../pm-plugins/table-resizing/utils/scale-table';
20
- import { insertColumnButtonOffset } from '../ui/common-styles';
21
19
 
22
20
  /**
23
21
  * Given a new ResizeState object, create a transaction that replaces and updates the table node based on new state.
@@ -141,10 +139,7 @@ export const rescaleColumns =
141
139
  if (shouldScale) {
142
140
  previousTableInfo = {
143
141
  width: getTableElementWidth(table.node),
144
- possibleMaxWidth: getBooleanFF('platform.editor.custom-table-width')
145
- ? getTableContainerElementWidth(table.node)
146
- : getTableContainerElementWidth(table.node) -
147
- insertColumnButtonOffset,
142
+ possibleMaxWidth: getTableContainerElementWidth(table.node),
148
143
  isResized,
149
144
  };
150
145
  } else {
@@ -152,10 +147,7 @@ export const rescaleColumns =
152
147
  // when table is resized the tableRef client width will be 1px larger than colGroup, which is used in calculations
153
148
  width: isResized ? tableRef.clientWidth - 1 : tableRef.clientWidth,
154
149
  /** the is the width the table can reach before overflowing */
155
- possibleMaxWidth: getBooleanFF('platform.editor.custom-table-width')
156
- ? tableRef?.parentElement?.clientWidth || 0
157
- : (tableRef?.parentElement?.clientWidth || 0) -
158
- insertColumnButtonOffset,
150
+ possibleMaxWidth: tableRef?.parentElement?.clientWidth || 0,
159
151
  isResized,
160
152
  };
161
153
  }
package/src/types.ts CHANGED
@@ -157,7 +157,6 @@ export interface TablePluginState {
157
157
  insertColumnButtonIndex?: number;
158
158
  insertRowButtonIndex?: number;
159
159
  isFullWidthModeEnabled?: boolean;
160
- layout?: TableLayout;
161
160
  ordering?: TableColumnOrdering;
162
161
  isResizeHandleWidgetAdded?: boolean;
163
162
  resizeHandleRowIndex?: number;
@@ -171,7 +170,6 @@ export interface TablePluginState {
171
170
 
172
171
  getIntl: () => IntlShape;
173
172
 
174
- isBreakoutEnabled?: boolean;
175
173
  wasFullWidthModeEnabled?: boolean;
176
174
  isTableResizingEnabled?: boolean;
177
175
  isDragAndDropEnabled?: boolean;
@@ -190,7 +188,6 @@ export type TablePluginAction =
190
188
  tableRef?: HTMLTableElement;
191
189
  tableNode?: PmNode;
192
190
  tableWrapperTarget?: HTMLElement;
193
- layout: TableLayout;
194
191
  isHeaderRowEnabled: boolean;
195
192
  isHeaderColumnEnabled: boolean;
196
193
  };
@@ -289,10 +286,6 @@ export type TablePluginAction =
289
286
  type: 'SELECT_COLUMN';
290
287
  data: { targetCellPosition: number; decorationSet: DecorationSet };
291
288
  }
292
- | {
293
- type: 'SET_TABLE_LAYOUT';
294
- data: { layout: TableLayout };
295
- }
296
289
  | { type: 'SHOW_INSERT_ROW_BUTTON'; data: { insertRowButtonIndex: number } }
297
290
  | {
298
291
  type: 'SHOW_INSERT_COLUMN_BUTTON';
@@ -361,7 +354,6 @@ export const TableCssClassName = {
361
354
  CONTROLS_INSERT_BUTTON_WRAP: `${tablePrefixSelector}-controls__insert-button-wrap`,
362
355
  CONTROLS_INSERT_LINE: `${tablePrefixSelector}-controls__insert-line`,
363
356
  CONTROLS_BUTTON_OVERLAY: `${tablePrefixSelector}-controls__button-overlay`,
364
- LAYOUT_BUTTON: `${tablePrefixSelector}-layout-button`,
365
357
 
366
358
  DRAG_CONTROLS_INSERT_BUTTON: `${tablePrefixSelector}-controls__drag-insert-button`,
367
359
  DRAG_CONTROLS_INSERT_BUTTON_INNER: `${tablePrefixSelector}-controls__drag-insert-button-inner`,
@@ -2,6 +2,10 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { useIntl } from 'react-intl-next';
4
4
 
5
+ import {
6
+ startColumnResizing,
7
+ ToolTipContent,
8
+ } from '@atlaskit/editor-common/keymaps';
5
9
  import { tableMessages as messages } from '@atlaskit/editor-common/messages';
6
10
  import Tooltip from '@atlaskit/tooltip';
7
11
 
@@ -32,7 +36,12 @@ export const ColumnResizeWidget = ({
32
36
 
33
37
  return (
34
38
  <Tooltip
35
- content={formatMessage(messages.adjustColumns)}
39
+ content={
40
+ <ToolTipContent
41
+ description={formatMessage(messages.adjustColumns)}
42
+ keymap={startColumnResizing}
43
+ />
44
+ }
36
45
  hideTooltipOnClick
37
46
  hideTooltipOnMouseDown
38
47
  position="mouse"
@@ -5,7 +5,6 @@ import { jsx } from '@emotion/react';
5
5
  import type { WrappedComponentProps } from 'react-intl-next';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
 
8
- import type { TableLayout } from '@atlaskit/adf-schema';
9
8
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
10
9
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
11
10
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
@@ -37,7 +36,6 @@ export interface Props {
37
36
  mountPoint?: HTMLElement;
38
37
  boundariesElement?: HTMLElement;
39
38
  scrollableElement?: HTMLElement;
40
- layout?: TableLayout;
41
39
  isNumberColumnEnabled?: boolean;
42
40
  stickyHeader?: RowStickyState;
43
41
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -23,7 +23,7 @@ import {
23
23
  } from '@atlaskit/editor-shared-styles';
24
24
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
25
25
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
26
- import { B300, N0, N20A, N300, N40A, R500 } from '@atlaskit/theme/colors';
26
+ import { N0, N40A, R500 } from '@atlaskit/theme/colors';
27
27
  import { fontSize } from '@atlaskit/theme/constants';
28
28
  import { token } from '@atlaskit/tokens';
29
29
 
@@ -259,36 +259,6 @@ const tableStickyHeaderFirefoxFixStyle = () => {
259
259
  }
260
260
  };
261
261
 
262
- const tableWrapperStyles = () => {
263
- if (getBooleanFF('platform.editor.custom-table-width')) {
264
- return css`
265
- .${ClassName.TABLE_NODE_WRAPPER} {
266
- padding-bottom: 0px;
267
- /* fixes gap cursor height */
268
- overflow: auto;
269
- overflow-y: hidden;
270
- position: relative;
271
-
272
- > table[data-number-column='true'] {
273
- width: calc(100% - 1px);
274
- }
275
- }
276
- `;
277
- } else {
278
- return css`
279
- .${ClassName.TABLE_NODE_WRAPPER} {
280
- padding-right: ${insertColumnButtonOffset}px;
281
- margin-right: -${insertColumnButtonOffset}px;
282
- padding-bottom: 0px;
283
- /* fixes gap cursor height */
284
- overflow: auto;
285
- overflow-y: hidden;
286
- position: relative;
287
- }
288
- `;
289
- }
290
- };
291
-
292
262
  // re-exporting these styles to use in Gemini test when table node view is rendered outside of PM
293
263
  export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
294
264
  ${tableSharedStyle()};
@@ -608,9 +578,7 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
608
578
 
609
579
  .${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
610
580
  .${ClassName.CORNER_CONTROLS}, .${ClassName.CONTROLS_CORNER_BUTTON} {
611
- width: ${getBooleanFF('platform.editor.custom-table-width')
612
- ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1
613
- : akEditorTableToolbarSize + akEditorTableNumberColumnWidth}px;
581
+ width: ${akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1}px;
614
582
  }
615
583
  .${ClassName.ROW_CONTROLS} .${ClassName.CONTROLS_BUTTON} {
616
584
  border-right-width: 0;
@@ -861,9 +829,7 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
861
829
  .${ClassName.NUMBERED_COLUMN} {
862
830
  position: relative;
863
831
  float: right;
864
- margin-left: ${getBooleanFF('platform.editor.custom-table-width')
865
- ? akEditorTableToolbarSize
866
- : akEditorTableToolbarSize - 1}px;
832
+ margin-left: ${akEditorTableToolbarSize}px;
867
833
  top: ${props.featureFlags?.tableDragAndDrop
868
834
  ? 0
869
835
  : akEditorTableToolbarSize}px;
@@ -914,9 +880,7 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
914
880
  display: block;
915
881
  }
916
882
  .${ClassName.NUMBERED_COLUMN} {
917
- padding-left: ${getBooleanFF('platform.editor.custom-table-width')
918
- ? 0
919
- : 1}px;
883
+ padding-left: 0px;
920
884
 
921
885
  .${ClassName.NUMBERED_COLUMN_BUTTON} {
922
886
  border-left: 0 none;
@@ -1082,23 +1046,21 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
1082
1046
  z-index: ${akEditorTableCellOnStickyHeaderZIndex - 4};
1083
1047
  }
1084
1048
 
1085
- ${tableWrapperStyles()}
1049
+ .${ClassName.TABLE_NODE_WRAPPER} {
1050
+ padding-bottom: 0px;
1051
+ /* fixes gap cursor height */
1052
+ overflow: auto;
1053
+ overflow-y: hidden;
1054
+ position: relative;
1055
+
1056
+ > table[data-number-column='true'] {
1057
+ width: calc(100% - 1px);
1058
+ }
1059
+ }
1086
1060
  `;
1087
1061
 
1088
1062
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4139
1089
1063
  export const tableStyles = (props: { featureFlags?: FeatureFlags }) => css`
1090
- .${ClassName.LAYOUT_BUTTON} button {
1091
- background: ${token('color.background.neutral', N20A)};
1092
- color: ${token('color.icon', N300)};
1093
- cursor: none;
1094
- }
1095
-
1096
- .${ClassName.LAYOUT_BUTTON}:not(.${ClassName.IS_RESIZING}) button:hover {
1097
- background: ${token('color.background.neutral.hovered', B300)};
1098
- color: ${token('color.icon', 'white')} !important;
1099
- cursor: pointer;
1100
- }
1101
-
1102
1064
  .ProseMirror {
1103
1065
  ${baseTableStyles(props)}
1104
1066
  }
@@ -374,9 +374,7 @@ export const OverflowShadow = (
374
374
  ${token('elevation.shadow.overflow.perimeter', 'transparent')} 0px,
375
375
  transparent 1px
376
376
  );
377
- left: ${getBooleanFF('platform.editor.custom-table-width')
378
- ? `calc(100% - ${tableOverflowShadowWidthWide}px)`
379
- : `calc(100% - ${tableOverflowShadowWidthWide - 10}px)`};
377
+ left: calc(100% - ${tableOverflowShadowWidthWide}px);
380
378
  }
381
379
  .${ClassName.WITH_CONTROLS} {
382
380
  ${overflowShadowWidhoutDnD(isDragAndDropEnabled)}
@@ -439,26 +437,24 @@ const columnHeaderButtonSelected = () =>
439
437
  });
440
438
 
441
439
  const getFloatingDotOverrides = () => {
442
- return getBooleanFF('platform.editor.custom-table-width')
443
- ? css`
444
- tr
445
- th:last-child
446
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before,
447
- tr
448
- td:last-child
449
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before {
450
- content: '';
451
- background-color: ${tableBorderColor};
452
- position: absolute;
453
- height: ${lineMarkerSize}px;
454
- width: ${lineMarkerSize}px;
455
- border-radius: 50%;
456
- pointer-events: none;
457
- top: ${token('space.025', '2px')};
458
- right: 0px;
459
- }
460
- `
461
- : '';
440
+ return css`
441
+ tr
442
+ th:last-child
443
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before,
444
+ tr
445
+ td:last-child
446
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before {
447
+ content: '';
448
+ background-color: ${tableBorderColor};
449
+ position: absolute;
450
+ height: ${lineMarkerSize}px;
451
+ width: ${lineMarkerSize}px;
452
+ border-radius: 50%;
453
+ pointer-events: none;
454
+ top: ${token('space.025', '2px')};
455
+ right: 0px;
456
+ }
457
+ `;
462
458
  };
463
459
 
464
460
  export const floatingColumnControls = () => {
@@ -755,29 +751,6 @@ export const hoveredWarningCell = css`
755
751
  }
756
752
  `;
757
753
 
758
- // move the resize handle zone completely inside the table cell to avoid overflow
759
- const getLastColumnResizerOverrides = () => {
760
- return getBooleanFF('platform.editor.custom-table-width')
761
- ? css`
762
- tr
763
- th:last-child
764
- .${ClassName.RESIZE_HANDLE_DECORATION},
765
- tr
766
- td:last-child
767
- .${ClassName.RESIZE_HANDLE_DECORATION} {
768
- background-color: transparent;
769
- position: absolute;
770
- width: ${resizeHandlerAreaWidth / 2}px;
771
- height: 100%;
772
- top: 0;
773
- right: 0;
774
- cursor: col-resize;
775
- z-index: ${resizeHandlerZIndex};
776
- }
777
- `
778
- : '';
779
- };
780
-
781
754
  // Explicit pixel values required here to ensure correct positioning and sizes of column resize handle
782
755
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
783
756
  const resizeHandleOverrides = (isDragAndDropEnabled: boolean | undefined) => {
@@ -868,7 +841,21 @@ export const resizeHandle = (isDragAndDropEnabled: boolean | undefined) => css`
868
841
  z-index: ${resizeHandlerZIndex};
869
842
  }
870
843
 
871
- ${getLastColumnResizerOverrides()}
844
+ tr
845
+ th:last-child
846
+ .${ClassName.RESIZE_HANDLE_DECORATION},
847
+ tr
848
+ td:last-child
849
+ .${ClassName.RESIZE_HANDLE_DECORATION} {
850
+ background-color: transparent;
851
+ position: absolute;
852
+ width: ${resizeHandlerAreaWidth / 2}px;
853
+ height: 100%;
854
+ top: 0;
855
+ right: 0;
856
+ cursor: col-resize;
857
+ z-index: ${resizeHandlerZIndex};
858
+ }
872
859
 
873
860
  ${resizeHandleOverrides(isDragAndDropEnabled)}
874
861
 
@@ -23,7 +23,6 @@ export {
23
23
  checkIfHeaderColumnEnabled,
24
24
  checkIfHeaderRowEnabled,
25
25
  checkIfNumberColumnEnabled,
26
- isLayoutSupported,
27
26
  getTableWidth,
28
27
  tablesHaveDifferentColumnWidths,
29
28
  tablesHaveDifferentNoOfColumns,
@@ -4,12 +4,9 @@ import type {
4
4
  EditorState,
5
5
  Selection,
6
6
  } from '@atlaskit/editor-prosemirror/state';
7
- import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
8
7
  import { TableMap } from '@atlaskit/editor-tables/table-map';
9
8
  import { findTable } from '@atlaskit/editor-tables/utils';
10
9
 
11
- import { pluginKey } from '../pm-plugins/plugin-key';
12
-
13
10
  export const isIsolating = (node: PmNode): boolean => {
14
11
  return !!node.type.spec.isolating;
15
12
  };
@@ -63,26 +60,6 @@ export const checkIfNumberColumnEnabled = (selection: Selection): boolean =>
63
60
  false,
64
61
  );
65
62
 
66
- export const isLayoutSupported = (state: EditorState): boolean => {
67
- const { permittedLayouts } = pluginKey.getState(state)?.pluginConfig || {};
68
- const { bodiedExtension, layoutSection, expand, extensionFrame } =
69
- state.schema.nodes;
70
-
71
- return (
72
- !hasParentNodeOfType([
73
- expand,
74
- layoutSection,
75
- bodiedExtension,
76
- extensionFrame,
77
- ])(state.selection) &&
78
- !!permittedLayouts &&
79
- (permittedLayouts === 'all' ||
80
- (permittedLayouts.indexOf('default') > -1 &&
81
- permittedLayouts.indexOf('wide') > -1 &&
82
- permittedLayouts.indexOf('full-width') > -1))
83
- );
84
- };
85
-
86
63
  export const getTableWidth = (node: PmNode) => {
87
64
  return getTableWidths(node).reduce((acc, current) => acc + current, 0);
88
65
  };