@atlaskit/editor-plugin-table 7.16.14 → 7.16.16

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 (158) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/commands/column-resize.js +6 -3
  3. package/dist/cjs/commands/delete.js +2 -1
  4. package/dist/cjs/commands/insert.js +8 -5
  5. package/dist/cjs/commands-with-analytics.js +6 -4
  6. package/dist/cjs/event-handlers.js +2 -1
  7. package/dist/cjs/nodeviews/TableComponent.js +21 -10
  8. package/dist/cjs/nodeviews/TableContainer.js +7 -3
  9. package/dist/cjs/nodeviews/TableResizer.js +3 -2
  10. package/dist/cjs/plugin.js +4 -3
  11. package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +4 -2
  12. package/dist/cjs/pm-plugins/keymap.js +5 -4
  13. package/dist/cjs/pm-plugins/main.js +2 -2
  14. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +12 -7
  15. package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +6 -5
  16. package/dist/cjs/pm-plugins/table-resizing/utils/consts.js +2 -1
  17. package/dist/cjs/pm-plugins/table-resizing/utils/index.js +6 -0
  18. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +6 -4
  19. package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +5 -3
  20. package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +13 -8
  21. package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +17 -9
  22. package/dist/cjs/toolbar.js +7 -4
  23. package/dist/cjs/transforms/column-width.js +3 -1
  24. package/dist/cjs/transforms/delete-columns.js +2 -1
  25. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +4 -2
  26. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +3 -2
  27. package/dist/cjs/ui/FloatingDragMenu/index.js +4 -1
  28. package/dist/cjs/ui/FloatingInsertButton/index.js +3 -1
  29. package/dist/cjs/ui/TableFloatingControls/index.js +2 -2
  30. package/dist/cjs/utils/drag-menu.js +2 -1
  31. package/dist/es2019/commands/column-resize.js +6 -3
  32. package/dist/es2019/commands/delete.js +2 -2
  33. package/dist/es2019/commands/insert.js +8 -8
  34. package/dist/es2019/commands-with-analytics.js +6 -6
  35. package/dist/es2019/event-handlers.js +2 -2
  36. package/dist/es2019/nodeviews/TableComponent.js +21 -10
  37. package/dist/es2019/nodeviews/TableContainer.js +7 -3
  38. package/dist/es2019/nodeviews/TableResizer.js +3 -2
  39. package/dist/es2019/plugin.js +4 -3
  40. package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +4 -2
  41. package/dist/es2019/pm-plugins/keymap.js +5 -5
  42. package/dist/es2019/pm-plugins/main.js +2 -2
  43. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +12 -7
  44. package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +6 -6
  45. package/dist/es2019/pm-plugins/table-resizing/utils/consts.js +1 -0
  46. package/dist/es2019/pm-plugins/table-resizing/utils/index.js +1 -1
  47. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +7 -5
  48. package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +5 -5
  49. package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +12 -8
  50. package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +17 -12
  51. package/dist/es2019/toolbar.js +7 -7
  52. package/dist/es2019/transforms/column-width.js +3 -2
  53. package/dist/es2019/transforms/delete-columns.js +2 -2
  54. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +4 -2
  55. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +3 -2
  56. package/dist/es2019/ui/FloatingDragMenu/index.js +4 -1
  57. package/dist/es2019/ui/FloatingInsertButton/index.js +3 -1
  58. package/dist/es2019/ui/TableFloatingControls/index.js +2 -2
  59. package/dist/es2019/utils/drag-menu.js +2 -2
  60. package/dist/esm/commands/column-resize.js +6 -3
  61. package/dist/esm/commands/delete.js +2 -1
  62. package/dist/esm/commands/insert.js +8 -5
  63. package/dist/esm/commands-with-analytics.js +6 -4
  64. package/dist/esm/event-handlers.js +2 -1
  65. package/dist/esm/nodeviews/TableComponent.js +21 -10
  66. package/dist/esm/nodeviews/TableContainer.js +7 -3
  67. package/dist/esm/nodeviews/TableResizer.js +3 -2
  68. package/dist/esm/plugin.js +4 -3
  69. package/dist/esm/pm-plugins/drag-and-drop/plugin.js +4 -2
  70. package/dist/esm/pm-plugins/keymap.js +5 -4
  71. package/dist/esm/pm-plugins/main.js +2 -2
  72. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +12 -7
  73. package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +6 -5
  74. package/dist/esm/pm-plugins/table-resizing/utils/consts.js +1 -0
  75. package/dist/esm/pm-plugins/table-resizing/utils/index.js +1 -1
  76. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +7 -5
  77. package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +5 -3
  78. package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +13 -8
  79. package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +17 -9
  80. package/dist/esm/toolbar.js +7 -4
  81. package/dist/esm/transforms/column-width.js +3 -1
  82. package/dist/esm/transforms/delete-columns.js +2 -1
  83. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +4 -2
  84. package/dist/esm/ui/FloatingDragMenu/DragMenu.js +3 -2
  85. package/dist/esm/ui/FloatingDragMenu/index.js +4 -1
  86. package/dist/esm/ui/FloatingInsertButton/index.js +3 -1
  87. package/dist/esm/ui/TableFloatingControls/index.js +2 -2
  88. package/dist/esm/utils/drag-menu.js +2 -1
  89. package/dist/types/commands/delete.d.ts +1 -1
  90. package/dist/types/commands/insert.d.ts +4 -4
  91. package/dist/types/commands-with-analytics.d.ts +3 -3
  92. package/dist/types/event-handlers.d.ts +1 -1
  93. package/dist/types/nodeviews/TableContainer.d.ts +4 -2
  94. package/dist/types/nodeviews/TableResizer.d.ts +2 -1
  95. package/dist/types/pm-plugins/keymap.d.ts +1 -1
  96. package/dist/types/pm-plugins/main.d.ts +1 -1
  97. package/dist/types/pm-plugins/table-resizing/utils/colgroup.d.ts +2 -2
  98. package/dist/types/pm-plugins/table-resizing/utils/consts.d.ts +1 -0
  99. package/dist/types/pm-plugins/table-resizing/utils/index.d.ts +1 -1
  100. package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +2 -2
  101. package/dist/types/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -2
  102. package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -2
  103. package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  104. package/dist/types/toolbar.d.ts +2 -2
  105. package/dist/types/transforms/column-width.d.ts +1 -1
  106. package/dist/types/transforms/delete-columns.d.ts +1 -1
  107. package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
  108. package/dist/types/utils/drag-menu.d.ts +1 -1
  109. package/dist/types-ts4.5/commands/delete.d.ts +1 -1
  110. package/dist/types-ts4.5/commands/insert.d.ts +4 -4
  111. package/dist/types-ts4.5/commands-with-analytics.d.ts +3 -3
  112. package/dist/types-ts4.5/event-handlers.d.ts +1 -1
  113. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
  114. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
  115. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
  116. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  117. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/colgroup.d.ts +2 -2
  118. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/consts.d.ts +1 -0
  119. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/index.d.ts +1 -1
  120. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +2 -2
  121. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -2
  122. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -2
  123. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  124. package/dist/types-ts4.5/toolbar.d.ts +2 -2
  125. package/dist/types-ts4.5/transforms/column-width.d.ts +1 -1
  126. package/dist/types-ts4.5/transforms/delete-columns.d.ts +1 -1
  127. package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
  128. package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
  129. package/package.json +8 -2
  130. package/src/commands/column-resize.ts +9 -3
  131. package/src/commands/delete.ts +2 -1
  132. package/src/commands/insert.ts +31 -12
  133. package/src/commands-with-analytics.ts +24 -8
  134. package/src/event-handlers.ts +2 -0
  135. package/src/nodeviews/TableComponent.tsx +41 -12
  136. package/src/nodeviews/TableContainer.tsx +6 -0
  137. package/src/nodeviews/TableResizer.tsx +4 -0
  138. package/src/plugin.tsx +9 -0
  139. package/src/pm-plugins/drag-and-drop/plugin.ts +13 -4
  140. package/src/pm-plugins/keymap.ts +17 -4
  141. package/src/pm-plugins/main.ts +2 -0
  142. package/src/pm-plugins/table-resizing/event-handlers.ts +21 -10
  143. package/src/pm-plugins/table-resizing/utils/colgroup.ts +14 -4
  144. package/src/pm-plugins/table-resizing/utils/consts.ts +1 -0
  145. package/src/pm-plugins/table-resizing/utils/index.ts +1 -0
  146. package/src/pm-plugins/table-resizing/utils/misc.ts +24 -5
  147. package/src/pm-plugins/table-resizing/utils/resize-column.ts +11 -4
  148. package/src/pm-plugins/table-resizing/utils/resize-state.ts +17 -6
  149. package/src/pm-plugins/table-resizing/utils/scale-table.ts +32 -9
  150. package/src/toolbar.tsx +15 -9
  151. package/src/transforms/column-width.ts +2 -1
  152. package/src/transforms/delete-columns.ts +11 -2
  153. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +12 -5
  154. package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -0
  155. package/src/ui/FloatingDragMenu/index.tsx +7 -0
  156. package/src/ui/FloatingInsertButton/index.tsx +7 -0
  157. package/src/ui/TableFloatingControls/index.tsx +18 -16
  158. package/src/utils/drag-menu.ts +2 -0
