@atlaskit/editor-plugin-table 7.31.2 → 7.31.3

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 (54) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/commands/insert.js +16 -19
  3. package/dist/cjs/commands-with-analytics.js +5 -7
  4. package/dist/cjs/plugin.js +2 -3
  5. package/dist/cjs/pm-plugins/keymap.js +9 -10
  6. package/dist/cjs/toolbar.js +9 -12
  7. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
  8. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +1 -2
  9. package/dist/cjs/ui/FloatingDragMenu/index.js +2 -4
  10. package/dist/cjs/ui/FloatingInsertButton/index.js +3 -7
  11. package/dist/cjs/utils/drag-menu.js +6 -7
  12. package/dist/es2019/commands/insert.js +10 -10
  13. package/dist/es2019/commands-with-analytics.js +4 -4
  14. package/dist/es2019/plugin.js +2 -3
  15. package/dist/es2019/pm-plugins/keymap.js +5 -5
  16. package/dist/es2019/toolbar.js +5 -6
  17. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +2 -3
  18. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +1 -2
  19. package/dist/es2019/ui/FloatingDragMenu/index.js +2 -3
  20. package/dist/es2019/ui/FloatingInsertButton/index.js +3 -6
  21. package/dist/es2019/utils/drag-menu.js +3 -3
  22. package/dist/esm/commands/insert.js +16 -19
  23. package/dist/esm/commands-with-analytics.js +5 -7
  24. package/dist/esm/plugin.js +2 -3
  25. package/dist/esm/pm-plugins/keymap.js +9 -10
  26. package/dist/esm/toolbar.js +9 -12
  27. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
  28. package/dist/esm/ui/FloatingDragMenu/DragMenu.js +1 -2
  29. package/dist/esm/ui/FloatingDragMenu/index.js +2 -4
  30. package/dist/esm/ui/FloatingInsertButton/index.js +3 -7
  31. package/dist/esm/utils/drag-menu.js +6 -7
  32. package/dist/types/commands/insert.d.ts +5 -5
  33. package/dist/types/commands-with-analytics.d.ts +3 -4
  34. package/dist/types/pm-plugins/keymap.d.ts +1 -1
  35. package/dist/types/toolbar.d.ts +1 -1
  36. package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +0 -1
  37. package/dist/types/utils/drag-menu.d.ts +1 -1
  38. package/dist/types-ts4.5/commands/insert.d.ts +5 -5
  39. package/dist/types-ts4.5/commands-with-analytics.d.ts +3 -4
  40. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
  41. package/dist/types-ts4.5/toolbar.d.ts +1 -1
  42. package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +0 -1
  43. package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
  44. package/package.json +3 -3
  45. package/src/commands/insert.ts +3 -10
  46. package/src/commands-with-analytics.ts +7 -8
  47. package/src/plugin.tsx +0 -4
  48. package/src/pm-plugins/keymap.ts +0 -5
  49. package/src/toolbar.tsx +0 -8
  50. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +7 -10
  51. package/src/ui/FloatingDragMenu/DragMenu.tsx +0 -3
  52. package/src/ui/FloatingDragMenu/index.tsx +1 -3
  53. package/src/ui/FloatingInsertButton/index.tsx +5 -10
  54. package/src/utils/drag-menu.ts +4 -9
@@ -1,9 +1,8 @@
1
1
  import type { IntlShape } from 'react-intl-next/src/types';
2
2
  import type { TableLayout } from '@atlaskit/adf-schema';
3
3
  import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
4
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ import type { CHANGE_ALIGNMENT_REASON, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
5
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { type CHANGE_ALIGNMENT_REASON } from '@atlaskit/editor-common/analytics';
7
6
  import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
8
7
  import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
9
8
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -15,9 +14,9 @@ export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyti
15
14
  export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
16
15
  export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, cellColor: string, editorView?: EditorView | null) => Command;
17
16
  export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
18
- export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
17
+ export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
19
18
  export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, isCommentEditor: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
20
- export declare const insertColumnWithAnalytics: (api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: 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
+ export declare const insertColumnWithAnalytics: (api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
21
20
  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;
22
21
  export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
23
22
  export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
@@ -4,5 +4,5 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
4
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
6
  import type { PluginInjectionAPI, PluginInjectionAPIWithA11y } from '../types';
7
- export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, nodeViewPortalProviderAPI: PortalProviderAPI, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, isTableResizingEnabled?: boolean): SafePlugin;
7
+ export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, nodeViewPortalProviderAPI: PortalProviderAPI, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, isTableResizingEnabled?: boolean): SafePlugin;
8
8
  export default keymapPlugin;