@@ -72,6 +72,7 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
72
72
  var _tableMap$height, _tableMap$height2, _tableMap$width, _tableMap$width2;
73
73
  var isTableScalingEnabled = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : false;
74
74
  var tableDuplicateCellColouring = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : false;
75
+ var shouldUseIncreasedScalingPercent = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : false;
75
76
  var addOptions = direction === 'row' ? [{
76
77
  label: 'above',
77
78
  offset: 0,
@@ -156,7 +157,7 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
156
157
  moveCursorToInsertedRow: true
157
158
  })(state, dispatch);
158
159
  } else {
159
- insertColumnWithAnalytics(editorAnalyticsAPI, isTableScalingEnabled, tableDuplicateCellColouring)(INPUT_METHOD.TABLE_CONTEXT_MENU, (index !== null && index !== void 0 ? index : 0) + offset)(state, dispatch, editorView);
160
+ insertColumnWithAnalytics(editorAnalyticsAPI, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent)(INPUT_METHOD.TABLE_CONTEXT_MENU, (index !== null && index !== void 0 ? index : 0) + offset)(state, dispatch, editorView);
160
161
  }
161
162
  return true;
162
163
  },
@@ -1,3 +1,3 @@
1
1
  import type { Command } from '@atlaskit/editor-common/types';
2
2
  import type { Rect } from '@atlaskit/editor-tables/table-map';
3
- export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean) => Command;
3
+ export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
@@ -3,10 +3,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
4
4
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
7
- export declare const addColumnBefore: (isTableScalingEnabled?: boolean) => Command;
8
- export declare const addColumnAfter: (isTableScalingEnabled?: boolean) => Command;
9
- export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean) => (column: number) => Command;
6
+ export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
7
+ export declare const addColumnBefore: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
8
+ export declare const addColumnAfter: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
9
+ export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
10
10
  export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean) => Command;
11
11
  export declare const createTable: (isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined | null) => Command;
12
12
  export declare const insertTableWithSize: (isFullWidthModeEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
@@ -15,10 +15,10 @@ export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalytics
15
15
  export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
16
16
  export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
17
17
  export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
18
- export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
18
+ export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
19
19
  export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect, isHeaderRowRequired: boolean) => Command;
20
- export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
21
- export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
20
+ export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
21
+ export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
22
22
  export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
23
23
  export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => Command;
24
24
  export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
@@ -12,7 +12,7 @@ export declare const handleMouseEnter: (view: EditorView, mouseEvent: Event) =>
12
12
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
13
13
  export declare const handleMouseMove: (view: EditorView, event: Event) => boolean;
14
14
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
15
- export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean) => Transaction;
15
+ export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
16
16
  export declare const isTableInFocus: (view: EditorView) => boolean;
17
17
  export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
18
18
  export declare const withCellTracking: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -29,8 +29,9 @@ type ResizableTableContainerProps = {
29
29
  isWholeTableInDanger?: boolean;
30
30
  isTableScalingEnabled?: boolean;
31
31
  isTableAlignmentEnabled?: boolean;
32
+ shouldUseIncreasedScalingPercent?: boolean;
32
33
  };