@@ -6,6 +6,6 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
6
6
  import type { TablePluginOptions } from './plugin';
7
7
  import type { PluginConfig, PluginInjectionAPI, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
8
8
  export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingWithFixedColumnWidthsOptionShown?: boolean, areTableColumnWidthsFixed?: boolean) => FloatingToolbarItem<Command>;
9
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => FloatingToolbarDropdown<Command>;
9
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => FloatingToolbarDropdown<Command>;
10
10
  export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
11
11
  export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
@@ -29,7 +29,6 @@ type DragMenuProps = {
29
29
  boundariesElement?: HTMLElement;
30
30
  scrollableElement?: HTMLElement;
31
31
  isTableScalingEnabled?: boolean;
32
- tableDuplicateCellColouring?: boolean;
33
32
  shouldUseIncreasedScalingPercent?: boolean;
34
33
  isTableFixedColumnWidthsOptionEnabled?: boolean;
35
34
  ariaNotifyPlugin?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
@@ -16,4 +16,4 @@ export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
16
16
  iconFallback?: React.ComponentType<React.PropsWithChildren<UNSAFE_NewIconProps>>;
17
17
  keymap?: string;
18
18
  }
19
- export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, isCommentEditor?: boolean) => DragMenuConfig[];
19
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, isCommentEditor?: boolean) => DragMenuConfig[];
@@ -4,10 +4,10 @@ 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
6
  import type { PluginInjectionAPI } from '../types';
7
- export declare function addColumnAt(api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
8
- export declare const addColumnBefore: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
9
- export declare const addColumnAfter: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
10
- export declare const insertColumn: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (column: number) => Command;
11
- export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean) => Command;
7
+ export declare function addColumnAt(api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
8
+ export declare const addColumnBefore: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
9
+ export declare const addColumnAfter: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
10
+ export declare const insertColumn: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (column: number) => Command;
11
+ export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean) => Command;
12
12
  export declare const createTable: (isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined | null, isCommentEditor?: boolean, isChromelessEditor?: boolean, isTableResizingEnabled?: boolean) => Command;