33
- export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
34
+ export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
34
35
  type TableContainerProps = {
35
36
  node: PMNode;
36
37
  className: string;
@@ -46,6 +47,7 @@ type TableContainerProps = {
46
47
  isTableResizingEnabled: boolean | undefined;
47
48
  isTableScalingEnabled?: boolean;
48
49
  isTableAlignmentEnabled?: boolean;
50
+ shouldUseIncreasedScalingPercent?: boolean;
49
51
  };
50
- export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
52
+ export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
51
53
  export {};
@@ -23,10 +23,11 @@ interface TableResizerProps {
23
23
  isTableAlignmentEnabled?: boolean;
24
24
  isWholeTableInDanger?: boolean;
25
25
  isFullWidthModeEnabled?: boolean;
26
+ shouldUseIncreasedScalingPercent?: boolean;
26
27
  }
27
28
  export interface TableResizerImprovementProps extends TableResizerProps {
28
29
  onResizeStop?: () => void;
29
30
  onResizeStart?: () => void;
30
31
  }
31
- export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
32
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
32
33
  export {};
@@ -3,5 +3,5 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
5
  import type { PluginInjectionAPIWithA11y } from '../types';
6
- export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape): SafePlugin;
6
+ export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
7
7
  export default keymapPlugin;
@@ -6,4 +6,4 @@ import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-pro
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
8
  import type { PluginConfig, PluginInjectionAPI } from '../types';
9
- export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean) => SafePlugin<import("../types").TablePluginState>;
9
+ export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => SafePlugin<import("../types").TablePluginState>;
@@ -9,8 +9,8 @@ type Col = Array<string | {
9
9
  * overflow.
10
10
  */
11
11
  export declare const getColWidthFix: (colwidth: number, tableColumnCount: number) => number;
12
- export declare const generateColgroup: (table: PmNode, tableRef?: HTMLElement) => Col[];
13
- export declare const insertColgroupFromNode: (tableRef: HTMLTableElement | null, table: PmNode, isTableScalingEnabled?: boolean, shouldRemove?: boolean) => HTMLCollection;
12
+ export declare const generateColgroup: (table: PmNode, tableRef?: HTMLElement, shouldUseIncreasedScalingPercent?: boolean) => Col[];
13
+ export declare const insertColgroupFromNode: (tableRef: HTMLTableElement | null, table: PmNode, isTableScalingEnabled?: boolean, shouldRemove?: boolean, shouldUseIncreasedScalingPercent?: boolean) => HTMLCollection;
14
14
  export declare const hasTableBeenResized: (table: PmNode) => boolean;
15
15
  /**
16
16
  * Check if a table has all the column width set to tableCellMinWidth(48px) or null
@@ -2,4 +2,5 @@ export declare const COLUMN_MIN_WIDTH = 48;
2
2
  export declare const TABLE_DEFAULT_WIDTH = 760;
3
3
  export declare const TABLE_MAX_WIDTH = 1800;
4
4
  export declare const MAX_SCALING_PERCENT = 0.3;
5
+ export declare const MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
5
6
  export declare const TABLE_EDITOR_MARGIN = 76;
@@ -10,4 +10,4 @@ export { scale, scaleWithParent, scaleTable, previewScaleTable } from './scale-t
10
10
  export type { ScaleOptions } from './scale-table';
11
11
  export type { ResizeState, ResizeStateWithAnalytics } from './types';
12
12
  export { resizeColumn, resizeColumnAndTable } from './resize-column';
13
- export { COLUMN_MIN_WIDTH, TABLE_MAX_WIDTH, TABLE_DEFAULT_WIDTH, MAX_SCALING_PERCENT, } from './consts';
13
+ export { COLUMN_MIN_WIDTH, TABLE_MAX_WIDTH, TABLE_DEFAULT_WIDTH, MAX_SCALING_PERCENT, MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION, } from './consts';
@@ -24,6 +24,6 @@ export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getE
24
24
  */
25
25
  export declare const getTableElementWidth: (table: PMNode) => number;
26
26
  export declare const getTableContainerElementWidth: (table: PMNode) => number;
27
- export declare const getTableScalingPercent: (table: PMNode, tableRef: HTMLElement | null) => number;
28
- export declare const getStaticTableScalingPercent: (table: PMNode, tableRenderWidth: number) => number;
27
+ export declare const getTableScalingPercent: (table: PMNode, tableRef: HTMLElement | null, shouldUseIncreasedScalingPercent?: boolean) => number;
28
+ export declare const getStaticTableScalingPercent: (table: PMNode, tableRenderWidth: number, shouldUseIncreasedScalingPercent?: boolean) => number;
29
29
  export {};
@@ -1,4 +1,4 @@
1
1
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ResizeState } from './types';
3
- export declare const resizeColumn: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement | null, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean) => ResizeState;
4
- export declare const resizeColumnAndTable: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, originalTableWidth?: number) => ResizeState;
3
+ export declare const resizeColumn: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement | null, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
4
+ export declare const resizeColumnAndTable: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, originalTableWidth?: number, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
@@ -3,7 +3,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { Rect } from '@atlaskit/editor-tables/table-map';
5
5
  import type { ResizeState, ResizeStateWithAnalytics } from './types';
6
- export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, }: {
6
+ export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, shouldUseIncreasedScalingPercent, }: {
7
7
  minWidth: number;
8
8
  maxSize: number;
9
9
  table: PMNode;
@@ -14,8 +14,9 @@ export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, star
14
14
  offset: number;
15
15
  };
16
16
  isTableScalingEnabled: boolean;
17
+ shouldUseIncreasedScalingPercent: boolean;
17
18
  }) => ResizeState;
18
- export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean) => void;
19
+ export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => void;
19
20
  export declare const getTotalWidth: ({ cols }: ResizeState) => number;
20
21
  export declare const adjustColumnsWidths: (resizeState: ResizeState, maxSize: number) => ResizeState;
21
22
  export declare const evenAllColumnsWidths: (resizeState: ResizeState) => ResizeState;
@@ -13,8 +13,8 @@ export interface ScaleOptions {
13
13
  isFullWidthModeEnabled?: boolean;
14
14
  isTableResizingEnabled?: boolean;
15
15
  }
16
- export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => ResizeState | undefined;
17
- export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => ResizeState;
16
+ export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState | undefined;
17
+ export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
18
18
  export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
19
19
  export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean) => void;
20
- export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => (tr: Transaction) => Transaction;
20
+ export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
@@ -8,10 +8,10 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
8
8
  import type { TablePluginOptions } from './plugin';
9
9
  import type { AlignmentOptions, PluginConfig, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
10
10
  export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarItem<Command>;
11
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => FloatingToolbarDropdown<Command>;
11
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
12
12
  export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
13
13
  export declare const getClosestSelectionOrTableRect: (state: EditorState) => Rect | undefined;
14
- export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions) => (config: PluginConfig) => FloatingToolbarHandler;
14
+ export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
15
15
  export declare const getLockBtnConfig: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
16
16
  export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => Command;
17
17
  type AlignmentIcon = {
@@ -21,4 +21,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
21
21
  * @param view
22
22
  * @returns Updated transaction with rescaled columns for a given table
23
23
  */
24
- export declare const rescaleColumns: (isTableScalingEnabled?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
24
+ export declare const rescaleColumns: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
@@ -1,4 +1,4 @@
1
1
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { Rect } from '@atlaskit/editor-tables/table-map';
4
- export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean) => (tr: Transaction) => Transaction;
4
+ export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
@@ -26,8 +26,9 @@ type DragMenuProps = {
26
26
  scrollableElement?: HTMLElement;
27
27
  isTableScalingEnabled?: boolean;
28
28
  tableDuplicateCellColouring?: boolean;
29
+ shouldUseIncreasedScalingPercent?: boolean;
29
30
  };
30
- export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
31
+ export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
31
32
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
32
33
  WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
33
34
  };
@@ -13,4 +13,4 @@ export interface DragMenuConfig extends DropdownOptionT<Command> {
13
13
  icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
14
14
  keymap?: string;
15
15
  }
16
- export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean) => DragMenuConfig[];
16
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
@@ -1,3 +1,3 @@
1
1
  import type { Command } from '@atlaskit/editor-common/types';
2
2
  import type { Rect } from '@atlaskit/editor-tables/table-map';
3
- export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean) => Command;
3
+ export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
@@ -3,10 +3,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
4
4
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
7
- export declare const addColumnBefore: (isTableScalingEnabled?: boolean) => Command;
8
- export declare const addColumnAfter: (isTableScalingEnabled?: boolean) => Command;
9
- export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean) => (column: number) => Command;
6
+ export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
7
+ export declare const addColumnBefore: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
8
+ export declare const addColumnAfter: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
9
+ export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
10
10
  export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean) => Command;