13
13
  export declare const insertTableWithSize: (isFullWidthModeEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, isCommentEditor?: boolean, isChromelessEditor?: boolean) => (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
@@ -1,9 +1,8 @@
1
1
  import type { IntlShape } from 'react-intl-next/src/types';
2
2
  import type { TableLayout } from '@atlaskit/adf-schema';
3
3
  import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
4
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ import type { CHANGE_ALIGNMENT_REASON, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
5
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { type CHANGE_ALIGNMENT_REASON } from '@atlaskit/editor-common/analytics';
7
6
  import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
8
7
  import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
9
8
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -15,9 +14,9 @@ export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyti
15
14
  export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
16
15
  export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, cellColor: string, editorView?: EditorView | null) => Command;
17
16
  export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
18
- export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
17
+ export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
19
18
  export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, isCommentEditor: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
20
- export declare const insertColumnWithAnalytics: (api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: 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
+ export declare const insertColumnWithAnalytics: (api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
21
20
  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;
22
21
  export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
23
22
  export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
@@ -4,5 +4,5 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
4
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
6
  import type { PluginInjectionAPI, PluginInjectionAPIWithA11y } from '../types';
7
- export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, nodeViewPortalProviderAPI: PortalProviderAPI, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, isTableResizingEnabled?: boolean): SafePlugin;
7
+ export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, nodeViewPortalProviderAPI: PortalProviderAPI, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, isTableResizingEnabled?: boolean): SafePlugin;
8
8
  export default keymapPlugin;
@@ -6,6 +6,6 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
6
6
  import type { TablePluginOptions } from './plugin';
7
7
  import type { PluginConfig, PluginInjectionAPI, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
8
8
  export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingWithFixedColumnWidthsOptionShown?: boolean, areTableColumnWidthsFixed?: boolean) => FloatingToolbarItem<Command>;
9
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => FloatingToolbarDropdown<Command>;
9
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => FloatingToolbarDropdown<Command>;
10
10
  export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
11
11
  export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
@@ -29,7 +29,6 @@ type DragMenuProps = {
29
29
  boundariesElement?: HTMLElement;
30
30
  scrollableElement?: HTMLElement;
31
31
  isTableScalingEnabled?: boolean;
32
- tableDuplicateCellColouring?: boolean;
33
32
  shouldUseIncreasedScalingPercent?: boolean;
34
33
  isTableFixedColumnWidthsOptionEnabled?: boolean;
35
34
  ariaNotifyPlugin?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
@@ -16,4 +16,4 @@ export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
16
16
  iconFallback?: React.ComponentType<React.PropsWithChildren<UNSAFE_NewIconProps>>;
17
17
  keymap?: string;
18
18
  }
19
- export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, isCommentEditor?: boolean) => DragMenuConfig[];
19
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, isCommentEditor?: boolean) => DragMenuConfig[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.31.2",
3
+ "version": "7.31.3",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/adf-schema": "^44.2.0",
31
31
  "@atlaskit/button": "^20.3.0",
32
32
  "@atlaskit/custom-steps": "^0.8.0",
33
- "@atlaskit/editor-common": "^94.22.0",
33
+ "@atlaskit/editor-common": "^94.23.0",
34
34
  "@atlaskit/editor-palette": "1.6.3",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
52
52
  "@atlaskit/primitives": "^13.2.0",
53
53
  "@atlaskit/theme": "^14.0.0",
54
- "@atlaskit/tmp-editor-statsig": "^2.17.0",
54
+ "@atlaskit/tmp-editor-statsig": "^2.19.0",
55
55
  "@atlaskit/toggle": "^13.4.0",
56
56
  "@atlaskit/tokens": "^2.2.0",
57
57
  "@atlaskit/tooltip": "^18.9.0",
@@ -42,7 +42,6 @@ function addColumnAtCustomStep(column: number) {
42
42
  export function addColumnAt(
43
43
  api: PluginInjectionAPI | undefined | null,
44
44
  isTableScalingEnabled = false,
45
- isCellBackgroundDuplicated?: boolean,
46
45
  isTableFixedColumnWidthsOptionEnabled?: boolean,
47
46
  shouldUseIncreasedScalingPercent?: boolean,
48
47
  isCommentEditor?: boolean,
@@ -57,7 +56,7 @@ export function addColumnAt(
57
56
  if (allowAddColumnCustomStep) {
58
57
  updatedTr = addColumnAtCustomStep(column)(updatedTr);
59
58
  } else {
60
- updatedTr = addColumnAtPMUtils(column, isCellBackgroundDuplicated)(updatedTr);
59
+ updatedTr = addColumnAtPMUtils(column)(updatedTr);
61
60
  }
62
61
  const table = findTable(updatedTr.selection);
63
62
  if (table) {
@@ -96,7 +95,6 @@ export const addColumnBefore =
96
95
  (
97
96
  api: PluginInjectionAPI | undefined | null,
98
97
  isTableScalingEnabled = false,
99
- isCellBackgroundDuplicated = false,
100
98
  isTableFixedColumnWidthsOptionEnabled = false,
101
99
  shouldUseIncreasedScalingPercent = false,
102
100
  isCommentEditor = false,
@@ -112,7 +110,6 @@ export const addColumnBefore =
112
110
  addColumnAt(
113
111
  api,
114
112
  isTableScalingEnabled,
115
- isCellBackgroundDuplicated,
116
113
  isTableFixedColumnWidthsOptionEnabled,
117
114
  shouldUseIncreasedScalingPercent,
118
115
  isCommentEditor,
@@ -132,7 +129,6 @@ export const addColumnAfter =
132
129
  (
133
130
  api: PluginInjectionAPI | undefined | null,
134
131
  isTableScalingEnabled?: boolean,
135
- isCellBackgroundDuplicated?: boolean,
136
132
  isTableFixedColumnWidthsOptionEnabled?: boolean,
137
133
  shouldUseIncreasedScalingPercent?: boolean,
138
134
  isCommentEditor?: boolean,
@@ -149,7 +145,6 @@ export const addColumnAfter =
149
145
  addColumnAt(
150
146
  api,
151
147
  isTableScalingEnabled,
152
- isCellBackgroundDuplicated,
153
148
  isTableFixedColumnWidthsOptionEnabled,
154
149
  shouldUseIncreasedScalingPercent,
155
150
  isCommentEditor,
@@ -167,7 +162,6 @@ export const insertColumn =
167
162
  (
168
163
  api: PluginInjectionAPI | undefined | null,
169
164
  isTableScalingEnabled = false,
170
- isCellBackgroundDuplicated?: boolean,
171
165
  isTableFixedColumnWidthsOptionEnabled?: boolean,
172
166
  shouldUseIncreasedScalingPercent?: boolean,
173
167
  isCommentEditor?: boolean,
@@ -177,7 +171,6 @@ export const insertColumn =
177
171
  let tr = addColumnAt(
178
172
  api,
179
173
  isTableScalingEnabled,
180
- isCellBackgroundDuplicated,
181
174
  isTableFixedColumnWidthsOptionEnabled,
182
175
  shouldUseIncreasedScalingPercent,
183
176
  isCommentEditor,
@@ -200,7 +193,7 @@ export const insertColumn =
200
193
  };
201
194
 
202
195
  export const insertRow =
203
- (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean): Command =>
196
+ (row: number, moveCursorToTheNewRow: boolean): Command =>
204
197
  (state, dispatch) => {
205
198
  // Don't clone the header row
206
199
  const headerRowEnabled = checkIfHeaderRowEnabled(state.selection);
@@ -214,7 +207,7 @@ export const insertRow =
214
207
 
215
208
  const tr = clonePreviousRow
216
209
  ? copyPreviousRow(state.schema)(row)(state.tr)
217
- : addRowAt(row, undefined, isCellBackgroundDuplicated)(state.tr);
210
+ : addRowAt(row, undefined)(state.tr);
218
211
 
219
212
  const table = findTable(tr.selection);
220
213
  if (!table) {
@@ -3,7 +3,11 @@ import type { IntlShape } from 'react-intl-next/src/types';
3
3
  import type { TableLayout } from '@atlaskit/adf-schema';
4
4
  import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
5
5
  import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
6
- import type { AnalyticsEventPayload, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
+ import type {
7
+ AnalyticsEventPayload,
8
+ CHANGE_ALIGNMENT_REASON,
9
+ EditorAnalyticsAPI,
10
+ } from '@atlaskit/editor-common/analytics';
7
11
  import {
8
12
  ACTION_SUBJECT,
9
13
  EVENT_TYPE,
@@ -11,7 +15,6 @@ import {
11
15
  TABLE_ACTION,
12
16
  TABLE_DISPLAY_MODE,
13
17
  } from '@atlaskit/editor-common/analytics';
14
- import { type CHANGE_ALIGNMENT_REASON } from '@atlaskit/editor-common/analytics';
15
18
  import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
16
19
  import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
17
20
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
@@ -199,7 +202,7 @@ export const addRowAroundSelection =
199
202
  };
200
203
 
201
204
  export const insertRowWithAnalytics =
202
- (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated = false) =>
205
+ (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
203
206
  (inputMethod: InsertRowMethods, options: InsertRowOptions) =>
204
207
  withEditorAnalyticsAPI((state) => {
205
208
  const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
@@ -215,9 +218,7 @@ export const insertRowWithAnalytics =
215
218
  },
216
219
  eventType: EVENT_TYPE.TRACK,
217
220
  };
218
- })(editorAnalyticsAPI)(
219
- insertRow(options.index, options.moveCursorToInsertedRow, isCellbackgroundDuplicated),
220
- );
221
+ })(editorAnalyticsAPI)(insertRow(options.index, options.moveCursorToInsertedRow));
221
222
 
222
223
  export const changeColumnWidthByStepWithAnalytics =
223
224
  (
@@ -272,7 +273,6 @@ export const insertColumnWithAnalytics =
272
273
  api: PluginInjectionAPI | undefined | null,
273
274
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
274
275
  isTableScalingEnabled = false,
275
- isCellbackgroundDuplicated = false,
276
276
  isTableFixedColumnWidthsOptionEnabled = false,
277
277
  shouldUseIncreasedScalingPercent = false,
278
278
  isCommentEditor = false,
@@ -304,7 +304,6 @@ export const insertColumnWithAnalytics =
304
304
  insertColumn(
305
305
  api,
306
306
  isTableScalingEnabled,
307
- isCellbackgroundDuplicated,
308
307
  isTableFixedColumnWidthsOptionEnabled,
309
308
  shouldUseIncreasedScalingPercent,
310
309
  isCommentEditor,
package/src/plugin.tsx CHANGED
@@ -188,9 +188,6 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
188
188
  // When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
189
189
  options?.isCommentEditor);
190
190
 
191
- const isCellBackgroundDuplicated =
192
- options?.getEditorFeatureFlags?.().tableDuplicateCellColouring || false;
193
-
194
191
  return {
195
192
  name: 'table',
196
193
 
@@ -435,7 +432,6 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
435
432
  fullWidthEnabled,
436
433
  api,
437
434
  getIntl,
438
- isCellBackgroundDuplicated,
439
435
  isTableFixedColumnWidthsOptionEnabled,
440
436
  shouldUseIncreasedScalingPercent,
441
437
  isCommentEditor,
@@ -68,7 +68,6 @@ export function keymapPlugin(
68
68
  isFullWidthEnabled?: boolean,
69
69
  pluginInjectionApi?: PluginInjectionAPIWithA11y,
70
70
  getIntl?: () => IntlShape,
71
- isCellBackgroundDuplicated = false,
72
71
  isTableFixedColumnWidthsOptionEnabled = false,
73
72
  shouldUseIncreasedScalingPercent?: boolean,
74
73
  isCommentEditor?: boolean,
@@ -130,7 +129,6 @@ export function keymapPlugin(
130
129
  addColumnBeforeCommand(
131
130
  api,
132
131
  isTableScalingEnabled,
133
- isCellBackgroundDuplicated,
134
132
  isTableFixedColumnWidthsOptionEnabled,
135
133
  shouldUseIncreasedScalingPercent,
136
134
  ),
@@ -142,7 +140,6 @@ export function keymapPlugin(
142
140
  addColumnAfterCommand(
143
141
  api,
144
142
  isTableScalingEnabled,
145
- isCellBackgroundDuplicated,
146
143
  isTableFixedColumnWidthsOptionEnabled,
147
144
  shouldUseIncreasedScalingPercent,
148
145
  ),
@@ -166,7 +163,6 @@ export function keymapPlugin(
166
163
  addColumnBeforeCommand(
167
164
  api,
168
165
  isTableScalingEnabled,
169
- isCellBackgroundDuplicated,
170
166
  isTableFixedColumnWidthsOptionEnabled,
171
167
  shouldUseIncreasedScalingPercent,
172
168
  ),
@@ -178,7 +174,6 @@ export function keymapPlugin(
178
174
  addColumnAfterCommand(
179
175
  api,
180
176
  isTableScalingEnabled,
181
- isCellBackgroundDuplicated,
182
177
  isTableFixedColumnWidthsOptionEnabled,
183
178
  shouldUseIncreasedScalingPercent,
184
179
  ),
package/src/toolbar.tsx CHANGED
@@ -206,7 +206,6 @@ export const getToolbarCellOptionsConfig = (
206
206
  api: PluginInjectionAPI | undefined | null,
207
207
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
208
208
  isTableScalingEnabled = false,
209
- isCellBackgroundDuplicated = false,
210
209
  isTableFixedColumnWidthsOptionEnabled = false,
211
210
  shouldUseIncreasedScalingPercent = false,
212
211
  isCommentEditor = false,
@@ -228,7 +227,6 @@ export const getToolbarCellOptionsConfig = (
228
227
  api,
229
228
  editorAnalyticsAPI,
230
229
  isTableScalingEnabled,
231
- isCellBackgroundDuplicated,
232
230
  isTableFixedColumnWidthsOptionEnabled,
233
231
  shouldUseIncreasedScalingPercent,
234
232
  isCommentEditor,
@@ -553,9 +551,6 @@ export const getToolbarConfig =
553
551
  )
554
552
  : [];
555
553
 
556
- const isCellBackgroundDuplicated =
557
- getEditorFeatureFlags().tableDuplicateCellColouring || false;
558
-
559
554
  const cellItems = pluginState.isDragAndDropEnabled
560
555
  ? []
561
556
  : getCellItems(
@@ -566,7 +561,6 @@ export const getToolbarConfig =
566
561
  api,
567
562
  editorAnalyticsAPI,
568
563
  isTableScalingEnabled,
569
- isCellBackgroundDuplicated,
570
564
  isTableFixedColumnWidthsOptionEnabled,
571
565
  shouldUseIncreasedScalingPercent,
572
566
  options?.isCommentEditor,
@@ -681,7 +675,6 @@ const getCellItems = (
681
675
  api: PluginInjectionAPI | undefined | null,
682
676
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
683
677
  isTableScalingEnabled = false,
684
- isCellBackgroundDuplicated = false,
685
678
  isTableFixedColumnWidthsOptionEnabled = false,
686
679
  shouldUseIncreasedScalingPercent = false,
687
680
  isCommentEditor = false,
@@ -697,7 +690,6 @@ const getCellItems = (
697
690
  api,
698
691
  editorAnalyticsAPI,
699
692
  isTableScalingEnabled,
700
- isCellBackgroundDuplicated,
701
693
  isTableFixedColumnWidthsOptionEnabled,
702
694
  shouldUseIncreasedScalingPercent,
703
695
  isCommentEditor,
@@ -653,8 +653,9 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
653
653
  const { state, dispatch } = editorView;
654
654
  const { targetCellPosition, isTableScalingEnabled = false } = getPluginState(state);
655
655
 
656
- const { tableDuplicateCellColouring = false, tableWithFixedColumnWidthsOption = false } =
657
- getEditorFeatureFlags ? getEditorFeatureFlags() : {};
656
+ const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags
657
+ ? getEditorFeatureFlags()
658
+ : {};
658
659
  // context menu opened by keyboard and any item except 'background' activated
659
660
  // or color has been chosen from color palette
660
661
  if (
@@ -735,7 +736,6 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
735
736
  this.props.api,
736
737
  editorAnalyticsAPI,
737
738
  isTableScalingEnabled,
738
- tableDuplicateCellColouring,
739
739
  tableWithFixedColumnWidthsOption,
740
740
  shouldUseIncreasedScalingPercent,
741
741
  isCommentEditor,
@@ -743,13 +743,10 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
743
743
  this.toggleOpen();
744
744
  break;
745
745
  case 'insert_row':
746
- insertRowWithAnalytics(editorAnalyticsAPI, tableDuplicateCellColouring)(
747
- INPUT_METHOD.CONTEXT_MENU,
748
- {
749
- index: selectionRect.bottom,
750
- moveCursorToInsertedRow: true,
751
- },
752
- )(state, dispatch);
746
+ insertRowWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.CONTEXT_MENU, {
747
+ index: selectionRect.bottom,
748
+ moveCursorToInsertedRow: true,
749
+ })(state, dispatch);
753
750
  this.toggleOpen();
754
751
  break;
755
752
  case 'delete_column':
@@ -90,7 +90,6 @@ type DragMenuProps = {
90
90
  boundariesElement?: HTMLElement;
91
91
  scrollableElement?: HTMLElement;
92
92
  isTableScalingEnabled?: boolean;
93
- tableDuplicateCellColouring?: boolean;
94
93
  shouldUseIncreasedScalingPercent?: boolean;
95
94
  isTableFixedColumnWidthsOptionEnabled?: boolean;
96
95
  ariaNotifyPlugin?: (
@@ -279,7 +278,6 @@ const DragMenu = React.memo(
279
278
  scrollableElement,
280
279
  boundariesElement,
281
280
  isTableScalingEnabled,
282
- tableDuplicateCellColouring,
283
281
  shouldUseIncreasedScalingPercent,
284
282
  isTableFixedColumnWidthsOptionEnabled,
285
283
  ariaNotifyPlugin,
@@ -311,7 +309,6 @@ const DragMenu = React.memo(
311
309
  editorAnalyticsAPI,
312
310
  pluginConfig?.isHeaderRowRequired,
313
311
  isTableScalingEnabled,
314
- tableDuplicateCellColouring,
315
312
  isTableFixedColumnWidthsOptionEnabled,
316
313
  shouldUseIncreasedScalingPercent,
317
314
  ariaNotifyPlugin,
@@ -79,8 +79,7 @@ const FloatingDragMenu = ({
79
79
  return null;
80
80
  }
81
81
 
82
- const { tableDuplicateCellColouring = false, tableWithFixedColumnWidthsOption = false } =
83
- getEditorFeatureFlags ? getEditorFeatureFlags() : {};
82
+ const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags?.() ?? {};
84
83
 
85
84
  const shouldUseIncreasedScalingPercent =
86
85
  isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
@@ -120,7 +119,6 @@ const FloatingDragMenu = ({
120
119
  boundariesElement={boundariesElement}
121
120
  scrollableElement={scrollableElement}
122
121
  isTableScalingEnabled={isTableScalingEnabled}
123
- tableDuplicateCellColouring={tableDuplicateCellColouring}
124
122
  shouldUseIncreasedScalingPercent={shouldUseIncreasedScalingPercent}
125
123
  isTableFixedColumnWidthsOptionEnabled={tableWithFixedColumnWidthsOption}
126
124
  ariaNotifyPlugin={ariaNotifyPlugin}
@@ -241,19 +241,14 @@ export class FloatingInsertButton extends React.Component<Props & WrappedCompone
241
241
  }
242
242
 
243
243
  private insertRow(event: React.SyntheticEvent) {
244
- const { editorView, insertRowButtonIndex, editorAnalyticsAPI, getEditorFeatureFlags } =
245
- this.props;
244
+ const { editorView, insertRowButtonIndex, editorAnalyticsAPI } = this.props;
246
245
 
247
246
  if (typeof insertRowButtonIndex !== 'undefined') {
248
247
  event.preventDefault();
249
248
 
250
249
  const { state, dispatch } = editorView;
251
- const featureFlags = !!getEditorFeatureFlags && getEditorFeatureFlags();
252
250
 
253
- insertRowWithAnalytics(
254
- editorAnalyticsAPI,
255
- featureFlags && featureFlags.tableDuplicateCellColouring,
256
- )(INPUT_METHOD.BUTTON, {
251
+ insertRowWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.BUTTON, {
257
252
  index: insertRowButtonIndex,
258
253
  moveCursorToInsertedRow: true,
259
254
  })(state, dispatch);
@@ -273,8 +268,9 @@ export class FloatingInsertButton extends React.Component<Props & WrappedCompone
273
268
  if (typeof insertColumnButtonIndex !== 'undefined') {
274
269
  event.preventDefault();
275
270
 
276
- const { tableDuplicateCellColouring = false, tableWithFixedColumnWidthsOption = false } =
277
- getEditorFeatureFlags ? getEditorFeatureFlags() : {};
271
+ const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags
272
+ ? getEditorFeatureFlags()
273
+ : {};
278
274
 
279
275
  const shouldUseIncreasedScalingPercent =
280
276
  isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
@@ -284,7 +280,6 @@ export class FloatingInsertButton extends React.Component<Props & WrappedCompone
284
280
  this.props.api,
285
281
  editorAnalyticsAPI,
286
282
  isTableScalingEnabled,
287
- tableDuplicateCellColouring,
288
283
  tableWithFixedColumnWidthsOption,
289
284
  shouldUseIncreasedScalingPercent,
290
285
  isCommentEditor,
@@ -162,7 +162,6 @@ export const getDragMenuConfig = (
162
162
  editorAnalyticsAPI?: EditorAnalyticsAPI,
163
163
  isHeaderRowRequired?: boolean,
164
164
  isTableScalingEnabled = false,
165
- tableDuplicateCellColouring = false,
166
165
  isTableFixedColumnWidthsOptionEnabled = false,
167
166
  shouldUseIncreasedScalingPercent = false,
168
167
  ariaNotifyPlugin?: (
@@ -291,19 +290,15 @@ export const getDragMenuConfig = (
291
290
  iconFallback: iconFallback,
292
291
  onClick: (state: EditorState, dispatch?: CommandDispatch) => {
293
292
  if (direction === 'row') {
294
- insertRowWithAnalytics(editorAnalyticsAPI, tableDuplicateCellColouring)(
295
- INPUT_METHOD.TABLE_CONTEXT_MENU,
296
- {
297
- index: (index ?? 0) + offset,
298
- moveCursorToInsertedRow: true,
299
- },
300
- )(state, dispatch);
293
+ insertRowWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.TABLE_CONTEXT_MENU, {
294
+ index: (index ?? 0) + offset,
295
+ moveCursorToInsertedRow: true,
296
+ })(state, dispatch);
301
297
  } else {
302
298
  insertColumnWithAnalytics(
303
299
  api,
304
300
  editorAnalyticsAPI,
305
301
  isTableScalingEnabled,
306
- tableDuplicateCellColouring,
307
302
  isTableFixedColumnWidthsOptionEnabled,
308
303
  shouldUseIncreasedScalingPercent,
309
304
  )(INPUT_METHOD.TABLE_CONTEXT_MENU, (index ?? 0) + offset)(state, dispatch, editorView);