11
11
  export declare const createTable: (isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined | null) => Command;
12
12
  export declare const insertTableWithSize: (isFullWidthModeEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
@@ -15,10 +15,10 @@ export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalytics
15
15
  export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
16
16
  export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
17
17
  export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
18
- export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
18
+ export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
19
19
  export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect, isHeaderRowRequired: boolean) => Command;
20
- export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
21
- export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
20
+ export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
21
+ export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
22
22
  export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
23
23
  export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => Command;
24
24
  export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
@@ -12,7 +12,7 @@ export declare const handleMouseEnter: (view: EditorView, mouseEvent: Event) =>
12
12
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
13
13
  export declare const handleMouseMove: (view: EditorView, event: Event) => boolean;
14
14
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
15
- export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean) => Transaction;
15
+ export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
16
16
  export declare const isTableInFocus: (view: EditorView) => boolean;
17
17
  export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
18
18
  export declare const withCellTracking: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -29,8 +29,9 @@ type ResizableTableContainerProps = {
29
29
  isWholeTableInDanger?: boolean;
30
30
  isTableScalingEnabled?: boolean;
31
31
  isTableAlignmentEnabled?: boolean;
32
+ shouldUseIncreasedScalingPercent?: boolean;
32
33
  };
33
- export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
34
+ export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
34
35
  type TableContainerProps = {
35
36
  node: PMNode;
36
37
  className: string;
@@ -46,6 +47,7 @@ type TableContainerProps = {
46
47
  isTableResizingEnabled: boolean | undefined;
47
48
  isTableScalingEnabled?: boolean;
48
49
  isTableAlignmentEnabled?: boolean;
50
+ shouldUseIncreasedScalingPercent?: boolean;
49
51
  };
50
- export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
52
+ export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
51
53
  export {};
@@ -23,10 +23,11 @@ interface TableResizerProps {
23
23
  isTableAlignmentEnabled?: boolean;
24
24
  isWholeTableInDanger?: boolean;
25
25
  isFullWidthModeEnabled?: boolean;
26
+ shouldUseIncreasedScalingPercent?: boolean;
26
27
  }
27
28
  export interface TableResizerImprovementProps extends TableResizerProps {
28
29
  onResizeStop?: () => void;
29
30
  onResizeStart?: () => void;
30
31
  }
31
- export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
32
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
32
33
  export {};
@@ -3,5 +3,5 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
5
  import type { PluginInjectionAPIWithA11y } from '../types';
6
- export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape): SafePlugin;
6
+ export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
7
7
  export default keymapPlugin;
@@ -6,4 +6,4 @@ import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-pro
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
8
  import type { PluginConfig, PluginInjectionAPI } from '../types';
9
- export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean) => SafePlugin<import("../types").TablePluginState>;
9
+ export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => SafePlugin<import("../types").TablePluginState>;
@@ -9,8 +9,8 @@ type Col = Array<string | {
9
9
  * overflow.
10
10
  */
11
11
  export declare const getColWidthFix: (colwidth: number, tableColumnCount: number) => number;
12
- export declare const generateColgroup: (table: PmNode, tableRef?: HTMLElement) => Col[];
13
- export declare const insertColgroupFromNode: (tableRef: HTMLTableElement | null, table: PmNode, isTableScalingEnabled?: boolean, shouldRemove?: boolean) => HTMLCollection;
12
+ export declare const generateColgroup: (table: PmNode, tableRef?: HTMLElement, shouldUseIncreasedScalingPercent?: boolean) => Col[];
13
+ export declare const insertColgroupFromNode: (tableRef: HTMLTableElement | null, table: PmNode, isTableScalingEnabled?: boolean, shouldRemove?: boolean, shouldUseIncreasedScalingPercent?: boolean) => HTMLCollection;
14
14
  export declare const hasTableBeenResized: (table: PmNode) => boolean;
15
15
  /**
16
16
  * Check if a table has all the column width set to tableCellMinWidth(48px) or null
@@ -2,4 +2,5 @@ export declare const COLUMN_MIN_WIDTH = 48;
2
2
  export declare const TABLE_DEFAULT_WIDTH = 760;
3
3
  export declare const TABLE_MAX_WIDTH = 1800;
4
4
  export declare const MAX_SCALING_PERCENT = 0.3;
5
+ export declare const MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
5
6
  export declare const TABLE_EDITOR_MARGIN = 76;
@@ -10,4 +10,4 @@ export { scale, scaleWithParent, scaleTable, previewScaleTable } from './scale-t
10
10
  export type { ScaleOptions } from './scale-table';
11
11
  export type { ResizeState, ResizeStateWithAnalytics } from './types';
12
12
  export { resizeColumn, resizeColumnAndTable } from './resize-column';
13
- export { COLUMN_MIN_WIDTH, TABLE_MAX_WIDTH, TABLE_DEFAULT_WIDTH, MAX_SCALING_PERCENT, } from './consts';
13
+ export { COLUMN_MIN_WIDTH, TABLE_MAX_WIDTH, TABLE_DEFAULT_WIDTH, MAX_SCALING_PERCENT, MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION, } from './consts';
@@ -24,6 +24,6 @@ export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getE
24
24
  */
25
25
  export declare const getTableElementWidth: (table: PMNode) => number;
26
26
  export declare const getTableContainerElementWidth: (table: PMNode) => number;
27
- export declare const getTableScalingPercent: (table: PMNode, tableRef: HTMLElement | null) => number;
28
- export declare const getStaticTableScalingPercent: (table: PMNode, tableRenderWidth: number) => number;
27
+ export declare const getTableScalingPercent: (table: PMNode, tableRef: HTMLElement | null, shouldUseIncreasedScalingPercent?: boolean) => number;
28
+ export declare const getStaticTableScalingPercent: (table: PMNode, tableRenderWidth: number, shouldUseIncreasedScalingPercent?: boolean) => number;
29
29
  export {};
@@ -1,4 +1,4 @@
1
1
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ResizeState } from './types';
3
- export declare const resizeColumn: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement | null, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean) => ResizeState;
4
- export declare const resizeColumnAndTable: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, originalTableWidth?: number) => ResizeState;
3
+ export declare const resizeColumn: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement | null, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
4
+ export declare const resizeColumnAndTable: (resizeState: ResizeState, colIndex: number, amount: number, tableRef: HTMLElement, tableNode: PmNode, selectedColumns?: number[], isTableScalingEnabled?: boolean, originalTableWidth?: number, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
@@ -3,7 +3,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { Rect } from '@atlaskit/editor-tables/table-map';
5
5
  import type { ResizeState, ResizeStateWithAnalytics } from './types';
6
- export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, }: {
6
+ export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, shouldUseIncreasedScalingPercent, }: {
7
7
  minWidth: number;
8
8
  maxSize: number;
9
9
  table: PMNode;
@@ -14,8 +14,9 @@ export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, star
14
14
  offset: number;
15
15
  };
16
16
  isTableScalingEnabled: boolean;
17
+ shouldUseIncreasedScalingPercent: boolean;
17
18
  }) => ResizeState;
18
- export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean) => void;
19
+ export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => void;
19
20
  export declare const getTotalWidth: ({ cols }: ResizeState) => number;
20
21
  export declare const adjustColumnsWidths: (resizeState: ResizeState, maxSize: number) => ResizeState;
21
22
  export declare const evenAllColumnsWidths: (resizeState: ResizeState) => ResizeState;
@@ -13,8 +13,8 @@ export interface ScaleOptions {
13
13
  isFullWidthModeEnabled?: boolean;
14
14
  isTableResizingEnabled?: boolean;
15
15
  }
16
- export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => ResizeState | undefined;
17
- export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => ResizeState;
16
+ export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState | undefined;
17
+ export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
18
18
  export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
19
19
  export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean) => void;
20
- export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean) => (tr: Transaction) => Transaction;
20
+ export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
@@ -8,10 +8,10 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
8
8
  import type { TablePluginOptions } from './plugin';
9
9
  import type { AlignmentOptions, PluginConfig, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
10
10
  export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarItem<Command>;
11
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => FloatingToolbarDropdown<Command>;
11
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
12
12
  export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
13
13
  export declare const getClosestSelectionOrTableRect: (state: EditorState) => Rect | undefined;
14
- export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions) => (config: PluginConfig) => FloatingToolbarHandler;
14
+ export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
15
15
  export declare const getLockBtnConfig: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
16
16
  export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => Command;
17
17
  type AlignmentIcon = {
@@ -21,4 +21,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
21
21
  * @param view
22
22
  * @returns Updated transaction with rescaled columns for a given table
23
23
  */
24
- export declare const rescaleColumns: (isTableScalingEnabled?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
24
+ export declare const rescaleColumns: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
@@ -1,4 +1,4 @@
1
1
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { Rect } from '@atlaskit/editor-tables/table-map';
4
- export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean) => (tr: Transaction) => Transaction;
4
+ export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
@@ -26,8 +26,9 @@ type DragMenuProps = {
26
26
  scrollableElement?: HTMLElement;
27
27
  isTableScalingEnabled?: boolean;
28
28
  tableDuplicateCellColouring?: boolean;
29
+ shouldUseIncreasedScalingPercent?: boolean;
29
30
  };
30
- export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
31
+ export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
31
32
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
32
33
  WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
33
34
  };
@@ -13,4 +13,4 @@ export interface DragMenuConfig extends DropdownOptionT<Command> {
13
13
  icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
14
14
  keymap?: string;
15
15
  }
16
- export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean) => DragMenuConfig[];
16
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.16.14",
3
+ "version": "7.16.16",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/pragmatic-drag-and-drop": "^1.1.0",
50
50
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.3.0",
51
51
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
52
- "@atlaskit/primitives": "^6.4.0",
52
+ "@atlaskit/primitives": "^6.5.0",
53
53
  "@atlaskit/theme": "^12.8.0",
54
54
  "@atlaskit/toggle": "^13.1.0",
55
55
  "@atlaskit/tokens": "^1.49.0",
@@ -132,6 +132,9 @@
132
132
  "platform.editor.table.colum-resizing-improvements": {
133
133
  "type": "boolean"
134
134
  },
135
+ "platform.editor.table.use-increased-scaling-percent": {
136
+ "type": "boolean"
137
+ },
135
138
  "platform.editor.explicit-html-element-check": {
136
139
  "type": "boolean"
137
140
  },
@@ -140,6 +143,9 @@
140
143
  },
141
144
  "platform.editor.table.editor-num-col-style-changes": {
142
145
  "type": "boolean"
146
+ },
147
+ "platform.editor.drag-and-drop_wmv9t": {
148
+ "type": "boolean"
143
149
  }
144
150
  }
145
151
  }
@@ -326,13 +326,17 @@ export const changeColumnWidthByStep =
326
326
  });
327
327
 
328
328
  let isTableScalingEnabledOnCurrentTable = isTableScalingEnabled;
329
- if (
329
+ const isTableScalingEnabledWithLockButton =
330
330
  isTableScalingEnabled &&
331
- getBooleanFF('platform.editor.table.preserve-widths-with-lock-button')
332
- ) {
331
+ getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
332
+ if (isTableScalingEnabledWithLockButton) {
333
333
  isTableScalingEnabledOnCurrentTable = originalTable.attrs.displayMode !== 'fixed';
334
334
  }
335
335
 
336
+ const shouldUseIncreasedScalingPercent =
337
+ isTableScalingEnabledWithLockButton &&
338
+ getBooleanFF('platform.editor.table.use-increased-scaling-percent');
339
+
336
340
  const initialResizeState = getResizeState({
337
341
  minWidth: tableCellMinWidth,
338
342
  maxSize,
@@ -341,6 +345,7 @@ export const changeColumnWidthByStep =
341
345
  start: tableStartPosition,
342
346
  domAtPos,
343
347
  isTableScalingEnabled: isTableScalingEnabledOnCurrentTable,
348
+ shouldUseIncreasedScalingPercent,
344
349
  });
345
350
 
346
351
  updateControls()(state);
@@ -358,6 +363,7 @@ export const changeColumnWidthByStep =
358
363
  originalTable,
359
364
  resizingSelectedColumns ? selectedColumns : undefined,
360
365
  isTableScalingEnabled,
366
+ shouldUseIncreasedScalingPercent,
361
367
  );
362
368
 
363
369
  customTr = updateColumnWidths(newResizeState, originalTable, tableStartPosition)(customTr);